Privacy data processing method and device based on alliance chain, equipment and storage medium
By combining smart contracts with off-chain nodes, privacy call parameters are parsed and processed to generate zero-knowledge proofs, solving the privacy and scalability issues when sharing privacy data in consortium blockchains, and achieving efficient privacy data processing and security protection.
Patent Information
- Application Number
- CN202211005208.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-08-22
AI Technical Summary
In existing consortium blockchains, sharing privacy datasets within authorized scopes can lead to reduced data privacy and poor computational and scalability.
By cooperating with smart contracts and off-chain nodes, privacy call parameters are parsed, instructing off-chain participants to perform privacy processing, and generating zero-knowledge proofs to verify the processing results, ensuring the security of privacy data and the scalability of the system.
It enables transaction processing of privacy data, enhances the performance of the consortium blockchain, fully protects the security of privacy data, and improves the scalability of the consortium blockchain system.
Smart Images

Figure CN115374473B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular to a privacy data processing method and device based on alliance chain, equipment and storage medium. BACKGROUND
[0002] The alliance chain refers to a blockchain used in a certain group or organization, has certain restrictions and requirements for the joined organizations and units, is only for members of a certain specific group and limited third parties, internally specifies multiple pre-selected nodes as accountants, and the generation of each block is determined by all pre-selected nodes. Fabric is a core blockchain framework promoted by the Hyperledger Alliance.
[0003] The existing privacy data set in the alliance chain and the fabric alliance chain needs to be shared within a certain range of permissions, so as to ensure the verifiability of data and algorithms, but this also reduces the privacy of data to a certain extent. SUMMARY
[0004] The present application provides a privacy data processing method and device based on alliance chain, equipment and storage medium, which can cooperate with the off-chain nodes of the participants through the smart contract, process the transactions involving the privacy data, enhance the performance of the alliance chain, and fully protect the security of the privacy data.
[0005] In a first aspect, the embodiments of the present application disclose a privacy data processing method based on an alliance chain system, which comprises the following steps:
[0006] Determine the privacy calling parameters in response to the calling request of the business party to the business smart contract through the business smart contract in the alliance chain system;
[0007] Obtain the privacy parameter analysis result by analyzing the privacy calling parameters through the contract agent of the business smart contract;
[0008] Publish the privacy processing event to the off-chain participant to which the privacy calling parameters belong through the business smart contract according to the privacy parameter analysis result, so as to instruct the off-chain participant to execute the following: based on the privacy data set, perform privacy processing according to the privacy parameter analysis result to obtain the privacy processing result; and generate zero-knowledge proof for the privacy processing result;
[0009] Obtain the proof verification result by verifying the zero-knowledge proof through the contract agent;
[0010] Obtain the privacy processing result and the proof verification result from the contract agent through the business smart contract.
[0011] Secondly, embodiments of this application disclose a privacy data processing method based on a consortium blockchain system, the method comprising:
[0012] The privacy processing event is obtained from the business smart contract in the consortium blockchain system. The privacy processing event is published in the following manner: in response to the business party's call request to the business smart contract, the privacy call parameters are determined; the privacy call parameters are parsed through the contract proxy of the business smart contract to obtain the privacy parameter parsing result; and the privacy processing event is published to the off-chain participant to which the privacy call parameter belongs through the business smart contract according to the privacy parameter parsing result.
[0013] Based on the privacy dataset, privacy processing is performed according to the privacy parameter parsing results to obtain the privacy processing result, and a zero-knowledge proof is generated for the privacy processing result.
[0014] The zero-knowledge proof is fed back to the contract agent to perform the following: the zero-knowledge proof is verified by the contract agent to obtain the proof verification result, and the privacy processing result and the proof verification result are fed back to the business smart contract.
[0015] Thirdly, embodiments of this application also provide a privacy data processing device based on a consortium blockchain system, the device comprising:
[0016] The parameter determination module is used to determine privacy call parameters in response to the business party's call request to the business smart contract through the business smart contract in the consortium blockchain system.
[0017] The encapsulation result acquisition module is used to parse the privacy call parameters through the contract proxy of the business smart contract to obtain the privacy parameter parsing result;
[0018] The proof generation module is used to publish a privacy processing event to the off-chain participant to which the privacy call parameter belongs through the business smart contract, based on the privacy parameter parsing result, and to instruct the off-chain participant to perform the following: perform privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain the privacy processing result; generate a zero-knowledge proof for the privacy processing result;
[0019] The verification result acquisition module is used to verify the zero-knowledge proof through the contract proxy to obtain the proof verification result;
[0020] The result acquisition module is used to obtain the privacy processing result and the proof verification result from the contract agent through the business smart contract.
[0021] Fourthly, embodiments of this application also provide a privacy data processing device based on a consortium blockchain system, the device comprising:
[0022] The event publishing module is used to obtain privacy processing events published by business smart contracts in the consortium blockchain system. The privacy processing events are published in the following manner: privacy call parameters are determined in response to a business party's call request to the business smart contract; the privacy call parameters are parsed through the business smart contract's contract proxy to obtain privacy parameter parsing results; and the privacy processing event is published by the business smart contract to the off-chain participants to which the privacy call parameters belong, based on the privacy parameter parsing results.
[0023] The result processing module is used to perform privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain the privacy processing result, and to generate a zero-knowledge proof for the privacy processing result.
[0024] The result feedback module is used to feed back the zero-knowledge proof to the contract agent, and is used to perform the following: verify the zero-knowledge proof through the contract agent to obtain the proof verification result, and feed back the privacy processing result and the proof verification result to the business smart contract.
[0025] Fifthly, embodiments of this application also disclose an electronic device, the electronic device comprising:
[0026] At least one processor; and
[0027] A memory communicatively connected to the at least one processor; wherein,
[0028] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the privacy data processing method based on a consortium blockchain system as described in any embodiment of the present invention.
[0029] Sixthly, embodiments of this application also disclose a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, which are used to cause a processor to execute the privacy data processing method based on a consortium blockchain system as described in any embodiment of the present invention.
[0030] The technical solution of this invention, through the cooperation of a business smart contract and the off-chain nodes of participating parties, with the contract proxy of the business smart contract acting as an intermediary, parses and encapsulates the call request involving privacy datasets to obtain the privacy parameter parsing result. The business smart contract then publishes a privacy processing event to the off-chain participant to which the privacy call parameter belongs, and verifies the offline calculation result. This solves the problems of the inability to calculate on-chain privacy data and poor scalability in the prior art, realizes transaction processing involving privacy data, enhances the performance of the consortium blockchain, can fully protect the security of privacy data, and improves the scalability of the consortium blockchain system.
[0031] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a flowchart of a privacy data processing method based on a consortium blockchain system according to Embodiment 1 of the present invention;
[0034] Figure 2 This is a flowchart of a privacy data processing method based on a consortium blockchain system according to Embodiment 2 of the present invention; Figure 3 This is a flowchart of a privacy data processing method based on a consortium blockchain system according to Embodiment 3 of the present invention;
[0035] Figure 4 This is a schematic diagram illustrating the signaling interaction between the business party, business smart contract, contract agent, and off-chain participants in a specific embodiment provided in Embodiment 4 of this application;
[0036] Figure 5 This is a schematic diagram of the structure of a privacy data processing device based on a consortium blockchain system according to Embodiment 5 of the present invention;
[0037] Figure 6 This is a schematic diagram of the structure of a privacy data processing device based on a consortium blockchain system according to Embodiment Six of the present invention;
[0038] Figure 7 This is a schematic diagram of the structure of an electronic device that implements a privacy data processing method based on a consortium blockchain system according to an embodiment of the present invention. Detailed Implementation
[0039] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0041] Example 1
[0042] Figure 1 This is a flowchart illustrating a privacy data processing method based on a consortium blockchain system, as provided in Embodiment 1 of the present invention. This embodiment is applicable to the processing of privacy data in a consortium blockchain. The method can be executed by a privacy data processing device based on a consortium blockchain system. This device can be implemented in hardware and / or software and can be configured in an electronic device, which can be a node in the consortium blockchain, participating in on-chain transaction processing. Figure 1 As shown, the method includes:
[0043] S110. Determine privacy call parameters in response to the business party's call request to the business smart contract through the business smart contract in the consortium blockchain system.
[0044] Smart contracts are publicly available business logic shared by all participants on the blockchain. They ensure the reliable maintenance of the blockchain ledger data without the need for a third party. In current consortium blockchain applications, smart contract code logic is typically designed and developed based on business logic rules. Common contract logic is encapsulated into a reusable code library that can be used across multiple business smart contracts. Business smart contracts are used to implement business requirements within the blockchain and can participate in the blockchain network. The business party is the requester that sends a call request to the business smart contract. Privacy call parameters can be parameters belonging to privacy data; for example, privacy call parameters could be ID card numbers and mobile phone numbers, which are not publicly disclosed and can be provided by the participant whose privacy data belongs.
[0045] Specifically, business users, based on their own business needs, call the corresponding functional interface of the business smart contract to determine the required call parameters. If the call parameters involve a privacy dataset in the blockchain network, then these call parameters are privacy call parameters, and these parameters are associated with privacy data within the privacy dataset. Business users can only access the privacy call parameters; they have no access rights to the privacy data associated with them. In other words, the privacy data itself will not be leaked to the business users. Taking a money transfer as an example, privacy call parameters could include descriptions of the paying account and the receiving account. It should be noted that if the call parameters do not involve a privacy dataset—meaning the data associated with the call parameters is public data and not privacy data—then all participants in the blockchain network have processing rights for these call parameters and can process the call request through the business smart contract.
[0046] S120. The privacy call parameters are parsed through the contract proxy of the business smart contract to obtain the privacy parameter parsing result.
[0047] Within the blockchain node containing the business smart contract, a contract proxy is also deployed. This contract proxy interacts not only with the business smart contract but also with off-chain participants within the blockchain. These off-chain participants are providers of the privacy dataset. Some nodes among them participate in the consortium blockchain network, i.e., participate in its consensus mechanism, while others are not part of the network and are only used for off-chain computation. The contract proxy is used to obtain call requests involving the privacy dataset and parse the privacy call parameters in the requests to obtain the privacy parameter parsing results.
[0048] Specifically, the contract proxy can determine the off-chain participants to which the privacy call parameters belong by parsing, as well as the processing algorithms and parameters for privacy data, and encapsulate the above information as the privacy parameter parsing result.
[0049] Optionally, the privacy call parameters can be parsed through the contract proxy of the business smart contract to obtain the privacy parameter parsing result. Specifically, this may include: determining the off-chain participant to which the privacy data belongs and the privacy function identifier of the off-chain participant based on the summary information of the privacy data through the contract proxy of the business smart contract; and encapsulating the off-chain participant, the privacy function identifier, the summary information of the privacy data, and the reference address of the privacy data to obtain the privacy parameter parsing result.
[0050] The summary information of the privacy data can be a hash of the original privacy data, used to identify the off-chain participant to whom the privacy data belongs and the privacy function identifier of that off-chain participant. The off-chain participant is the provider of the privacy dataset.
[0051] Specifically, through the contract proxy of the business smart contract, the off-chain participant to which the privacy data belongs and the privacy function identifier of the off-chain participant are determined based on the summary information of the privacy data. Then, the off-chain participant, the privacy function identifier, the summary information of the privacy data and the reference address of the privacy data are encapsulated to obtain the privacy parameter parsing result. This lays the foundation for the off-chain participant to perform off-chain privacy calculations based on its own privacy dataset and the privacy parameter parsing result.
[0052] S130. Through the business smart contract, a privacy processing event is published to the off-chain participant to which the privacy call parameter belongs, based on the privacy parameter parsing result, to instruct the off-chain participant to perform the following: based on the privacy dataset, perform privacy processing according to the privacy parameter parsing result to obtain the privacy processing result; generate a zero-knowledge proof for the privacy processing result.
[0053] S140. The zero-knowledge proof is verified through the contract proxy to obtain the proof verification result.
[0054] Privacy processing events are events that process data involving privacy datasets. Privacy datasets are private data, inaccessible to other blockchain nodes. Publishing privacy processing events to the off-chain participants whose privacy call parameters belong to can improve the processing efficiency of the consortium blockchain system. Zero-knowledge proofs enable a prover to convince a verifier that a statement is true without providing any useful information. Essentially, a zero-knowledge proof is a protocol involving two or more parties, outlining a series of steps required for two or more parties to complete a task. The prover proves to the verifier that they know or possess a certain message, but the proof process cannot reveal any information about the proven message to the verifier. This invention generates zero-knowledge proofs for privacy processing results, which can improve the credibility of the computation results.
[0055] Specifically, off-chain participants send the generated zero-knowledge proofs to the contract agent, which verifies the zero-knowledge proofs. The verification results can include: verification passed or verification failed.
[0056] S150. Obtain the privacy processing result and the proof verification result from the contract agent through the business smart contract.
[0057] If the contract agent successfully verifies the zero-knowledge proof, indicating that the privacy processing result is credible, it will then feed back the privacy processing result and the proof verification result to the business smart contract.
[0058] Optionally, the privacy data processing method based on the consortium blockchain system also includes: extracting the privacy function identifier of the off-chain participant from the registration request of the off-chain participant through a contract proxy.
[0059] By using contract proxy, the privacy function identifiers of off-chain participants can be extracted from their registration requests. This allows for preprocessing and can improve the system's processing efficiency and scalability.
[0060] The technical solution of this invention determines privacy call parameters in response to a business party's call request to a business smart contract; the privacy call parameters are parsed by the contract proxy of the business smart contract to obtain privacy parameter parsing results; the business smart contract instructs off-chain participants to perform privacy processing based on a privacy dataset and the privacy parameter parsing results, obtaining privacy processing results and generating zero-knowledge proofs; the zero-knowledge proofs are verified by the contract proxy; and the privacy processing results and proof verification results are obtained from the contract proxy by the business smart contract. Through the cooperation of the smart contract and the contract proxy, transaction requests involving privacy datasets are distributed to the off-chain nodes of the participating parties for execution. The off-chain nodes not only process the transaction requests based on the privacy dataset to obtain privacy processing results but also generate zero-knowledge proofs for the privacy processing results. This achieves transaction processing involving privacy data, enhances the performance of the consortium blockchain, fully protects the security of privacy data, and improves the scalability of the consortium blockchain system.
[0061] Example 2
[0062] Figure 2This is a flowchart of a privacy data processing method based on a consortium blockchain system, provided in Embodiment 2 of the present invention. This embodiment, based on the above embodiments, further optimizes and expands the determination of privacy call parameters in response to a business party's call request to the business smart contract, and can be combined with the above optional implementation methods. The step of determining privacy call parameters in response to a business party's call request to the business smart contract includes: extracting the privacy data identifier to be called from the business party's call request to the business smart contract; and querying the privacy data's summary information and reference address from the blockchain based on the privacy data identifier. Figure 2 As shown, the method includes:
[0063] S210. Extract the privacy data identifier to be invoked from the business party's call request to the business smart contract through the business smart contract in the consortium blockchain system.
[0064] S220. Query the summary information and reference address of the privacy data from the blockchain based on the privacy data identifier.
[0065] The summary information of the privacy data is the hash of the original privacy data. The reference address of the privacy data is the location address of the privacy data in the privacy dataset, used to locate the privacy data in the privacy dataset for easy data retrieval. The summary information of the privacy data can be pre-reported to the blockchain by the parties involved in the privacy dataset.
[0066] Specifically, by extracting the privacy data identifier to be invoked from the business party's call request to the business smart contract, and then querying the privacy data summary information and the privacy data reference address from the blockchain based on the privacy data identifier, the privacy data summary information lays the foundation for generating zero-knowledge proofs for the privacy processing results. By determining the privacy data reference address, off-chain participants can accurately and efficiently locate the privacy data corresponding to the privacy call parameters, thereby improving the processing efficiency of the consortium blockchain system.
[0067] S230. The privacy call parameters are parsed through the contract proxy of the business smart contract to obtain the privacy parameter parsing result.
[0068] S240. Through the business smart contract, a privacy processing event is published to the off-chain participant to which the privacy call parameter belongs, based on the privacy parameter parsing result, to instruct the off-chain participant to perform the following: based on the privacy dataset, perform privacy processing according to the privacy parameter parsing result to obtain the privacy processing result; generate a zero-knowledge proof for the privacy processing result.
[0069] S250. The zero-knowledge proof is verified through the contract proxy to obtain the proof verification result.
[0070] S260. Obtain the privacy processing result and the proof verification result from the contract proxy through the business smart contract. The technical solution of this embodiment of the invention, through the business smart contract in the consortium blockchain system, extracts the privacy data identifier to be invoked from the business party's call request to the business smart contract, and queries the summary information and reference address of the privacy data from the blockchain based on the privacy data identifier, which can improve the processing efficiency of the consortium blockchain system. Through the contract proxy of the business smart contract, the privacy call parameters are parsed to obtain the privacy parameter parsing result. Through the business smart contract, a privacy processing event is published to the off-chain participant to which the privacy call parameters belong, instructing the off-chain participant to perform privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain the privacy processing result. A zero-knowledge proof is generated for the privacy processing result. Through the contract proxy, the zero-knowledge proof is verified to obtain the proof verification result. Through the business smart contract, the privacy processing result and the proof verification result are obtained from the contract proxy. This realizes transaction processing involving privacy data, enhances the performance of the consortium blockchain, can fully protect the security of privacy data, and improves the scalability of the consortium blockchain system.
[0071] Example 3
[0072] Figure 3 This is a flowchart illustrating a privacy data processing method based on a consortium blockchain system, as provided in Embodiment 3 of the present invention. This embodiment is applicable to situations involving the processing of privacy data within a consortium blockchain. The method can be executed by a privacy data processing device based on a consortium blockchain system. This device can be implemented in hardware and / or software and can be configured in the electronic devices of off-chain participants, belonging to an off-chain node. Figure 3 As shown, the method includes:
[0073] S310. Obtain privacy processing events published by business smart contracts in the consortium blockchain system; wherein, the privacy processing events are published in the following manner: in response to a business party's call request to the business smart contract, determine privacy call parameters; through the contract proxy of the business smart contract, parse the privacy call parameters to obtain privacy parameter parsing results; through the business smart contract, publish the privacy processing event to the off-chain participants to which the privacy call parameters belong, based on the privacy parameter parsing results.
[0074] Privacy processing events are events that process data involving privacy datasets. Privacy access parameters can be parameters belonging to the privacy data; for example, privacy access parameters can be privacy parameters such as ID card numbers and mobile phone numbers. These privacy parameters are not publicly disclosed and can be provided by the parties involved in the privacy data.
[0075] Optionally, the privacy parameter parsing result may include a privacy function identifier, a summary of the privacy data, and a reference address of the privacy data.
[0076] The summary information of the privacy data can be the hash of the original privacy data. The reference address of the privacy data is the location address of the privacy data in the privacy dataset, used to locate the privacy data in the privacy dataset for easy data retrieval.
[0077] S320. Based on the privacy dataset, perform privacy processing according to the privacy parameter parsing result to obtain the privacy processing result, and generate a zero-knowledge proof for the privacy processing result.
[0078] Within this framework, the privacy dataset is considered private data and is inaccessible to other blockchain nodes. Zero-knowledge proofs enable a prover to convince a verifier that a statement is true without revealing any useful information to the verifier. Essentially, a zero-knowledge proof is a protocol involving two or more parties, outlining a series of steps required for them to complete a task. The prover demonstrates to the verifier that they know or possess certain information, but the proof process cannot disclose any information about the proven information to the verifier.
[0079] Optionally, the step of performing privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain a privacy processing result, and generating a zero-knowledge proof for the privacy processing result, may specifically include: querying the original privacy data from the privacy dataset based on the reference address of the privacy data; determining the privacy function based on the privacy function identifier; processing the original privacy data based on the privacy function to obtain a privacy processing result; and generating a zero-knowledge proof based on the summary information of the privacy data and the original privacy data.
[0080] The privacy data reference address is the location address of the privacy data within the privacy dataset, used to locate the privacy data for easy querying. The privacy function identifier is used to locate the privacy function. The privacy function is defined locally and registered in the blockchain. Based on the privacy function, the original privacy data is processed to obtain the privacy processing result. Then, a hash operation is performed on the original privacy data to obtain the privacy data digest information. Finally, a zero-knowledge proof is generated based on the privacy data digest information and the original privacy data.
[0081] Specifically, by querying the original privacy data from the privacy dataset based on the reference address of the privacy data, determining the privacy function based on the privacy function identifier, processing the original privacy data based on the privacy function to obtain the privacy processing result, and finally generating a zero-knowledge proof based on the summary information and the original privacy data, the security of the privacy data can be fully protected.
[0082] S330. Feed back the zero-knowledge proof to the contract agent to perform the following: verify the zero-knowledge proof through the contract agent to obtain the proof verification result, and feed back the privacy processing result and the proof verification result to the business smart contract.
[0083] If the contract agent verifies the zero-knowledge proof and the verification result is successful, it will send the privacy processing result and the proof verification result back to the business smart contract.
[0084] The technical solution of this invention acquires privacy-processing events published by business smart contracts in a consortium blockchain system. Then, based on a privacy dataset, it performs privacy processing according to the privacy parameter parsing results to obtain a privacy processing result. A zero-knowledge proof is generated for the privacy processing result, and finally, the zero-knowledge proof is fed back to the contract proxy. The zero-knowledge proof is then verified to obtain a proof verification result, and the privacy processing result and proof verification result are fed back to the business smart contract. Through the cooperation of smart contracts and contract proxies, transaction requests involving privacy datasets are distributed to the off-chain nodes of the participating parties for execution. The off-chain nodes not only process the transaction requests based on the privacy dataset to obtain privacy processing results but also generate zero-knowledge proofs for the privacy processing results. This achieves transaction processing involving privacy data, enhances the performance of the consortium blockchain, fully protects the security of privacy data, and improves the scalability of the consortium blockchain system.
[0085] Example 4
[0086] The following specific embodiment illustrates the privacy data processing method based on the consortium blockchain system described above. See details below. Figure 4 . Figure 4 This is a schematic diagram illustrating the signaling interaction between the business party, business smart contract, contract agent, and off-chain participants in a specific embodiment provided in this application.
[0087] S401. The business party sends a call request to the business smart contract in the consortium blockchain system. If the call request does not involve privacy data, then execute S409; if the call request involves privacy data, then execute S402.
[0088] S402. The business smart contract in the consortium blockchain system determines the privacy call parameters based on the call request and sends them to the contract agent.
[0089] S403. The contract agent parses the privacy call parameters to obtain the privacy parameter parsing results and sends them to the business smart contract.
[0090] S404. The business smart contract publishes a privacy processing event to the off-chain participant to which the privacy call parameter belongs based on the privacy parameter parsing result. The off-chain participant performs privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain the privacy processing result.
[0091] S405. Off-chain participants generate zero-knowledge proofs for the privacy processing results.
[0092] S406. Off-chain participants will provide the zero-knowledge proof results to the contract agent.
[0093] S407. The contract agent verifies the zero-knowledge proof and obtains the proof verification result.
[0094] S408, The contract agent sends the privacy processing results and proof verification results to the business smart contract.
[0095] S409. The business smart contract sends the obtained privacy processing results and proof verification results to the business party.
[0096] The technical solution of this invention, in a Fabric-like consortium blockchain, if a transaction request requires access to the privacy dataset of any participant, the smart contract, through a contract proxy, controls the off-chain node of that participant to process the transaction request based on the privacy dataset to obtain a privacy processing result, and generates a zero-knowledge proof for the privacy processing result. The contract proxy then verifies the zero-knowledge proof to obtain a proof verification result, and the smart contract obtains both the privacy processing result and the proof verification result. By cooperating with the off-chain nodes of the participating parties, transaction processing involving privacy data is achieved, enhancing the performance of the consortium blockchain.
[0097] Example 5
[0098] Figure 5 This is a schematic diagram of a privacy data processing device based on a consortium blockchain system, provided in Embodiment 5 of the present invention. Figure 5 As shown, the device includes:
[0099] The parameter determination module 510 is used to determine privacy call parameters in response to the call request of the business party to the business smart contract through the business smart contract in the consortium blockchain system.
[0100] The encapsulation result acquisition module 520 is used to parse the privacy call parameters through the contract proxy of the business smart contract to obtain the privacy parameter parsing result;
[0101] The proof generation module 530 is used to publish a privacy processing event to the off-chain participant to which the privacy call parameter belongs through the business smart contract based on the privacy parameter parsing result, and to instruct the off-chain participant to perform the following: perform privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain the privacy processing result; generate a zero-knowledge proof for the privacy processing result;
[0102] The verification result acquisition module 540 is used to verify the zero-knowledge proof through the contract proxy to obtain the proof verification result;
[0103] The result acquisition module 550 is used to obtain the privacy processing result and the proof verification result from the contract proxy through the business smart contract. The technical solution of this embodiment of the invention determines privacy call parameters in response to the business party's call request to the business smart contract; the contract proxy of the business smart contract parses the privacy call parameters to obtain a privacy parameter parsing result; the business smart contract instructs off-chain participants to perform privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain a privacy processing result and generate a zero-knowledge proof; the contract proxy verifies the zero-knowledge proof; and the business smart contract obtains the privacy processing result and the proof verification result from the contract proxy. Through the cooperation of the smart contract and the contract proxy, transaction requests involving privacy datasets are distributed to the off-chain nodes of the participants for execution. The off-chain nodes not only process the transaction requests based on the privacy dataset to obtain privacy processing results, but also generate zero-knowledge proofs for the privacy processing results. This realizes transaction processing involving privacy data, enhances the performance of the consortium blockchain, fully protects the security of privacy data, and improves the scalability of the consortium blockchain system.
[0104] Furthermore, the parameter determination module 510 is invoked, including:
[0105] The identifier extraction unit is used to extract the privacy data identifier to be invoked from the business party's call request to the business smart contract;
[0106] The information query unit is used to query the summary information and reference address of the privacy data from the blockchain based on the privacy data identifier.
[0107] Furthermore, the encapsulation result yields module 520, which includes:
[0108] The identifier determination unit is used to determine the off-chain participant to which the privacy data belongs and the privacy function identifier of the off-chain participant based on the summary information of the privacy data through the contract proxy of the business smart contract;
[0109] The information encapsulation unit is used to encapsulate the off-chain participant, the privacy function identifier, the summary information of the privacy data, and the reference address of the privacy data to obtain the privacy parameter parsing result.
[0110] Furthermore, the privacy data processing device based on the consortium blockchain system also includes: extracting the privacy function identifier of the off-chain participant from the registration request of the off-chain participant through a contract proxy.
[0111] The privacy data processing device based on a consortium blockchain system provided in this embodiment of the invention can execute the privacy data processing method based on a consortium blockchain system provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0112] Example 6
[0113] Figure 6 This is a schematic diagram of a privacy data processing device based on a consortium blockchain system, provided in Embodiment 5 of the present invention. Figure 6 As shown, the device includes:
[0114] Event publishing module 610 is used to obtain privacy processing events published by business smart contracts in the consortium blockchain system; wherein, the privacy processing events are published in the following manner: in response to the business party's call request to the business smart contract, privacy call parameters are determined; through the contract proxy of the business smart contract, the privacy call parameters are parsed to obtain privacy parameter parsing results; through the business smart contract, the privacy processing event is published to the off-chain participants to which the privacy call parameters belong, based on the privacy parameter parsing results;
[0115] The result processing module 620 is used to perform privacy processing based on the privacy dataset and the privacy parameter parsing result to obtain a privacy processing result, and to generate a zero-knowledge proof for the privacy processing result.
[0116] The result feedback module 630 is used to feed back the zero-knowledge proof to the contract agent and performs the following: the contract agent verifies the zero-knowledge proof to obtain the proof verification result, and feeds back the privacy processing result and the proof verification result to the business smart contract.
[0117] The technical solution of this invention acquires privacy-processing events published by business smart contracts in a consortium blockchain system. Then, based on a privacy dataset, it performs privacy processing according to the privacy parameter parsing results to obtain a privacy processing result. A zero-knowledge proof is generated for the privacy processing result, and finally, the zero-knowledge proof is fed back to the contract proxy. The zero-knowledge proof is then verified to obtain a proof verification result, and the privacy processing result and proof verification result are fed back to the business smart contract. Through the cooperation of smart contracts and contract proxies, transaction requests involving privacy datasets are distributed to the off-chain nodes of the participating parties for execution. The off-chain nodes not only process the transaction requests based on the privacy dataset to obtain privacy processing results but also generate zero-knowledge proofs for the privacy processing results. This achieves transaction processing involving privacy data, enhances the performance of the consortium blockchain, fully protects the security of privacy data, and improves the scalability of the consortium blockchain system.
[0118] Furthermore, the privacy parameter parsing result includes a privacy function identifier, a summary of the privacy data, and a reference address to the privacy data;
[0119] Furthermore, the result processing module 620 includes:
[0120] The original text query unit is used to query the original text of the privacy data from the privacy dataset based on the reference address of the privacy data;
[0121] A function determination unit is used to determine a privacy function based on the privacy function identifier;
[0122] The original text processing unit is used to process the original privacy data based on the privacy function to obtain a privacy processing result;
[0123] The proof generation unit is used to generate zero-knowledge proofs based on the summary information of the privacy data and the original text of the privacy data.
[0124] The privacy data processing device based on a consortium blockchain system provided in this embodiment of the invention can execute the privacy data processing method based on a consortium blockchain system provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0125] Example 7
[0126] Figure 7A schematic diagram of an electronic device 70 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0127] like Figure 7 As shown, the electronic device 70 includes at least one processor 71 and a memory, such as a read-only memory (ROM) 72 or a random access memory (RAM) 73, communicatively connected to the at least one processor 71. The memory stores computer programs executable by the at least one processor. The processor 71 can perform various appropriate actions and processes based on the computer program stored in the ROM 72 or loaded from storage unit 78 into the RAM 73. The RAM 73 can also store various programs and data required for the operation of the electronic device 70. The processor 71, ROM 72, and RAM 73 are interconnected via a bus 74. An input / output (I / O) interface 75 is also connected to the bus 74.
[0128] Multiple components in electronic device 70 are connected to I / O interface 75, including: input unit 76, such as keyboard, mouse, etc.; output unit 77, such as various types of monitors, speakers, etc.; storage unit 78, such as disk, optical disk, etc.; and communication unit 79, such as network card, modem, wireless transceiver, etc. Communication unit 79 allows electronic device 70 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0129] Processor 71 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 71 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 71 performs the various methods and processes described above, such as privacy data processing methods based on consortium blockchain systems.
[0130] In some embodiments, privacy data processing based on a consortium blockchain system can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 78. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 70 via ROM 72 and / or communication unit 79. When the computer program is loaded into RAM 73 and executed by processor 71, one or more steps of the privacy data processing based on a consortium blockchain system described above can be performed. Alternatively, in other embodiments, processor 71 can be configured to perform the privacy data processing method based on a consortium blockchain system by any other suitable means (e.g., by means of firmware).
[0131] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0132] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0133] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0134] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0135] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0136] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability.
[0137] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0138] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A privacy data processing method based on a consortium chain system, characterized in that, The method comprises: determining a privacy calling parameter in response to a calling request of a business party to a business smart contract in a consortium chain system; determining, by a contract agent of the business smart contract, a chain-off participation party to which privacy data belongs and a privacy function identifier of the chain-off participation party according to digest information of the privacy data; wherein the digest information of the privacy data is a hash of an original text of the privacy data; and the chain-off participation party is a provider providing a privacy data set; encapsulating the chain-off participation party, the privacy function identifier, the digest information of the privacy data, and a reference address of the privacy data to obtain a privacy parameter analysis result; publishing, by the business smart contract, a privacy processing event to the chain-off participation party to which the privacy calling parameter belongs according to the privacy parameter analysis result, to instruct the chain-off participation party to perform the following: performing privacy processing based on the privacy data set according to the privacy parameter analysis result to obtain a privacy processing result; and generating zero-knowledge proof for the privacy processing result; verifying, by the contract agent, the zero-knowledge proof to obtain a proof verification result; obtaining, by the business smart contract, the privacy processing result and the proof verification result from the contract agent.
2. The method of claim 1, wherein, The determining of the privacy calling parameter in response to the calling request of the business party to the business smart contract comprises: extracting a privacy data identifier to be called from the calling request of the business party to the business smart contract; querying the digest information of the privacy data and a reference address of the privacy data from the blockchain according to the privacy data identifier.
3. The method of claim 1, wherein, The method further comprises: extracting, by the contract agent, a privacy function identifier of a chain-off participation party from a registration request of the chain-off participation party.
4. A method for processing private data based on a consortium chain system, characterized in that, The method comprises: obtaining a privacy processing event published by a business smart contract in a consortium chain system; wherein the privacy processing event is published in the following manner: determining a privacy calling parameter in response to a calling request of a business party to the business smart contract; determining, by a contract agent of the business smart contract, a chain-off participation party to which privacy data belongs and a privacy function identifier of the chain-off participation party according to digest information of the privacy data; wherein the digest information of the privacy data is a hash of an original text of the privacy data; and the chain-off participation party is a provider providing a privacy data set; encapsulating the chain-off participation party, the privacy function identifier, the digest information of the privacy data, and a reference address of the privacy data to obtain a privacy parameter analysis result; and publishing, by the business smart contract, the privacy processing event to the chain-off participation party to which the privacy calling parameter belongs according to the privacy parameter analysis result; performing privacy processing based on the privacy data set according to the privacy parameter analysis result to obtain a privacy processing result, and generating zero-knowledge proof for the privacy processing result; feeding back the zero-knowledge proof to the contract agent, to perform the following: verifying, by the contract agent, the zero-knowledge proof to obtain a proof verification result, and feeding back the privacy processing result and the proof verification result to the business smart contract.
5. The method of claim 4, wherein, The privacy data set is based on the privacy parameter analysis result, privacy processing is performed to obtain a privacy processing result, and zero-knowledge proof is generated for the privacy processing result, comprising: According to the reference address of the privacy data, the original text of the privacy data is queried from the privacy data set; According to the privacy function identifier, determine the privacy function; Based on the privacy function, the original text of the privacy data is processed to obtain a privacy processing result; According to the summary information of the privacy data and the original text of the privacy data, generate zero-knowledge proof. 6.A privacy data processing apparatus based on a consortium chain system, characterized by comprising: The device comprises: The calling parameter determination module is used to determine the privacy calling parameter through the business smart contract in the alliance chain system in response to the calling request of the business party to the business smart contract; The encapsulation result obtaining module comprises an identifier determination unit and an information encapsulation unit; The identifier determination unit is used to determine the off-chain participant to which the privacy data belongs and the privacy function identifier of the off-chain participant through the contract agent of the business smart contract according to the summary information of the privacy data, wherein the summary information of the privacy data is the hash of the original text of the privacy data; the off-chain participant is a provider of the privacy data set; The information encapsulation unit is used to encapsulate the off-chain participant, the privacy function identifier, the summary information of the privacy data, and the reference address of the privacy data to obtain a privacy parameter analysis result; The proof generation module is used to publish a privacy processing event to the off-chain participant to which the privacy calling parameter belongs through the business smart contract according to the privacy parameter analysis result, for instructing the off-chain participant to perform the following: based on the privacy data set, privacy processing is performed according to the privacy parameter analysis result to obtain a privacy processing result; and zero-knowledge proof is generated for the privacy processing result; The verification result obtaining module is used to verify the zero-knowledge proof through the contract agent to obtain a proof verification result; The result obtaining module is used to obtain the privacy processing result and the proof verification result from the contract agent through the business smart contract. 7.A privacy data processing apparatus based on a consortium chain system, characterized by comprising: The device comprises: The event publishing module is used to obtain the privacy processing event published by the business smart contract in the alliance chain system; wherein the privacy processing event is published in the following way: the privacy calling parameter is determined in response to the calling request of the business party to the business smart contract; the off-chain participant to which the privacy data belongs and the privacy function identifier of the off-chain participant are determined through the contract agent of the business smart contract according to the summary information of the privacy data, wherein the summary information of the privacy data is the hash of the original text of the privacy data; the off-chain participant is a provider of the privacy data set; the privacy parameter analysis result is obtained by encapsulating the off-chain participant, the privacy function identifier, the summary information of the privacy data, and the reference address of the privacy data; and the privacy processing event is published to the off-chain participant to which the privacy calling parameter belongs through the business smart contract according to the privacy parameter analysis result; The result processing module is configured to perform privacy processing based on the privacy data set and according to the privacy parameter resolution result to obtain a privacy processing result, and generate zero-knowledge proof for the privacy processing result. The result feedback module is configured to feed back the zero-knowledge proof to the contract agent, and perform the following: verify the zero-knowledge proof through the contract agent to obtain a proof verification result, and feed back the privacy processing result and the proof verification result to the business smart contract.
8. An electronic device, comprising: Comprise: At least one processor; And The memory is in communication connection with the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the privacy data processing method based on the alliance chain system in any one of claims 1-3 or 4-5.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the privacy data processing method based on the alliance chain system in any one of claims 1-3 or 4-5 when executed.
Citation Information
Patent Citations
Contract calling method and device
CN112199701A
Data processing method, block chain, terminal equipment and storage medium
CN114240657A