CN113496398A - Data processing method, device, equipment and medium based on intelligent contract - Google Patents

Data processing method, device, equipment and medium based on intelligent contract Download PDF

Info

Publication number
CN113496398A
CN113496398A CN202010196101.6A CN202010196101A CN113496398A CN 113496398 A CN113496398 A CN 113496398A CN 202010196101 A CN202010196101 A CN 202010196101A CN 113496398 A CN113496398 A CN 113496398A
Authority
CN
China
Prior art keywords
computing
computing node
target data
message
data
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
CN202010196101.6A
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.)
China Mobile Communications Group Co Ltd
China Mobile Shanghai ICT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Shanghai ICT 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 China Mobile Communications Group Co Ltd, China Mobile Shanghai ICT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202010196101.6A priority Critical patent/CN113496398A/en
Publication of CN113496398A publication Critical patent/CN113496398A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/256Integrating or interfacing systems involving database management systems in federated or virtual databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Development Economics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention discloses a data processing method, a device, equipment and a medium based on an intelligent contract. The method comprises the following steps: receiving a data calculation request sent by a calling party; determining at least one first computing node participating in the target data to be shared of the computing and calling party according to the data computing request; sending a first message to a calling party; the first message is used for calling a party to send target data to at least one first computing node, and the at least one first computing node calculates the target data by adopting a secure multi-party computing algorithm based on an intelligent contract; receiving a calculation result sent by at least one first calculation node; and reconstructing the calculation result to obtain a final calculation result corresponding to the target data. The data processing method, the device, the equipment and the medium based on the intelligent contract can ensure the safety of the execution of the intelligent contract.

Description

