A privacy information calculation method and correctness verification method for multi-center medical data
By using blockchain and zero-knowledge proofs in multi-center medical data training, the problem of verifying the training process and results is solved, data privacy protection and transaction credibility are achieved, and the accuracy of model training and data security are ensured.
Patent Information
- Application Number
- CN202411765129.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Existing federated learning technologies cannot trace and verify the training process and results in multi-center medical data training, which prevents the raw data from being used on a wide scale and poses a risk of data privacy leakage.
A blockchain-based privacy-preserving computation method is adopted. By sending model weights to computing nodes for training, global gradient values are generated and model weights are updated. Zero-knowledge proofs and hash values are used for data verification to ensure data privacy and the credibility of the training process.
It enables privacy-preserving computation of multi-center medical data, ensuring independence and data privacy among clients, verifying the completion of model training and the correctness of data delivery, and ensuring the credibility and security of data transactions.
Smart Images

Figure CN119249496B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of next-generation information technology, and in particular to a method for calculating privacy information and verifying the correctness of multi-center medical data. Background Technology
[0002] To design a machine learning framework that enables AI systems to more efficiently and accurately share their data while meeting data privacy, security, and regulatory requirements, federated learning technology has been proposed. Federated learning refers to multiple clients collaborating to solve machine learning problems under the coordination of a central server. During this process, each client's raw data is kept locally and not exchanged or transmitted. This technology maximizes data privacy and security because participants only need to transmit local model parameters, without sharing data. Furthermore, multi-party collaborative model training improves model performance more than training a model using only local datasets. However, when the central server and multiple clients are two or more parties in a transaction, the training process, results, and interaction outcomes cannot be traced and verified, preventing much of the local raw data from being used effectively on a broad scale. Summary of the Invention
[0003] In view of the above problems, the present invention is proposed to provide a technical solution that overcomes or at least partially solves the above problems.
[0004] This invention provides a method for calculating privacy information in multi-center medical data, for use by a task initiator. The method includes:
[0005] The current model weights for a specific task are sent to multiple computing nodes participating in the task execution, so that the computing nodes can use the model weights as their initial weights to train on local medical data and obtain updated single-node gradient values.
[0006] Receive multiple single-node gradient values and sum them to generate a global gradient value;
[0007] The model weights for the task are updated based on the global gradient values.
[0008] Optionally, the method further 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 for the next round of training on local privacy medical data, until the model is determined to have converged.
[0009] Optionally, the method further includes: upon model convergence, notifying the computing nodes to generate a first zero-knowledge proof for the task based on the single-node gradient values of the last round, and submitting it to the blockchain.
[0010] Optionally, the method further includes: generating a global weight hash value based on the model weights and submitting it to the blockchain before sending the model weights to the computing node.
[0011] 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; correspondingly, generating a global weight hash value based on the model weight includes: generating a global weight hash value according to the task parameters and the model weight.
[0012] Optionally, the method further includes: receiving, in the case of model convergence, the final data emitted by the computing node, which includes hash values of at least some medical data and hash values of the single-node gradient values from the previous round.
[0013] This invention provides a method for calculating privacy information in multi-center medical data, and a computing node for performing the task. The method includes:
[0014] Receive the model weights sent by the task initiator as its initial weights;
[0015] The local medical data is trained based on the initial weights to obtain updated single-node gradient values; the updated single-node gradient values are then sent to the task initiator.
[0016] Optionally, before training the local medical data based on the initial weights, the method further includes: calculating the hash value of 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.
[0017] Optionally, the method further includes: receiving a notification from the task initiator that the model has converged, generating a single-node gradient value hash based on the most recently updated single-node gradient value according to the notification, and submitting it to the blockchain.
[0018] Optionally, the method further includes: receiving a notification that the model has converged, and sending the hash value of the final single-node gradient value and the hash value of a portion of the medical data as the final delivery data to the task initiator based on the notification.
[0019] Optionally, the method further includes: after sending the most recently updated single-node gradient value to the task initiator at 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.
[0020] Optionally, the method also includes: submitting the hash value of the updated medical data to the blockchain when updating local medical data daily.
[0021] Optionally, if the task initiator model converges, the method further includes:
[0022] Obtain the hash value of at least a portion of the original data locally on the compute node, and use it as the first hash value;
[0023] Calculate the hash value of the model weights from the previous round, and use it as the second hash value;
[0024] Get the hash value of the most recently updated single-node gradient value and use it as the third hash value;
[0025] Zero-knowledge ZK is generated based on the first hash value, the second hash value, and the third hash value, and then submitted to the blockchain.
[0026] This invention also provides a method for verifying the correctness of data in a blockchain, specifically including:
[0027] The zero-knowledge proof data is verified to be relevant to the current task based on the zero-knowledge ZK verification contract previously selected by the task party. The selected zero-knowledge ZK verification contract is related to the task type.
[0028] Extract the first hash value from the zero-knowledge proof data, and determine whether the original data has passed verification based on whether the first hash value is consistent with the hash value that was uploaded to the chain when the original data was updated. The first hash value is the hash value of at least part of the original data.
[0029] The second hash value is extracted from the zero-knowledge proof data, and the consistency between the second hash value and the hash value previously uploaded to the chain by the task initiator is used to verify whether the task initiator has received the model. The second hash value is the hash value of the model weight uploaded to the chain by the task initiator in the last round.
[0030] Extract the third hash value from each zero-knowledge proof data, and obtain the sum of the gradient values of all computing nodes based on the third hash value. The third hash value is the final single-node gradient value of each computing node.
[0031] The convergence of the model is verified by checking whether the summation result is less than a predetermined threshold.
[0032] The present invention also provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the aforementioned method for calculating privacy information for multi-center medical data, or performs the aforementioned method for calculating privacy information for multi-center medical data, or implements the aforementioned method for verifying the correctness of blockchain data.
[0033] Through the above technical solution, the present invention can realize the task training of medical large models based on medical data from multiple clients (multi-centers), realize the data storage and verification of the training process based on task type, and ensure that each client is independent of each other, does not interfere with each other or leak privacy. It can verify the trustworthiness of information privacy computation and the successful delivery of information through zero-knowledge proof means, 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 results of the corresponding task.
[0034] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above technical solution, its purpose, features and advantages more obvious and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0035] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0036] Figure 1 A flowchart of the privacy information calculation method for multi-center medical data proposed in this invention, applied to the task initiator, is shown.
[0037] Figure 2 The communication process between the computing node and the task initiator in the first round of a method for computing privacy information for multi-center medical data is illustrated.
[0038] Figure 3 This illustrates the communication process between the computing node and the task initiator in the final round of a method for computing privacy information for multi-center medical data.
[0039] Figure 4 The communication process between the computing nodes, the task initiator, and the blockchain platform is illustrated in a method for computing privacy information in multi-center medical data.
[0040] Figure 5 This illustrates the principle by which computing nodes generate zero-knowledge proof data;
[0041] Figure 6 This demonstrates the process by which a blockchain platform verifies tasks based on zero-knowledge proof data generated by computing nodes.
[0042] Figure 7 This illustrates the process by which computing nodes generate zero-knowledge proof data;
[0043] Figure 8 The flowchart illustrates the method for calculating privacy information of medical data on the computing node side;
[0044] Figure 9 A flowchart is shown for a data integrity verification method for blockchain.
[0045] Figure 10 The structure of a computer device that performs a method for calculating privacy information is shown. Detailed Implementation
[0046] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0047] This invention provides a method for calculating privacy information in multi-center medical data, for use by the task initiator, such as... Figure 1 As shown, the method includes:
[0048] S11. The current model weights for a certain task are sent to multiple computing nodes participating in the task execution, so that the computing nodes use the model weights as their initial weights to train on local medical data and obtain updated single-node gradient values.
[0049] S12. Receive multiple single-node gradient values and sum them to generate a global gradient value;
[0050] S13. Update the model weights for the task based on the global gradient value.
[0051] Through the above method, the present invention can realize the task training of medical large models based on medical data from multiple clients (multi-centers), realize data storage of the training process based on task type, and ensure that each client is independent of each other, does not interfere with each other, and does not leak privacy information.
[0052] The above technical solution describes the execution process of a logistic regression task. The "task initiator" can be the buyer of medical data, and the "computing nodes" can be the holders of the medical data. The above solution describes the execution of the first round of the task. First, the task initiator sends the current model weights to all computing nodes. The computing nodes use these as initial weights to train on their local private data, obtaining updated gradient values, which are then sent back to the task initiator. The task initiator sums the gradient values from multiple computing nodes to obtain the global gradient value, and uses this global gradient value to update the model weights, thus completing one round of computation. In actual task execution, each task may have multiple rounds. Whether to proceed to the next round depends primarily on the task initiator's judgment of model convergence based on the global gradient value. If the model has not converged, the next round is executed.
[0053] like Figure 2 As shown, the task initiator includes at least a convergence judgment module, a model update module, and a security aggregation module. The convergence judgment module sends the updated weights from the previous round to each computing node. The computing nodes train the model locally based on the previous round weights and their local privacy data (or raw data), generating single-node gradient values. The model training calculation method has been sent to the computing nodes by the task initiator beforehand. To ensure data security, the single-node gradient values are aggregated with a mask to generate masked single-node gradient values, which are then sent to the task provider. The task provider receives the single-node gradient values from all computing nodes and performs an addition operation through the security aggregation module to generate a global gradient value. The model is updated based on this global gradient value, generating the model weights for the current round. The convergence judgment module determines whether the model has converged based on these model weights. If the model has not converged, a new round is started, and steps S11-S13 are repeated using the currently updated model weights as the model weights.
[0054] 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 ends. 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 for the next round of training on local privacy-sensitive medical data, until the model is determined to have converged. As a specific embodiment, the global gradient value is checked for zero; if the global gradient value is zero, the model is determined to have converged. Figure 3 As shown, when determining model convergence, the task initiator generates the final converged model; if the global gradient value is not zero, it is determined that the model has not yet converged.
[0055] like Figure 4As shown, each time the task initiator updates the model weights, it generates a global weight hash value based on the global gradient value and submits it to the blockchain. In each round, when generating the global gradient value, since it is unknown whether this round is the last, the task initiator will generate a global weight hash value based on the global gradient value and upload it to the blockchain.
[0056] The task initiator selects a corresponding ZK verification contract based on the number of dimensions in 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 across 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 hash value of the model weights from the last round uploaded by the task initiator. The local training module performs a consistency comparison between the hash value of the last round uploaded model weights and the received model weights. If they match, the zero-knowledge proof generation step is performed.
[0057] We abstract zero-knowledge proofs into a set of inputs and outputs: public input, secret input, and public output. The inputs and outputs correspond to the computational steps, and zero-knowledge proofs can make certain inputs externally invisible. In this invention, the person submitting the zero-knowledge proof data knows a set of secret inputs, which, together with the public inputs, and follows the previously defined computational steps, indeed computes the public output. The public inputs and public outputs can be extracted from the zero-knowledge proof data and are externally visible, while the secret inputs cannot be extracted. Therefore, the design of zero-knowledge proofs becomes a design of inputs and outputs.
[0058] In this invention, such as Figure 5 , 6 As shown, one of the secret inputs to a zero-knowledge proof is the original data (or privacy data, local data) of the computing node. By calculating the hash value of the original data in the zero-knowledge proof and publishing the hash value as a public output, the origin of the original data is traced. If the zero-knowledge proof data passes verification, 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 was indeed previously stored on the chain. One public input to a zero-knowledge proof is the weight of the previous round, and one public output is the zero-knowledge proof data, which includes the single-node gradient value of the last round, the privacy data hash value, and the weight hash value of the previous round.
[0059] As one specific implementation method, such as Figure 7 As shown, the specific process by which a computing node generates a zero-knowledge proof includes:
[0060] S71. Obtain the hash value of at least a portion of the original data (privacy data) locally on the computing node, and use it as the first hash value;
[0061] S72. Calculate the hash value of the model weights from the previous round, and use it as the second hash value;
[0062] S73. Obtain the hash value of the most recently updated single-node gradient value and use it as the third hash value;
[0063] S74. Generate a 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.
[0064] In this way, throughout the entire task, the computing node only needs to generate a zero-knowledge proof ZK data at the end, submit it to the blockchain, and once the blockchain verifies it, the task can be completed.
[0065] In data transactions, computing nodes (data holders) only begin computation after receiving payment, and task initiators (data buyers) only pay after receiving the computation results, making transactions impossible. In this invention, blockchain, by storing the original data hash values of computing nodes, the intermediate task results submitted by the task initiator, and the zero-knowledge proof data submitted by the computing nodes, can act as a "payment agent" in data transactions. It replaces "reputation guarantee" with "machine trust" created through consensus algorithms and code, enabling trustworthy data transactions. This is because zero-knowledge proof technology allows for the verification of computation results, eliminating disputes. Based on the intermediate task results (model weight hash values for each round) submitted by the task initiator to the blockchain and the zero-knowledge proofs submitted by each computing node to the blockchain (including the original data hash values), the blockchain platform verifies the zero-knowledge proof data. If the verification passes, the delivered result is qualified; if the verification fails, the delivered result is incorrect.
[0066] In each training round, the computing nodes perform calculations on the locally stored raw data based on the model weight values received from the task initiator. The calculation steps are also obtained from the task initiator. The task initiator transforms the analysis and calculation steps it originally intended to perform into privacy-preserving computation steps before sending them to the computing nodes. The computing nodes complete the calculations on their respective local data, then aggregate the results to form the final calculation result, which is sent to the task initiator. Therefore, the buyer in the data transaction changes from "buying and selling data" to "buying and selling computation results." During multiple rounds of communication, what is transmitted is continuously updated global model weights and intermediate single-node gradient values. Through this transmission process, the buyer ultimately obtains the desired computation result but cannot access the original data from each center, thus protecting data privacy. This also allows each center to repeatedly sell the same data, which is beneficial for fully utilizing and maximizing the value of the data.
[0067] To prevent computing nodes from leaking privacy when sending single-node gradient values to the task initiator, the computing nodes add a mask before sending the single-node gradient values.
[0068] Because each round of tasks is initiated by the task initiator, to ensure that the computation results submitted by subsequent verification computing nodes are obtained by completing the current task, and to prevent computing nodes from submitting zero-knowledge proofs of other tasks to deceive the verification process, the task initiator selects the corresponding on-chain verification contract based on the task type; generates task parameters based on the selected on-chain verification contract; and generates a global weight hash value based on the task parameters and model weights. In this implementation, verification contracts are pre-built on the blockchain. Therefore, when the task initiator submits a task, it does not need to generate a corresponding new contract each time. Computing nodes can trust the correctness of the contract, and do not need to verify the correctness of the verification contract every time. This not only verifies that each computing node has completed the computation for the current task, but also greatly saves the computing power required for verification.
[0069] This invention provides a method for calculating privacy information in multi-center medical data. When applied to computing nodes, for example... Figure 8 As shown, the method includes:
[0070] S81. Receive the model weights sent by the task initiator as its initial weights;
[0071] S84. Train the local medical data based on the initial weights to obtain updated single-node gradient values; send the updated single-node gradient values to the task initiator.
[0072] As a preferred implementation, a mask is added before sending the updated single-node gradient value to the task initiator to prevent the leakage of privacy information.
[0073] Before training the local medical data based on the initial weights, the method further includes: S83. Calculating the hash value of the initial weights independently and verifying it through the blockchain; if the verification is successful, training the local medical data based on the initial weights. The initial weights include task parameters, and the verification involves comparing the hash value with the hash value of the initial weights uploaded to the blockchain by the corresponding task initiator. If the two hash values match, the verification is considered successful. The process of self-verification by the computing node helps ensure that the finally generated zero-knowledge proof can pass the verification process executed by the blockchain, thereby enabling the data transaction to be successfully completed.
[0074] Before training the local medical data based on the initial weights, the method further includes: S82. Obtaining the calculation method for training from the task sender. In step S84, the local medical data is trained based on the initial weights using the obtained calculation method.
[0075] Before the computing nodes train the model, the task initiator (or data purchaser) needs to send the computing methods (or computational approaches) used for training to the computing nodes. Simultaneously, the task initiator also needs to provide a set of zero-knowledge proof generation methods (generation algorithms) and verification methods (verification contracts). These generation and verification methods are related to the computation steps; different computation steps will have different generation and verification methods. When delivering the computation results (including single-node gradient values) to the task initiator, the computing node performs the aforementioned generation methods on at least a portion of the original data to generate a data segment. This data segment, along with the computation results, is sent to the task initiator so that the task initiator can use the verification methods to verify this data segment. If the data segment passes verification, it can be confirmed that the computation results were calculated according to the requirements of the computation steps, thus completing the verification of the computation process.
[0076] The computing node receives the ZK verification contract from the blockchain platform, generates a single-node gradient value hash based on the latest generated single-node gradient value according to the ZK verification contract, and submits it to the blockchain. Since the convergence of the model is determined by the task initiator, the task initiator typically initiates the zero-knowledge proof generation and verification processes to start the data transaction settlement process.
[0077] To prevent the task initiator from failing to notify or initiate the data transaction settlement process after determining model convergence, the data transaction settlement process can be initiated by the computing nodes after the task times out. After sending the most recently updated single-node gradient value to the task initiator at a predetermined time, the computing node generates a hash value of the single-node gradient value based on the most recently updated single-node gradient value and submits it to the blockchain. Once all zero-knowledge proof data (Proof) from all computing nodes is on-chain, the blockchain platform communicates with the task initiator to enable the initiator to select the corresponding ZK verification contract. The initiator then sends the selected ZK verification contract to the computing nodes, allowing the computing nodes to generate zero-knowledge proof data and execute the subsequent verification process. Alternatively, the task initiator can select the corresponding ZK verification contract before the first round of model training, send the selected ZK verification contract to the computing nodes, and submit it to the blockchain.
[0078] Zero-knowledge proofs for computing nodes can prove the correctness of their computation process and the correlation of data without exposing the original data. They can verify the correctness of data transactions or achieve data transaction auditing. They are an important piece of the technical puzzle for realizing data transaction infrastructure and realize trusted computing.
[0079] Here, it should be noted that the delivery of computation results by a computing node to the task initiator is not the same as the generation of zero-knowledge proofs and submission to the blockchain by the computing node. The delivery of computation 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 proofs and submission to the blockchain by the computing node is to ensure that the data communication process between the two parties is verifiable through the immutability and fair and objective verification process of the blockchain.
[0080] This invention not only verifies the computation process of computing nodes but also verifies the local raw data computed by each computing node. In practice, when computing nodes update their local raw medical data, they don't necessarily need to submit the hash value of the updated raw medical data to the blockchain for notarization during task execution. These notarized hash values can be used in subsequent data transaction settlement processes, where the blockchain verifies the credibility of the raw data. After receiving the data, the task initiator parses a set of hash values and compares them with the hash values previously notarized by the computing nodes. This verifies that the computing nodes did indeed use the raw data corresponding to the hash value, thus verifying the correctness of the raw data.
[0081] When necessary, the task initiator can also request the computing node to provide a portion of the original data according to sampling inspection. By comparing the hash value of this portion of the original data with the hash value of the data previously uploaded to the blockchain, it can be confirmed that this portion of data is indeed data that has been previously verified, thereby achieving original data traceability and ensuring that the computing node does not falsify the original data when the task initiator initiates the task. The data traceability technology is combined with blockchain. The computing node (data holder) continuously uploads the hash value of its data to the blockchain for verification in normal times. Whenever the data is updated, it is immediately uploaded to the blockchain. When the task initiator executes the computing task, this embodiment uses the blockchain to verify the data generation time itself, preventing the data holder from temporarily falsifying a large amount of data for this task.
[0082] After achieving privacy-preserving transaction verification through zero-knowledge proofs, smart contracts can be used to complete functions such as prepayment locking, zero-knowledge proof submission and verification, and payment on the blockchain. The transaction data and zero-knowledge proofs left on the blockchain by each computing node and task initiator constitute a very complete set of audit data. Logically, the transaction has been verified through this data and is tamper-proof, which can be used for future transaction auditing.
[0083] In this invention, data holders, buyers, and other stakeholders each build their own nodes to form a blockchain network, enabling data transactions. The system's rules are transparent, eliminating the risk of fraud by trusted third parties and ensuring complete trust from all parties. Buyers believe that payment will only be transferred after they receive a satisfactory computation result. Data holders believe that they will receive payment as long as they submit the correct computation result. The blockchain first charges the buyer and then notifies the data holder to begin computation. After the data holder delivers the computation result to the buyer and submits the corresponding zero-knowledge proof to the blockchain for verification, the blockchain sends the computation result back to the buyer and pays the data holder.
[0084] This invention provides a method for verifying the correctness of data in a blockchain, such as... Figure 9 As shown, the method includes:
[0085] S91. Verify whether the zero-knowledge proof data is related to the current task based on the zero-knowledge ZK verification contract previously selected by the task party. The selected zero-knowledge ZK verification contract is related to the task type.
[0086] S92. Extract a first hash value from the zero-knowledge proof data, and determine whether the original data has passed verification based on whether the first hash value is consistent with the hash value that was uploaded to the chain when the original data was updated. The first hash value is the hash value of at least part of the original data.
[0087] S93. Extract the 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. The second hash value is the hash value of the model weight uploaded to the chain by the task initiator in the last round.
[0088] S94. Extract a third hash value from each zero-knowledge proof data, and obtain 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;
[0089] S95. Verify whether the model converges based on whether the summation result is less than a predetermined threshold.
[0090] In the above technical solution, the original data proof is achieved through step S92, the model acceptance proof is achieved through step S93, and the model convergence proof is achieved through steps S94 and S95.
[0091] First, to achieve proof of the original data, one of the secret inputs for the computing node to generate the zero-knowledge proof is at least a portion of the original data. By calculating the hash value of the original data in the generation of the zero-knowledge proof and publishing this hash value as a public output, the origin of the original data is traced. If the zero-knowledge proof data passes 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 published hash value with the hash values previously recorded on the blockchain to confirm that the data used to perform the calculation was indeed previously proven on the blockchain.
[0092] In proving model convergence, the convergence is determined by the sum of the gradient values output by all computation nodes being less than a threshold. Therefore, a zero-knowledge proof generated by a single node cannot directly prove model convergence. Thus, the gradient values need to be published as public output in the zero-knowledge proof. The blockchain then sums the gradient values from all nodes to determine if the model has converged. Since the zero-knowledge proof is only computed once after model convergence, and only the gradient value of the last single node is published, the privacy data of the computation nodes is not exposed.
[0093] In this invention, the model receiving proof is cleverly designed to solve the problem in existing technologies where it's difficult to prove that the computation node's calculation results have been sent if the task initiator denies the claim. Let's look back at the final execution flow. At the start of execution, the task initiator needs to send the initial model weights to the computation node. The gradient values obtained from the final round of model training are close to zero, meaning that the model weights sent out by the task initiator in the final round are actually the finally converged model. This allows us to achieve proof. The secret input of the zero-knowledge proof includes the model weights from the previous round, and the hash of the previous round's weights is output in the public output. Then, at the start of each round, the task initiator is required to put the hash value of the model weights on the blockchain. When the zero-knowledge proof passes verification, it indicates that the model has converged, and the hash value of the model weights is A. Since A has already been put on the blockchain by the task initiator, and the task initiator can generate its hash value A, it means it already possesses the converged model corresponding to hash value A.
[0094] The present invention also provides a computer device, such as Figure 10 As shown, the computer device includes a processor 1001, a communication interface 1002, and a memory 1003. The processor 1001, the communication interface 1002, and the memory 1003 are connected via a communication bus 1004. The memory 1003 stores a computer program. When the computer program is executed by the processor, the processor performs the aforementioned method for calculating privacy information for multi-center medical data, or performs the aforementioned method for calculating privacy information for multi-center medical data, or implements the aforementioned method for verifying the correctness of data for blockchain.
[0095] Through the above technical solution, the present invention can realize the task training of large medical models based on medical data from multiple clients (multi-centers), realize data storage of the training process based on task type, and ensure that each client is independent of each other, does not interfere with each other or leak privacy. It can 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 training model results for the corresponding task through zero-knowledge proof.
[0096] As a specific application, the above technical solution can be applied to multimodal standardized medical datasets. A data center storing the electronic medical record text modality database can serve as a computing node, as can a data center storing DICOM standard medical image modalities and labeled data. Data centers in different hospitals can each serve as a computing node. Data models can be categorized into federated statistical models, federated feature engineering models, federated machine learning models, federated information retrieval models, or evaluation models. Among these, federated statistical models perform statistical training on the original data. Algorithms that can be used include data statistics, longitudinal Pearson algorithm, multi-party privacy data summation, two-party data sample intersection, longitudinal KMeans algorithm, and overall stability index. The calculation process includes: the federated feature engineering model, which trains by sampling features from the original data, using algorithms such as federated sampling, vertical feature selection, and vertical / horizontal feature binning; the federated machine learning model, which performs deep learning on the original data, using algorithms such as vertical or horizontal logistic regression, vertical linear regression, vertical Poisson regression, horizontal or vertical neural networks, horizontal or vertical SecureBoost, vertical KMeans, and vertical Pearson; the federated information retrieval model, which retrieves information and uses the PIR algorithm; and the evaluation model, which provides algorithms for binary classification, multi-class classification, regression evaluation, clustering evaluation, federated and one-sided comparison evaluation. Of course, the above are just examples of specific models and corresponding applicable algorithms. This invention is not limited to the above models and algorithms; it is universally applicable to various models and algorithms.
[0097] The task initiator device is not necessarily a server or cloud server. The device that performs model aggregation is preferably a cloud server, which communicates with multiple institutions or sites with computing power and local data through network connections. The model training results generated by the cloud server can be uploaded to the task initiator device. This setup has low requirements for the task initiator device and is conducive to the realization of data flow.
[0098] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for calculating privacy information in multi-center medical data, used by the task initiator, characterized in that, The method includes: The hash value of the initial weight for a specific task is uploaded to the blockchain so that computing nodes can verify the initial weight through the blockchain upon receiving it. Based on the type of task, select the corresponding on-chain verification contract, and generate task parameters based on the selected on-chain verification contract; Before sending the model weights to the computing nodes, a global weight hash value is generated based on the task parameters and model weights, and then submitted to the blockchain; The current model weights for a specific task are sent to multiple computing nodes participating in the task execution, so that if the computing nodes pass the verification, they can train the local medical data based on the model weights to obtain updated single-node gradient values. The computing node receives multiple single-node gradient values and sums them to generate a global gradient value. After sending the most recently updated single-node gradient value to the task initiator at a predetermined time, the computing node generates a single-node gradient value hash value based on the most recently updated single-node gradient value and submits it to the blockchain. The model weights for the task are updated based on the global gradient values.
2. The method for calculating privacy information in multi-center medical data according to claim 1, further characterized in that, The method further 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 for the next round of training on local privacy medical data, until the model is determined to have converged.
3. The method for calculating privacy information in multi-center medical data according to claim 2, further characterized in that, The method further includes: when the model converges, notifying the computing nodes to generate a first zero-knowledge proof for the task based on the single-node gradient values of the last round, and submitting it to the blockchain.
4. The method for calculating privacy information in multi-center medical data according to claim 3, further characterized in that, The method also includes, in the case of model convergence, receiving final data from the computing node, which includes hash values of at least some medical data and hash values of the single-node gradient values from the previous round.
5. A method for calculating privacy information in multi-center medical data, comprising a computing node for performing a task, characterized in that, The method includes: Receive the model weights sent by the task initiator as its initial weights; Based on the initial weight, its hash value is calculated independently and verified through the blockchain. The initial weight has been uploaded to the blockchain by the task initiator. If the verification is successful, the local medical data is trained based on the initial weight to obtain the updated single-node gradient value. The updated single-node gradient value is sent to the task initiator. After a predetermined time has elapsed since the most recently updated single-node gradient value was sent to the task initiator, a single-node gradient value hash value is generated based on the most recently updated single-node gradient value and submitted to the blockchain. Access the blockchain platform based on the ZK verification contract and obtain the model weight hash value of the last round uploaded by the task initiator; The model weight hash value from the last round of on-chain processing is compared with the received model weight. If they match, a zero-knowledge proof generation step is performed. The zero-knowledge proof generation step includes: Obtain the hash value of at least a portion of the original data locally on the compute node, and use it as the first hash value; Calculate the hash value of the model weights from the previous round, and use it as the second hash value; Get the hash value of the most recently updated single-node gradient value and use it as the third hash value; Zero-knowledge ZK is generated based on the first hash value, the second hash value, and the third hash value, and then submitted to the blockchain.
6. The method for calculating privacy information in multi-center medical data according to claim 5, further characterized in that, The method further includes: receiving a notification that the model has converged, and submitting the hash value of the final single-node gradient value and the hash value of the model weights in the previous round to the blockchain according to the notification.
7. The method for calculating privacy information in multi-center medical data according to claim 5, further characterized in that, The method further includes: receiving a notification that the model has converged, and sending the hash value of the final single-node gradient value and the hash value of a portion of the medical data as the final delivery data to the task initiator based on the notification.
8. The method for calculating privacy information in multi-center medical data according to claim 5, further characterized in that, The method also includes submitting the hash value of the updated medical data to the blockchain when updating local medical data daily.
9. A method for verifying the correctness of data in a blockchain, characterized in that: The method includes: The zero-knowledge proof data is verified to be relevant to the current task based on the zero-knowledge ZK verification contract previously selected by the task party. The selected zero-knowledge ZK verification contract is related to the task type, and a zero-knowledge ZK verification contract is pre-set on the blockchain. Extract the first hash value from the zero-knowledge proof data, and determine whether the original data has passed verification based on whether the first hash value is consistent with the hash value that was uploaded to the chain when the original data was updated. The first hash value is the hash value of at least part of the original data. The second hash value is extracted from the zero-knowledge proof data, and the consistency between the second hash value and the hash value previously uploaded to the chain by the task initiator is used to verify whether the task initiator has received the model. The second hash value is the hash value of the model weight uploaded to the chain by the task initiator in the last round. The third hash value is extracted from each zero-knowledge proof data, and the gradient values of all computing nodes are summed based on the third hash value. The third hash value is the final single-node gradient value of each computing node. The final single-node gradient value is generated by the computing node based on the most recently updated single-node gradient value after the computing node sends the most recently updated single-node gradient value to the task initiator at a predetermined time, and is then submitted to the blockchain. The convergence of the model is verified by checking whether the summation result is less than a predetermined threshold.
10. A computer device comprising a processor and a memory, wherein the memory stores a computer program, which, when executed by the processor, performs a method for calculating privacy information for multi-center medical data as described in any one of claims 1-4, or performs a method for calculating privacy information for multi-center medical data as described in any one of claims 5-8, or implements a method for verifying the correctness of data for blockchain as described in claim 9.
Citation Information
Patent Citations
Federal learning-based medical data sharing and privacy protection method and system
CN114996762A
Privacy calculation method and system with verifiable calculation process and traceable original data
CN118520516A