CN112734426A - Multi-party private data calculation method based on block chain technology - Google Patents

Multi-party private data calculation method based on block chain technology Download PDF

Info

Publication number
CN112734426A
CN112734426A CN202110034701.7A CN202110034701A CN112734426A CN 112734426 A CN112734426 A CN 112734426A CN 202110034701 A CN202110034701 A CN 202110034701A CN 112734426 A CN112734426 A CN 112734426A
Authority
CN
China
Prior art keywords
task
participants
participant
data
segment
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.)
Withdrawn
Application number
CN202110034701.7A
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.)
Beijing Lianfei Future Technology Co ltd
Original Assignee
Beijing Lianfei Future 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 Beijing Lianfei Future Technology Co ltd filed Critical Beijing Lianfei Future Technology Co ltd
Priority to CN202110034701.7A priority Critical patent/CN112734426A/en
Publication of CN112734426A publication Critical patent/CN112734426A/en
Withdrawn 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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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/03Credit; Loans; Processing thereof

Abstract

The invention discloses a multi-party private data calculation method based on a block chain technology, wherein a block chain comprises at least two participants, block chain link points of each participant form a block chain network, any one participant actively creates a calculation task, the other participants receive the tasks, each participant participates own private data in task functions for operation according to corresponding algorithms and rules, and each participant calls intelligent contracts in block chain nodes to extract task results participated in by each participant. This application is through setting up the block chain network, each participant is a node, including intelligent contract and account book in every node, each participant acquires the task from the chain, with respective private data according to the regulation, participate in data operation to real-time automatic synchronization data arrives respective node account book, each block chain account book is completely unanimous, each participant calls own intelligent contract and reads required data, the privacy of each participant's data has been guaranteed, data security has been improved.

Description