Data processing method, device, equipment and medium based on intelligent contract
Technical Field
The invention relates to the technical field of block chains, in particular to a data processing method, a data processing device, data processing equipment and data processing media based on an intelligent contract.
Background
An intelligent contract is a "computer trading agreement to execute contract terms". It can replace manual operation to carry out automatic complex digital financial transaction. The method has wide application scenes in the fields of finance, logistics, supply chains, crowd funding and the like. All users on the blockchain can see the intelligent contracts based on the blockchain.
The existing intelligent contract has the advantages that the input of the participant is not privacy and can resist attack of adversaries in the contract execution process, so that the secret of the participant is leaked or illegally attacked. However, the current blockchain technology only supports simple scripting languages on specific instruction sets, and the instruction sets only limit the authentication of the integrity and ownership of contract data and do not have the capability of protecting the data privacy of the participants. Therefore, the execution security of the smart contract is poor.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a data processing device, equipment and a data processing medium based on an intelligent contract, which can ensure the safety of the execution of the intelligent contract.
In a first aspect, an embodiment of the present invention provides a data processing method based on an intelligent contract, including:
receiving a data calculation request sent by a calling party;
determining at least one first computing node participating in the target data to be shared of the computing and calling party according to the data computing request;
sending a first message to a calling party; the first message is used for calling a party to send target data to at least one first computing node, and the at least one first computing node calculates the target data by adopting a Secure Multi-party computing (SMPC) algorithm based on an intelligent contract;
receiving a calculation result sent by at least one first calculation node;
and reconstructing the calculation result to obtain a final calculation result corresponding to the target data.
In a second aspect, an embodiment of the present invention provides a data processing apparatus based on an intelligent contract, including:
the first receiving module is used for receiving a data calculation request sent by a calling party;
the determining module is used for determining at least one first computing node of the target data to be shared by the computing and calling parties according to the data computing request;
the first sending module is used for sending a first message to the calling party; the first message is used for calling a party to send target data to at least one first computing node, and the at least one first computing node calculates the target data by adopting a secure multi-party computing algorithm based on an intelligent contract;
the second receiving module is used for receiving a calculation result sent by at least one first calculation node;
and the reconstruction module is used for reconstructing the calculation result to obtain a final calculation result corresponding to the target data.
In a third aspect, an embodiment of the present invention provides a data processing device based on an intelligent contract, including: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor executes the computer program to implement the intelligent contract-based data processing method provided by the first aspect of the embodiment of the invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the intelligent contract-based data processing method provided in the first aspect of the embodiment of the present invention.
According to the data processing method, the device, the equipment and the medium based on the intelligent contract, the secure multi-party computing algorithm is introduced into the intelligent contract, in the execution process of the secure multi-party computing algorithm, computing tasks of all parties are consistent, no centralized special node exists, and fairness of the intelligent contract can be guaranteed; the safety multi-party computing algorithm protects the privacy of the input information of each party and can ensure the privacy of the intelligent contract; through the secret sharing and homomorphic commitment scheme, other participants verify whether the target participant is honest or not by comparing the commitment value obtained by calculation with the commitment value published by the target participant before, so that the calculation result of the target participant can be ensured to be a correct result, and the accuracy of the intelligent contract can be ensured. Therefore, the characteristics of the secure multiparty computing algorithm can be embodied in the fairness, the privacy and the correctness of the intelligent contract, and the security of the execution of the intelligent contract can be ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a data processing method based on an intelligent contract according to an embodiment of the present invention;
FIG. 2 is a process diagram of data processing based on smart contracts according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data processing apparatus based on an intelligent contract according to an embodiment of the present invention;
fig. 4 is a block diagram of a hardware architecture of a computing device according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In order to solve the problem of the prior art, embodiments of the present invention provide a data processing method, apparatus, device, and medium based on an intelligent contract. First, a data processing method based on an intelligent contract according to an embodiment of the present invention will be described in detail.
Fig. 1 is a schematic flowchart of a data processing method based on an intelligent contract according to an embodiment of the present invention. The data processing method based on the intelligent contract can comprise the following steps:
s101: and receiving a data calculation request sent by a calling party.
S102: and determining at least one first computing node participating in the target data to be shared of the computation calling party according to the data computation request.
S103: a first message is sent to the caller.
The first message is used for calling a party to send target data to at least one first computing node, and the at least one first computing node calculates the target data by adopting a secure multi-party computing algorithm based on an intelligent contract.
S104: and receiving the calculation result sent by at least one first calculation node.
S105: and reconstructing the calculation result to obtain a final calculation result corresponding to the target data.
In some possible implementations of the embodiment of the present invention, at least one second computing node for computing target data to be shared by the caller may be obtained according to the data computing request; selecting at least one first computing node participating in target data to be shared by computing callers from at least one second computing node
In some possible implementations of the embodiment of the present invention, when at least one second computing node for computing target data to be shared by a caller is obtained according to a data computing request, a second message may be sent to the at least one computing node, where the second message is used to obtain the computing node for computing the target data to be shared by the caller; receiving an acknowledgement response message sent by at least one computing node for the second message; and determining the computing node which sends the confirmation response message as the second computing node.
For example, assuming that a message of a compute node for acquiring target data to be shared by a compute caller is sent to 100 compute nodes, and an acknowledgement response message for the message is received from 50 compute nodes, the 50 compute nodes are taken as second compute nodes.
In some possible implementations of the embodiment of the present invention, when at least one first computing node participating in target data to be shared by a computing caller is selected from at least one second computing node, a preset computing node selection rule may be adopted to select the first computing node. The preset computing node selection rule includes, but is not limited to: randomly selecting computing nodes with strong computing power, selecting computing nodes with large memory capacity, selecting computing nodes with more idle computing resources and the like.
In some possible implementations of embodiments of the present invention, the caller may share the target data to be shared secretly to at least one first computing node.
The secure multiparty computation algorithm is mathematically described as: there are n participants P1, P2, … …, Pn, which together compute a function in a secure way, where security refers to the correctness of the output results and the confidentiality of the input and output information. Specifically, each participant Pi has its own secret input information Xi, n participants share a function f (X1, X2, … …, Xn) — (Y1, Y2, … …, Yn), and at the end of the calculation, each participant Pi can only obtain its own output information Yi, but cannot know any information of other participants.
The secure multiparty computation algorithm meets the following requirements:
1: loyalty, which requires that most participants be loyal.
2: termination, i.e., the ability of a loyalty party to terminate a computing task for a limited time.
3: privacy, input with other participants that any participant cannot.
4: consistency, all loyalty participants get the same output.
The secure multi-party computing algorithm builds a penalty mechanism based on the EtherFang intelligent contract to implement a fairness protocol. All participants need to pay the deposit to the intelligent contract at the beginning, otherwise the agreement is terminated.
The secure multiparty computation algorithm is mainly composed of two phases. In the first stage, a participant chain executes an unfair common multi-party computing (MPC) protocol, which applies a Verifiable Secret Sharing (VSS) scheme. The secret is shared in a random polynomial of the order t, and finally n participants obtain respective secret shares; and in the second stage, the participants execute a fair secret reconstruction protocol, the participants need to perform multi-round interaction with the intelligent contract, the participants firstly publish own secret shares to other participants in a linked manner, after the other participants verify the secret shares, the verification results are fed back to the intelligent contract, the intelligent contract judges the malicious party, and finally the deposit of the malicious party is divided equally to the honest party. In this stage, the honesty party can recover the secret as long as t +1 correct shares are collected, and if the recovery fails, the secret can be compensated.
The secure multiparty computing algorithm protocol combines the VSS scheme and the homomorphic commitment scheme to achieve the verification of the share correctness. The secure multi-party computing algorithm represents a function y to be computed as f (x1, x2, … …, xn) as a directed graph formed by addition and multiplication, and realizes arbitrary computation by executing corresponding addition protocol and multiplication protocol. The protocol flow mainly comprises the following three stages:
the first stage is an input stage, and each participant shares own secret input among all participants by using a VSS scheme; the second phase is a calculation phase, the participants execute corresponding addition protocols and multiplication protocols, the input is secret shares, the shares are verifiable, and the output of the calculation phase is the secret shares needed for reconstructing y. Each protocol participant Pi gets a share yi; the third phase is an output phase, and the participators publish own share yi and recover y together.
In the input phase, in order to protect privacy, each participant Pi as a distributor shares its input to other participants using a secret sharing scheme and uses a homomorphic commitment scheme to guarantee verifiability of secret shares.
Pi selects two random polynomials a (x) a0+a1x+a2x2+……+anxnAnd b (x) β01x+β2x2+……+βnxnWherein a is0Is a secret value. Pi will share sjIn the case of a (a), (j), b (j)) is sent in secret to the other participants Pj, j being 1, 2, … …, n. At the same time, Pi broadcasts the commitment value Ak=ga(k)hb(k)mod p, k is 0, 1, 2, … …, n. Wherein p is a large prime number negotiated among n participants, p is 2q +1, q is also a prime number, and g is Zp *H is a random element in the subgroup generated by g.
After receiving the share of the self, Pj needs to verify whether the share of the self is valid, that is, whether the share of the self and the shares of all other persons are on the same polynomial with the number of times t. The method comprises the following steps:
by f (x) ═ a0+a1x+a2x2+……+anxnIs provided with
Figure BDA0002417668100000061
Is recorded as:
Figure BDA0002417668100000062
therefore, it is not only easy to use
Figure BDA0002417668100000063
Participant randomly selects delta E [1, n ∈ ]],AδIs a promulgated commitment, calculation
Figure BDA0002417668100000071
λjiIs V-1Has the value of
Figure BDA0002417668100000072
Therefore, it is not only easy to use
Figure BDA0002417668100000073
Wherein the content of the first and second substances,
Figure BDA0002417668100000074
pj will be calculated
Figure BDA0002417668100000075
And A previously publishedδThe comparison is made, and if equal, the own share is checked for a match with the commitment, if a match is made, the received share is considered valid, and if not, the correct share is applied to the distributor. Through this verification process, each participant can check whether the secret distributor is honest.
By the embodiment of the invention, whether the distributor is honest or not can be detected, the active attack that the secret distributor sends wrong shares to other participants can be resisted, and any information about the secret shares is not leaked in the published commitments.
In the output stage, after the secret input of the participant is to be shared through the input gate, the addition gate and the multiplication gate operate on the shares, and any information about the secret input cannot be leaked. All commitments to the output gate are validated to be correct, so that in the output phase, i.e. the fair reconstruction phase is implemented by means of a blockchain, only the share y published by the participants has to be checkediWith its previously published commitment AiIf there is a match, the correct shares are found, and y can be recovered correctly as long as t +1 correct shares are found.
After the down-link general MPC protocol is executed, all the participants obtain respective shares and need to disclose own shares to recover the secret, but after a malicious participant obtains the secret shares of others and successfully recovers the secret, the protocol is terminated in advance without disclosing own shares, which may cause that some participants cannot obtain the final result, and the fairness of the MPC is damaged. A fair secret reconstruction protocol needs to be executed to detect and punish malicious participants while compensating for honesty. Because of the existence of the penalty mechanism, rational participants may choose not to do harm.
The secure multi-party computing algorithm is realized based on an EtherFang intelligent contract, and the protocol has two accounts: an external account controlled by the user's personal private key and a contract account controlled by the contract code, not controlled by anyone, which can act as a trusted party to store the deposit. All participants send deposit to contract account, which is kept by intelligent contract, and the number of deposit paying rounds is only one.
The secure multiparty computing algorithm protocol includes a local protocol Conlocal and a Smart contract ConContract. ConContract is compiled by a participant Pi, and after all participants agree on the contracted content, the Pi issues the contracted content to a block chain network and writes the contracted content into a block chain after being verified by miners.
The global is executed by the participants, defines the computational operations of the participants and the data sent to the con-track, which is executed by the block nodes and is responsible for keeping the deposit and determining the participant behavior during the secret reconstruction phase.
In the block chain network, the execution result of the intelligent contract needs to be known, so in order to improve the efficiency, the participants verify the correctness of the shares locally and mutually, and if the verification fails, the participants are verified by ConContract. For the behavior of the early termination protocol, con-control is determined by timeout, and if the participant does not send information to con-control within a specified time, the participant is determined to be a malicious party.
According to the data processing method based on the intelligent contract, disclosed by the embodiment of the invention, the secure multi-party computing algorithm is introduced into the intelligent contract, in the execution process of the secure multi-party computing algorithm, the computing tasks of each party are consistent, no centralized special node exists, and the fairness of the intelligent contract can be ensured; the safety multi-party computing algorithm protects the privacy of the input information of each party and can ensure the privacy of the intelligent contract; through the secret sharing and homomorphic commitment scheme, other participants verify whether the target participant is honest or not by comparing the commitment value obtained by calculation with the commitment value published by the target participant before, so that the calculation result of the target participant can be ensured to be a correct result, and the accuracy of the intelligent contract can be ensured. Therefore, the characteristics of the secure multiparty computing algorithm can be embodied in the fairness, the privacy and the correctness of the intelligent contract, and the security of the execution of the intelligent contract can be ensured.
In some possible implementations of the embodiment of the present invention, after receiving a data calculation request sent by a caller, before acquiring at least one second calculation node used for calculating target data to be shared by the caller, the caller may also be authenticated. And when the caller passes the identity authentication, acquiring at least one second computing node for computing the target data to be shared by the caller.
The embodiment of the invention does not limit the verification mode adopted by the identity verification of the calling party, and any available verification mode can be applied to the embodiment of the invention.
For example, the public key is derived from an elliptic curve to derive an address, a signature is generated by using a corresponding private key and an elliptic digital signature algorithm, ownership is proved, and the identity of a calling party is verified.
In some possible implementations of the embodiment of the present invention, the number of the computing nodes that receive the target data to be shared by the caller may also be counted, and if the counted number is smaller than the first preset number of computing nodes, a message is sent to the caller, so that the caller can re-share the target data to be shared.
Specifically, a third message fed back by at least one first computing node may be received, where the third message includes information of target data to be shared by a calling party; determining a first number of first compute nodes to send a third message; and if the first number is smaller than the first preset computing node number, sending a fourth message to the calling party, wherein the fourth message is used for the calling party to send target data to be shared by the calling party to at least one first computing node again.
For example, assuming that 100 computing nodes are recruited and 30 computing nodes are selected to participate in the computation, the calling party sends the target data to be shared to the 30 computing nodes participating in the computation.
Assume that the first preset number of compute nodes is 20.
Suppose that a message which is fed back by 19 of 30 computing nodes participating in computation and receives target data to be shared by a caller is received. At this time, a data re-sharing message is sent to the calling party, and after receiving the data re-sharing message, the calling party sends the target data to be shared to the 30 computing nodes participating in the computation again.
Suppose that a message which is fed back by 29 of 30 computing nodes participating in computation and receives target data to be shared by a caller is received. At this time, the data re-sharing message does not need to be sent to the calling party.
In some possible implementations of the embodiment of the present invention, the number of first computing nodes that feed back the same computing result may also be counted, and if the counted number is smaller than the second preset number of computing nodes, a message is sent to the computing nodes, so that the computing nodes recalculate.
Specifically, the second number of the first computing nodes feeding back the same computing result may be counted; and if the second quantity is smaller than the second preset computing node quantity, sending a fifth message to the at least one first computing node, wherein the fifth message is used for indicating the at least one first computing node to recalculate the target data to be shared by the caller.
For example, assuming that 100 computing nodes are recruited and 30 computing nodes are selected to participate in the computation, the target data to be shared by the 30 computing nodes participating in the computation is called.
Assuming that 29 computing nodes in the 30 computing nodes receive target data to be shared by a calling party, the 29 computing nodes calculate the received target data.
Assume that the second preset number of compute nodes is 20.
Suppose that 19 of the 29 computing nodes are received to feed back the same computation result. At this time, recalculation messages are sent to 29 computing nodes, and after receiving the recalculation messages, the 29 computing nodes recalculate the target data to be shared by the caller.
In some possible implementations of embodiments of the present invention, based on the consistency of the secure multiparty computation algorithm, all loyalty participants get the same output, and the computation results computed by the compute nodes that get the same computation results may be considered to be correct computation results.
In some possible implementations of the embodiment of the present invention, the calculation result may be reconstructed based on a data reconstruction technique and a reconstruction function/algorithm, where data reconstruction refers to conversion of data from one geometric form to another geometric form, and conversion of data from one format to another format, including structure conversion, format conversion, type replacement, and the like (data splicing, data cropping, data compression, and the like), so as to implement unification of spatial data in structure, format, and type, and connection and fusion of multi-source and heterogeneous data.
In some possible implementations of the embodiment of the present invention, a trusted refactoring party is introduced in the embodiment of the present invention to implement the data processing method based on the intelligent contract provided by the embodiment of the present invention. And the trusted reconstruction party reconstructs the data to obtain a final calculation result. The credible reconstruction party is used for supervising and managing the execution process of the intelligent contract, does not participate in the intelligent contract calculation, only carries out verification and notification in the execution process, and does not influence the contract fairness.
Based on the above, the process of data processing based on the intelligent contract provided by the embodiment of the invention is shown in fig. 2.
And the calling party sends a data calculation request to the trusted restructuring party.
And after receiving the data calculation request, the trusted reconstruction party performs identity verification on the calling party. And when the caller passes the identity authentication, the trusted restructuring party is gathered and a computing node is selected. And the trusted reconstruction party informs the calculation node selected by the calling party of sending the target data to be shared.
And if the number of the computing nodes receiving the target data is less than the first preset number of the computing nodes, the trusted reconstitution direction sends a data re-sharing message to the calling party, and the calling party re-shares the target data after receiving the data re-sharing message.
And if the number of the computing nodes receiving the target data is not less than the first preset number of the computing nodes, the trusted reconstruction party informs the computing nodes receiving the target data to compute the received target data. And the computing node sends the computing result to the credible reconstruction party.
And if the number of the same calculation results received by the credible reconstruction party is less than the second preset number of the calculation nodes, the credible reconstruction party informs the calculation nodes receiving the target data to recalculate the received target data.
And if the number of the same calculation results received by the credible reconstruction party is not less than the second preset number of the calculation nodes, reconstructing the received calculation results to obtain the final calculation results.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a data processing apparatus based on an intelligent contract.
Fig. 3 is a schematic structural diagram of a data processing apparatus based on an intelligent contract according to an embodiment of the present invention. The intelligent contract-based data processing apparatus may include:
a first receiving module 301, configured to receive a data calculation request sent by a calling party;
a determining module 302, configured to determine, according to the data calculation request, at least one first calculation node of the target data to be shared by the calculation and invocation party;
a first sending module 303, configured to send a first message to a caller; the first message is used for calling a party to send target data to at least one first computing node, and the at least one first computing node calculates the target data by adopting a secure multi-party computing algorithm based on an intelligent contract;
a second receiving module 304, configured to receive a calculation result sent by at least one first calculation node;
and a reconstructing module 305, configured to reconstruct the calculation result to obtain a final calculation result corresponding to the target data.
In some possible implementations of embodiments of the invention, the determining module 302 includes:
the acquiring unit is used for acquiring at least one second computing node used for computing target data to be shared by a calling party according to the data computing request;
and the selecting unit is used for selecting at least one first computing node participating in the target data to be shared by the computation invoker from at least one second computing node.
The data processing device based on the intelligent contract provided by the embodiment of the invention can also comprise:
the verification module is used for verifying the identity of the calling party; if the caller passes authentication, module 302 is determined.
In some possible implementations of the embodiment of the present invention, the obtaining unit may be specifically configured to:
sending a second message to at least one computing node, wherein the second message is used for obtaining the computing node of the target data to be shared by the computing caller;
receiving an acknowledgement response message sent by at least one computing node for the second message;
and determining the computing node which sends the confirmation response message as the second computing node.
In some possible implementations of the embodiments of the present invention, the selection unit may be specifically configured to:
and selecting at least one first computing node participating in the target data to be shared of the computation invoker from at least one second computing node by adopting a preset computing node selection rule.
In some possible implementations of the embodiment of the present invention, the data processing apparatus based on an intelligent contract provided in the embodiment of the present invention may further include:
the third receiving module is used for receiving a third message sent by at least one first computing node, wherein the third message comprises information of target data to be shared by a calling party;
a first statistics module to determine a first number of first compute nodes to send a third message;
and the second sending module is used for sending a fourth message to the calling party if the first number is smaller than the first preset number of the computing nodes, wherein the fourth message is used for the calling party to resend the target data to be shared by the calling party to at least one first computing node.
In some possible implementations of the embodiment of the present invention, the data processing apparatus based on an intelligent contract provided in the embodiment of the present invention may further include:
the second statistical module is used for determining a second number of the first computing nodes which send the same computing result;
and the third sending module is configured to send a fifth message to the at least one first computing node if the second number is smaller than the second preset number of computing nodes, where the fifth message is used to instruct the at least one first computing node to recalculate the target data to be shared by the caller.
As for the embodiment of the data processing apparatus based on the intelligent contract according to the embodiment of the present invention, since it is basically similar to the embodiment of the data processing method based on the intelligent contract according to the embodiment of the present invention, the description is relatively simple, and relevant points can be referred to the partial description of the embodiment of the data processing method based on the intelligent contract according to the embodiment of the present invention. The embodiments of the present invention are not described herein in detail.
Fig. 4 is a block diagram of a hardware architecture of a computing device according to an embodiment of the present invention. As shown in fig. 4, computing device 400 includes an input device 401, an input interface 402, a central processor 403, a memory 404, an output interface 405, and an output device 406. The input interface 402, the central processing unit 403, the memory 404, and the output interface 405 are connected to each other through a bus 410, and the input device 401 and the output device 406 are connected to the bus 410 through the input interface 402 and the output interface 405, respectively, and further connected to other components of the computing device 400.
Specifically, the input device 401 receives input information from the outside and transmits the input information to the central processor 403 through the input interface 402; the central processor 403 processes the input information based on computer-executable instructions stored in the memory 404 to generate output information, stores the output information temporarily or permanently in the memory 404, and then transmits the output information to the output device 406 through the output interface 405; output device 406 outputs the output information outside of computing device 400 for use by a user.
That is, the computing device shown in fig. 4 may also be implemented as a smart contract-based data processing device, which may include: a memory storing a computer program; and a processor, which can realize the intelligent contract-based data processing method provided by the embodiment of the invention when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium; the computer program realizes the data processing method based on the intelligent contract provided by the embodiment of the invention when being executed by the processor.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (10)

