CN114358764A - Privacy calculation method based on intelligent contracts in block chain and related equipment - Google Patents

Privacy calculation method based on intelligent contracts in block chain and related equipment Download PDF

Info

Publication number
CN114358764A
CN114358764A CN202111347858.1A CN202111347858A CN114358764A CN 114358764 A CN114358764 A CN 114358764A CN 202111347858 A CN202111347858 A CN 202111347858A CN 114358764 A CN114358764 A CN 114358764A
Authority
CN
China
Prior art keywords
participant
computing
intelligent contract
blockchain
intelligent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111347858.1A
Other languages
Chinese (zh)
Inventor
王焕然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhonglian Digital Technology Co ltd
Original Assignee
Shenzhen Zhonglian Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhonglian Digital Technology Co ltd filed Critical Shenzhen Zhonglian Digital Technology Co ltd
Priority to CN202111347858.1A priority Critical patent/CN114358764A/en
Publication of CN114358764A publication Critical patent/CN114358764A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a privacy calculation method based on an intelligent contract in a block chain and related equipment. The method comprises the following steps: in response to determining that a computing transaction contained in an intelligent contract in the blockchain meets a trigger condition, for each participant in a plurality of participants involved in the computing transaction, invoking encrypted data and a digital certificate of the participant, and decrypting the encrypted data by using the digital certificate to obtain original data of the participant; and executing the calculation logic corresponding to the calculation transaction based on all the original data to obtain a calculation result. According to the privacy computing method and the related equipment based on the intelligent contracts in the block chain, the safety and the privacy of data in the privacy computing process are guaranteed through the application of the intelligent contract system in the block chain, the accuracy and the reliability of the data are guaranteed through calling the intelligent contracts which cannot be tampered, and the problem of data security trust of a user in the computing process is solved.

Description

