Privacy data computing traceable system and method based on blockchain consensus mechanism
Patent Information
- Application Number
- CN202310603310.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-05-25
AI Technical Summary
两种方法都存在一定的问题:采用脱敏技术可能会导致数据的不完整
[0044] (1) In actual blockchain systems, in order to pursue reasonable fairness in consensus mechanisms, the current consensus mechanisms are quite complex. The existing blockchain consensus mechanisms have low security and high resource consumption. Therefore, it is particularly important to design a new consensus mechanism. To this end, this invention improves the consensus mechanism to realize data sharing and traceability in blockchain. The designed CPoW model under the credit model and the consensus protocol using the threshold cryptography scheme first ensure that the traceable consensus mechanism can complete both data sharing and data traceability. Finally, it also achieves the purpose of improving the system throughput and reducing resource consumption. Therefore, it has very good practical performance.
Smart Images

Figure CN116821952B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a traceable system and method for privacy data computation based on a blockchain consensus mechanism, specifically a trusted computation and traceability system and method for user privacy data, belonging to the field of trusted sharing and traceability of digital information. Background Technology
[0002] In recent years, blockchain technology has attracted widespread attention from researchers in the field of digital information. In traditional digital information exchange models, data management institutions use central data repositories to support transaction processes and computations. The database owner holds complete control and can manage access and update permissions. This limits the transparency and scalability of data assets, making it difficult for external access parties to ensure that data records have not been tampered with. Due to limitations in network conditions and technology, distributed databases in traditional data exchange models suffer from poor feasibility, difficulty in data synchronization, and challenges in resolving consensus issues. However, with the advancement of data transmission and encryption technologies, the decentralized, open, independent, secure, and anonymity characteristics of blockchain give it unique advantages, making distributed and trusted data sharing based on the blockchain increasingly possible.
[0003] Consensus mechanisms refer to the process of reaching a unified agreement on the state of a network in a decentralized manner. Consensus mechanisms help verify and confirm that information is added to the ledger, ensuring that only genuine transactions are recorded on the blockchain. However, current consensus mechanisms have low security and high resource consumption, making the design of new traceable consensus mechanisms particularly important. Therefore, improving consensus mechanisms to achieve data sharing and traceability on the blockchain, i.e., traceable consensus mechanisms, is crucial.
[0004] Blockchain traceability refers to the use of blockchain technology, combining its unique, immutable, distributed ledger recording characteristics with technologies such as the Internet of Things (IoT), to achieve full traceability of goods from the source information collection and recording, raw material tracing, production process, processing links, warehousing information, inspection batches, logistics turnover, to third-party quality inspection, customs entry and exit, and anti-counterfeiting authentication. However, the traceability of privacy data is still imperfect. Therefore, a privacy data computation traceability system based on blockchain consensus mechanism is designed to improve the privacy data protection and data traceability of blockchain.
[0005] Blockchain utilizes technologies such as timestamps and consensus mechanisms to achieve data immutability and traceability, providing technical support for the establishment of cross-institutional traceability systems. It also incorporates third-party oversight agencies and consumers into the oversight system, breaking down information silos, providing information support, and achieving a degree of transparency in production processes. However, privacy data requires both protection and transparency, making the balance between the two crucial. To address this, a privacy data calculation module based on smart contracts was designed. This module calculates privacy data while simultaneously achieving a degree of transparency in the production process and protecting privacy data.
[0006] Currently, data privacy protection has received significant attention in the application of blockchain technology. Common methods for protecting user data privacy include: (1) anonymizing the data before uploading it to the blockchain; and (2) encrypting the data before uploading it to the blockchain. Both methods have certain problems: anonymizing the data may lead to incomplete data. Encryption requires decryption after data acquisition; if encrypted data on the blockchain is processed using big data technology, it will severely impact analysis efficiency. Summary of the Invention
[0007] The technical problem solved by this invention is to overcome the shortcomings of existing technologies and provide a traceable system and method for privacy data computation based on a blockchain consensus mechanism. This system improves efficiency and achieves blockchain-based data computation, privacy data protection, and data traceability.
[0008] The present invention adopts the following technical solution:
[0009] In a first aspect, the present invention provides a traceable privacy data computation system based on a blockchain consensus mechanism, comprising: a blockchain-based data retrieval module, a smart contract-based privacy data computation module, and a consensus mechanism-based privacy computation trustworthiness traceability module.
[0010] The blockchain-based data retrieval module utilizes the data requester's blockchain to access the data provider's non-public privacy data through two methods. One method is to use the blockchain's call chaincode to access the data provider's data interface and retrieve the non-public privacy data provided by the data provider. The other method is to use a URL provided by the blockchain to access the non-public privacy data provided by the data provider. The blockchain reads and identifies the non-public privacy data uploaded by the data provider. First, the blockchain records the method of obtaining the non-public privacy data in a smart contract to ensure data security, trustworthiness, and privacy. Then, the non-public privacy data is passed to the privacy data calculation module based on the smart contract.
[0011] The smart contract-based privacy data computation module employs a traceable consensus mechanism algorithm to select a ledger recorder. This recorder is used to document the process, and the traceable consensus mechanism algorithm ensures the reliability of the recorder's actions. After selecting a recorder, the module chooses either the data provider's local node or randomly assigns an idle anonymous computation node, and uses a cPoW credit model to evaluate the node's creditworthiness. Among the creditworthy nodes, the module uses a threshold cryptography-based TCCM consensus algorithm to compute the data provider's non-public privacy data. After computation, the results of the non-public privacy data computation are encrypted using data exclusivity and data traceability schemes to ensure that the computation results are not leaked and that the reliability is traceable. The requesting party calls a smart contract to obtain the computation results of the non-public privacy data and then passes these results to the consensus mechanism-based privacy computation reliability traceability module.
[0012] The consensus-based privacy computation credibility traceability module works as follows: Based on the computation results of non-public privacy data from the smart contract-based privacy data computation module, it identifies the ledger keeper and obtains data records from both the data provider and the data requester. Both parties provide evidence; the consensus-based privacy computation credibility traceability module receives the data records from the data requester and the data provider as data evidence, and uses this evidence to trace the actions of both parties. Using the results of the data requester's action tracing, it determines whether the data requester is trustworthy; using the results of the data provider's action tracing, it determines whether the computation results of the non-public privacy data provided by the data provider are trustworthy, ultimately achieving the traceability of the credibility of privacy data computation.
[0013] In the smart contract-based privacy data calculation module, the cPoW credit model evaluation consists of two models: the node credit model and the sharding round-robin model. Both models simultaneously evaluate the creditworthiness of nodes.
[0014] (1) The node credit rating model is used to evaluate the performance of various indicators of the node. In order to make the influence of the credit rating evaluation indicators the same, the attributes are first uniformly quantified and a three-layer neural network credit rating model is designed. The input layer node is the secondary indicator x of credit rating evaluation, the hidden layer node is the primary indicator y, the output layer node z range is [0,1], the weight from the input layer to the hidden layer is v, and the weight from the hidden layer to the output layer is w.
[0015] (2) The time-sharing rotation model is designed to make the influence of credit rating indicators fair. It selects different nodes to evaluate the luck of nodes at different times.
[0016] Furthermore, in the smart contract-based privacy data computation module, the TCCM consensus algorithm based on the threshold cryptography scheme is implemented as follows:
[0017] The TCCM consensus algorithm proposed in this invention is a consensus protocol based on threshold cryptography. This protocol adopts a margin model based on threshold group signature theory. Before computing the privacy data, the data provider has a node ID and pays a margin to the margin manager set through the node ID to prevent Byzantine behavior. After paying the margin, the data provider signs the signature through the node ID and appends it to the end of the margin. The node ID completes the computing of the privacy data. After the computing is completed, the margin manager set signs the node ID that paid the margin and returns the margin to the node ID. The total time of this process is the time for encryption computing and signing, consuming very few resources.
[0018] Furthermore, in the smart contract-based privacy data calculation module, the data exclusivity and data traceability scheme adopts a dual-chain blockchain data calculation method to encrypt the calculation results of non-public privacy data. The dual chains include two different types of blockchains: a data blockchain and a transaction blockchain. The data blockchain encrypts and stores the non-public privacy data to ensure its secure storage and prevent access by other nodes. The transaction blockchain encrypts and stores the calculation results of the non-public privacy data and then retrieves them during the transaction process.
[0019] Furthermore, the specific implementation method of the consensus-based privacy computing trust traceability module is as follows:
[0020] (1) Based on the calculation results of the non-public privacy data of the privacy data calculation module based on smart contracts, find the bookkeeper and obtain the data records of the data provider and the data requester through the bookkeeper;
[0021] (2) Both parties provide evidence that the privacy computing credibility traceability module based on the consensus mechanism receives data records from the data requester and the data provider as data evidence. These include the data parameters Args provided by the data requester for this service, the privacy computing result Res provided by the data provider, the service record number LogID, the service application time LogTime, the data requester ID, and the data provider ID. Among these, the data parameters Args, the privacy computing result Res, and the service record number LogID are mandatory parameters. LogID is used to query the blockchain and extract the record Log for this service.
[0022] (3) Data requester behavior tracing: Through the records obtained during the evidence presentation phase of both parties, the service content is traced. Based on the data parameter Args provided by the data requester, the hash value HashArgs after encryption of the privacy data is calculated using the md5 algorithm. The hash value HashArgs is compared with the hash value of the input parameter recorded in the Log. If they are the same, it is proven that the data input by the data requester is trustworthy; otherwise, the data input by the data requester is deemed untrustworthy.
[0023] (4) Data provider behavior tracing: The incoming data parameter Args is used as input and sent to the data provider again, based on the privacy calculation type SerType provided by this service in the Log.
[0024] a. If SerType = URL, then the method of this privacy computation is confirmed to be that the data provider registers the URL of the privacy computation service API that can be provided in the system, sends the input data parameter Args as input to the URL address registered by the privacy computation trust traceability module based on consensus mechanism, and obtains the computation result ReRes from the data provider;
[0025] b. If SerType = Anonymous, then the privacy computation method is confirmed to be the privacy computation trust traceability module based on consensus mechanism, which designates an anonymous computing node to perform the computation, takes the input data parameter Args as input, submits the privacy computation algorithm to the designated computing node for recomputation, and obtains the computation result ReRes;
[0026] The calculation result is used to calculate the hash value HashReRes of the encrypted privacy data using the MD5 algorithm. Similarly, the privacy calculation result Res provided by the data provider is also hashed to HashRes. The hash values HashRes, HashReRes of the encrypted privacy data, and LogHashRes of the result recorded in the Log are compared:
[0027] a. If all three are the same, it proves that the results provided by the data provider are credible;
[0028] b. If HashRes is inconsistent with HashReRes, it proves that the algorithm provided by the data provider is unstable and causes errors;
[0029] c. If HashRes and LogHasRes are inconsistent, it proves that the privacy calculation results provided by the data provider are incorrect;
[0030] d. If HashReRes and LogHashRes are inconsistent, it proves that the data provider has provided an incorrect privacy computing algorithm;
[0031] Based on the comparison results, the FinalRes service will be returned to trace the responsibility for this service, thus enabling the traceability of the credibility of privacy data.
[0032] Secondly, this invention provides a traceable method for privacy data computation based on a blockchain consensus mechanism, the specific implementation of which is as follows:
[0033] (1) Utilize the data requester's blockchain to call the data provider's non-public private data to perform preparatory work before private data computation.
[0034] (2) Before computation begins, a traceable consensus mechanism algorithm is used to select a ledger recorder. The ledger recorder is used to record the process. The traceable consensus mechanism algorithm allows the ledger recorder to be traced and recorded, ensuring the reliability of the ledger recorder's records. After the ledger recorder is selected, a local node of the data provider is selected or a random idle anonymous computing node is assigned, and the node's credit is evaluated using the cPoW credit model. If the node's credit is qualified, the non-public private data is transmitted to that node for computation.
[0035] (3) Start the calculation. First, the calculation of the private data of the data provider is completed by using the TCCM consensus algorithm based on the threshold cryptography scheme.
[0036] (4) Encrypt the calculation results of the non-public privacy data in step (3) using data sharing and data traceability schemes to ensure that the calculation results of the non-public privacy data are not leaked and that the credibility can be traced.
[0037] (5) Data requesters need to obtain the computation results of non-public privacy data by calling smart contracts. To ensure the credibility of the computation results of non-public privacy data, it is necessary to trace the actions of both data requesters and data providers.
[0038] (6) First, the bookkeeper is found through the calculation results of the privacy data, and the data records of the data provider and the data demander are obtained through the bookkeeper; both parties provide evidence by providing their respective data records as data evidence, and the behavior of the data provider and the data demander is traced through the data evidence; the data demander's behavior is traced to determine whether the data demander is trustworthy, and the data provider's behavior is traced to determine whether the calculation results of the non-public privacy data provided by the data provider are trustworthy, and finally the trustworthiness of the privacy data calculation is traced.
[0039] Thirdly, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0040] Memory, used to store computer programs;
[0041] A processor is used to execute computer programs stored in memory, and during execution, it implements a traceable system and method for privacy data computation based on a blockchain consensus mechanism.
[0042] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when processed and executed, implements a traceable system and method for privacy data computation based on a blockchain consensus mechanism.
[0043] The advantages of this invention compared to the prior art are:
[0044] (1) In actual blockchain systems, in order to pursue reasonable fairness in consensus mechanisms, the current consensus mechanisms are quite complex. The existing blockchain consensus mechanisms have low security and high resource consumption. Therefore, it is particularly important to design a new consensus mechanism. To this end, this invention improves the consensus mechanism to realize data sharing and traceability in blockchain. The designed CPoW model under the credit model and the consensus protocol using the threshold cryptography scheme first ensure that the traceable consensus mechanism can complete both data sharing and data traceability. Finally, it also achieves the purpose of improving the system throughput and reducing resource consumption. Therefore, it has very good practical performance.
[0045] (2) In actual blockchain systems, many people still hold traditional views, believing that anonymity means insecurity. Furthermore, the current shortcomings in blockchain technology have spurred the development of numerous on-chain analysis tools, undermining the privacy features of the blockchain. Therefore, users remain highly skeptical about privacy data. The privacy data calculation process, encryption algorithm, and traceable chaincode calls employed in this invention can completely guarantee data privacy throughout the entire process, while also providing excellent data sharing and traceability, thus ensuring the transparency of the blockchain. Attached Figure Description
[0046] Figure 1 This is the overall architecture of the privacy data computation traceability system based on the blockchain consensus mechanism of the present invention;
[0047] Figure 2 This is the privacy data calculation module based on smart contracts in this invention;
[0048] Figure 3 This is the data credibility traceability module based on a consensus mechanism in this invention;
[0049] Figure 4 This is a flowchart of a traceable privacy data computation method based on a blockchain consensus mechanism according to the present invention. Detailed Implementation
[0050] The specific embodiments of the system of the present invention will be further described below with reference to the accompanying drawings.
[0051] like Figure 1 As shown, the privacy data computation traceability system based on blockchain consensus mechanism of the present invention includes a blockchain-based data retrieval module, a smart contract-based privacy data computation module, and a consensus mechanism-based data credibility traceability module.
[0052] The implementation process of each of the above modules is as follows:
[0053] 1. Detailed implementation of the blockchain-based data retrieval module:
[0054] (1) Blockchain calls the chaincode to access the privacy data provided by the data provider. There are two ways to access the privacy data of the data provider using blockchain chaincode:
[0055] a. The data provider provides an interface for reading private data and waits for a response from the blockchain. The blockchain reads and identifies the data provided by the data provider through this interface. If the user's private data meets the requirements, the upload is successful, and the next step is executed; otherwise, the upload fails, and the data provider re-uploads the private data.
[0056] b. The blockchain assigns a unique Privacy Uniform Resource Locator (URI) to each user. Data providers access this URI through the blockchain's privacy resource transfer channel to upload their privacy data to a traceable privacy data computation system based on the blockchain's consensus mechanism. Upon receiving the user-uploaded privacy data, the blockchain reads and verifies whether the data complies with regulations. If it does, the read is successful, and the next step is executed; otherwise, the upload fails, and the user re-uploads.
[0057] (2) The blockchain reads and identifies the privacy data uploaded by the data provider. First, the privacy data is stored in the blockchain's storage module to ensure its security, trustworthiness, and privacy. Then, the privacy data is passed to the privacy data calculation module based on smart contracts.
[0058] 2. For example Figure 2 As shown: The privacy data computation module based on smart contracts is specifically implemented using the following three modules: a CPoW consensus mechanism module (node credit model and sharding round-robin model), a TCCM threshold group signature theory-based margin module, and a data sharing traceability consensus module.
[0059] (1) A traceable consensus mechanism selects a ledger keeper, who is used to record the process. The ledger keeper selected by the traceable consensus mechanism algorithm can trace and record the ledger keeper's behavior. After the ledger keeper is selected, a local node of the data provider is selected or a randomly assigned idle anonymous computing node is selected to complete the computation of the data provider's non-public private data. To ensure that the nodes honestly compute the private data, the blockchain needs to evaluate the nodes' credit. Specifically, the blockchain system adopts the cPoW credit model: this consensus algorithm consists of two models, a node credit model and a sharding round-robin model, and evaluates the node's creditworthiness based on these two models.
[0060] a. The node credit rating model is used to evaluate the performance of various indicators of a node. To ensure that the influence of the credit rating indicators is the same, the attributes are first uniformly quantified. A three-layer neural network credit rating model is designed. The input layer nodes are the secondary indicators x of credit rating evaluation, which include three aspects: 1. The node account's wealth capacity, including two nodes: x1: Coinage, x2: token flow ratio; 2. The node's performance, including four nodes: x3: network latency, x4: number of times the node went offline, x5: node offline duration, x6: number of times the node searched the space; 3. The node's integrity level: x7: node's network joining time, x8: number of times the node provided fork regions, x9: whether the node provided invalid blocks, x10: the node's credit rating in the previous round. These three aspects have three different weights v. After that, the network is trained to obtain the second-round hidden layer nodes as the primary indicator y. From y to the output layer, there are also three different weights w. The output layer node z ranges from [0,1]. At this point, the attributes are uniformly quantified, and the influence of the credit rating indicators is the same.
[0061] b. The sharded round-robin model is designed to ensure fairness in the impact of creditworthiness assessment metrics. It selects different nodes based on different times to evaluate their creditworthiness. When a user submits a request, the node representing the current time is selected to evaluate its creditworthiness. This not only ensures the randomness of the nodes but also guarantees fairness in the impact of the creditworthiness assessment metrics.
[0062] (2) Threshold Cryptography Consensus Protocol: To prevent Byzantine behavior such as cheating and unexcused offline behavior by participating nodes, and to further improve system throughput and reduce resource consumption, a consensus algorithm based on threshold cryptography, namely the TCCM consensus protocol, is proposed. This protocol is based on a margin model of threshold group signature theory. The margin model based on threshold group signature theory is designed to prevent Byzantine behavior by participating nodes. Byzantine behavior can be prevented by staking a margin, and the security of the margin is guaranteed by signature technology.
[0063] Each participating party in the margin deposit process has a contributing node ID. The special transactions involve two processes: contributing and returning margin. Each node ID contributes margin to the margin management set, and each contributing node needs to sign a random signature using both the public key of the regular transaction and the margin management set's public key. This signature is appended to the contributed margin and submitted to the managers. Once the node ID has faithfully completed the blockchain formula, the margin management set signs the special transaction for contributing margin and the node ID for returning margin, returning the margin to the contributing node ID. The total time for this process is limited only by the time spent on encryption and signing, consuming minimal resources.
[0064] (3) Data Dedicatedness and Data Traceability Scheme: To ensure data integrity, traceability of data sources, and user privacy during the sharing process, and to prevent data theft, a data dedicatedness and data traceability scheme is proposed based on blockchain technology and threshold cryptographic signature technology. This scheme is a dual-chain blockchain data computing scheme. The dual chains mainly include two types of blockchains: data blockchain and transaction blockchain. Their functions are to encrypt and store the original data and to encrypt and store useful transaction information for later retrieval during the transaction process, respectively.
[0065] The data sharing and traceability scheme employs the Byzantine Fault Tolerance (BFT) protocol between the two-chain structures. The key characteristics of the BFT protocol are decentralization and fault tolerance for arbitrary behavior. Through a distributed approach, consensus can be reached by a quorum of members or a sufficient number of nodes. Each node can determine the trusted entity to achieve consensus without relying on identical participants. A threshold cryptography consensus protocol is used between each type of single-chain block to ensure data security and information authenticity.
[0066] In token and data transactions, a threshold cryptography consensus protocol is used for token transactions, while data transaction nodes are marked and recorded, and then encrypted into blocks using an encryption algorithm. Once a data transaction is completed on the transaction blockchain, a data transaction record appears on the data blockchain. The nodes on the data blockchain record the original data, divide it into n data blocks, and encrypt them. The ciphertext set is stored on the data blockchain using a threshold cryptography algorithm. This speeds up data verification for users and prevents data from being resold.
[0067] (4) After the calculation is completed, the data requester calls the smart contract to obtain the calculation result. No privacy data is obtained during the calculation process. The result obtained by the privacy data calculation module based on the smart contract will continue to be passed to the privacy calculation trust traceability module based on the consensus mechanism.
[0068] 3. A data credibility traceability module based on a consensus mechanism, such as... Figure 3 As shown, the specific implementation is as follows:
[0069] (1) Based on the calculation results of the non-public privacy data of the privacy data calculation module based on smart contracts, find the bookkeeper and obtain the data records of the data provider and the data demander through the bookkeeper.
[0070] (2) Both parties provide evidence that the privacy computing credibility traceability module based on the consensus mechanism receives data records from the data requester and the data provider as data evidence. These include the data parameters Args provided by the data requester for this service, the privacy computing result Res provided by the data provider, the service record number LogID, the service application time LogTime, the data requester ID, and the data provider ID. Among these, the data parameters Args, the privacy computing result Res, and the service record number LogID are mandatory parameters. The system queries the blockchain through LogID to extract the system record Log for this service.
[0071] (3) Privacy Computation Requester Behavior Tracing: The system traces the service content through the system records obtained during the evidence presentation phase of both parties. Based on the incoming data parameter Args provided by the data requester, the system calculates its encrypted hash value HashArgs using the MD5 algorithm. The hash value HashArgs is compared with the incoming parameter hash value recorded in the system log. If they are the same, it proves that the data input by the data requester is trustworthy; otherwise, it is determined that the data input by the data requester is untrustworthy.
[0072] (4) Privacy computing provider behavior tracing: The incoming data parameter Args is used as input and sent to the data provider again, based on the privacy computing type SerType provided in the Log.
[0073] a. If SerType = URL, then the method of this privacy calculation is confirmed to be that the data provider registers the URL of the privacy calculation service API that can be provided in the system, sends the input data parameter Args as input to the URL address registered in the system, and obtains the calculation result ReRes from the data provider.
[0074] b. If SerType = Anonymous, then the privacy computation method is confirmed to be that the system designates an anonymous computing node to perform the computation, takes the input data parameter Args as input, submits the privacy computation algorithm to the designated computing node for recomputation, and obtains the computation result ReRes.
[0075] The calculation result is encrypted using the MD5 algorithm to calculate its hash value HashReRes. Similarly, the privacy calculation result Res provided by the data provider is hashed to HashRes. The hash values HashRes, HashReRes and the result hash value LogHashRes in the system log are compared.
[0076] a. If all three are the same, it proves that the results provided by the data provider are credible;
[0077] b. If HashRes is inconsistent with HashReRes, it proves that the algorithm provided by the data provider is unstable and causes errors;
[0078] c. If HashRes and LogHasRes are inconsistent, it proves that the privacy calculation results provided by the data provider are incorrect;
[0079] d. If HashReRes and LogHashRes are inconsistent, it proves that the data provider has provided an incorrect privacy computing algorithm.
[0080] The system will return the FinalRes result of the traceability and accountability for this service based on the results.
[0081] like Figure 4 As shown, the present invention provides a traceable method for privacy data computation based on a blockchain consensus mechanism, which is implemented as follows:
[0082] (1) Utilizing the data requester's blockchain with data retrieval function, the non-public private data of the data provider is retrieved. First, the blockchain records the acquisition method of the non-public private data in the smart contract to ensure the security, trust and privacy of the data, and to carry out the preparatory work before the private data calculation.
[0083] (2) Before computation begins, a traceable consensus mechanism algorithm is used to select a ledger recorder. The ledger recorder is used to record the process. The traceable consensus mechanism algorithm allows the ledger recorder to be traced and recorded, ensuring the reliability of the ledger recorder's records. After the ledger recorder is selected, a local node of the data provider is selected or a random idle anonymous computing node is assigned, and the node's credit is evaluated using the cPoW credit model. If the node's credit is qualified, the non-public private data is transmitted to that node for computation.
[0084] (3) Start the calculation. First, the calculation of the private data of the data provider is completed by using the TCCM consensus algorithm based on the threshold cryptography scheme.
[0085] (4) Encrypt the calculation results of the non-public privacy data in step (3) using data sharing and data traceability schemes to ensure that the calculation results of the non-public privacy data are not leaked and that the credibility can be traced.
[0086] (5) Data requesters need to obtain the computation results of non-public privacy data by calling smart contracts. To ensure the credibility of the computation results of non-public privacy data, it is necessary to trace the actions of both data requesters and data providers.
[0087] (6) First, the bookkeeper is found through the calculation results of the privacy data, and the data records of the data provider and the data demander are obtained through the bookkeeper; both parties provide evidence by providing their respective data records as data evidence, and the behavior of the data provider and the data demander is traced through the data evidence; the data demander's behavior is traced to determine whether the data demander is trustworthy, and the data provider's behavior is traced to determine whether the calculation results of the non-public privacy data provided by the data provider are trustworthy, and finally the trustworthiness of the privacy data calculation is traced.
[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the above embodiments can be implemented by software, or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of the above embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.), including several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0089] Based on the same inventive concept, another embodiment of the present invention provides an electronic device (computer, server, smartphone, etc.) including a memory and a processor, wherein the memory stores a computer program configured to be executed by the processor, and the computer program includes instructions for performing the steps of the method of the present invention.
[0090] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium (such as ROM / RAM, disk, optical disk), wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, it implements the various steps of the method of the present invention.
[0091] The above embodiments are provided merely for the purpose of describing the present invention and are not intended to limit the scope of the invention. The scope of the invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the invention should be covered within the scope of the invention.
Claims
1. A privacy-preserving data computation traceability system based on a blockchain consensus mechanism, characterized in that, include: A blockchain-based data retrieval module, a smart contract-based privacy data computation module, and a consensus mechanism-based privacy computation trustworthiness traceability module: The blockchain-based data retrieval module utilizes the data requester's blockchain to access the data provider's non-public privacy data through two methods. One method is to use the blockchain's call chaincode to access the data provider's data interface and retrieve the non-public privacy data provided by the data provider. The other method is to use a URL provided by the blockchain to access the non-public privacy data provided by the data provider. The blockchain reads and identifies the non-public privacy data uploaded by the data provider. First, the blockchain records the method of obtaining the non-public privacy data in a smart contract to ensure data security, trustworthiness, and privacy. Then, the non-public privacy data is passed to the privacy data calculation module based on the smart contract. The smart contract-based privacy data computation module employs a traceable consensus mechanism algorithm to select a ledger recorder. This recorder is used to document the process, and the algorithm ensures that the selected recorder's actions can be traced and recorded. After selecting a recorder, the module chooses either the data provider's local node or randomly assigns an idle anonymous computation node, and uses a cPoW credit model to evaluate the node's creditworthiness. Among the creditworthy nodes, the module uses a threshold cryptography-based TCCM consensus algorithm to compute the data provider's non-public privacy data. After computation, the results are encrypted using data exclusivity and traceability schemes to ensure the computation results are not leaked and their credibility is traceable. The data requester invokes a smart contract to obtain the computation results of the non-public privacy data and then passes these results to the consensus mechanism-based privacy computation credibility traceability module. The consensus-based privacy computation credibility traceability module works as follows: Based on the computation results of non-public privacy data from the smart contract-based privacy data computation module, it identifies the ledger keeper and obtains data records from both the data provider and the data requester. Both parties provide evidence; the consensus-based privacy computation credibility traceability module receives the data records from the data requester and the data provider as data evidence, and uses this evidence to trace the actions of both parties. Using the results of the data requester's action tracing, it determines whether the data requester is trustworthy; using the results of the data provider's action tracing, it determines whether the computation results of the non-public privacy data provided by the data provider are trustworthy, ultimately achieving the traceability of the credibility of privacy data computation.
2. The privacy data computation traceability system based on blockchain consensus mechanism according to claim 1, characterized in that: In the smart contract-based privacy data calculation module, the cPoW credit model evaluation consists of two models: the node credit model and the sharding round-robin model. Both models simultaneously evaluate the creditworthiness of nodes. (1) The node credit rating model is used to evaluate the performance of various indicators of the node. In order to make the influence of the credit rating evaluation indicators the same, the attributes are first uniformly quantified and a three-layer neural network credit rating model is designed. The input layer node is the secondary indicator x of credit rating evaluation, the hidden layer node is the primary indicator y, the output layer node z range is [0,1], the weight from the input layer to the hidden layer is v, and the weight from the hidden layer to the output layer is w. (2) The time-segmented rotation model is designed to make the influence of credit rating indicators fair. It selects different nodes to evaluate the luck of nodes at different times.
3. The privacy data computation traceability system based on blockchain consensus mechanism according to claim 1, characterized in that: In the smart contract-based privacy data computation module, the TCCM consensus algorithm based on the threshold cryptography scheme is implemented as follows: The TCCM consensus algorithm based on threshold cryptography, i.e. the consensus protocol of threshold cryptography, adopts a margin model based on threshold group signature theory. Before computing private data, the data provider has a node ID and pays a margin to the margin manager set through the node ID to prevent Byzantine behavior. After paying the margin, the data provider signs the signature through the node ID and appends it to the end of the margin. The node ID completes the calculation of privacy data; After the calculation is completed, the deposit managers sign the node IDs that have paid the deposit and return the deposits to the node IDs. The total time for this process is the time for encryption calculation and signing, consuming very few resources.
4. The privacy data computation traceability system based on blockchain consensus mechanism according to claim 1, characterized in that: In the smart contract-based privacy data calculation module, the data sharing and data traceability scheme uses a dual-chain blockchain data calculation method to encrypt the calculation results of non-public privacy data. The dual chains include two different types of blockchains: data blockchain and transaction blockchain. The data blockchain encrypts and stores non-public privacy data to ensure that the non-public privacy data is securely stored and cannot be accessed by other nodes. The transaction blockchain encrypts and stores the calculation results of private data that is not publicly disclosed, and then retrieves them during the transaction process.
5. The privacy data computation traceability system based on blockchain consensus mechanism according to claim 1, characterized in that: The specific implementation method of the consensus-based privacy computing credibility traceability module is as follows: (1) Based on the calculation results of the non-public privacy data of the privacy data calculation module based on smart contracts, find the bookkeeper and obtain the data records of the data provider and the data requester through the bookkeeper; (2) Both parties provide evidence that the privacy computing credibility traceability module based on the consensus mechanism receives data records from the data requester and the data provider as data evidence. These include the data parameters Args provided by the data requester for this service, the privacy computing result Res provided by the data provider, the service record number LogID, the service application time LogTime, the data requester ID, and the data provider ID. Among these, the data parameters Args, the privacy computing result Res, and the service record number LogID are mandatory parameters. LogID is used to query the blockchain and extract the record Log for this service. (3) Data requester behavior traceability: The service content is traced through the records obtained during the evidence presentation stage of both parties. The hash value HashArgs of the encrypted private data is calculated using the md5 algorithm based on the Args of the incoming data provided by the data requester. The hash value HashArgs is compared with the hash value of the incoming parameter recorded in the Log. If they are the same, it is proven that the data input by the data requester is trustworthy; otherwise, the data input by the data requester is deemed untrustworthy. (4) Data provider behavior tracing: The incoming data parameter Args is passed to the data provider again as input, and the privacy calculation type SerType provided in this service is determined according to the Log: a. If the privacy computation type SerType = URL, then confirm that the privacy computation method is the URL of the privacy computation service API provided by the data provider during registration, send the input data parameter Args as input to the URL address registered by the privacy computation trust traceability module based on consensus mechanism, and obtain the data provider's computation result ReRes; b. If the privacy computation type SerType = Anonymous, then the privacy computation method is confirmed to be the privacy computation trust traceability module based on the consensus mechanism, which designates an anonymous computing node to perform the computation, takes the input data parameter Args as input, submits the privacy computation algorithm to the designated computing node for recomputation, and obtains the computation result ReRes; The calculation result is used to calculate the hash value HashReRes of the encrypted privacy data using the MD5 algorithm. Similarly, the privacy calculation result Res provided by the data provider is also hashed to HashRes. The hash values HashRes, HashReRes of the encrypted privacy data, and LogHashRes of the result recorded in the Log are compared: a. If all three are the same, it proves that the results provided by the data provider are credible; b. If HashRes is inconsistent with HashReRes, it proves that the algorithm provided by the data provider is unstable and causes errors; c. If HashRes and LogHasRes are inconsistent, it proves that the privacy calculation results provided by the data provider are incorrect; d. If HashReRes and LogHashRes are inconsistent, it proves that the data provider has provided an incorrect privacy computing algorithm; Based on the comparison results, FinalRes will return the traceability and accountability results for this service, enabling the traceability of the credibility of privacy data.
6. A traceable method for privacy-preserving data computation based on a blockchain consensus mechanism, characterized in that, The implementation is as follows: (1) Utilize the data requester’s blockchain to call the data provider’s non-public privacy data and perform preparatory work before privacy data calculation; call the data provider’s non-public privacy data through any one of two methods. One method is to use the blockchain’s call chaincode to call the data provider’s non-public privacy data through the data provider’s data interface. Another approach is to use blockchain to provide URLs that allow data providers to access non-public, private data. (2) Before the calculation begins, a traceable consensus mechanism algorithm is used to select the bookkeeper. The bookkeeper is used to record the process. The bookkeeper selected by the traceable consensus mechanism algorithm can trace and record the bookkeeper's behavior, ensuring that the bookkeeper's record is reliable. After selecting the bookkeeper, choose a local node of the data provider or randomly assign an idle anonymous computing node, and use the cPoW credit model to evaluate the node's credit. If the node's credit is qualified, the private data that is not disclosed will be transmitted to the node for calculation. (3) Start the calculation. First, the calculation of the data provider's private data is completed by using the TCCM consensus algorithm based on the threshold cryptography scheme. The TCCM consensus algorithm based on the threshold cryptography scheme, i.e. the consensus protocol of the threshold cryptography scheme, adopts a deposit model based on the threshold group signature theory. Before calculating the private data, the data provider has a node ID and pays a deposit to the deposit manager set through the node ID to prevent Byzantine behavior. After paying the deposit, the data provider signs the signature through the node ID and appends it to the end of the deposit. The node ID completes the calculation of privacy data; After the calculation is completed, the deposit managers sign the node IDs that have paid the deposit and return the deposits to the node IDs. The total time for this process is the time for encryption calculation and signing, consuming very few resources. (4) The calculation results of the non-public privacy data in step (3) are encrypted using the data sharing and data traceability scheme to ensure that the calculation results of the non-public privacy data are not leaked and that the credibility is traceable; the data sharing and data traceability scheme adopts a dual-chain blockchain data calculation method to encrypt the calculation results of the non-public privacy data. The dual chains include two different types of blockchains: data blockchain and transaction blockchain. The data blockchain encrypts and stores the non-public privacy data to ensure that the non-public privacy data is stored securely and will not be accessed by other nodes. The transaction blockchain encrypts and stores the computation results of private data that is not publicly disclosed, and then retrieves them during the transaction process; (5) The data requester calls the smart contract to obtain the calculation results of the non-public privacy data; to ensure the credibility of the calculation results of the non-public privacy data, the behavior of the data requester and the data provider is traced; firstly, the bookkeeper is found through the calculation results of the privacy data, and the data records of the data provider and the data requester are obtained through the bookkeeper; both parties provide evidence, providing their respective data records as data evidence, and the behavior of the data provider and the data requester is traced through the data evidence; using the results obtained from the behavior tracing of the data requester, it is determined whether the data requester is credible, and using the results obtained from the behavior tracing of the data provider, it is determined whether the calculation results of the non-public privacy data provided by the data provider are credible, and finally the credibility of the privacy data calculation is traced.
7. The method for traceable privacy data computation based on blockchain consensus mechanism according to claim 6, characterized in that: In step (2), the cPoW credit model evaluation consists of two models: a node credit model and a sharding rotation model. Both models simultaneously evaluate the creditworthiness of nodes. The node credit model is used to evaluate the performance of various indicators of nodes. In order to make the influence of the creditworthiness evaluation indicators the same, the attributes are first uniformly quantified, and a three-layer neural network credit evaluation model is designed. The input layer node is the secondary indicator x of creditworthiness evaluation, the hidden layer node is the primary indicator y, the output layer node z ranges from [0,1], the weight from the input layer to the hidden layer is v, and the weight from the hidden layer to the output layer is w. The sharding rotation model is designed to make the influence of the creditworthiness evaluation indicators fair. A time-sharding rotation model is designed to select different nodes to evaluate the luck of nodes according to different times.
8. The method for traceable privacy data computation based on blockchain consensus mechanism according to claim 6, characterized in that: Step (5) is implemented as follows: (1) Based on the calculation results of the non-public privacy data of the privacy data calculation module based on smart contracts, find the bookkeeper and obtain the data records of the data provider and the data requester through the bookkeeper; (2) Both parties provide evidence that the privacy computing credibility traceability module based on the consensus mechanism receives data records from the data requester and the data provider as data evidence. These include the data parameters Args provided by the data requester for this service, the privacy computing result Res provided by the data provider, the service record number LogID, the service application time LogTime, the data requester ID, and the data provider ID. Among these, the data parameters Args, the privacy computing result Res, and the service record number LogID are mandatory parameters. LogID is used to query the blockchain and extract the record Log for this service. (3) Data requester behavior traceability: The service content is traced through the records obtained during the evidence presentation stage of both parties. The hash value HashArgs of the encrypted private data is calculated using the md5 algorithm based on the Args of the incoming data provided by the data requester. The hash value HashArgs is compared with the hash value of the incoming parameter recorded in the Log. If they are the same, it is proven that the data input by the data requester is trustworthy; otherwise, the data input by the data requester is deemed untrustworthy. (4) Data provider behavior tracing: The incoming data parameter Args is passed to the data provider again as input, and the privacy calculation type SerType provided in this service is determined according to the Log: a. If SerType = URL, then confirm that the privacy computation method is the URL of the privacy computation service API registered by the data provider. Send the incoming data parameter Args as input to the URL address registered by the privacy computation trust traceability module based on consensus mechanism, and obtain the computation result ReRes from the data provider. b. If SerType = Anonymous, then the privacy computation method is confirmed to be the privacy computation trust traceability module based on consensus mechanism, which designates an anonymous computing node to perform the computation, takes the input data parameter Args as input, submits the privacy computation algorithm to the designated computing node for recomputation, and obtains the computation result ReRes; The calculation result is used to calculate the hash value HashReRes of the encrypted privacy data using the MD5 algorithm. Similarly, the privacy calculation result Res provided by the data provider is also hashed to HashRes. The hash values HashRes, HashReRes of the encrypted privacy data, and LogHashRes of the result recorded in the Log are compared: a. If all three are the same, it proves that the results provided by the data provider are credible; b. If HashRes is inconsistent with HashReRes, it proves that the algorithm provided by the data provider is unstable and causes errors; c. If HashRes and LogHasRes are inconsistent, it proves that the privacy calculation results provided by the data provider are incorrect; d. If HashReRes and LogHashRes are inconsistent, it proves that the data provider has provided an incorrect privacy computing algorithm; Based on the comparison results, FinalRes will return the traceability and accountability results for this service, enabling the traceability of the credibility of privacy data.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor for executing a computer program stored in memory, which, when executed, implements the system of any one of claims 1-5 or the method of any one of claims 6-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the system according to any one of claims 1-5 or the method according to any one of claims 6-8.
Citation Information
Patent Citations
Multi-center block chain transaction privacy protection system and method
CN108021821A
Consensus mechanism of traceable cloud storage system based on block chain
CN111177796A