Multi-party private data calculation method based on block chain technology
Technical Field
The invention relates to the technical field of multi-party data statistics, in particular to a multi-party private data calculation method based on a block chain technology.
Background
At present, the scenes of data statistics completed by the participation of a plurality of participants are very large. In such a scenario, most of the participating parties share the private data controlled by the participating parties to a third party commonly approved by the public, and then the third party completes data statistics. For example, credit investigation systems record all persons' loans, credit card opening records, etc., which come from various large banks. The data interaction between each participant and the third-party system adopts technologies such as asymmetric encryption, digital signature and the like to ensure the safety in data transmission.
In the prior art, although technologies such as asymmetric encryption and digital signature are adopted between each participant and a third-party system, the security of the data interaction stage between the participants and the third-party system can only be ensured. The third party system can see the plaintext of the data of the participant after decrypting the received data, and the third party system does not have any privacy protection on the data of the participant. If the third-party system is attacked after the data is decrypted, the risk that the plaintext data of the participating party is acquired by the untrusted party also occurs. Under the scheme, the third-party system has absolute control right in the whole statistical process, knows the private data of all the participants, cannot carry out privacy protection on the private data of the participants, and has a great risk of data leakage. In addition, the data statistical result is only known by a third-party system, and the whole statistical process is not transparent.
Therefore, how to perform data statistics under the condition of ensuring the data security of each participant is an urgent problem to be solved at present.
Disclosure of Invention
The invention aims to provide a multi-party private data calculation method based on a block chain technology, wherein a block chain network is arranged, each participant is a node, each node comprises an intelligent contract and an account book, each participant has the right of creating a task, each participant acquires the task from the chain, the respective private data participate in data operation according to the regulation of the intelligent contract and automatically synchronizes the data to the respective node account book in real time, the account books of each block chain are completely consistent, each participant can read the required data by calling the own intelligent contract, the calculation process is transparent, the calculation process can be traced back, the private data cannot be reversely deduced from the calculation process, the privacy of the data of each participant is ensured, and the data safety is improved.
In a first aspect, the above object of the present invention is achieved by the following technical solutions:
a multi-party private data calculation method based on a block chain technology is characterized in that a block chain comprises at least two participants, block chain link points of each participant form a block chain network, any one participant actively creates a calculation task, the other participants receive the tasks, each participant participates own private data into task functions for operation according to corresponding algorithms and rules, and each participant calls intelligent contracts in block chain nodes to extract the task results of each participant.
The invention is further configured to: each participant has the same structure and comprises a block chain link point module, the block chain link point module comprises an intelligent contract submodule and an account book submodule, the intelligent contract submodule is used for defining the operation method of data uplink, and the account book submodule is used for storing uplink data according to block blocks.
The invention is further configured to: the intelligent contract submodule comprises a task creating unit, a task receiving and processing unit, a task calculating unit and a task result unit, wherein the task creating unit is used for acquiring a globally unique task number and acquiring a task; the task receiving and processing unit is used for receiving and processing the tasks created by the user or other participants; the task computing unit is used for participating own private data into a task function according to rules to carry out operation; and the task result unit is used for calling the intelligent contract in the block chain node to extract the task result participated by the intelligent contract.
The invention is further configured to: any one of all the participants can call a getTaskId method in an intelligent contract submodule to obtain a task ID, a task structure is created, and a getTask method in the intelligent contract submodule is called to obtain a task; all the participants call a putTask method in an intelligent contract submodule to chain the task structure, and the chain transaction HASH is broadcasted to all the participants; and calling getTaskResult in the intelligent contract submodule to obtain a calculation result.
The invention is further configured to: all n participants PsDeploying own block link points, and deploying intelligent contracts on the block link points to form a block chain network; one of the participants PmAs a task initiator, establishing a task and executing operation; according to the operation rule, the task initiator sends the calculation result to any P of the rest n-1 participantskParticipant PkAfter receiving the calculation result of the task initiator, the private data of the task initiator participates in the calculation to obtain a participant PkIs calculated and finishedAnd if so, uplink transmitting to any one of the remaining n-2 participants; and (3) until all the participants participate in the operation, after the operation result F (0) is uplinked by the last participant, broadcasting all the participants, and calling an intelligent contract by each participant to obtain the operation result F (0), wherein s is equal to (1, 2 … n), m is equal to s, and k is equal to s.
The invention is further configured to: task initiator PmCreating a task for counting the sum of private data of all participants, establishing a first polynomial of the task, wherein a constant term of the first polynomial is equal to the private data of the task, performing operation, adding an operation result into a task structure to obtain a first segment of task structure of the task, chaining the first segment of task structure of the task of the user, obtaining the first segment of task structure of the rest of n-1 participants, extracting data corresponding to the task of the user, reconstructing a second polynomial of the user according to the Lagrange's interpolation theorem, setting a variable in the second polynomial of the user to be 0, performing calculation, and adding a calculation result into the task structure to obtain a second segment of task structure of the user; receiving second segment task structures of the rest n-1 participants, extracting parameters for operation, and obtaining a third segment task structure of the user; the third segment of the task structure of the user is linked up, and the uplink transaction is sent to any one P of the rest n-1 participantskAnd calling the intelligent contract to obtain a calculation result.
The invention is further configured to: task initiator PmCreating a task for counting the sum of private data of all participants and performing operation, wherein the task comprises the following steps:
s1, calling an intelligent contract on the own block chain node to acquire a task ID, wherein the task structure comprises the task ID and a task type, and chaining the task structure and broadcasting the task structure to all participants;
s2, establishing an n-1 degree polynomial fm(x) Its constant term is equal to its own private data;
s3, randomly taking n x values and solving corresponding fm(xmq) Obtaining n groups of data (x)mq,fm(xmq) Wherein q ═ is (1, 2 … n);
s4, converting the array (x)mm,fm(xmm) Reserved, the remaining n-1 sets of data are marked as YmAdded as a task parameter to the task structure, the task structure becomes task (task ID, task type, Y)m) Is called PmA first segment of a task structure;
s5, mixing PmThe first segment of the task structure of the party carries out uplink and broadcasts uplink transaction to the rest n-1 participating parties;
s6, receiving the rest n-1 participants PjP ofjThe first segment of the task structure, where j ≠ m, extracts PjIn the first stage of the task structure, YjA set of data Y corresponding to itselfjm=[xjm,fj(xjm)]Wherein j is (1, 2 … m-1, m +1 … n) to obtain n-1 group data YjmWherein Y isjmRepresenting a participant PjProviding to a participant PmThe data of (a);
s7, based on array (x)mm,fm(xmm))、YjmReconstructing the polynomial according to the Lagrange's theorem of interpolation
Figure BDA0002893692550000051
Wherein f ismm' (x) denotes a table based on an array (x)mm,fm(xmm) F) reconstructionmOne term of a 'x' polynomial, fjm' (x) denotes a symbol based on the array YmjReconstructed fjOne term of a 'x' polynomial, Fm' (x) denotes a task initiator PmA reconstructed polynomial;
s8, taking x as 0, calculating
Figure BDA0002893692550000052
Wherein f ismm' (0) is composed of an array (x)mq,fm(xmq) Is calculated to be a constant, fjm' (0) is a required party Pj/PmA commonly participating polynomial;
s9, adding Fm' (0) addition to PmIn the square task structure, get PmTask Structure task (task ID, task Ren) of the second section of the partyType of service, Fm' (0)), and then adding PmThe second section of the task structure of the party cochains and broadcasts to the rest n-1 participating parties;
s10, receiving P of the remaining n-1 participantsjA second task structure, wherein j ═ 1, 2 … m-1, m +1 … n, F is extractedj' (0), construction
Figure BDA0002893692550000053
Figure BDA0002893692550000054
Wherein, Fm' (0) is a task initiator based array (x)mq,fm(xmq) A polynomial constructed, the calculation result when x ═ 0; in the same way, Fj' (0) is a task initiator based on a participant PjArray of (x)jq,fj(xjq) A polynomial constructed, the calculation result when x ═ 0;
s11, adding Fm(0) Adding to PmIn the square task structure, get PmSquare third segment task Structure task (task ID, task type, F)m(0));
S12, mixing PmThe third part of the task structure cochain sends cochain transaction to any one P of the rest n-1 participantskWherein k ═ is (1, 2 … m-1, m +1 … n);
and S13, calling the intelligent contract to obtain a calculation result.
The invention is further configured to: n-1 participants PiAcquiring a task from a block chain network, establishing a first polynomial of the task, wherein a constant term of the first polynomial is equal to private data of the task, performing operation, adding an operation result into a task structure to obtain a first segment of task structure of the task, chaining the first segment of task structure of the task, acquiring first segments of task structures of the rest of n-1 participants, extracting data corresponding to the task, reconstructing a second polynomial of the task according to the Lagrange's interpolation theorem, setting a parameter in the second polynomial of the task to be 0, performing calculation, adding a calculation result into the task structure to obtain a second polynomial of the taskThe second segment task structure of (1); chaining the second segment of the task structure of the user; and receiving a third section of task structure of the task initiator or receiving the calculation results of the rest n-2 participants, performing operation to obtain an operation result and sending the operation result to any one participant not participating in the operation.
The invention is further configured to: n-1 participants PiAcquiring and operating tasks, comprising the following steps:
a1, establishing an n-1 polynomial fi(x) Its constant term is equal to its own private data; wherein, i ═ is (1, 2 … m-1, m +1 … n), i ∈ s;
a2, randomly taking n x values and solving corresponding fi(xiq) Obtaining n groups of data (x)iq,fi(xiq) Wherein q ═ is (1, 2 … n);
a3, will array (x)ii,fi(xii) Reserved, the remaining n-1 sets of data are marked as YiAdded as a task parameter to the task structure, the task structure becomes task (task ID, task type, Y)i) Is called PiA first segment of a task structure;
a4, adding PiThe first segment of the task structure of the party carries out uplink and broadcasts uplink transaction to the rest n-1 participating parties;
a5, receiving the rest n-1 participants PsP ofsA first segment of the task structure, where s ≠ i, extracts PsIn the first stage of the task structure, YjA set of data Y corresponding to itselfji=[xji,fj(xji)]Wherein j ═ is (1, 2 … i-1, i +1 … n), giving n-1 group of data Yji,YjiRepresenting a participant PjIs provided to PiA set of data of the party;
a6, based on array (x)ii,fi(xii))、YjiReconstructing the polynomial using the Lagrange's interpolation theorem
Figure BDA0002893692550000071
A7, taking x as 0, calculating
Figure BDA0002893692550000072
Wherein f isii' (0) is composed of an array (x)iq,fi(xiq) Is calculated to be a constant, fji' (0) is a required party Pj/PiA polynomial that participates in the calculation together;
a8, adding Fi' (0) addition to PiIn the first stage of the task structure, P is obtainediTask Structure task (task ID, task type, F) of second segment of the squarei' (0)), and then adding PiThe second section of the task structure of the party cochains and broadcasts to the rest n-1 participating parties;
a9, P of receiving task initiatormA third task structure of the square, and Fi(0)=Fi’(0)+Fm(0) (ii) a Or receives P already computed in the remaining n-2 participantsjA third task structure, where j ═ 1, (2 … i-1, i +1 … n) and j ≠ m, extracts Fj(0) Construction of Fi(0)=Fi’(0)+Fj(0);
A10, adding the data obtained in the step A5 to Fi(0) Performing operation to obtain PiSquare third segment task Structure task (task ID, task type, F)i(0) ) cochain, sending the cochain transaction to any one of the participating parties not participating in the calculation;
and A11, each participant calls an intelligent contract to obtain a calculation result.
In a second aspect, the above object of the present invention is achieved by the following technical solutions:
a multi-party private data computing terminal based on a block chain technology comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the method.
In a third aspect, the above object of the present invention is achieved by the following technical solutions:
a computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the method of the present application.
Compared with the prior art, the beneficial technical effects of this application do:
1. according to the method, the block chain network is set, each participant is a node, private data of the participants is only known by the participant, and data acquired by other participants from an account book is calculated, so that the privacy of the data of the participants is guaranteed, and the data security is improved;
2. furthermore, each participant has the authority to create tasks, so that data statistics of each participant can be guaranteed without a third party, and the probability of data privacy is reduced;
3. furthermore, all the participating parties participate in the operation of the task function according to the rules, the operation methods are consistent, and the accuracy of data statistics is guaranteed.
Drawings
Fig. 1 is a block chain network structure diagram according to an embodiment of the present application.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
Detailed description of the preferred embodiment
The block chain network comprises n participants, the structures of the participants are the same, each participant comprises a block chain node module, each block chain node module comprises an intelligent contract submodule and an account book submodule, the intelligent contract submodule is used for defining the operation method of data chaining, the operation method comprises the steps of obtaining a globally unique task number, obtaining a task from the block chain network, chaining the task to the block chain network, and inquiring a task calculation result from the account book. The account book submodule is used for storing uplink data according to the block blocks.
Each participant links data needing to be shared to other participants, links the data through an intelligent contract and writes the data into a node account book of the participant, block chain link points of the other participants automatically synchronize the data to respective node account books in real time, and the block chain link point account books of all the participants are kept completely consistent. When each participant needs to read the data on the chain, the data in the node account book can be read by calling the intelligent contract of the node of the participant.
The work of each participant includes:
and (3) creating a task: each participant can actively create a computing task, and key information required for task execution needs to be provided when the task is created. For example, a bank in a bank alliance initiates a task of counting all loan balances of a certain client, and the following two key information are required when the task is created: the first is the loan balance statistics, and the second is to provide the identification number of the client.
Task receiving and processing: each participant receives tasks created by itself or other participants and processes the tasks according to agreed algorithms and rules.
Task calculation: each participant participates the private data of the participant in the task function according to the rule to participate in the operation.
And (4) task results: and calling an intelligent contract in the block chain node, and extracting a task result participated by the intelligent contract.
Specifically, the intelligent contract sub-module comprises a task creating unit, a task receiving and processing unit, a task calculating unit and a task result unit, wherein the task creating unit is used for acquiring a globally unique task number and acquiring a task; the task receiving and processing unit is used for receiving and processing the tasks created by the user or other participants; the task computing unit is used for participating own private data into a task function according to rules to carry out operation; and the task result unit is used for calling the intelligent contract in the block chain node to extract the task result participated by the intelligent contract.
Any one of all n participants can call a getTaskId method in an intelligent contract submodule to obtain a task ID, a task structure is created, and a getTask method in the intelligent contract submodule is called to obtain a task; all the participants call a putTask method in an intelligent contract submodule to chain the task structure, and the chain transaction HASH is broadcasted to all the participants; and calling getTaskResult in the intelligent contract submodule to obtain a calculation result.
All n participants PsDeploying own block link points, and deploying intelligent contracts on the block link points to form a block chain network; any one of the participants PmAs a task initiator, establishing a task and chaining the task, acquiring the task from the chain and participating private data of the task in operation; according to the operation rule, all the participants independently participate in the operation of own private data, each participant cannot obtain the private data of the other participants, and the data obtained from the account book is an operation result, so that the privacy of the data of each participant is ensured.
All the participants establish a calculation rule together according to the task, link the calculation rule, obtain the rule from the link, and participate the private data of the participants in the rule for operation.
Any one of the participants or the task initiator collects the operation, firstly participates the private data of the participant into the operation rule, and sends the operation result to any one of the other n-1 participants PkParticipant PkAfter receiving the calculation result of the task initiator, the private data of the task initiator participates in the calculation to obtain a participant PkAnd transmits the result to any one of the rest n-2 participants; and (3) until all the participants participate in the operation, after the operation result F (0) is uplinked by the last participant, broadcasting all the participants, and calling an intelligent contract by each participant to obtain the operation result F (0), wherein s is equal to (1, 2 … n), m is equal to s, and k is equal to s.
In particular, any one participant acts as a task initiator PmAnd a task for counting the sum of all the private data of the participants is created, and the private data of all the participants in the counting process is required not to be leaked, and the process is transparent. The process is as follows:
and the task initiator calls a getTaskId method in an intelligent contract on the own block chain node to obtain a task ID, then creates a task, and necessary information required for executing the task in a task structure comprises a task number and a task type. Linking a task structure, acquiring tasks from the chain by each participant, establishing a first polynomial of the participant, acquiring n groups of data with the same number as n of the participants according to the first polynomial of the participant, reserving one group of data for the participant, respectively distributing the rest of data to the rest of the participants, and acquiring one group of data by each participant; all the participators carry out the same operation, thus, each participator book has n groups of data, the n groups of data come from n participators, the Lagrange interpolation theorem is utilized, the second polynomial of each participator is reestablished based on each group of data of each participator, each group of data of each participator only establishes one item in the second polynomial, the item includes the parameters of the n groups of data of the participators, the second polynomial is uplink, the sum of the second polynomials of all the participators is taken as the third polynomial, all the participators participate the n groups of data of themselves in the third polynomial, the variable is taken as 0 for operation, only the data of themselves are operated, the operation result is handed over to any participator not operated with the data of themselves until all the participators participate the data of themselves in the operation rule, and the operation result is obtained, and the last participant links the last operation result, and each participant acquires the operation result from the chain, so that the data of each participant participates in the operation, the private data of each participant is not public in the operation process, and each participant cannot obtain the private data of other participants, thereby ensuring the privacy and the safety of the private data.
Or, if the participant reconstructs the second polynomial of the participant, the variable in the second polynomial of the participant is set as 0, the calculation is carried out, and the calculation result is added into the task structure to obtain a second segment of the task structure of the participant; receiving second segment task structures of the rest n-1 participants, extracting parameters for operation, and obtaining a third segment task structure of the user; the uplink of the third segment task structure of the user is transmitted to any one of the rest n-1 participants P which does not carry out operationkAnd linking the operation result by the last participant until all participants participate in the operation, and calling the intelligent contract by each participant to obtain the operation result.
Specifically, let 5 participants be P1、P2、P3、P4、P5The private data is S1、S2、S3、S4、S5Let P be2As a task initiator, a task of calculating 5 participant private data and S is initiated, and the task initiator works, including the following steps:
s1, task initiator P2Calling a getTaskId method in an intelligent contract on a self block chain node to acquire a task ID, wherein a task structure comprises the task ID and a task type, and chaining and broadcasting the task structure to all participants;
after a task initiator initiates a task, an intelligent contract getTask method is called to obtain a task (task ID and task type).
S2, establishing an n-1-4 degree polynomial f2(x) Its constant term is equal to its own private data;
f2(x)=S2+a1x+a2x2+a3x3+a4x4 (1);
here S is used directly2Without using a0For the sake of clarity.
S3, randomly taking 5 x values (x)21、x22、x23、x24、x25) And find the corresponding f2(x2q) To obtain 5 sets of data (x)2q,f2(x2q) Wherein q ═ is (1, 2 … 5);
s4, converting the array (x)22,f2(x22) Reserved for itself, marks the remaining n-1 group of data as Y2Added as a task parameter to the task structure, the task structure becomes task (task ID, task type, Y)2) Is called P2A first segment of a task structure;
s5, mixing P2The first segment of the task structure of the party links the chain, and broadcasts the chain transaction to the other 4 participating parties;
s6, receiving the other 4 participants PjWherein j ≠ 2, extracts PjIn the first stage of the task structure, YjA set of data Y corresponding to itselfj2=[xj2,fj(xj2)]Where j is (1, 3, 4, 5), 4 sets of data Y are obtainedj2Is composed of P1Y in square first segment task structure12Data Y12=[x12,f1(x12)]Y in the first segment task Structure of P3 side32Data Y32=[x32,f3(x32)],P4Y in square first segment task structure42Data Y42=[x42,f4(x42)],P5Y in square first segment task structure52Data Y52=[x52,f5(x52)];
S7 array from different participants based on above 5 sets (x)22,f2(x22))、Yj2Wherein Y isj2Representing a participant Pj(j ≠ 2) is provided to participant P2According to the Lagrange's interpolation theorem, a polynomial is reconstructed,
Figure BDA0002893692550000131
fjm(x) The representation is based on array YmjReconstructed fj(x) One term of a polynomial, Fm' (x) denotes a task initiator PmA reconstructed polynomial; each entry again includes 5 parameters (x)jq,(xjm,fj(xjm)))。
In particular to the present embodiment, it is,
F2’(x)=f22’(x)+f12’(x)+f32’(x)+f42’(x)+f52’(x) (3);
wherein f is22' (x) denotes a table based on an array (x)22,f2(x22) F) reconstruction2A term in a 'x' polynomial expressed as:
Figure BDA0002893692550000141
in the formula, x21、x22、x23、x24、x25For the randomly selected 5 x values in step S3, for the task initiator P2Since the parameters in the formula are known, the formula (4) is a constant when x is 0.
Accordingly, the number of the first and second electrodes,
Figure BDA0002893692550000142
in the formula, x11、x13、x14、x15Only participant P1Knowing that the remaining participants know only one of them, participant P2 knows only the data (x)12,f1(x12) Data (x)13、f1(x13) Only participant P)1、P3Knowing the data (x)14、f1(x14) Only participant P)1、P4Knowing the data (x)15、f1(x15) Only participant P)1、P5Knowing, therefore, equation (5)
In a similar manner to that described above,
Figure BDA0002893692550000143
Figure BDA0002893692550000144
Figure BDA0002893692550000151
Figure BDA0002893692550000152
s8, substituting equations (4) - (8) into equation (3) to calculate the value of equation (3), where equation (4) is a constant because the parameters are known, and equations (5) - (8) are the required participants P, respectivelyj/PmA commonly participating polynomial;
s9, adding F2' (0) addition to P2In the square task structure, the second segment task structure task (task ID, task type, F) of P2 side is obtained2' (0)), and then adding P2The second section of the task structure of the party cochains and broadcasts to the other 4 participants;
s10, receiving P of the other 4 participantsjA second task structure, wherein j is (1, 3, 4, 5), extracting Fj' (0), construction:
Figure BDA0002893692550000153
wherein, F2' (0) is a task initiator based array (x)2q,f2(x2q) A polynomial constructed, the calculation result when x ═ 0; in the same way, Fj' (0) is a task initiator based on a participant PjArray of (x)jq,fj(xjq) A polynomial constructed, the calculation result when x ═ 0;
s11, adding F2(0) Adding to P2In the square task structure, get P2Square third segment task Structure task (task ID, task type, F)2(0));
S12, mixing P2The third segment of the task structure uplink sends uplink transaction to any one P of the other 4 participantskWherein k ═ is (1, 3, 4, 5);
and S13, calling the intelligent contract to obtain a calculation result.
Participant P1、P3、P4、P5Calling an intelligent contract getTask method, acquiring tasks from the chain and calculating, wherein the working processes of the participants are similar, and using the participants P1Working process of (2) is an exampleThe explanation is made, and the rest is analogized, and the working process is as follows:
a1, establishing an n-1 ═ 4 polynomial f1(x) The constant term of which is equal to the private data of itself,
f1(x)=S1+b1x+b2x2+b3x3+b4x4 (10);
a2, randomly taking 5 x values (x)11、x12、x13、x14、x15) And find the corresponding f1(x1q) Obtaining n groups of data (x)1q,f1(x1q) Wherein q ═ is (1, 2, 3, 4, 5);
a3, will array (x)11,f1(x11) Reserved) and mark the remaining 4 sets of data as Y1Added as a task parameter to the task structure, the task structure becomes task (task ID, task type, Y)1) Is called P1A first segment of a task structure;
a4, adding P1The first section of the task structure of the party cochains and broadcasts cochain transaction to the other 4 participating parties, including a task initiator;
a5, receiving the other 4 participants PsP ofsThe first segment of the task structure, where s ≠ 1, extracts PsIn the first stage of the task structure, YjA set of data Y corresponding to itselfj1=[xj1,fj(xj1)]Where j is (2, 3, 4, 5), 4 sets of data Y are obtainedj1,Yj1Representing a participant PjIs provided to P1A set of data of each square, respectively Y21、Y31、Y41、Y51Corresponds to the information from the participant P2、P3、P4、P5
A6, based on array (x)11,f1(x11))、Yj1Reconstructing the polynomial using the Lagrange's interpolation theorem
Figure BDA0002893692550000161
Wherein the content of the first and second substances,
Figure BDA0002893692550000162
in the formula, for the participant P1In other words, the parameters in the formula are known, and when x is 0, the formula (12) is a constant.
Figure BDA0002893692550000171
For participant P1In terms of the parameters (x) in the formula21、f2(x21) Are known, the remaining parameters (x)21、x22、x23、x24、x25) As a participant P25 arbitrary x values of (a), f2(x21) Is based on the formula (1) in x ═ x21As a result of the calculation of time, after the participant P2 participates, the formula (13) can have a result when x is equal to 0.
Accordingly, the number of the first and second electrodes,
Figure BDA0002893692550000172
wherein the parameter (x)31、x32、x33、x34、x35) As a participant P35 arbitrary x values of (a), f3(x31) As a participant P3Polynomial f based on its initial setting3(x) Where x is equal to x31The calculation result of time.
Figure BDA0002893692550000173
Wherein the parameter (x)41、x42、x43、x44、x45) As a participant P45 arbitrary x values of (a), f4(x41) As a participant P4Polynomial f based on its initial setting4(x) Where x is equal to x41The calculation result of time.
Figure BDA0002893692550000174
Wherein the parameter (x)51、x52、x53、x54、x55) As a participant P55 arbitrary x values of (a), f5(x51) As a participant P5Polynomial f based on its initial setting5(x) Where x is equal to x51The calculation result of time.
A7, taking x as 0, calculating equations (12) - (16), i.e.
Figure BDA0002893692550000181
The value of (a) is,
wherein f isii' (0) is a constant, f, calculated from equation (12)j1' (0) is a required party Pj/P1A polynomial that participates in the calculation together;
a8, adding F1' (0) addition to P1In the first stage of the task structure, P is obtained1Task Structure task (task ID, task type, F) of second segment of the square1' (0)), call intelligent contract putTask method, and apply P1The second section of the task structure of the party cochains and broadcasts to the other 4 participants;
a9, P of receiving task initiator2A third task structure of the square
F1(0)=F1’(0)+F2(0) (17);
A10, adding the data obtained in the step A5 to F1(0) Performing operation to obtain P1Square third segment task Structure task (task ID, task type, F)1(0) For sending uplink transactions to any of the parties P not yet involved in the calculation4
Participant P4Through the same operations as the steps A1-A8Then, constructing:
F4(0)=F4’(0)+F1(0) (18); p is obtained by the same operation as A104Square third segment task Structure task (task ID, task type, F)4(0) For sending uplink transactions to any of the parties P not yet involved in the calculation5
Participant P5After the same operations as the steps A1-A8, the following are constructed:
F5(0)=F5(0)+F4(0) (19);
p is obtained by the same operation as A105Square third segment task Structure task (task ID, task type, F)5(0) For sending uplink transactions to any of the parties P not yet involved in the calculation3
Participant P3After the same operations as the steps A1-A8, the following are constructed:
F3(0)=F3(0)+F5(0) (19);
after the same operation as A10, the participant P3As the last party participating in the operation, F3(0) As a result of the F (0) last operation, a task structure task is constructed and the uplink HASH is broadcasted to all participants.
A11, each participant calls an intelligent contract getTaskResult to obtain a calculation result.
Detailed description of the invention
The application relates to a multi-party private data computing terminal based on a block chain technology, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and is characterized in that: when the processor executes the computer program, the method according to the first embodiment of the present application is implemented.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the multi-party private data computing terminal device based on the block chain technology.
The multi-party private data computing terminal equipment based on the block chain technology can be computing equipment such as a desktop computer, a notebook computer, a palm computer and a cloud server. The terminal device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the above example is merely an example of a multi-party private data computing terminal device based on a block chain technique, and does not constitute a limitation of a multi-party private data computing terminal device based on a block chain technique, and may include more or less components than those shown, or combine some components, or different components, for example, the multi-party private data computing terminal device based on a block chain technique may further include an input and output device, a network access device, a bus, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the one type of block chain technology based multiparty private data computing terminal device, with various interfaces and lines connecting the various parts of the whole one type of terminal device.
The memory can be used for storing the computer program and/or the module, and the processor realizes various functions of the multi-party private data computing terminal device based on the block chain technology by running or executing the computer program and/or the module stored in the memory and calling the data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Detailed description of the preferred embodiment
The module/unit integrated with the multi-party private data computing terminal device based on the block chain technology can be stored in a computer readable storage medium if the module/unit is realized in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The embodiments of the present invention are preferred embodiments of the present invention, and the scope of the present invention is not limited by these embodiments, so: all equivalent changes made according to the structure, shape and principle of the invention are covered by the protection scope of the invention.