Privacy calculation method based on intelligent contracts in block chain and related equipment
Technical Field
The application relates to the technical field of block chains, in particular to a privacy calculation method based on intelligent contracts in block chains and related equipment.
Background
In the prior art, when a calculation program obtains a calculation result, all original data need to be obtained, and then a desired final calculation result is obtained by a certain calculation method. And ownership and calculation of data are inseparable, that is, in all cases where calculation is performed through original data, sensitive data and private data of a user need to be obtained, and therefore data leakage is easy to occur. The user cannot obtain expected calculation results on the premise of ensuring data security and privacy.
Disclosure of Invention
In view of the above, an object of the present application is to provide a privacy computation method based on an intelligent contract in a block chain and a related device.
In view of the above, the present application provides a privacy computation method, which is executed by an intelligent contract system in a blockchain, and the method includes:
in response to determining that a computing transaction contained in an intelligent contract in the blockchain meets a trigger condition, for each participant in a plurality of participants involved in the computing transaction, invoking encrypted data and a digital certificate of the participant, and decrypting the encrypted data by using the digital certificate to obtain original data of the participant;
executing the computing logic corresponding to the computing transaction based on all the original data to obtain a computing result,
wherein the smart contract is pre-established by the plurality of participants for the computing transaction and is signed with a private key of each of the plurality of participants before being stored in the blockchain,
the original data of each of the plurality of parties is previously encrypted with the private key of that party and stored as the encrypted data of that party in the blockchain along with the digital certificate of that party,
the digital certificate is generated by authenticating the public key of the participant through a certificate center and encrypting the basic information of the participant by using the public key of the certificate center.
Further, the method also comprises the following steps: and encrypting the calculation result through the digital certificate of each participant in the plurality of participants and returning the calculation result to the service demand party.
Further, when each of the plurality of participants is pre-registered with the blockchain, the blockchain generates a pair of public and private keys for the participant.
Further, the decrypting the encrypted data by using the digital certificate to obtain the original data of the participant includes:
and decrypting the digital certificate through the public key of the certificate center to obtain the public key of the participant, and decrypting the encrypted data through the public key of the participant.
Further, the intelligent contracts, prior to being stored in the blockchain, include:
and code auditing is respectively carried out on the intelligent contract by each of the multiple participants, the intelligent contract is signed by the respective private key after the auditing is finished, and the signed intelligent contract is subjected to chain confirmation.
Further, the intelligent contracts are stored in the blockchain, and include:
broadcasting the intelligent contracts in a block chain, initiating consensus verification after a verification node in the block chain receives the intelligent contracts, packaging a plurality of intelligent contracts subjected to consensus verification into a contract set and broadcasting the contracts in the block chain in a block form, verifying each intelligent contract by the node receiving the contract set, and storing the intelligent contracts in the block chain after the verification is passed.
Further, the intelligent contract system periodically checks a state machine included in the intelligent contract and a trigger condition of the computing transaction, and pushes the computing transaction to each verification node in the block chain in response to determining that the state machine indicates that the intelligent contract is not completed and the trigger condition is satisfied;
in response to receiving validation pass information for the computing transaction by a majority of validation nodes in the blockchain, the intelligent contract system determines that the computing transaction satisfies the trigger condition and executes the computing transaction.
Based on the same inventive concept, the application also provides an intelligent contract system for privacy computation in a block chain, which comprises:
a data acquisition module to: in response to determining that a computing transaction contained in an intelligent contract in the blockchain meets a trigger condition, for each participant in a plurality of participants involved in the computing transaction, invoking encrypted data and a digital certificate of the participant, and decrypting the encrypted data by using the digital certificate to obtain original data of the participant;
a calculation module to: executing the computing logic corresponding to the computing transaction based on all the original data to obtain a computing result,
wherein the smart contract is pre-established by the plurality of participants for the computing transaction and is signed with a private key of each of the plurality of participants before being stored in the blockchain,
the original data of each of the plurality of parties is previously encrypted with the private key of that party and stored as the encrypted data of that party in the blockchain along with the digital certificate of that party,
the digital certificate is generated by authenticating the public key of the participant through a certificate center and encrypting the basic information of the participant by using the public key of the certificate center.
Based on the same inventive concept, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable by the processor, and the processor, when executing the computer program, implements the method for privacy computation based on intelligent contracts in block chains as described in any of the above.
From the above, according to the privacy computing method and the related device based on the intelligent contract in the block chain, the security and the privacy of data in the privacy computing process are ensured through the application of the intelligent contract system in the block chain, the accuracy and the reliability of the data are ensured through the calling of the intelligent contract which cannot be tampered, and the data security trust problem of a user in the computing process is solved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the related art, the drawings needed to be used in the description of the embodiments or the related art will be briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a privacy computation method based on intelligent contracts in a blockchain according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an intelligent contract generation flow according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an intelligent contract execution flow according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an intelligent contract transmission and storage flow according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an intelligent contract system for privacy computation in a blockchain according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings in combination with specific embodiments.
It should be noted that technical terms or scientific terms used in the embodiments of the present application should have a general meaning as understood by those having ordinary skill in the art to which the present application belongs, unless otherwise defined. The use of "first," "second," and similar terms in the embodiments of the present application do not denote any order, quantity, or importance, but rather the terms are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
As described in the background art, when a computing program runs, all raw data needs to be called, and a user data leakage problem is easily caused. The development of block chain technology brings a decentralized, non-tamper-able and high-reliability system to people. The intelligent contract is automatically executed when certain conditions are met, but the trust of both contract parties cannot be guaranteed, for example, malicious tampering operation. The intelligent contract is deployed based on the blockchain system, so that the trust problem of both transaction parties can be solved. The non-tampering property of the block chain ensures that the contract content cannot be changed, the high reliability ensures that the contract is executed when the condition is met, and the decentralization and the whole network backup ensure the audit afterwards. The security and privacy of data of multiple users can be well guaranteed by realizing privacy calculation based on the intelligent contract in the block chain, and the data security trust problem in the calculation process is solved.
All data on the blockchain is applied transparently, so that data processing of the intelligent contract is also applied transparently, and any party can view the code and data during running. All data of the blockchain is not falsifiable, so that intelligent contract code deployed on the blockchain and data output generated by running are not falsifiable, and a node running the intelligent contract does not need to worry about malicious modification of code and data by other nodes. The number of the nodes supporting the block chain network is hundreds or even thousands, the failure of part of the nodes can not cause the stop of the intelligent contract, the reliability of the intelligent contract is close to the permanent operation theoretically, and therefore the intelligent contract can be guaranteed to be effective at every moment like a paper contract.
Embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, the present application provides a privacy computation method, executed by an intelligent contract system in a blockchain, including the following steps:
step S101, in response to determining that the computing transaction included in the intelligent contract in the block chain meets a trigger condition, for each of a plurality of participants involved in the computing transaction, invoking encrypted data and a digital certificate of the participant, and decrypting the encrypted data by using the digital certificate to obtain original data of the participant.
Specifically, the intelligent contract comprises a state machine, a computing transaction and a trigger condition, and when the computing transaction in the intelligent contract system meets the trigger condition, the intelligent contract needs to call original data related to the computing transaction to perform computation. The source of the raw data is multi-place and may involve multiple parties depending on the business needs of the parties providing or collecting the data. Each participant acquires a unique digital certificate from the certificate center in advance, the intelligent contract calls the digital certificates of the participants to decrypt the encrypted original data according to the authorization of the participants, and the original data of the participants are obtained after decryption is completed.
Step S102, based on all the original data, executing the calculation logic corresponding to the calculation transaction to obtain a calculation result,
wherein the smart contract is pre-established by the plurality of participants for the computing transaction and is signed with a private key of each of the plurality of participants before being stored in the blockchain,
the original data of each of the plurality of parties is previously encrypted with the private key of that party and stored as the encrypted data of that party in the blockchain along with the digital certificate of that party,
the digital certificate is generated by authenticating the public key of the participant through a certificate center and encrypting the basic information of the participant by using the public key of the certificate center.
Specifically, two or more parties to a presence transaction agree on a commitment and a privacy computing function contract according to specific needs. The contracts contain the rights and obligations of two or more parties and the function logic required by private calculation data, and the rights and obligations are designed and recorded in an electronic mode to form intelligent contracts. Referring to fig. 2, a participant 1 participating in the computation registers a node account with the blockchain system, the blockchain system returns a public key and a private key for registering the node to the participant 1, and the participant 2 applies for registration of the node account in the same manner. Participant 1 and participant 2 draw up the intelligent contract content for the specific computational logic and generate an intelligent contract record. The participator sends the intelligent contract content to the blockchain system, and the blockchain system signs and encrypts the intelligent contract content through the private key of the participator, generates the intelligent contract and returns the intelligent contract to the participator.
And after the intelligent contract calls the original data required by executing the calculation transaction, executing corresponding calculation logic to obtain a calculation result. The original data is stored in the blockchain together with the digital certificate after being encrypted by the private keys of all the participants. Meanwhile, the block chain calculates the Hash value of each original data through a Hash algorithm, and stores the Hash value in a database, wherein the Hash value corresponds to the original data one by one. The Hash value is a unique identification of the original data of the query, whereby each of said original data corresponds to an encrypted data and a Hash value. The digital certificate is issued to the participants by a certificate center of a third party authority, the public key of the participants, the identity information and the identity identification of the participants are encrypted by a private key of the certificate center through the certification of the public key of the participants of the original data by the certificate center, and thus the digital certificate is generated.
In some embodiments, the calculation result is encrypted by the digital certificate of each of the plurality of parties and returned to the business requiring party.
Specifically, after the calculation result is obtained by executing the calculation transaction, the intelligent contract encrypts the calculation result through the digital certificates of the multiple participants and returns the encrypted calculation result to the service demand party. If the calculation result relates to the condition of returning the ID of the user data of the opposite side, such as the case that a recommendation system needs to return the user ID of the system of the opposite side, the user ID of the opposite side subjected to digit confusion of the random number is returned to the service demand side after the Hash value is comprehensively calculated by using the ID of the real user data of the opposite side and the random number.
In some embodiments, upon each of the plurality of participants pre-registering with the blockchain, the blockchain generates a pair of public and private keys for the participant. A user participating in an intelligent contract must first register as a user of the blockchain, which returns to the user a pair of public and private keys. The public key is used as an account address of the user on the block chain, and the private key is used as a unique key for operating the account.
In some embodiments, the decrypting the encrypted data using the digital certificate to obtain the original data of the participant includes:
and decrypting the digital certificate through the public key of the certificate center to obtain the public key of the participant, and decrypting the encrypted data through the public key of the participant. When the encrypted data needs to be decrypted, firstly, a digital certificate corresponding to the encrypted data is inquired, then the public key of a certificate center is used for decrypting the digital certificate to obtain the public key of a party to which the encrypted data belongs, the data encrypted by the private key of the party is decrypted through the public key of the party, the encryption process is also called asymmetric encryption, and the certificate center provides security guarantee for the public key and the private key which are asymmetrically encrypted.
In some embodiments, the intelligent closing, prior to being stored in the blockchain, comprises:
and code auditing is respectively carried out on the intelligent contract by each of the multiple participants, the intelligent contract is signed by the respective private key after the auditing is finished, and the signed intelligent contract is subjected to chain confirmation.
Specifically, for the business privacy computation logic to be executed, the two parties or the multiple parties participating in the privacy computation encapsulate the computation process into an executable function according to the possibility of different businesses, so as to ensure that the correct computation logic is called when the intelligent contract is executed. When each participant carries out code audit, the business process needs to be combed and test data needs to be provided to ensure the correctness of calculation and the integrity of business, and then test cases are packaged to carry out test audit on the calculation logic codes. And in the calculation process of each participant, the data is ensured not to be transmitted and leaked. After the audit is finished, each participant confirms the chaining of the intelligent contract, and the method for confirming the chaining is to trigger the triggering condition of the intelligent contract after the chaining is finished, execute the calculation affair, acquire the data of the calculation result and compare the correctness of the calculation result.
In some embodiments, the intelligent contracts are stored into the blockchain, including:
broadcasting the intelligent contracts in a block chain, initiating consensus verification after a verification node in the block chain receives the intelligent contracts, packaging a plurality of intelligent contracts subjected to consensus verification into a contract set and broadcasting the contracts in the block chain in a block form, verifying each intelligent contract by the node receiving the contract set, and storing the intelligent contracts in the block chain after the verification is passed.
Specifically, after a plurality of participants reach an intelligent contract, the intelligent contract is broadcast in the block chain whole network by means of P2P, and each node receives a contract. And after receiving the broadcasted intelligent contract, the verification node in the block chain stores the intelligent contract into a memory and waits for the arrival of the consensus time.
After the consensus time arrives, the verification node packs all intelligent contracts received in the time interval into a contract Set, calculates the Hash value of the contract Set, packs the Hash value of the contract Set in a block structure, and broadcasts the block structure.
After receiving the block structure, other verification nodes can decompose the Hash value of the contract set in the structure, the Hash value obtained by calculating the contract set by the current node is compared with the Hash values in the block structures sent by other nodes after decomposing the block, the calculation is correct if the Hash values are the same, then a contract set approved by the verification node is sent to other nodes, and through the multi-round sending and comparison, all the verification nodes finally achieve the consistency of the latest contract set in the specified time.
The newly agreed contract sets are spread across the network in blocks. Each block contains the following information: the Hash value of the current block, the Hash value of the previous block, the timestamp of when the consensus is achieved, and other descriptive information. And verifying each intelligent contract in the contract set by the node receiving the latest contract set, storing the verified intelligent contract in a block chain finally, wherein the verified content mainly includes whether the private key signature of the participant is matched with the account, decrypting the signature by using the public key of the participant, and checking whether the signature is consistent with the original data.
Referring to fig. 3, participant 1 and participant 2 broadcast the intelligent contract in a blockchain, and the verification node 1 receives the intelligent contract and stores it in the node. When the consensus time comes, the verification node 1 packages all contracts stored in the node to form a contract set, calculates the Hash value of the contract set, packages the Hash value of the contract set in a block structure, and broadcasts the Hash value in a block chain. After the verification node 2 receives the block structure, the block structure is decomposed to obtain a Hash value, the Hash value is compared with the Hash value of the node to obtain a contract set approved by the node to the next verification node, the latest contract set is obtained until the Nth verification point is reached, and finally the latest contract set is broadcasted in a block chain network in a block form.
In some embodiments, the intelligent contract system periodically checks a state machine included in the intelligent contract and a trigger condition for the computing transaction, and in response to determining that the state machine indicates that the intelligent contract is not complete and the trigger condition is satisfied, pushes the computing transaction to each validation node in the block chain;
in response to receiving validation pass information for the computing transaction by a majority of validation nodes in the blockchain, the intelligent contract system determines that the computing transaction satisfies the trigger condition and executes the computing transaction.
Specifically, the intelligent contracts periodically check the state of the automaton, traverse the state machine, the calculation transactions and the trigger conditions contained in each intelligent contract one by one, push the calculation transactions meeting the trigger conditions to the queue to be verified, wait for consensus, and continuously store the calculation transactions not meeting the trigger conditions on the block chain.
The calculation affairs entering the latest round of verification can be diffused to each verification node, the verification nodes perform signature verification firstly to ensure the validity of the calculation affairs, the calculation affairs passing the verification can enter a to-be-identified set, and after most verification nodes achieve common identification, the calculation affairs can be successfully executed and a service demand party is informed.
After the computing transactions are successfully executed, the state opportunity of the intelligent contract judges the state of the intelligent contract, when all the computing transactions included in the intelligent contract are sequentially executed, the state opportunity marks the state of the intelligent contract as completed and removes the intelligent contract from the latest block, otherwise, the state of the intelligent contract is marked as in progress and continuously stored in the latest block to wait for the next round of processing until the processing is completed. The whole processing of the calculation affairs and the state is automatically completed by an intelligent contract system arranged in the bottom layer of the block chain, and the whole course is transparent and can not be tampered.
Referring to fig. 4, the intelligent contract system in the block chain regularly traverses the trigger condition of each intelligent contract, and pushes the computation transaction meeting the trigger condition to a to-be-verified transaction queue, where the to-be-verified transaction queue includes computation transaction 1 and computation transaction 2 … … computation transaction N. After the calculation transaction in the transaction queue to be verified is sent to the verification node, the verification node firstly carries out signature verification on the calculation transaction, and the calculation transaction is stored in the set to be identified after the verification is passed. And each verification node verifies the calculation transaction respectively, when most verification nodes achieve consensus, the intelligent contract system executes the calculation transaction, and after the calculation is finished, the calculation result is returned to the service demand side. When all the computing transactions in the contract are completed, the contract is removed from the block of each validation node and the contract state is marked as complete.
It should be noted that the method of the embodiment of the present application may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment, and the multiple devices interact with each other to complete the method.
It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same inventive concept, corresponding to the method of any embodiment, the application also provides an intelligent contract system for privacy computation in the block chain.
Referring to fig. 5, the intelligent contract system for privacy computation in a blockchain includes:
a data obtaining module 501, configured to: in response to determining that a computing transaction contained in an intelligent contract in the blockchain meets a trigger condition, for each participant in a plurality of participants involved in the computing transaction, invoking encrypted data and a digital certificate of the participant, and decrypting the encrypted data by using the digital certificate to obtain original data of the participant;
a calculation module 502 for: executing the computing logic corresponding to the computing transaction based on all the original data to obtain a computing result,
wherein the smart contract is pre-established by the plurality of participants for the computing transaction and is signed with a private key of each of the plurality of participants before being stored in the blockchain,
the original data of each of the plurality of parties is previously encrypted with the private key of that party and stored as the encrypted data of that party in the blockchain along with the digital certificate of that party,
the digital certificate is generated by authenticating the public key of the participant through a certificate center and encrypting the basic information of the participant by using the public key of the certificate center.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations as the present application.
The apparatus in the foregoing embodiment is used to implement the privacy calculation method based on the intelligent contract in the blockchain in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to the method of any embodiment described above, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the privacy calculation method based on the intelligent contract in the block chain described above is implemented.
Fig. 6 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device in the foregoing embodiment is used to implement the privacy calculation method based on the intelligent contract in the blockchain in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application further provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the privacy computation method based on intelligent contracts in a block chain according to any of the above embodiments.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the privacy computation method based on the intelligent contracts in the blockchain according to any of the above embodiments, and have the beneficial effects of corresponding method embodiments, and are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the context of the present application, features from the above embodiments or from different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the application. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the application, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the application are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the application, it should be apparent to one skilled in the art that the embodiments of the application can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present application has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present application are intended to be included within the scope of the present application.