1. A method for data processing based on intelligent contracts, the method comprising:
receiving a data calculation request sent by a calling party;
determining at least one first computing node participating in computing target data to be shared by the calling party according to the data computing request;
sending a first message to the caller; wherein the first message is used for the caller to send the target data to the at least one first computing node, and the at least one first computing node calculates the target data by adopting a secure multi-party computing algorithm based on an intelligent contract;
receiving a calculation result sent by the at least one first calculation node;
and reconstructing the calculation result to obtain a final calculation result corresponding to the target data.
2. The method according to claim 1, wherein the determining, according to the data calculation request, at least one first calculation node participating in calculating target data to be shared by the caller comprises:
acquiring at least one second computing node for computing target data to be shared by the caller according to the data computing request;
and selecting at least one first computing node participating in computing the target data to be shared by the calling party from the at least one second computing node.
3. The method according to claim 2, wherein before the obtaining, according to the data computation request, at least one second computing node for computing target data to be shared by the caller, the method further comprises:
carrying out identity verification on the calling party; and if the caller passes the identity authentication, acquiring at least one second computing node for computing the target data to be shared by the caller.
4. The method according to claim 2, wherein the obtaining, according to the data computation request, at least one second computing node for computing target data to be shared by the caller comprises:
sending a second message to at least one computing node, wherein the second message is used for acquiring the computing node which calculates the target data to be shared by the caller;
receiving an acknowledgement response message sent by at least one computing node for the second message;
and determining the computing node which sends the determination response message as a second computing node.
5. The method according to claim 2, wherein the selecting, from the at least one second computing node, at least one first computing node participating in computing the target data to be shared by the caller comprises:
and selecting at least one first computing node participating in computing the target data to be shared by the calling party from the at least one second computing node by adopting a preset computing node selection rule.
6. The method according to claim 1, wherein prior to said receiving the computation results sent by said at least one first computing node, said method further comprises:
receiving a third message sent by the at least one first computing node, wherein the third message comprises information of target data to be shared by the calling party;
determining a first number of first compute nodes to send the third message;
if the first number is smaller than a first preset computing node number, sending a fourth message to the caller, wherein the fourth message is used for the caller to send target data to be shared by the caller to the at least one first computing node again.
7. The method according to claim 1, wherein before the reconstructing the calculation result to obtain a final calculation result corresponding to the target data, the method further comprises:
determining a second number of first compute nodes sending the same compute result;
if the second number is smaller than a second preset number of computing nodes, sending a fifth message to the at least one first computing node, where the fifth message is used to instruct the at least one first computing node to recalculate the target data to be shared by the caller.
8. A data processing apparatus based on smart contracts, the apparatus comprising:
the first receiving module is used for receiving a data calculation request sent by a calling party;
the determining module is used for determining at least one first computing node participating in computing the target data to be shared by the calling party according to the data computing request;
the first sending module is used for sending a first message to the calling party; wherein the first message is used for the caller to send the target data to the at least one first computing node, and the at least one first computing node calculates the target data by adopting a secure multi-party computing algorithm based on an intelligent contract;
the second receiving module is used for receiving the calculation result sent by the at least one first calculation node;
and the reconstruction module is used for reconstructing the calculation result to obtain a final calculation result corresponding to the target data.
9. A data processing apparatus based on smart contracts, the apparatus comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor, when executing the computer program, implements a smart contract-based data processing method according to any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, implements the intelligent contract-based data processing method according to any one of claims 1 to 7.
CN202010196101.6A 2020-03-19 2020-03-19 Data processing method, device, equipment and medium based on intelligent contract Pending CN113496398A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010196101.6A CN113496398A (en) 2020-03-19 2020-03-19 Data processing method, device, equipment and medium based on intelligent contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010196101.6A CN113496398A (en) 2020-03-19 2020-03-19 Data processing method, device, equipment and medium based on intelligent contract