Claims (11)

1. A multi-party private data calculation method based on a block chain technology is characterized in that: the block chain comprises at least two participants, block chain link points of each participant form a block chain network, any one participant actively creates a calculation task, the other participants receive the tasks, each participant participates own private data into task functions for operation according to corresponding algorithms and rules, and each participant calls intelligent contracts in block chain nodes to extract the task results of each participant.
2. The block chaining technique based multi-party private data calculation method of claim 1, wherein: each participant has the same structure and comprises a block chain link point module, the block chain link point module comprises an intelligent contract submodule and an account book submodule, the intelligent contract submodule is used for defining the operation method of data uplink, and the account book submodule is used for storing uplink data according to block blocks.
3. The block chaining technique based multi-party private data calculation method of claim 2, wherein: the intelligent contract submodule comprises a task creating unit, a task receiving and processing unit, a task calculating unit and a task result unit, wherein the task creating unit is used for acquiring a globally unique task number and acquiring a task; the task receiving and processing unit is used for receiving and processing the tasks created by the user or other participants; the task computing unit is used for participating own private data into a task function according to rules to carry out operation; and the task result unit is used for calling the intelligent contract in the block chain node to extract the task result participated by the intelligent contract.
4. The block chaining technique based multi-party private data calculation method of claim 1, wherein: any one of all the participants can call a getTaskId method in an intelligent contract submodule to obtain a task ID, a task structure is created, and a getTask method in the intelligent contract submodule is called to obtain a task; all the participants call a putTask method in an intelligent contract submodule to chain the task structure, and the chain transaction HASH is broadcasted to all the participants; and calling getTaskResult in the intelligent contract submodule to obtain a calculation result.
5. The block chaining technique based multi-party private data calculation method of claim 1, wherein: all n participants PsDeploying own block link points, and deploying intelligent contracts on the block link points to form a block chain network; one of the participants PmAs a task initiator, establishing a task and executing operation; according to the operation rule, the task initiator sends the calculation result to any P of the rest n-1 participantskParticipant PkAfter receiving the calculation result of the task initiator, the private data of the task initiator participates in the calculation to obtain a participant PkAnd transmits the result to any one of the rest n-2 participants; and (3) until all the participants participate in the operation, after the operation result F (0) is uplinked by the last participant, broadcasting all the participants, and calling an intelligent contract by each participant to obtain the operation result F (0), wherein s is equal to (1, 2 … n), m is equal to s, and k is equal to s.
6. The block chaining technique based multi-party private data calculation method of claim 5, wherein: task initiator PmCreating a task for counting the sum of private data of all participants, establishing a first polynomial of the task, wherein a constant term of the first polynomial is equal to the private data of the first polynomial, performing operation, adding an operation result into a task structure to obtain a first segment of task structure of the task, chaining the first segment of task structure of the task of the first segment of the taskReconstructing a second polynomial of the self according to the value theorem, setting the variable in the second polynomial of the self as 0, calculating, and adding a calculation result into the task structure to obtain a second segment of the task structure of the self; receiving second segment task structures of the rest n-1 participants, extracting parameters for operation, and obtaining a third segment task structure of the user; the third segment of the task structure of the user is linked up, and the uplink transaction is sent to any one P of the rest n-1 participantskAnd calling the intelligent contract to obtain a calculation result.
7. The block chain technology-based multi-party private data calculation method according to claim 6, wherein: task initiator PmCreating a task for counting the sum of private data of all participants and performing operation, wherein the task comprises the following steps:
s1, calling an intelligent contract on the own block chain node to acquire a task ID, wherein the task structure comprises the task ID and a task type, and chaining the task structure and broadcasting the task structure to all participants;
s2, establishing an n-1 degree polynomial fm(x) Its constant term is equal to its own private data;
s3, randomly taking n x values and solving corresponding fm(xmq) Obtaining n groups of data (x)mq,fm(xmq) Wherein q ═ is (1, 2 … n);
s4, converting the array (x)mm,fm(xmm) Reserved, the remaining n-1 sets of data are marked as YmAdded as a task parameter to the task structure, the task structure becomes task (task ID, task type, Y)m) Is called PmA first segment of a task structure;
s5, mixing PmThe first segment of the task structure of the party carries out uplink and broadcasts uplink transaction to the rest n-1 participating parties;
s6, receiving the rest n-1 participants PjP ofjThe first segment of the task structure, where j ≠ m, extracts PjIn the first stage of the task structure, YjA set of data Y corresponding to itselfjm=[xjm,fj(xjm)]Wherein j is (1, 2 … m-1, m +1 … n) to obtain n-1 group data YjmWherein Y isjmRepresenting a participant PjProviding to a participant PmThe data of (a);
s7, based on array (x)mm,fm(xmm))、YjmReconstructing the polynomial according to the Lagrange's theorem of interpolation
Figure FDA0002893692540000041
Wherein f ismm' (x) denotes a table based on an array (x)mm,fm(xmm) F) reconstructionm(x) One term of a polynomial, fjm' (x) denotes a symbol based on the array YmjReconstructed fj(x) One term of a polynomial, Fm' (x) denotes a task initiator PmA reconstructed polynomial;
s8, taking x as 0, calculating
Figure FDA0002893692540000042
Wherein f ismm' (0) is composed of an array (x)mq,fm(xmq) Is calculated to be a constant, fjm' (0) is a required party Pj/PmA commonly participating polynomial;
s9, adding Fm' (0) addition to PmIn the square task structure, get PmTask Structure task (task ID, task type, F) of second segment of the squarem' (0)), and then adding PmThe second section of the task structure of the party cochains and broadcasts to the rest n-1 participating parties;
s10, receiving P of the rest n-1 participantsjA second task structure, wherein j ═ 1, 2 … m-1, m +1 … n, F is extractedj' (0), construction
Figure FDA0002893692540000043
Figure FDA0002893692540000044
Wherein, Fm' (0) is task initiator based on taskArray of service initiators (x)mq,fm(xmq) A polynomial constructed, the calculation result when x ═ 0; in the same way, Fj' (0) is a task initiator based on a participant PjArray of (x)jq,fj(xjq) A polynomial constructed, the calculation result when x ═ 0;
s11, adding Fm(0) Adding to PmIn the square task structure, get PmSquare third segment task Structure task (task ID, task type, F)m(0));
S12, mixing PmThe third part of the task structure cochain sends cochain transaction to any one P of the rest n-1 participantskWherein k ═ is (1, 2 … m-1, m +1 … n);
and S13, calling the intelligent contract to obtain a calculation result.
8. The block chaining technique based multi-party private data calculation method of claim 5, wherein: n-1 participants PiAcquiring a task from a block chain network, establishing a first polynomial of the task, performing operation, adding an operation result to a task structure to obtain a first segment of task structure of the task, chaining the first segment of task structure of the task, acquiring first segment of task structures of the rest of n-1 participants, extracting data corresponding to the task, reconstructing a second polynomial of the task according to the Lagrange's interpolation theorem, setting parameters in the second polynomial of the task to be 0, performing calculation, and adding a calculation result to the task structure to obtain a second segment of task structure of the task; chaining the second segment of the task structure of the user; and receiving a third section of task structure of the task initiator or receiving the calculation results of the rest n-2 participants, performing operation to obtain an operation result and sending the operation result to any one participant not participating in the operation.
9. The block-chain-technology-based multi-party private data calculation method according to claim 8, wherein: n-1 participants PiObtaining a task and computing, including the followingThe method comprises the following steps:
a1, establishing an n-1 polynomial fi(x) Its constant term is equal to its own private data; wherein, i ═ is (1, 2 … m-1, m +1 … n), i ∈ s;
a2, randomly taking n x values and solving corresponding fi(xiq) Obtaining n groups of data (x)iq,fi(xiq) Wherein q ═ is (1, 2 … n);
a3, will array (x)ii,fi(xii) Reserved, the remaining n-1 sets of data are marked as YiAdded as a task parameter to the task structure, the task structure becomes task (task ID, task type, Y)i) Is called PiA first segment of a task structure;
a4, adding PiThe first segment of the task structure of the party carries out uplink and broadcasts uplink transaction to the rest n-1 participating parties;
a5, receiving the rest n-1 participants PsP ofsA first segment of the task structure, where s ≠ i, extracts PsIn the first stage of the task structure, YjA set of data Y corresponding to itselfji=[xji,fj(xji)]Wherein j ═ is (1, 2 … i-1, i +1 … n), giving n-1 group of data Yji,YjiRepresenting a participant PjIs provided to PiA set of data of the party;
a6, based on array (x)ii,fi(xii))、YjiReconstructing the polynomial using the Lagrange's interpolation theorem
Figure FDA0002893692540000061
A7, taking x as 0, calculating
Figure FDA0002893692540000062
Wherein f isii' (0) is composed of an array (x)iq,fi(xiq) Is calculated to be a constant, fji' (0) is a required party Pj/PiA polynomial that participates in the calculation together;
a8, adding Fi' (0) addition to PiIn the first stage of the task structure, P is obtainediTask Structure task (task ID, task type, F) of second segment of the squarei' (0)), and then adding PiThe second section of the task structure of the party cochains and broadcasts to the rest n-1 participating parties;
a9, P of receiving task initiatormA third task structure of the square, and Fi(0)=Fi’(0)+Fm(0) (ii) a Or receives P already computed in the remaining n-2 participantsjA third task structure, where j ═ 1, (2 … i-1, i +1 … n) and j ≠ m, extracts Fj(0) Construction of Fi(0)=Fi’(0)+Fj(0);
A10, adding the data obtained in the step A5 to Fi(0) Performing operation to obtain PiSquare third segment task Structure task (task ID, task type, F)i(0) ) cochain, sending the cochain transaction to any one of the participating parties not participating in the calculation;
and A11, each participant calls an intelligent contract to obtain a calculation result.
10. A multi-party private data computing terminal based on block-chain technology, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: the processor, when executing the computer program, implements the method of any of claims 1-9.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 9.
CN202110034701.7A 2021-01-12 2021-01-12 Multi-party private data calculation method based on block chain technology Withdrawn CN112734426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110034701.7A CN112734426A (en) 2021-01-12 2021-01-12 Multi-party private data calculation method based on block chain technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110034701.7A CN112734426A (en) 2021-01-12 2021-01-12 Multi-party private data calculation method based on block chain technology