Claims (10)

1. A privacy computation method performed by an intelligent contract system in a blockchain, the method comprising:
in response to determining that a computing transaction contained in an intelligent contract in the blockchain meets a trigger condition, for each participant in a plurality of participants involved in the computing transaction, invoking encrypted data and a digital certificate of the participant, and decrypting the encrypted data by using the digital certificate to obtain original data of the participant;
executing the computing logic corresponding to the computing transaction based on all the original data to obtain a computing result,
wherein the smart contract is pre-established by the plurality of participants for the computing transaction and is signed with a private key of each of the plurality of participants before being stored in the blockchain,
the original data of each of the plurality of parties is previously encrypted with the private key of that party and stored as the encrypted data of that party in the blockchain along with the digital certificate of that party,
the digital certificate is generated by authenticating the public key of the participant through a certificate center and encrypting the basic information of the participant by using the public key of the certificate center.
2. The method of claim 1, further comprising:
and encrypting the calculation result through the digital certificate of each participant in the plurality of participants and returning the calculation result to the service demand party.
3. The method of claim 1 or 2, wherein upon each of the plurality of participants pre-registering onto the blockchain, the blockchain generates a pair of public and private keys for that participant.
4. The method of claim 1 or 2, wherein decrypting the encrypted data using the digital certificate to obtain the original data of the party comprises:
and decrypting the digital certificate through the public key of the certificate center to obtain the public key of the participant, and decrypting the encrypted data through the public key of the participant.
5. The method of claim 1 or 2, wherein the intelligent synthetic comprises, approximately before being stored into the blockchain:
and code auditing is respectively carried out on the intelligent contract by each of the multiple participants, the intelligent contract is signed by the respective private key after the auditing is finished, and the signed intelligent contract is subjected to chain confirmation.
6. The method of claim 5, wherein the intelligent contracts are stored into the blockchain, comprising:
broadcasting the intelligent contracts in a block chain, initiating consensus verification after a verification node in the block chain receives the intelligent contracts, packaging a plurality of intelligent contracts subjected to consensus verification into a contract set and broadcasting the contracts in the block chain in a block form, verifying each intelligent contract by the node receiving the contract set, and storing the intelligent contracts in the block chain after the verification is passed.
7. The method of claim 1 or 2,
the intelligent contract system periodically checks a state machine contained in the intelligent contract and a trigger condition of the computing transaction, and pushes the computing transaction to each verification node in the block chain in response to determining that the state machine indicates that the intelligent contract is not completed and the trigger condition is met;
in response to receiving validation pass information for the computing transaction by a majority of validation nodes in the blockchain, the intelligent contract system determines that the computing transaction satisfies the trigger condition and executes the computing transaction.
8. An intelligent contract system for privacy computing in a blockchain, comprising:
a data acquisition module to: in response to determining that a computing transaction contained in an intelligent contract in the blockchain meets a trigger condition, for each participant in a plurality of participants involved in the computing transaction, invoking encrypted data and a digital certificate of the participant, and decrypting the encrypted data by using the digital certificate to obtain original data of the participant;
a calculation module to: executing the computing logic corresponding to the computing transaction based on all the original data to obtain a computing result,
wherein the smart contract is pre-established by the plurality of participants for the computing transaction and is signed with a private key of each of the plurality of participants before being stored in the blockchain,
the original data of each of the plurality of parties is previously encrypted with the private key of that party and stored as the encrypted data of that party in the blockchain along with the digital certificate of that party,
the digital certificate is generated by authenticating the public key of the participant through a certificate center and encrypting the basic information of the participant by using the public key of the certificate center.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, the processor implementing the method of any one of claims 1 to 7 when executing the computer program.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202111347858.1A 2021-11-15 2021-11-15 Privacy calculation method based on intelligent contracts in block chain and related equipment Pending CN114358764A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111347858.1A CN114358764A (en) 2021-11-15 2021-11-15 Privacy calculation method based on intelligent contracts in block chain and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111347858.1A CN114358764A (en) 2021-11-15 2021-11-15 Privacy calculation method based on intelligent contracts in block chain and related equipment