Publications (1)

Publication Number Publication Date
CN113496398A true CN113496398A (en) 2021-10-12

Family

ID=77993447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010196101.6A Pending CN113496398A (en) 2020-03-19 2020-03-19 Data processing method, device, equipment and medium based on intelligent contract

Country Status (1)

Country Link
CN (1) CN113496398A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023185044A1 (en) * 2022-03-31 2023-10-05 蚂蚁区块链科技(上海)有限公司 Data processing method and apparatus, and electronic device and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410680A (en) * 2014-11-20 2015-03-11 北京奇虎科技有限公司 Method, client terminal, server and system of sharing file/file folder
US20170155511A1 (en) * 2015-11-30 2017-06-01 Honeywell International, Inc. Embedded security architecture for process control systems
CN106815080A (en) * 2017-01-09 2017-06-09 北京航空航天大学 Distributed diagram data treating method and apparatus
CN107273759A (en) * 2017-05-08 2017-10-20 上海点融信息科技有限责任公司 Method, equipment and computer-readable recording medium for protecting block chain data
CN109359957A (en) * 2018-09-17 2019-02-19 ***股份有限公司 A kind of method and relevant apparatus of multi-party computations
CN109615378A (en) * 2019-01-24 2019-04-12 上海点融信息科技有限责任公司 Multi-party computations method, apparatus and readable storage medium storing program for executing based on block chain
CN109711840A (en) * 2018-12-26 2019-05-03 咪咕文化科技有限公司 A kind of transaction data processing method, device and storage medium
CN109872155A (en) * 2019-02-22 2019-06-11 矩阵元技术(深圳)有限公司 Data processing method and device
US20190182035A1 (en) * 2017-12-12 2019-06-13 International Business Machines Corporation Protection of confidentiality, privacy and financial fairness in a blockchain based decentralized identity management system
CN110335037A (en) * 2019-04-19 2019-10-15 矩阵元技术(深圳)有限公司 Method of commerce, device and the storage medium calculated based on block chain and Secure
US20200034550A1 (en) * 2018-07-27 2020-01-30 Hrl Laboratories, Llc System and method to protect data privacy of lightweight devices using blockchain and multi-party computation

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410680A (en) * 2014-11-20 2015-03-11 北京奇虎科技有限公司 Method, client terminal, server and system of sharing file/file folder
US20170155511A1 (en) * 2015-11-30 2017-06-01 Honeywell International, Inc. Embedded security architecture for process control systems
CN106815080A (en) * 2017-01-09 2017-06-09 北京航空航天大学 Distributed diagram data treating method and apparatus
CN107273759A (en) * 2017-05-08 2017-10-20 上海点融信息科技有限责任公司 Method, equipment and computer-readable recording medium for protecting block chain data
US20190182035A1 (en) * 2017-12-12 2019-06-13 International Business Machines Corporation Protection of confidentiality, privacy and financial fairness in a blockchain based decentralized identity management system
US20200034550A1 (en) * 2018-07-27 2020-01-30 Hrl Laboratories, Llc System and method to protect data privacy of lightweight devices using blockchain and multi-party computation
CN109359957A (en) * 2018-09-17 2019-02-19 ***股份有限公司 A kind of method and relevant apparatus of multi-party computations
CN109711840A (en) * 2018-12-26 2019-05-03 咪咕文化科技有限公司 A kind of transaction data processing method, device and storage medium
CN109615378A (en) * 2019-01-24 2019-04-12 上海点融信息科技有限责任公司 Multi-party computations method, apparatus and readable storage medium storing program for executing based on block chain
CN109872155A (en) * 2019-02-22 2019-06-11 矩阵元技术(深圳)有限公司 Data processing method and device
CN110335037A (en) * 2019-04-19 2019-10-15 矩阵元技术(深圳)有限公司 Method of commerce, device and the storage medium calculated based on block chain and Secure

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱岩等: ""基于安全多方计算的区块链智能合约执行***"", 《密码学报》, vol. 6, no. 2, 30 April 2019 (2019-04-30), pages 246 - 257 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023185044A1 (en) * 2022-03-31 2023-10-05 蚂蚁区块链科技(上海)有限公司 Data processing method and apparatus, and electronic device and storage medium

Similar Documents

Publication Publication Date Title
US11979507B2 (en) Computer implemented method and system for transferring access to a digital asset
CN112035889B (en) Block chain privacy verification method and device for computing outsourcing and computer equipment
EP3540628B1 (en) Mechanism for efficient validation of finality proof in lightweight distributed ledger clients
JP2020526069A (en) Controlled cryptographic private key release
EP3642773B1 (en) System and method of multi-round token distribution using a blockchain network
US20210377050A1 (en) Computer implemented method and system for obtaining digitally signed data
US20240179211A1 (en) Computer-implemented system and method for controlling processing steps of a distributed system
CN113496398A (en) Data processing method, device, equipment and medium based on intelligent contract
CN110852887B (en) Method and device for acquiring transaction processing state in decentralized application cluster
CN112488683A (en) Method and device for offline transaction of block chain
CN111784338A (en) Information processing method, device, system and storage medium
Vishwakarma et al. Crossledger: A pioneer cross-chain asset transfer protocol
CN112438035B (en) Computer-implemented system and method for controlling processing steps of a distributed system
JP2000214774A (en) Distributed multiplication device and its program recording medium
CN118316925A (en) Data processing method, device, readable medium and equipment based on distributed nodes
CN115545913A (en) Verifiable computing method, device, computer equipment and medium
CN116346839A (en) Block chain slicing system, slicing method and intelligent contract transaction processing method

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