Blockchain-based privacy-preserving transaction verification methods, devices, equipment, and media
By using ZKML technology and oracles to build an identity verification system in the blockchain network and generate key pairs, the problem of insufficient privacy protection in the blockchain application model is solved, and the privacy and security of data processing are realized, thereby enhancing the security of data transmission.
Patent Information
- Application Number
- CN202410436418.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-04-11
AI Technical Summary
Blockchain application models lack sufficient privacy protection when processing raw and transaction data, leading to a high risk of data leakage.
ZKML technology is used to analyze the privacy protection model of private domain nodes, generate key pairs, and register the verification keys to public domain nodes of the blockchain network through an oracle to build an identity verification system. Public-private key pairs are generated using federated learning and secure multi-party computation to ensure the privacy and security of data processing.
It effectively solves the privacy protection problem of blockchain applications when processing raw data and transaction data, avoids the exposure of sensitive information, and enhances the security of data transmission and the transparency of the network.
Smart Images

Figure CN118337396B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain, and in particular to a blockchain-based privacy-preserving transaction verification method, apparatus, device, and medium. Background Technology
[0002] With the rapid development of the Internet of Things (IoT), the concept of Web3.0 has emerged. Web3.0 aims to build a more intelligent, open, and decentralized internet ecosystem, in which blockchain technology plays a crucial role. As an innovative distributed ledger technology, blockchain allows information sharing and transactions across trust boundaries while ensuring the immutability and security of data. Through blockchain technology, Web3.0 provides a secure platform for interactions between individuals and businesses, eliminating the need for trusted third parties.
[0003] However, despite the immense potential of blockchain technology in data processing, privacy protection remains a critical issue when applying blockchain models for data analysis. When individuals or businesses input personalized data into the model, the lack of privacy protection in blockchain application models poses a risk of data leakage during the analysis process. Furthermore, blockchain application models often fail to adequately protect the raw data of individuals or businesses during the training phase, creating a potential for raw data leakage.
[0004] Therefore, how to address the inability of blockchain application models to protect the privacy of raw data and data that needs to be transacted is a pressing technical problem that needs to be solved. Summary of the Invention
[0005] This application provides a blockchain-based privacy-preserving transaction verification method, apparatus, device, and medium to address the problem that blockchain application models cannot protect the privacy of raw data and data that needs to be transacted.
[0006] Firstly, this application provides a blockchain-based privacy-preserving transaction verification method, including:
[0007] The system obtains the user's request transaction instruction and uses ZKML technology to analyze and process the privacy protection model of the private domain node to obtain the key pair of the privacy protection model. The key pair includes: a proof key and a verification key corresponding to the proof key.
[0008] Based on the requested transaction instruction, the privacy protection model, and the proof key, determine the data processing result of the requested transaction instruction;
[0009] The data processing result and the verification key are sent to the public domain node of the blockchain network, so that the public domain node can determine the target verification result based on the data processing result and the verification key;
[0010] Obtain the target verification result sent by the public domain node, and execute the request transaction instruction when the target verification result is a preset result. The preset result is used to indicate that the transaction status of the request transaction instruction is a trusted state.
[0011] Optionally, the data processing result includes: a request transaction result and model parameter proof. The step of determining the data processing result of the request transaction instruction based on the request transaction instruction, the privacy-preserving model, and the proof key includes:
[0012] The request transaction instruction is input into the privacy protection model to obtain the request transaction result output by the privacy protection model;
[0013] Based on the request transaction instruction, the privacy protection model, and the proof key, determine the model parameter proof of the privacy protection model;
[0014] Sending the data processing result and the verification key to a public node of the blockchain network, so that the public node determines the target verification result based on the data processing result and the verification key, includes:
[0015] The request transaction result, the model parameter proof, and the verification key are sent to the public domain node, so that the public domain node can verify the request transaction result based on the model parameter proof and the verification key to obtain the target verification result.
[0016] Optionally, after employing ZKML technology to analyze and process the privacy protection model of the private domain node to obtain the key pair of the privacy protection model, wherein the key pair includes a proof key and a verification key corresponding to the proof key, the method further includes:
[0017] The verification key is registered to a public node of the blockchain network via an oracle, so that the public node stores the verification key.
[0018] A first identity verification system is constructed based on the private domain nodes, the privacy protection model, and the public domain nodes.
[0019] Optionally, before obtaining the user-sent transaction request instruction, the method further includes:
[0020] Obtain the model parameter information sent by the public domain node, the model parameter information including: the base model and the model parameters of the base model;
[0021] Based on the node data samples of the private domain node and the model parameters, the incremental model parameters of the private domain node are determined, and the incremental model parameters are sent to the public domain node so that the public domain node can perform secure aggregation processing on the multiple incremental model parameters to obtain incremental model gradient information.
[0022] The incremental model gradient information sent by the public domain node is obtained. The incremental model gradient information is obtained by the public domain node through secure aggregation of incremental model parameters sent by multiple private domain nodes in the blockchain network. Different private domain nodes send different incremental model parameters.
[0023] Based on the incremental model gradient information, the incremental model parameters of the private domain node are updated to obtain the updated incremental model parameters. Based on the updated incremental model parameters and the base model, the privacy protection model corresponding to the private domain node is generated.
[0024] Optionally, before obtaining the model parameter information sent by the public domain node, the method further includes:
[0025] Based on federated learning and secure multi-party computation, a public-private key pair is generated for the private domain node. The public-private key pair includes a public key parameter and a private key parameter corresponding to the public key parameter.
[0026] The public key parameters are registered with the blockchain network through the oracle, so that the public domain nodes of the blockchain network can generate business identity certificates for the private domain nodes based on the public key parameters.
[0027] Obtain the business identity certificate sent by the public domain node, and construct a second identity verification system for the private domain node based on the business identity certificate, the public key parameter, and the corresponding private key parameter.
[0028] Optionally, determining the incremental model parameters of the private domain node based on the node data samples of the private domain node and the model parameters includes:
[0029] Based on the public-private key pair, the encrypted transmission channel of the private domain node is determined;
[0030] Based on the encrypted transmission channel, the node data sample is subjected to sample alignment processing to obtain aligned node data sample;
[0031] The incremental model parameters are determined based on the aligned node data samples and the model parameters.
[0032] Optionally, determining the incremental model parameters based on the aligned node data samples and the model parameters includes:
[0033] According to the target framework, the model parameters are separated to obtain parameter processing results, which include: frozen parameters and unfrozen parameters. The parameter state of the frozen parameters is untrainable.
[0034] Based on the aligned node data sample, determine the objective function of the private domain node;
[0035] The unfrozen parameters are iteratively trained according to the objective function and the aligned node data samples to obtain the incremental model parameters.
[0036] Optionally, updating the incremental model parameters of the private domain node based on the incremental model gradient information to obtain the updated incremental model parameters includes:
[0037] The incremental model gradient information is decrypted to obtain the target incremental gradient information of the private domain node, wherein the target incremental gradient information includes: the target incremental gradient;
[0038] The incremental model parameters are updated based on the target incremental gradient to obtain the updated incremental model parameters.
[0039] Secondly, this application provides a blockchain-based privacy-preserving transaction verification device, comprising:
[0040] The acquisition module is used to acquire transaction requests sent by the user.
[0041] The processing module is used to analyze and process the privacy protection model of the private domain node using ZKML technology to obtain the key pair of the privacy protection model. The key pair includes: a proof key and a verification key corresponding to the proof key.
[0042] The determination module is used to determine the data processing result of the request transaction instruction based on the request transaction instruction, the privacy protection model, and the proof key;
[0043] The sending module is used to send the data processing result and the verification key to the public domain node of the blockchain network, so that the public domain node can determine the target verification result based on the data processing result and the verification key;
[0044] The acquisition module is also used to acquire the target verification result sent by the public domain node;
[0045] An execution module is used to execute the request transaction instruction when the target verification result is a preset result, wherein the preset result is used to indicate that the transaction status of the request transaction instruction is a trustworthy status.
[0046] Optionally, the device further includes: an input module;
[0047] The input module is used to input the request transaction instruction into the privacy protection model and obtain the request transaction result output by the privacy protection model;
[0048] The determining module is further configured to determine the model parameter proof of the privacy protection model based on the request transaction instruction, the privacy protection model, and the proof key;
[0049] Sending the data processing result and the verification key to a public node of the blockchain network, so that the public node determines the target verification result based on the data processing result and the verification key, includes:
[0050] The sending module is specifically used to send the request transaction result, the model parameter proof, and the verification key to the public domain node, so that the public domain node can verify the request transaction result based on the model parameter proof and the verification key to obtain the target verification result.
[0051] Optionally, the device further includes: a registration module;
[0052] The registration module is used to register the verification key to a public node of the blockchain network through an oracle, so that the public node can store the verification key.
[0053] The device further includes: a construction module;
[0054] The construction module is used to construct a first identity verification system based on the private domain node, the privacy protection model, and the public domain node.
[0055] Optionally, the acquisition module is further configured to acquire model parameter information sent by the public domain node, the model parameter information including: the basic model and the model parameters of the basic model;
[0056] The determining module is further configured to determine the incremental model parameters of the private domain node based on the node data sample of the private domain node and the model parameters.
[0057] The sending module is specifically used to send the incremental model parameters to the public domain node, so that the public domain node can perform secure aggregation processing on the multiple incremental model parameters to obtain incremental model gradient information;
[0058] The acquisition module is also used to acquire the incremental model gradient information sent by the public domain node. The incremental model gradient information is obtained by the public domain node through secure aggregation processing of the incremental model parameters sent by multiple private domain nodes in the blockchain network. Different private domain nodes send different incremental model parameters.
[0059] The processing module is specifically used to update the incremental model parameters of the private domain node according to the incremental model gradient information to obtain the updated incremental model parameters, and generate the privacy protection model corresponding to the private domain node according to the updated incremental model parameters and the base model.
[0060] Optionally, the apparatus further includes: a generation module;
[0061] The generation module is used to generate a public-private key pair for the private domain node based on federated learning and secure multi-party computation. The public-private key pair includes a public key parameter and a private key parameter corresponding to the public key parameter.
[0062] The registration module is also used to register the public key parameters to the blockchain network through the oracle, so that the public domain nodes of the blockchain network can generate business identity certificates for the private domain nodes based on the public key parameters;
[0063] The acquisition module is also used to acquire the business identity certificate sent by the public domain node;
[0064] The construction module is also used to construct a second authentication system for the private domain node based on the business identity certificate, the public key parameters, and the corresponding private key parameters.
[0065] Optionally, the determining module is further configured to determine the encrypted transmission channel of the private domain node based on the public-private key pair;
[0066] The processing module is further configured to perform sample alignment processing on the node data sample according to the encrypted transmission channel to obtain aligned node data samples.
[0067] The determining module is specifically used to determine the incremental model parameters based on the aligned node data samples and the model parameters.
[0068] Optionally, the processing module is further configured to separate the model parameters according to the target framework to obtain parameter processing results, the parameter processing results including: frozen parameters and unfrozen parameters, wherein the parameter state of the frozen parameters is an untrainable state;
[0069] The determining module is further configured to determine the objective function of the private domain node based on the aligned node data sample;
[0070] The processing module is specifically used to perform iterative training on the unfrozen parameters according to the objective function and the aligned node data samples to obtain the incremental model parameters.
[0071] Optionally, the processing module is further configured to decrypt the incremental model gradient information to obtain the target incremental gradient information of the private domain node, wherein the target incremental gradient information includes: target incremental gradient;
[0072] The processing module is specifically used to update the incremental model parameters according to the target incremental gradient to obtain the updated incremental model parameters.
[0073] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0074] The memory stores computer-executed instructions;
[0075] The processor executes computer execution instructions stored in the memory to implement the blockchain-based privacy-preserving transaction verification method as described in the first aspect and various possible implementations of the first aspect above.
[0076] Fourthly, this application provides a computer storage medium storing computer execution instructions thereon, which are executed by a processor to implement the blockchain-based privacy-preserving transaction verification method as described in the first aspect and various possible implementations of the first aspect.
[0077] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the blockchain-based privacy-preserving transaction verification method as described above.
[0078] The blockchain-based privacy-preserving transaction verification method provided in this application, after receiving a user's request transaction instruction, analyzes the privacy protection model of the private domain node using ZKML technology and generates a corresponding key pair. Then, it processes the data according to the request transaction instruction, the privacy protection model, and the proof key contained in the key pair to obtain the data processing result. The data processing result and the verification key contained in the key pair are then sent to the public domain node of the blockchain network. Finally, upon receiving the target verification result returned by the public domain node, and if the target verification result is a preset result, the request transaction instruction is executed. This method effectively solves the privacy protection problem in blockchain applications when processing raw and transaction data, while avoiding the direct exposure of sensitive information on the blockchain, thereby enhancing the security of data transmission. Attached Figure Description
[0079] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0080] Figure 1 The process of the blockchain-based privacy-preserving transaction verification method provided in this application Figure 1 ;
[0081] Figure 2 The process of the blockchain-based privacy-preserving transaction verification method provided in this application Figure 2 ;
[0082] Figure 3 The process of the blockchain-based privacy-preserving transaction verification method provided in this application Figure 3 ;
[0083] Figure 4 This is a schematic diagram of the blockchain-based privacy-preserving transaction verification device provided in this application;
[0084] Figure 5 This is a schematic diagram of the structure of the blockchain-based privacy-preserving transaction verification device provided in this application.
[0085] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0086] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0087] It should be noted that the blockchain-based privacy-preserving transaction verification method and apparatus of this application can be used in the blockchain field, or in any field other than blockchain. The application field of the blockchain-based privacy-preserving transaction verification method and apparatus of this application is not limited.
[0088] First, the terms used in this application will be explained.
[0089] A blockchain network (English name: blockchain or blockchain chain) is a decentralized distributed ledger that is stored in blocks, is immutable, secure, and reliable. It combines technologies such as distributed storage, peer-to-peer transmission, consensus mechanisms, and cryptography. It records transactions and information through a continuously growing chain of data blocks, ensuring data security and transparency. The characteristics of blockchain include decentralization, immutability, transparency, security, and programmability. Furthermore, data in a blockchain exists in the form of blocks, each containing a certain number of transactions and some metadata. Each block is linked together chronologically to form an immutable data chain.
[0090] ZKML technology combines zero-knowledge proofs (ZK) with machine learning (ML) to bridge artificial intelligence and blockchain. Zero-knowledge proofs (ZK) are a cryptographic method that allows one party to prove the truth of a statement to another without revealing any additional information. In this protocol, the prover wants to demonstrate the truth of a statement to the verifier, who does not need to obtain specific details or other relevant information about the statement. Machine learning (ML) is a branch of artificial intelligence that involves developing and applying algorithms that enable computers to learn from data and make predictions or decisions without explicit program instructions. It is an iterative process that optimizes performance by training models.
[0091] Therefore, ZKML combines the advantages of these two fields, enabling the protection of data privacy while ensuring the correctness and integrity of computations during machine learning.
[0092] Oracles: Blockchain oracles are a technology that brings real-world data into the blockchain, providing verifiable external information for smart contracts. They enable smart contracts to access and use this data by transforming real-world data into a trusted digital form and storing it on the blockchain.
[0093] Federated learning: Federated learning is a distributed machine learning approach that allows multiple participants to share data and models without having to centralize all the data on a single central node.
[0094] Secure Multi-Party Computation (BC-SMPC): Secure Multi-Party Computation is a technology that combines blockchain and Secure Multi-Party Computation (SMPC) to enable secure collaborative computation among multiple parties without disclosing their sensitive data.
[0095] With the rapid development of the Internet of Things (IoT) and the widespread adoption of smart devices, the generation, collection, and processing of data have become increasingly important. Against this backdrop, the concept of Web3.0 has emerged, aiming to build a more intelligent, open, and decentralized internet ecosystem. Web3.0 will integrate advanced technologies such as blockchain, artificial intelligence, and distributed storage to achieve efficient management and value extraction from the massive amounts of data generated.
[0096] In the Web3.0 environment, blockchain technology plays a crucial role. As an innovative distributed ledger technology, blockchain allows information sharing and transactions across trust boundaries while ensuring the immutability and transparency of data. This provides a secure platform for interactions between individuals and businesses, eliminating the need for trusted third parties. Through smart contracts, blockchain can also automatically execute code, further enhancing automation and reducing human intervention, thereby improving efficiency and security.
[0097] However, despite the immense potential of blockchain technology in data processing, privacy protection remains a critical issue when applying blockchain models for data analysis. When individuals or businesses input personalized data into the model, the lack of privacy protection in blockchain application models poses a risk of data leakage during the analysis process. Furthermore, blockchain application models often fail to adequately protect the raw data of individuals or businesses during the training phase, creating a potential for raw data leakage.
[0098] Therefore, how to address the inability of blockchain application models to protect the privacy of raw data and data that needs to be transacted is a pressing technical problem that needs to be solved.
[0099] This application provides a blockchain-based privacy-preserving transaction verification method aimed at addressing the aforementioned technical problems of existing technologies. After receiving a user's request transaction instruction, ZKML technology is used to analyze the privacy protection model of the private domain node and generate a corresponding key pair. Then, data is processed according to the request transaction instruction, the privacy protection model, and the proof key contained in the key pair to obtain the data processing result. This data processing result, along with the verification key contained in the key pair, is sent to the public domain node of the blockchain network. Finally, upon receiving the target verification result returned by the public domain node, and if the target verification result is a preset result, the request transaction instruction is executed. This method effectively solves the privacy protection problem in blockchain applications when processing raw and transaction data, while avoiding the direct exposure of sensitive information on the blockchain, thereby enhancing the security of data transmission.
[0100] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0101] Figure 1 The process of the blockchain-based privacy-preserving transaction verification method provided in this embodiment Figure 1 .like Figure 1 As shown, the blockchain-based privacy-preserving transaction verification method provided in this embodiment includes:
[0102] S101: Obtain the request transaction instruction sent by the user, and use ZKML technology to analyze and process the privacy protection model of the private domain node to obtain the key pair of the privacy protection model. The key pair includes: a proof key and a verification key corresponding to the proof key.
[0103] The blockchain network consists of public domain nodes and private domain nodes. Public domain nodes are composed of multiple private domain nodes.
[0104] The proof key is used to prove the validity of the identity of the private domain node to other private domain nodes, while the verification key is used to verify other private domain nodes.
[0105] By obtaining the transaction requests sent by users, it means that we can obtain information about users with current transaction needs and the transactions that need to be completed. This includes understanding what type of transaction the user wants to conduct (such as buying, selling, or transferring funds), the specific object of the transaction (such as stocks, currencies, or commodities), and related transaction details, such as quantity, price, and time limits.
[0106] This step can be achieved in various ways, such as by the user entering transaction details into a form on a webpage and submitting a request, or by the user using an application on a mobile phone or tablet to conduct the transaction. The application provides an interface for the user to input or select relevant transaction parameters, and then the user sends a transaction request. This application does not impose any special restrictions on this.
[0107] The purpose of this step is to verify the accuracy of the training and prediction results of the machine learning model without disclosing sensitive information.
[0108] Understandably, by using ZKML technology to generate key pairs corresponding to the privacy protection model, private domain nodes can prove that they possess specific knowledge or attributes without exposing the specific data content. This enables data analysis and training and validation of machine learning models to be carried out effectively while protecting data privacy.
[0109] Furthermore, the proof key enables private nodes to generate proofs demonstrating specific properties of their data or models without sharing the underlying data itself. Correspondingly, the verification key allows other private nodes to verify the correctness of these proofs, thus ensuring the accuracy of machine learning model predictions and the confidentiality of data without disclosing any sensitive information.
[0110] S102: Determine the data processing result of the request transaction instruction based on the request transaction instruction, the privacy protection model, and the proof key.
[0111] The purpose of this step in determining the data processing result of the request transaction instruction is to verify the legality of the request transaction instruction while verifying the effectiveness of the privacy protection model.
[0112] Understandably, by comprehensively considering the request transaction instruction, the privacy protection model, and the proof key, it is possible not only to ensure that the privacy protection model can effectively protect user privacy when processing transaction data, but also to verify whether the request transaction instruction complies with the legality standards of the blockchain network. This allows for dual confirmation of the privacy and compliance of the transaction without exposing any sensitive information during the verification process, thus maintaining the integrity and security of the blockchain network.
[0113] S103: Send the data processing result and the verification key to the public domain node of the blockchain network, so that the public domain node can determine the target verification result based on the data processing result and the verification key.
[0114] The purpose of this step is to allow public domain nodes to verify the correctness and legality of the requested transaction instruction based on the verification key.
[0115] Understandably, after a private node initiates a transaction and executes the request transaction instruction, it needs to send the transaction result and the corresponding verification key to the public nodes of the blockchain network so that the public nodes can select nodes responsible for verification. The task of these verification nodes is to use the received data processing results and verification keys to verify the correctness and legality of the request transaction instruction.
[0116] This verification process not only ensures that transactions are conducted without disclosing any sensitive information, but also guarantees that only legitimate and valid transactions will be recorded on the blockchain.
[0117] S104: Obtain the target verification result sent by the public domain node, and when the target verification result is a preset result, execute the request transaction instruction, wherein the preset result is used to indicate that the transaction status of the request transaction instruction is a trusted state.
[0118] In this case, obtaining the target verification result sent by the public domain node means that the verification result of the public domain node on the requested transaction result can be obtained.
[0119] Understandably, in a blockchain network, the consensus mechanism requires multiple verifiers within the blockchain to independently verify a transaction and reach a consensus before the transaction can be confirmed. Therefore, if a private node needs to know whether it can execute the request transaction instruction corresponding to its node, it needs to obtain the verification results of other private nodes to determine whether sufficient consensus has been reached to accept or reject the transaction, thereby ensuring that the transaction is only recognized and executed after a majority of private nodes reach a consensus.
[0120] The purpose of determining whether the target verification result is the preset result is to determine whether the blockchain network has reached a consensus to authorize the private domain node that handles the user request to execute the transaction instruction.
[0121] Understandably, when a private node (such as a user node) initiates a transaction request, it generates a transaction result and may provide a related model parameter proof. To verify the correctness and legality of this result, the blockchain network identifies a target verification node. This target verification node independently verifies the requested transaction result using the provided model parameter proof and verification key, and generates a corresponding verification result. Subsequently, if the verification result indicates that the transaction result is valid (i.e., the preset result has been achieved), the blockchain network can determine that there is sufficient consensus to allow the original private node that initiated the transaction to execute the transaction instruction.
[0122] If the target verification result is the preset result, it indicates that the blockchain network has reached a consensus to authorize the private domain node that handles the user request to execute the transaction instruction. At this time, the request transaction instruction can be executed.
[0123] If the target verification result is the preset result, it indicates that the blockchain network has not reached a consensus to authorize the private domain node that handles the user request to execute the transaction instruction. In this case, the execution of the requested transaction instruction can be refused.
[0124] This embodiment provides a blockchain-based privacy-preserving transaction verification method. The method first obtains a request transaction instruction sent by a user and then uses ZKML technology to analyze and process the privacy-preserving model of the private domain node, obtaining a key pair for the privacy-preserving model. Next, based on the request transaction instruction, the privacy-preserving model, and the proof key contained in the key pair, the data processing result of the request transaction instruction is determined, and the data processing result and the verification key contained in the key pair are sent to the public domain node of the blockchain network. Upon receiving the target verification result sent by the public domain node, and if the target verification result is a preset result, the request transaction instruction is executed. This method effectively solves the privacy protection problem in blockchain applications when processing raw data and transaction data, while avoiding the direct exposure of sensitive information on the blockchain, thereby enhancing the security of data transmission.
[0125] Figure 2 The process of the blockchain-based privacy-preserving transaction verification method provided in this embodiment Figure 2 .like Figure 2 As shown, this embodiment is... Figure 1 Based on the embodiments, the blockchain-based privacy-preserving transaction verification method is described in detail. The blockchain-based privacy-preserving transaction verification method provided in this embodiment includes:
[0126] S201: Obtain the user's request transaction instruction and use ZKML technology to analyze and process the privacy protection model of the private domain node to obtain the key pair of the privacy protection model. The key pair includes: a proof key and a verification key corresponding to the proof key.
[0127] The explanation of step S201 is similar to that of step S101 above, and will not be repeated here.
[0128] S202: Register the verification key to a public node of the blockchain network via an oracle, so that the public node stores the verification key.
[0129] Registering the verification key to a public domain node via an oracle means that when information from a private domain node needs to be verified, the public domain node can quickly perform the verification without having to repeatedly obtain the verification key.
[0130] Understandably, once a public domain node stores the verification key of the private domain node, it can quickly verify the proof generated by the private domain node when needed, without having to obtain the key again each time.
[0131] Furthermore, in a blockchain network, all private nodes are aware that public nodes store the verification keys. This provides a foundation for trust and consensus within the system, thereby enhancing the transparency and credibility of the entire network, strengthening trust among network participants, and protecting their respective data privacy.
[0132] S203: Construct a first identity verification system based on the private domain node, the privacy protection model, and the public domain node.
[0133] The purpose of this step is to establish a secure and reliable verification mechanism between private nodes, the privacy protection model, and public nodes, so that private nodes in the blockchain network can effectively verify each other's identities when exchanging data and collaborating, thereby improving the security and trust of the entire network.
[0134] Understandably, by building a primary authentication system, it is possible not only to ensure that only verified nodes can participate in the network, preventing unauthorized access and operations, but also to verify that nodes possess certain specific attributes or permissions without disclosing sensitive information, thus ensuring the protection of personal and organizational data privacy.
[0135] S204: Input the request transaction instruction into the privacy protection model to obtain the request transaction result output by the privacy protection model. The data processing result includes: the request transaction result and the model parameter proof.
[0136] The purpose of inputting the transaction request instruction into the privacy protection model is to process the user's transaction request without exposing the user's sensitive information.
[0137] Understandably, privacy protection models ensure that users' personal data and transaction details (such as sensitive information like identity, contact information, and account details) are securely processed during transaction execution, thus preventing information leaks. Furthermore, privacy protection models can restrict access to user data, allowing only authorized systems and personnel to operate on it, and monitor and record all data processing activities for tracking and auditing purposes.
[0138] Therefore, by inputting transaction requests into the privacy protection model, a secure channel can be established between users and the trading platform, allowing users to trade with peace of mind without worrying about the infringement of their personal privacy, and also increasing users' trust in the platform.
[0139] S205: Based on the request transaction instruction, the privacy protection model, and the proof key, determine the model parameter proof of the privacy protection model.
[0140] The model parameter proof is used to verify the correctness of the model parameters used in processing the request transaction instruction.
[0141] By comprehensively considering the request transaction instruction, the privacy protection model, and the proof key, it is possible to verify whether the model parameters of the privacy protection model used in the request transaction process are correct and have not been tampered with. Thus, when it is proven that the parameters used in the privacy protection model are correct and have not been tampered with, it is not necessary to expose sensitive model parameters or user data.
[0142] In this step, firstly, a ZKML circuit is created based on the request transaction instruction, the privacy-preserving model, and the proof key. Then, the created ZKML circuit and proof key are used to generate a ZK proof that can verify the validity of the model parameters used to process the request transaction instruction without revealing any sensitive information.
[0143] S206: Send the requested transaction result, the model parameter proof, and the verification key to the public domain node, so that the public domain node can verify the requested transaction result based on the model parameter proof and the verification key to obtain the target verification result.
[0144] The purpose of this step is to allow public domain nodes to verify the correctness and legality of the requested transaction result based on the model parameters and the verification key.
[0145] Understandably, after a private node initiates a transaction and requests the execution of the transaction instruction, it needs to send the requested transaction result, along with the corresponding model parameter proof and verification key, to the public node so that the public node can select a node responsible for verification. The task of these verification nodes is to use the received model parameter proof and verification key to verify the correctness and legality of the transaction result.
[0146] This verification process not only ensures that transactions are conducted without disclosing any sensitive information, but also guarantees that only legitimate and valid transactions will be recorded on the blockchain.
[0147] Optionally, the request transaction result, the model parameter proof, and the verification key are sent to the public domain node so that the public domain node can verify the request transaction result based on the model parameter proof and the verification key to obtain the target verification result. A specific implementation process may include: any private domain node in the blockchain network obtains a verifiable secure random number sent by the public domain node, and determines whether the private domain node is a target verification node based on the verifiable secure random number. If so, the private domain node verifies the request transaction result based on the model parameter proof and the verification key to obtain at least one target verification result.
[0148] Among them, the verifiable secure random number can randomly select any private domain node in the blockchain network as the target verification node, ensuring that the allocation of verification tasks is fair and unpredictable, and preventing potential attackers from undermining the security of the network by predicting or manipulating node selection.
[0149] The purpose of determining whether any private domain node is the target verification node based on the verifiable secure random number is to determine whether the blockchain network is fair when selecting any private domain node.
[0150] Understandably, by using verifiable secure random numbers, blockchain networks can randomly select nodes in an unpredictable and impartial manner, thus preventing any potential attacker from compromising network security by predicting or manipulating node selection. This approach not only promotes equal opportunities among network participants but also enhances the transparency and trust of the entire network in selecting key validating nodes.
[0151] S207: Obtain the target verification result sent by the public domain node.
[0152] S208: Determine whether the target verification result is a preset result; if yes, proceed to step S209; otherwise, proceed to step S210.
[0153] The explanation of step S208 is the same as that in the above embodiments, and will not be repeated here.
[0154] The blockchain-based privacy-preserving transaction verification method provided in this embodiment first obtains the request transaction instruction sent by the user. Next, ZKML technology is used to analyze and process the privacy-preserving model, obtaining a key pair for the privacy-preserving model. The verification key contained in the key pair is then registered with a public domain node via an oracle, thereby constructing a first identity verification system based on the private domain node, the privacy-preserving model, and the public domain node. Then, the request transaction instruction is input into the privacy-preserving model, obtaining the request transaction result output by the privacy-preserving model. Based on the request transaction instruction, the privacy-preserving model, and the proof key contained in the key pair, the model parameter proof of the privacy-preserving model is determined. Then, the request transaction result, the model parameter proof, and the verification key are sent to the public domain node, and at least one verification result sent by the public domain node is obtained. Finally, if at least one verification result is a preset verification result, the request transaction instruction is executed.
[0155] This method utilizes ZKML technology, allowing private nodes to hide their model parameters and data content from the outside world, ensuring data privacy even during public verification. Simultaneously, by generating model parameter proofs, public nodes can verify whether the transaction results submitted by private nodes were generated by a specific privacy-preserving model, thus ensuring the reliability and consistency of the results.
[0156] Figure 3 The process of the blockchain-based privacy-preserving transaction verification method provided in this embodiment Figure 3 .like Figure 3 As shown, this embodiment is... Figure 2 Based on the embodiments, this embodiment provides a detailed explanation of the implementation process prior to obtaining model parameter information sent by public nodes of the blockchain network. The blockchain-based privacy-preserving transaction verification method provided in this embodiment includes:
[0157] S301: Based on federated learning and secure multi-party computation, generate a public-private key pair for the private domain node. The public-private key pair includes a public key parameter and a private key parameter corresponding to the public key parameter.
[0158] The public key parameter is used to encrypt data or verify signatures, while the corresponding private key parameter is used to decrypt data or create signatures.
[0159] By employing federated learning and secure multi-party computation, each private node generates a public-private key pair, which is associated with the identity of the private node.
[0160] Understandably, the public key parameter in a public-private key pair is used to encrypt data or verify signatures, while the private key parameter is used to decrypt data or create signatures, ensuring that only nodes holding the correct private key can access the encrypted information. This provides a secure mechanism for data exchange between private domain nodes, allowing them to share model updates and gradient information without directly exposing the original data.
[0161] S302: Register the public key parameters to the blockchain network through the oracle, so that the public domain nodes of the blockchain network can generate business identity certificates for the private domain nodes based on the public key parameters.
[0162] The purpose of this step is to provide private domain nodes with a secure, trusted, and compliant identity on the blockchain network while protecting privacy, so that they can participate in network activities such as federated learning and smart contract execution without worrying about identity security issues.
[0163] Understandably, by using oracles to register the public key parameters of private domain nodes to the blockchain network, a verified and secure identity, namely business identity proof, can be provided for the private domain nodes. This ensures that their identities are authenticated without disclosing sensitive information about the nodes, thereby protecting privacy while ensuring that private domain nodes can securely participate in activities on the blockchain.
[0164] Furthermore, by generating business identity certificates for private domain nodes, these nodes can freely participate in federated learning, execute smart contracts, and perform other operations without worrying about the security of their identity and transactions. This facilitates the establishment of a secure and trustworthy blockchain ecosystem and promotes collaboration and trust between different organizations.
[0165] S303: Obtain the business identity certificate sent by the public domain node, and construct the second identity verification system of the private domain node based on the business identity certificate, the public key parameter and the corresponding private key parameter.
[0166] The purpose of obtaining business identity verification in this step is to ensure that the private domain node can operate as an authenticated and trustworthy participant, while protecting its privacy and security. The purpose of building a second identity verification system for private domain nodes is to establish their identity and trustworthiness within the blockchain network.
[0167] Understandably, by obtaining the business identity verification sent by the public domain node and combining it with the public key parameters and their corresponding private key parameters, the private domain node can build its own identity verification system. This system provides a secure authentication mechanism for the private domain node. Thus, when the private domain node interacts with other nodes, such as participating in federated learning or executing smart contracts, it can rely on this verification system to prove the authenticity of its identity and ensure the integrity and confidentiality of transactions and communications are protected.
[0168] S304: Obtain the model parameter information sent by the public domain node, the model parameter information including: the basic model and the model parameters of the basic model.
[0169] The blockchain network consists of public domain nodes and private domain nodes. Public domain nodes are composed of multiple private domain nodes.
[0170] Public domain nodes refer to blockchain networks that anyone can freely join and use, characterized by high openness and decentralization. In public domain nodes, all data is publicly verifiable, anyone can participate in transactions, and network management and updates are decentralized.
[0171] Private domain nodes refer to nodes operated and managed by a single organization or institution within a specific blockchain network. Private domain nodes are typically used to achieve specific business needs and management objectives, such as internal supply chain management and digital identity authentication. In contrast to public domain blockchain networks, private domain nodes usually require identity authentication and access control, and involve relatively fewer participating nodes. Within a private domain node, data access and usage permissions are typically restricted, and the organization is solely responsible for network management and maintenance.
[0172] The purpose of this step is to ensure that the data source of the private domain node can still be used to train the basic model without being directly shared with other nodes or public domain nodes, thereby protecting the data privacy of the private domain node during data transmission.
[0173] Understandably, when public nodes in a blockchain network share their basic models and corresponding model parameters, each private node in the blockchain network can use this as a starting point and further train the model parameters (such as weights and biases) using its own data sources. This ensures that the data of private nodes is not directly shared with other nodes or public nodes, effectively protecting data privacy.
[0174] S305: Determine the encrypted transmission channel of the private domain node based on the public-private key pair.
[0175] The purpose of this step in determining the encrypted transmission channel for the private domain node is to ensure the confidentiality and integrity of the data during transmission.
[0176] Understandably, private domain nodes need to exchange and collaborate on data while ensuring data privacy and security. Therefore, asymmetric encryption can be achieved using public-private key pairs. The public key is used to encrypt data, while the corresponding private key is used to decrypt it. Only the recipient holding the correct private key can interpret the information. This protects data from unauthorized third-party access and ensures that even if data is intercepted during transmission, it cannot be tampered with or forged, thus maintaining data confidentiality and integrity.
[0177] S306: Based on the encrypted transmission channel, perform sample alignment processing on the node data samples of the private domain node to obtain aligned node data samples.
[0178] The node data sample is used to indicate the dataset owned by a single private domain node. These data samples are unique to that node, such as user information, transaction records, or other types of data.
[0179] The purpose of this step, which aligns the node data samples, is to effectively synchronize and integrate the data samples between nodes while protecting data privacy.
[0180] Understandably, in a blockchain network, each private node holds its own data samples. To collaboratively optimize a model, these samples must be aligned to ensure consistency in features and format. Therefore, by using encrypted transmission channels, nodes can securely synchronize and integrate samples without exposing the specific content of the data. This not only protects the data privacy of each private node but also promotes effective collaboration among nodes, collectively improving the performance and accuracy of the model.
[0181] S307: According to the target framework, the model parameters are separated to obtain parameter processing results, which include: frozen parameters and unfrozen parameters, wherein the parameter state of the frozen parameters is untrainable.
[0182] Frozen parameters refer to parameters that do not require training. Unfrozen parameters refer to parameters that require training.
[0183] The purpose of this step is to determine which model parameters will remain fixed during subsequent training (frozen parameters) and which parameters will be allowed to be updated to learn new features or tasks (unfrozen parameters).
[0184] Understandably, by separating the model parameters according to the target framework, it means that the private domain node can use the model parameters obtained from the public domain node as a training starting point, and then separate the model parameters based on this to obtain the model parameters that need to be updated and the model parameters that do not need to be updated. This helps the model to flexibly adapt to new datasets or tasks while retaining existing knowledge, while taking into account computational efficiency and generalization ability.
[0185] S308: Determine the objective function of the private domain node based on the aligned node data sample.
[0186] The purpose of this step is to determine a target function suitable for parameter training of private domain nodes.
[0187] Understandably, since the objective function can effectively guide how private domain nodes adjust and optimize their internal parameters in order to better achieve predetermined business goals or tasks, by determining an objective function suitable for the node data samples, it can be ensured that the private domain node model can effectively learn the patterns and features in the data during the training process, and ultimately improve the model's performance and prediction accuracy, thereby better adapting to the specific needs of the private domain node.
[0188] S309: According to the objective function and the aligned node data samples, iteratively train the unfrozen parameters to obtain the incremental model parameters.
[0189] Through iterative training, the unfrozen parameters can be optimized based on the characteristics of the node data samples of the private domain nodes and the guidance of the objective function, thereby improving the accuracy and generalization ability of the model.
[0190] Understandably, since iterative training allows the model to gradually adjust and optimize its parameters by traversing the dataset multiple times, and the objective function provides direction for parameter updates (e.g., by minimizing loss or improving accuracy), iteratively training the unfrozen parameters using aligned node data samples and the objective function not only allows the model to adapt to the data characteristics of specific private domain nodes, but also enhances its prediction or classification accuracy.
[0191] S310: Send the incremental model parameters to the public domain node so that the public domain node can perform secure aggregation processing on the multiple incremental model parameters to obtain incremental model gradient information.
[0192] This step is intended to enable public domain nodes to safely aggregate the incremental model parameters provided by private domain nodes, thereby obtaining the incremental gradient information of the global model.
[0193] Understandably, since public domain nodes are composed of multiple private domain nodes, by sending the incremental model parameters calculated by each private domain node to the centralized public domain node, all participating private domain nodes can collaboratively participate in the training process of the basic model. Each private domain node contributes its own knowledge without sharing the original data, thus protecting their individual data privacy while achieving an overall improvement in model performance across the entire network. This collaborative approach fully utilizes the data resources of each node to optimize the model while avoiding the direct exposure of sensitive information, thereby ensuring data security and privacy.
[0194] S311: Obtain the incremental model gradient information sent by the public domain node. The incremental model gradient information is obtained by the public domain node through secure aggregation processing of the incremental model parameters sent by multiple private domain nodes in the blockchain network. The incremental model parameters sent by different private domain nodes are different.
[0195] The purpose of this step is to update and improve the model parameters of the private domain node itself, so as to achieve synchronous improvement of the global model.
[0196] Understandably, incremental model gradient information is obtained through secure aggregation of incremental model parameters submitted by all private domain nodes. It represents how the global model optimizes based on the data from the entire network. Therefore, by acquiring the incremental model gradient information sent by public domain nodes, each private domain node can achieve synchronous improvement of its local model and the global model. This ensures that each private domain node's base model not only contains information from its local data but also reflects the latest learning outcomes of the entire network. This process promotes the collective improvement of the base model while avoiding the direct sharing of sensitive data, thus protecting data privacy while improving model performance.
[0197] S312: Decrypt the incremental model gradient information to obtain the target incremental gradient information of the private domain node, wherein the target incremental gradient information includes the target incremental gradient.
[0198] The purpose of decrypting the gradient information of the incremental model is to ensure that the data of all private domain nodes can be securely shared and utilized in the multi-party collaborative machine learning process, while protecting their respective privacy and data security.
[0199] Understandably, after obtaining the incremental model gradient information sent by the public domain node, since the incremental model gradient information contains the incremental model parameters of all private domain nodes, the target incremental gradient information suitable for a single private domain node can be obtained by decrypting the incremental model gradient information.
[0200] S313: Update the incremental model parameters according to the target incremental gradient to obtain the updated incremental model parameters.
[0201] The purpose of this step, which refines the incremental model parameters of the private domain nodes, is to ensure that the basic model of the private domain nodes remains consistent with the basic models of other private domain nodes in the entire network.
[0202] Understandably, since the target incremental gradients are based on the incremental model parameters of all nodes and are obtained through secure aggregation and decryption, they contain the comprehensive learning results of the entire network data. This gradient information provides guidance for each private node on how to adjust its model based on the global data.
[0203] Therefore, by using incremental model gradient information obtained from public domain nodes to update their own model parameters, private domain nodes can integrate knowledge from other parts of the network, thereby improving the performance of their own models. This allows private domain nodes to jointly improve the model quality of the entire network without directly sharing the original sensitive data.
[0204] S314: Generate a privacy protection model corresponding to the private domain node based on the updated incremental model parameters and the basic model.
[0205] The purpose of this step in generating the privacy protection model corresponding to the private domain node is to create a machine learning model for the private domain node that integrates global learning results, is sensitive to and applicable to local data, and does not disclose users' personal information.
[0206] Understandably, private nodes generate a privacy-preserving model by combining their own base model with incremental model parameters updated based on gradient information from public nodes. This privacy-preserving model incorporates collective intelligence learned from the entire network while being optimized for the local data characteristics of private nodes, and it does not leak any user's personal information during the processing.
[0207] Therefore, private domain nodes can obtain a machine learning model that adapts to local data and protects user privacy, and then use this model to process data without worrying about the security of sensitive information.
[0208] This embodiment provides a blockchain-based privacy-preserving transaction verification method. First, it generates public-private key pairs for private nodes through federated learning and secure multi-party computation, and registers the public key parameters contained in these pairs to the blockchain network via an oracle. Next, it obtains the business identity certificate generated by the public node for the public key parameters, and constructs a first identity verification system for the private node based on the business identity certificate, the public key parameters, and the corresponding private key parameters. Then, based on the public-private key pairs of the private node, it determines the encrypted transmission channel for the private node, and performs sample alignment processing on the node data samples of the private node according to the encrypted transmission channel, obtaining aligned node data samples. Next, it continues to obtain model parameter information sent by the public node, and freezes the model parameters contained in the model parameter information according to the target framework, obtaining parameter processing results. Finally, based on the aligned node data samples, it determines the objective function of the private node, and performs training processing on the unfrozen parameters contained in the parameter processing results according to the objective function and the aligned node data samples, obtaining incremental model parameters. Next, the incremental model gradient information sent by the public domain nodes is acquired, and the target incremental gradient information of the private domain nodes is determined based on this information. Finally, the privacy-preserving model corresponding to the private domain nodes is generated based on the updated incremental model parameters and the base model.
[0209] This method not only addresses the issue of blockchain application models' inability to protect the privacy of raw and transaction data, but also avoids the risk of sensitive data being directly exposed on the blockchain, enhancing the security of data transmission. Furthermore, this method improves computational efficiency and reduces network load, thereby enhancing the accuracy and security of the model.
[0210] Figure 4 A schematic diagram of the blockchain-based privacy-preserving transaction verification device provided in this application. Figure 4 As shown, this application provides a blockchain-based privacy-preserving transaction verification device 400, which includes:
[0211] The acquisition module 401 is used to acquire the transaction request instruction sent by the user;
[0212] The processing module 402 is used to analyze and process the privacy protection model of the private domain node using ZKML technology to obtain the key pair of the privacy protection model. The key pair includes: a proof key and a verification key corresponding to the proof key.
[0213] The determining module 403 is used to determine the data processing result of the request transaction instruction based on the request transaction instruction, the privacy protection model, and the proof key;
[0214] The sending module 404 is used to send the data processing result and the verification key to the public domain node of the blockchain network, so that the public domain node can determine the target verification result based on the data processing result and the verification key;
[0215] The acquisition module 401 is further configured to acquire the target verification result sent by the public domain node;
[0216] The execution module 405 is used to execute the request transaction instruction when the target verification result is a preset result, wherein the preset result is used to indicate that the transaction status of the request transaction instruction is a trustworthy status.
[0217] Optionally, the device further includes: an input module 406;
[0218] The input module 406 is used to input the request transaction instruction into the privacy protection model and obtain the request transaction result output by the privacy protection model;
[0219] The determining module 403 is further configured to determine the model parameter proof of the privacy protection model based on the request transaction instruction, the privacy protection model, and the proof key;
[0220] Sending the data processing result and the verification key to a public node of the blockchain network, so that the public node determines the target verification result based on the data processing result and the verification key, includes:
[0221] The sending module 404 is specifically used to send the request transaction result, the model parameter proof, and the verification key to the public domain node, so that the public domain node can verify the request transaction result based on the model parameter proof and the verification key to obtain the target verification result.
[0222] Optionally, the device further includes: a registration module 407;
[0223] The registration module 407 is used to register the verification key to a public node of the blockchain network through an oracle, so that the public node stores the verification key;
[0224] The device further includes: a construction module 408;
[0225] The construction module 408 is used to construct a first identity verification system based on the private domain node, the privacy protection model, and the public domain node.
[0226] Optionally, the acquisition module 401 is further configured to acquire model parameter information sent by the public domain node, the model parameter information including: the basic model and the model parameters of the basic model;
[0227] The determining module 403 is further configured to determine the incremental model parameters of the private domain node based on the node data sample of the private domain node and the model parameters.
[0228] The sending module 404 is specifically used to send the incremental model parameters to the public domain node, so that the public domain node can perform secure aggregation processing on the multiple incremental model parameters to obtain incremental model gradient information;
[0229] The acquisition module 401 is further configured to acquire the incremental model gradient information sent by the public domain node. The incremental model gradient information is obtained by the public domain node through secure aggregation processing of the incremental model parameters sent by multiple private domain nodes in the blockchain network. The incremental model parameters sent by different private domain nodes are different.
[0230] The processing module 402 is specifically used to update the incremental model parameters of the private domain node according to the incremental model gradient information to obtain the updated incremental model parameters, and generate the privacy protection model corresponding to the private domain node according to the updated incremental model parameters and the base model.
[0231] Optionally, the device further includes: a generation module 409;
[0232] The generation module 409 is used to generate a public-private key pair for the private domain node based on federated learning and secure multi-party computation. The public-private key pair includes a public key parameter and a private key parameter corresponding to the public key parameter.
[0233] The registration module 407 is further configured to register the public key parameters to the blockchain network through the oracle, so that the public domain nodes of the blockchain network can generate business identity certificates for the private domain nodes based on the public key parameters;
[0234] The acquisition module 401 is also used to acquire the business identity certificate sent by the public domain node;
[0235] The construction module 408 is further configured to construct a second authentication system for the private domain node based on the business identity certificate, the public key parameters, and the corresponding private key parameters.
[0236] Optionally, the determining module 403 is further configured to determine the encrypted transmission channel of the private domain node based on the public-private key pair;
[0237] The processing module 402 is further configured to perform sample alignment processing on the node data sample according to the encrypted transmission channel to obtain aligned node data samples.
[0238] The determining module 403 is specifically used to determine the incremental model parameters based on the aligned node data samples and the model parameters.
[0239] Optionally, the processing module 402 is further configured to separate the model parameters according to the target framework to obtain parameter processing results, the parameter processing results including: frozen parameters and unfrozen parameters, wherein the parameter state of the frozen parameters is an untrainable state;
[0240] The determining module 403 is further configured to determine the objective function of the private domain node based on the aligned node data sample;
[0241] The processing module 402 is specifically used to perform iterative training processing on the unfrozen parameters according to the objective function and the aligned node data samples to obtain the incremental model parameters.
[0242] Optionally, the processing module 403 is further configured to decrypt the incremental model gradient information to obtain the target incremental gradient information of the private domain node, wherein the target incremental gradient information includes: target incremental gradient;
[0243] The processing module 402 is specifically used to update the incremental model parameters according to the target incremental gradient to obtain the updated incremental model parameters.
[0244] Figure 5 A schematic diagram of the structure of the blockchain-based privacy-preserving transaction verification device provided in this application. Figure 5 As shown, this application provides a blockchain-based privacy-preserving transaction verification device 500, which includes: a receiver 501, a transmitter 502, a processor 503, and a memory 504.
[0245] Receiver 501 is used to receive instructions and data;
[0246] Transmitter 502 is used to send commands and data;
[0247] Memory 504 is used to store instructions executed by the computer;
[0248] The processor 503 is used to execute computer execution instructions stored in the memory 504 to implement the various steps of the blockchain-based privacy-preserving transaction verification method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing embodiments of the blockchain-based privacy-preserving transaction verification method.
[0249] Optionally, the memory 504 can be either standalone or integrated with the processing 503.
[0250] When the memory 504 is set up independently, the electronic device also includes a bus for connecting the memory 504 and the processor 503.
[0251] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the blockchain-based privacy-preserving transaction verification method performed by the aforementioned blockchain-based privacy-preserving transaction verification device.
[0252] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0253] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application 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 or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A blockchain-based privacy-preserving transaction verification method, characterized in that, The method includes: The system obtains the user's request transaction instruction and uses ZKML technology to analyze and process the privacy protection model of the private domain node to obtain the key pair of the privacy protection model. The key pair includes: a proof key and a verification key corresponding to the proof key. Based on the requested transaction instruction, the privacy protection model, and the proof key, determine the data processing result of the requested transaction instruction; The data processing result and the verification key are sent to the public domain node of the blockchain network, so that the public domain node can determine the target verification result based on the data processing result and the verification key; Obtain the target verification result sent by the public domain node, and execute the request transaction instruction when the target verification result is a preset result. The preset result is used to indicate that the transaction status of the request transaction instruction is a trusted state.
2. The method according to claim 1, characterized in that, The data processing results include: a request transaction result and model parameter proof. The step of determining the data processing result of the request transaction instruction based on the request transaction instruction, the privacy protection model, and the proof key includes: The request transaction instruction is input into the privacy protection model to obtain the request transaction result output by the privacy protection model; Based on the request transaction instruction, the privacy protection model, and the proof key, determine the model parameter proof of the privacy protection model; Sending the data processing result and the verification key to a public node of the blockchain network, so that the public node determines the target verification result based on the data processing result and the verification key, includes: The request transaction result, the model parameter proof, and the verification key are sent to the public domain node, so that the public domain node can verify the request transaction result based on the model parameter proof and the verification key to obtain the target verification result.
3. The method according to claim 1, characterized in that, The method employs ZKML technology to analyze and process the privacy protection model of the private domain node, obtaining a key pair for the privacy protection model. The key pair includes a proof key and a corresponding verification key. The method further includes: The verification key is registered to a public node of the blockchain network via an oracle, so that the public node stores the verification key. A first identity verification system is constructed based on the private domain nodes, the privacy protection model, and the public domain nodes.
4. The method according to claim 1, characterized in that, Before obtaining the user's requested transaction instruction, the method further includes: Obtain the model parameter information sent by the public domain node, the model parameter information including: the base model and the model parameters of the base model; Based on the node data samples of the private domain node and the model parameters, the incremental model parameters of the private domain node are determined, and the incremental model parameters are sent to the public domain node so that the public domain node can perform secure aggregation processing on the multiple incremental model parameters to obtain incremental model gradient information. The incremental model gradient information sent by the public domain node is obtained. The incremental model gradient information is obtained by the public domain node through secure aggregation of incremental model parameters sent by multiple private domain nodes in the blockchain network. Different private domain nodes send different incremental model parameters. Based on the incremental model gradient information, the incremental model parameters of the private domain node are updated to obtain the updated incremental model parameters. Based on the updated incremental model parameters and the base model, the privacy protection model corresponding to the private domain node is generated.
5. The method according to claim 4, characterized in that, Before obtaining the model parameter information sent by the public domain node, the method further includes: Based on federated learning and secure multi-party computation, a public-private key pair is generated for the private domain node. The public-private key pair includes a public key parameter and a private key parameter corresponding to the public key parameter. The public key parameters are registered with the blockchain network through the oracle, so that the public domain nodes of the blockchain network can generate business identity certificates for the private domain nodes based on the public key parameters. Obtain the business identity certificate sent by the public domain node, and construct a second identity verification system for the private domain node based on the business identity certificate, the public key parameter, and the corresponding private key parameter.
6. The method according to claim 4, characterized in that, The step of determining the incremental model parameters of the private domain node based on the node data samples of the private domain node and the model parameters includes: Based on the public-private key pair, the encrypted transmission channel of the private domain node is determined; Based on the encrypted transmission channel, the node data sample is subjected to sample alignment processing to obtain aligned node data sample; The incremental model parameters are determined based on the aligned node data samples and the model parameters.
7. The method according to claim 6, characterized in that, The step of determining the incremental model parameters based on the aligned node data samples and the model parameters includes: According to the target framework, the model parameters are separated to obtain parameter processing results, which include: frozen parameters and unfrozen parameters. The parameter state of the frozen parameters is untrainable. Based on the aligned node data sample, determine the objective function of the private domain node; The unfrozen parameters are iteratively trained according to the objective function and the aligned node data samples to obtain the incremental model parameters.
8. The method according to claim 4, characterized in that, The step of updating the incremental model parameters of the private domain node based on the incremental model gradient information to obtain the updated incremental model parameters includes: The incremental model gradient information is decrypted to obtain the target incremental gradient information of the private domain node, wherein the target incremental gradient information includes: the target incremental gradient; The incremental model parameters are updated based on the target incremental gradient to obtain the updated incremental model parameters.
9. A blockchain-based privacy-preserving transaction verification device, comprising: The acquisition module is used to acquire transaction requests sent by the user. The processing module is used to analyze and process the privacy protection model of the private domain node using ZKML technology to obtain the key pair of the privacy protection model. The key pair includes: a proof key and a verification key corresponding to the proof key. The determination module is used to determine the data processing result of the request transaction instruction based on the request transaction instruction, the privacy protection model, and the proof key; A sending module is used to send the data processing result and the verification key to the public domain node, so that the public domain node can determine the target verification result based on the data processing result and the verification key; The acquisition module is also used to acquire the target verification result sent by the public domain node; An execution module is used to execute the request transaction instruction when the target verification result is a preset result, wherein the preset result is used to indicate that the transaction status of the request transaction instruction is a trustworthy status.
10. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the blockchain-based privacy-preserving transaction verification method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the blockchain-based privacy-preserving transaction verification method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the blockchain-based privacy-preserving transaction verification method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Block chain supervisible privacy protection method based on zero knowledge proof
CN115564434A
Civil administration data privacy protection method and system based on block chain
CN116933278A