Publications (1)

Publication Number Publication Date
CN114358764A true CN114358764A (en) 2022-04-15

Family

ID=81095704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111347858.1A Pending CN114358764A (en) 2021-11-15 2021-11-15 Privacy calculation method based on intelligent contracts in block chain and related equipment

Country Status (1)

Country Link
CN (1) CN114358764A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679270A (en) * 2022-05-25 2022-06-28 南湖实验室 Data cross-domain encryption and decryption method based on privacy calculation
CN117081743A (en) * 2023-10-12 2023-11-17 北京天润基业科技发展股份有限公司 Secret key management and acquisition method for privacy calculation, blockchain and electronic equipment
WO2024103689A1 (en) * 2022-11-14 2024-05-23 苏州元脑智能科技有限公司 State change method and apparatus, device, and nonvolatile readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103473A (en) * 2017-04-27 2017-08-29 电子科技大学 A kind of intelligent contract implementation method based on block chain
CN109493203A (en) * 2018-09-30 2019-03-19 咪咕文化科技有限公司 A kind of data calculate method, apparatus and storage medium
CN109829326A (en) * 2018-11-20 2019-05-31 西安电子科技大学 Cross-domain certification and fair audit duplicate removal cloud storage system based on block chain
CA3057385A1 (en) * 2019-03-01 2019-05-31 Alibaba Group Holding Limited Methods and devices for protecting sensitive data of transaction activity based on smart contract in blockchain
WO2019120325A2 (en) * 2019-03-29 2019-06-27 Alibaba Group Holding Limited Retrieving access data for blockchain networks using highly available trusted execution environments
CN110298190A (en) * 2019-04-19 2019-10-01 矩阵元技术(深圳)有限公司 Decentralization Secure data processing method, device and storage medium
CN110914851A (en) * 2019-03-27 2020-03-24 阿里巴巴集团控股有限公司 Improving integrity of communications between blockchain networks and external data sources
WO2020108138A1 (en) * 2018-11-30 2020-06-04 阿里巴巴集团控股有限公司 Method for implementing privacy protection in blockchain
CN111563279A (en) * 2020-05-19 2020-08-21 江苏荣泽信息科技股份有限公司 Cloud data privacy protection system based on block chain
CN111683071A (en) * 2020-05-29 2020-09-18 百度在线网络技术(北京)有限公司 Private data processing method, device, equipment and storage medium of block chain
CN111881218A (en) * 2020-08-07 2020-11-03 江苏哩咕信息科技有限公司 Public space data sharing method based on block chain
CN112637278A (en) * 2020-12-09 2021-04-09 云南财经大学 Data sharing method and system based on block chain and attribute-based encryption and computer readable storage medium
CN113420319A (en) * 2021-04-08 2021-09-21 同方股份有限公司 Data privacy protection method and system based on block chain and permission contract
US20210328791A1 (en) * 2020-07-08 2021-10-21 Alipay (Hangzhou) Information Technology Co., Ltd. Blockchain data processing methods and apparatuses based on cloud computing

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103473A (en) * 2017-04-27 2017-08-29 电子科技大学 A kind of intelligent contract implementation method based on block chain
CN109493203A (en) * 2018-09-30 2019-03-19 咪咕文化科技有限公司 A kind of data calculate method, apparatus and storage medium
CN109829326A (en) * 2018-11-20 2019-05-31 西安电子科技大学 Cross-domain certification and fair audit duplicate removal cloud storage system based on block chain
WO2020108138A1 (en) * 2018-11-30 2020-06-04 阿里巴巴集团控股有限公司 Method for implementing privacy protection in blockchain
CA3057385A1 (en) * 2019-03-01 2019-05-31 Alibaba Group Holding Limited Methods and devices for protecting sensitive data of transaction activity based on smart contract in blockchain
CN110914851A (en) * 2019-03-27 2020-03-24 阿里巴巴集团控股有限公司 Improving integrity of communications between blockchain networks and external data sources
WO2019120325A2 (en) * 2019-03-29 2019-06-27 Alibaba Group Holding Limited Retrieving access data for blockchain networks using highly available trusted execution environments
CN110298190A (en) * 2019-04-19 2019-10-01 矩阵元技术(深圳)有限公司 Decentralization Secure data processing method, device and storage medium
CN111563279A (en) * 2020-05-19 2020-08-21 江苏荣泽信息科技股份有限公司 Cloud data privacy protection system based on block chain
CN111683071A (en) * 2020-05-29 2020-09-18 百度在线网络技术(北京)有限公司 Private data processing method, device, equipment and storage medium of block chain
US20210328791A1 (en) * 2020-07-08 2021-10-21 Alipay (Hangzhou) Information Technology Co., Ltd. Blockchain data processing methods and apparatuses based on cloud computing
CN111881218A (en) * 2020-08-07 2020-11-03 江苏哩咕信息科技有限公司 Public space data sharing method based on block chain
CN112637278A (en) * 2020-12-09 2021-04-09 云南财经大学 Data sharing method and system based on block chain and attribute-based encryption and computer readable storage medium
CN113420319A (en) * 2021-04-08 2021-09-21 同方股份有限公司 Data privacy protection method and system based on block chain and permission contract

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679270A (en) * 2022-05-25 2022-06-28 南湖实验室 Data cross-domain encryption and decryption method based on privacy calculation
CN114679270B (en) * 2022-05-25 2022-09-06 南湖实验室 Data cross-domain encryption and decryption method based on privacy calculation
WO2024103689A1 (en) * 2022-11-14 2024-05-23 苏州元脑智能科技有限公司 State change method and apparatus, device, and nonvolatile readable storage medium
CN117081743A (en) * 2023-10-12 2023-11-17 北京天润基业科技发展股份有限公司 Secret key management and acquisition method for privacy calculation, blockchain and electronic equipment
CN117081743B (en) * 2023-10-12 2024-01-12 北京天润基业科技发展股份有限公司 Secret key management and acquisition method for privacy calculation, blockchain and electronic equipment