Publications (1)

Publication Number Publication Date
CN112734426A true CN112734426A (en) 2021-04-30

Family

ID=75590373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110034701.7A Withdrawn CN112734426A (en) 2021-01-12 2021-01-12 Multi-party private data calculation method based on block chain technology

Country Status (1)

Country Link
CN (1) CN112734426A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438237A (en) * 2021-06-24 2021-09-24 上海万向区块链股份公司 Data security collaborative computing method and system
CN113472513A (en) * 2021-06-11 2021-10-01 电子科技大学 Parallel safe multi-party computing method based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472513A (en) * 2021-06-11 2021-10-01 电子科技大学 Parallel safe multi-party computing method based on block chain
CN113472513B (en) * 2021-06-11 2023-08-25 电子科技大学 Parallel secure multiparty computing method based on block chain
CN113438237A (en) * 2021-06-24 2021-09-24 上海万向区块链股份公司 Data security collaborative computing method and system

Similar Documents

Publication Publication Date Title
DE60031304T3 (en) METHOD FOR AUTHENTICATING SOFTWARE USERS
US10749666B2 (en) Data statistics method and apparatus
TW202009776A (en) Secure multi-party computation method and apparatus, and electronic device
CN111008863B (en) Lottery drawing method and system based on block chain
DE202016008584U1 (en) Systems for providing a block-chain-based multifactor identity verification of individuals
CN112734426A (en) Multi-party private data calculation method based on block chain technology
CN114595835B (en) Model training method and device based on federal learning, equipment and storage medium
CN111861477A (en) Block chain-based post-transaction data processing method and device and computer equipment
DE102019002731A1 (en) Device for the direct transfer of electronic coin data sets to another device and payment system
CN112184444B (en) Method, device, equipment and medium for processing information based on characteristics of information
WO2023098294A1 (en) Heterogeneous data processing method and apparatus, and electronic device
DE60109805T2 (en) METHOD AND SYSTEM FOR USE OF AN UNSAVERED CYPRUS ACCELERATOR
CN110827121A (en) Block chain-based electronic bidding method, device and storage medium
CN111222158A (en) Block chain-based two-party security and privacy comparison method
CN112597542A (en) Target asset data aggregation method and device, storage medium and electronic device
JP2019009767A (en) Information processing device
EP3899844A1 (en) Method for generating a blind signature
WO2023134070A1 (en) Decentralized federated clustering method and apparatus, and electronic device and storage medium
CN112199697A (en) Information processing method, device, equipment and medium based on shared root key
KR20210054422A (en) Method for Shamir Secret Share Recovery
EP3866142A1 (en) Secret right shift calculation system, secret division system, method of same, secret calculation device, and program
CN110689348A (en) Income verification method, device, terminal and medium based on alliance chain
CN113792890A (en) Model training method based on federal learning and related equipment
CN116108473B (en) Data processing method and device in multiparty security calculation
Zhu et al. A patient-centric key management protocol for healthcare information system based on blockchain

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210430