Similar Documents

Publication Publication Date Title
CN111401902B (en) Service processing method, device and equipment based on block chain
CN111724150B (en) Service request processing method and device
CN111080295B (en) Electronic contract processing method and device based on blockchain
CN111382168B (en) Node group creating method and node group-based transaction method in alliance chain network
CN114358764A (en) Privacy calculation method based on intelligent contracts in block chain and related equipment
CN113468602B (en) Data inspection method, device and equipment
CN109978688A (en) The access control method and its contract generator and server of distributed common recognition system
CN112215608A (en) Data processing method and device
CN111383018B (en) Node group creating method and node group-based transaction method in alliance chain network
CN110246039B (en) Transaction monitoring method and device based on alliance chain and electronic equipment
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
WO2017050147A1 (en) Information registration and authentication method and device
CN111460400A (en) Data processing method and device and computer readable storage medium
CN113704775A (en) Service processing method based on distributed digital identity and related device
CN109818965B (en) Personal identity verification device and method
CN115296794A (en) Key management method and device based on block chain
CN114331437A (en) Block chain-based digital seal using method and device
CN112291321B (en) Service processing method, device and system
CN105743651A (en) Method and apparatus for utilizing card application in chip security domain, and application terminal
CN111899104B (en) Service execution method and device
CN111600882A (en) Block chain-based account password management method and device and electronic equipment
CN113868691B (en) Authorized operation method and device of block chain based on cloud-native technology
CN116975810A (en) Identity verification method, device, electronic equipment and computer readable storage medium
CN115409511A (en) Personal information protection system based on block chain
CN115118434A (en) Key management method and device based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination