Blockchain-based decentralized multi-party data intersection method and device

CN115422534BActive Publication Date: 2026-09-08INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211070580.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2026-09-08
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

[0002]目前需要多个参与方进行数据求交计算的场景,如在多个金融机构中确定是否存在某个客户多头借贷的场景,目前针对这种场景,常用的做法是把数据交由第三方进行求交计算,这样数据会暴露给第三方,若第三方出现作恶,则将出现数据泄露的风险

Benefits of technology

[0024]The decentralized multi-party data intersection method and apparatus based on blockchain provided in this invention does not require aggregating the intersection data of all participants to a third party for multi-party intersection calculation. Instead, it dynamically selects a master node from the nodes participating in the multi-party intersection calculation through an election mechanism. The master node distributes and aggregates the data, and other nodes perform data intersection calculation based on the data distributed by the master node, thus realizing decentralized multi-party intersection calculation. This overcomes the data leakage problem caused by entrusting the data to a third party for intersection calculation in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115422534B_ABST
    Figure CN115422534B_ABST
Patent Text Reader

Abstract

The application provides a kind of decentralized multi-party data intersection method and device based on blockchain, which can be used in financial field or other technical fields.The method comprises the following steps: determining the master node in each node participating in multi-party intersection calculation in the blockchain network according to multi-party intersection calculation request;After the master node passes through consensus, if the master node is the node, intersection data in the intersection data set of the node is sent to each other node;According to the feedback data generated after each other node carries out intersection calculation on the intersection data, the data intersection of each node participating in multi-party intersection calculation in the blockchain network is determined.The device is used to execute the above method.The decentralized multi-party data intersection method and device based on blockchain provided by the embodiment of the application can overcome the problem of data leakage caused by the intersection calculation of data by third party in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and specifically to a decentralized multi-party data intersection method and apparatus based on blockchain. Background Technology

[0002] Currently, in scenarios requiring data intersection calculations by multiple parties, such as determining whether a customer has multiple loans among multiple financial institutions, the common practice is to entrust the data to a third party for intersection calculations. However, this exposes the data to the third party, and if the third party acts maliciously, there is a risk of data leakage. Summary of the Invention

[0003] To address the problems in the prior art, embodiments of the present invention provide a decentralized multi-party data intersection method and apparatus based on blockchain, which can at least partially solve the problems existing in the prior art.

[0004] In a first aspect, embodiments of the present invention provide a decentralized multi-party data intersection method based on blockchain, comprising:

[0005] Based on the multi-party intersection calculation request, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network;

[0006] After the master node reaches consensus, if the master node is this node, then the intersection data in the intersection dataset of this node will be sent to all other nodes.

[0007] Based on the feedback data generated by each of the other nodes after performing intersection calculations on the intersection data, the data intersection of each node participating in the multi-party intersection calculation in the blockchain network is determined.

[0008] Secondly, this invention proposes a decentralized multi-party data intersection method based on blockchain, comprising:

[0009] Based on the multi-party intersection calculation request, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network;

[0010] After the master node reaches consensus, if the master node is a node other than this node, then the intersection data sent by the master node is obtained.

[0011] The intersection data is compared with the intersection data in the intersection dataset of this node to obtain the data intersection result;

[0012] Feedback data is generated based on the data intersection results and sent to the master node. The master node is used to determine the data intersection of the nodes participating in the multi-party intersection calculation in the blockchain network based on the feedback data sent by other nodes.

[0013] Thirdly, embodiments of the present invention provide a blockchain-based decentralized multi-party data intersection device, comprising:

[0014] The first determining module is used to determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request;

[0015] The sending module is used to send the intersection data in the intersection dataset of this node to each other node after the master node has reached a consensus, if the master node is this node.

[0016] The second determining module is used to determine the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the feedback data generated after each of the other nodes performs the intersection calculation on the intersection data.

[0017] Fourthly, embodiments of the present invention provide a blockchain-based decentralized multi-party data intersection device, comprising:

[0018] The determination module is used to determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request;

[0019] The acquisition module is used to acquire the intersection data sent by the master node after the master node has reached consensus, if the master node is a node other than this node.

[0020] The comparison module is used to compare the intersection data with the intersection data in the intersection dataset of this node to obtain the data intersection result;

[0021] The sending module is used to generate feedback data based on the data intersection result and send the feedback data to the master node. The master node is used to determine the data intersection of the nodes participating in the multi-party intersection calculation in the blockchain network based on the feedback data sent by other nodes.

[0022] Fifthly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the blockchain-based decentralized multi-party data intersection method described in any of the above embodiments.

[0023] In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the blockchain-based decentralized multi-party data intersection method described in any of the above embodiments.

[0024] The decentralized multi-party data intersection method and apparatus based on blockchain provided in this invention does not require aggregating the intersection data of all participants to a third party for multi-party intersection calculation. Instead, it dynamically selects a master node from the nodes participating in the multi-party intersection calculation through an election mechanism. The master node distributes and aggregates the data, and other nodes perform data intersection calculation based on the data distributed by the master node, thus realizing decentralized multi-party intersection calculation. This overcomes the data leakage problem caused by entrusting the data to a third party for intersection calculation in the prior art. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0026] Figure 1 This is a schematic diagram of the structure of a blockchain network that supports decentralized multi-party data intersection according to an embodiment of the present invention.

[0027] Figure 2 This is a schematic diagram of the structure of an intersection calculation node provided in an embodiment of the present invention.

[0028] Figure 3 This is a flowchart illustrating a decentralized multi-party data intersection method based on blockchain, provided by an embodiment of the first aspect of the present invention.

[0029] Figure 4 This is a partial flowchart illustrating a blockchain-based decentralized multi-party data intersection method provided in an embodiment of the first aspect of the present invention.

[0030] Figure 5 This is a partial flowchart illustrating a blockchain-based decentralized multi-party data intersection method provided in an embodiment of the first aspect of the present invention.

[0031] Figure 6 This is a partial flowchart illustrating a blockchain-based decentralized multi-party data intersection method provided in an embodiment of the first aspect of the present invention.

[0032] Figure 7 This is a schematic flowchart of a blockchain-based decentralized multi-party data intersection method provided by an embodiment of the second aspect of the present invention.

[0033] Figure 8 This is a partial flowchart illustrating a blockchain-based decentralized multi-party data intersection method provided by an embodiment of the second aspect of the present invention.

[0034] Figure 9 This is a partial flowchart illustrating a decentralized multi-party data intersection method based on blockchain, provided in a specific embodiment of the present invention.

[0035] Figure 10 This is a schematic diagram of a blockchain-based decentralized multi-party data intersection device provided in an embodiment of the third aspect of the present invention.

[0036] Figure 11 This is a schematic diagram of a blockchain-based decentralized multi-party data intersection device provided in an embodiment of the fourth aspect of the present invention.

[0037] Figure 12 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily ordered.

[0039] The terms "first," "second," etc., used in this document do not specifically refer to any order or sequence, nor are they intended to limit the invention; they are merely used to distinguish elements or operations described using the same technical terms.

[0040] The terms “include,” “including,” “have,” “contain,” etc., used in this article are all open-ended terms, meaning that they include but are not limited to.

[0041] The term "and / or" as used in this document includes any or all of the items mentioned.

[0042] To better understand this invention, the overall architecture of the blockchain network involved in this invention will be introduced below:

[0043] Figure 1 This is a schematic diagram of the structure of a blockchain network supporting decentralized multi-party data intersection according to an embodiment of the present invention, as shown below. Figure 1As shown, the blockchain network includes multiple intersection computing nodes 1. Since this invention solves the problem of multi-party data intersection, at least two or more institutions are required to participate in the construction of the blockchain network. Each institution can have one or more intersection computing nodes 1. All intersection computing nodes 1 in the blockchain network are interconnected. An institution typically uses one intersection computing node 1, but if parallel intersection calculations are involved, multiple intersection computing nodes 1 can be used.

[0044] "Intersection Computation Node 1" can be one or more servers that back each other up. It supports data intersection among all intersection computation nodes by providing communication, data query, data calculation, data transmission, data verification and data storage services.

[0045] Figure 2 This is a schematic diagram of the structure of an intersection calculation node provided in an embodiment of the present invention, as shown below. Figure 2 As shown, "Intersection Calculation Node 1" includes: a communication module 11, a security module 12, a data processing module 13, a data transmission module 14, a data verification module 15, and a data storage module 16; among which,

[0046] The "communication module 11" is responsible for establishing network connections with other intersection computing nodes 1, receiving requests from other intersection computing nodes 1 and responding to them;

[0047] "Security Module 12" is responsible for security services, providing security algorithms and security services;

[0048] "Data Processing Module 13" is responsible for Leader node (master node) election, intersection calculation, data comparison, and data transformation based on the security module;

[0049] The “Data Transmission Module 14” is responsible for providing data distribution and data reception services between each intersection calculation node 1, and for distributing data to other intersection calculation nodes 1 based on the communication module.

[0050] The "Data Validation Module 15" is responsible for validating the data results calculated by each intersection calculation node 1. The specific verification method is to reach a consensus on the data results of the intersection calculations performed by each intersection calculation node. If the verification passes, subsequent processing can proceed directly; if the verification fails, the intersection calculation fails.

[0051] The "Data Storage Module 16" is responsible for storing the results of the intersection calculation on the blockchain.

[0052] In a first aspect, one embodiment of the present invention provides a decentralized multi-party data intersection method based on blockchain, such as... Figure 3 As shown, the decentralized multi-party data intersection method based on blockchain provided in this embodiment of the invention includes:

[0053] S101. Based on the multi-party intersection calculation request, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network;

[0054] In step S101, when each node in the blockchain network participating in the multi-party intersection calculation performs a data intersection calculation, each node initiates a Leader node (master node) confirmation step upon receiving a multi-party intersection calculation request.

[0055] The multi-party intersection computation request can be sent by the node that initiated the multi-party secure computation, and the request can include the identity information of each node participating in the computation. Alternatively, the multi-party intersection computation request can also be sent by other nodes participating in the computation besides the current node. Each node in the blockchain network participating in the computation can send multi-party intersection computation requests to other nodes. In this case, after receiving multi-party intersection computation requests from all other nodes participating in the computation in the blockchain network, the current node determines the master node among all nodes participating in the computation.

[0056] Each node participating in the multi-party intersection calculation has a pre-defined Leader election mechanism in its smart contract. This mechanism dynamically selects a Leader node from among the participating nodes. This Leader node then performs the calculations, scheduling, and data aggregation, eliminating the need for a centralized node. The Leader election mechanism can be related to the amount of data each node participates in the intersection calculation. Since the amount of data for each node changes with business transactions, the Leader node for each intersection calculation is not fixed.

[0057] S102. After the master node reaches consensus, if the master node is this node, then the intersection data in the intersection dataset of this node is sent to each other node.

[0058] In step S102, after each node participating in the multi-party intersection calculation selects a Leader, it initiates consensus among the nodes. After the Leader passes the consensus, the Leader node sends its local intersection data to the other nodes. Specifically, when the Leader node is the current node, the current node sends its local intersection data to the other nodes.

[0059] S103. Based on the feedback data generated after each of the other nodes performs intersection calculations on the intersection data, determine the data intersection of each node participating in the multi-party intersection calculation in the blockchain network.

[0060] In step S103, after receiving the intersection data distributed by the Leader node, the non-Leader nodes participating in the multi-party intersection calculation first compare the intersection data with their own intersection data to check if there is matching data. Based on the matching result, they generate feedback data and send the feedback data back to the Leader node. The Leader node determines the data intersection of each node participating in the multi-party intersection calculation based on the feedback data of the other non-Leader nodes.

[0061] The decentralized multi-party data intersection method based on blockchain provided in this invention does not require aggregating the intersection data of all participants to a third party for multi-party intersection calculation. Instead, it dynamically selects a master node from the participating nodes through an election mechanism. The master node distributes and aggregates the data, and other nodes perform data intersection calculations based on the data distributed by the master node, thus achieving decentralized multi-party intersection calculation. This overcomes the data leakage problem caused by entrusting data to a third party for intersection calculation in the prior art.

[0062] like Figure 4 As shown, in some embodiments, determining the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request includes:

[0063] S1011. Based on the multi-party intersection calculation request, obtain the number of intersection data of other nodes participating in the multi-party intersection calculation in the blockchain network;

[0064] In step S1011, this node initiates a Leader election operation based on the multi-party intersection calculation request. The number of intersection data of the other nodes can be obtained from the multi-party intersection calculation request sent to this node by the other nodes, or it can be sent to this node by the other nodes after this node initiates the Leader election operation.

[0065] S1012. Based on the number of intersection data of each of the other nodes and the number of intersection data of this node, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network.

[0066] In step S1012, for each node participating in the multi-party intersection calculation in the blockchain network, each node performs a data volume count on the teaching data in its local intersection dataset, sends the counted teaching data to other nodes, and each node exchanges the data count with each other in pairs. By comparing the data counts, the node with the most data can be selected as the Leader; or the node with the fewest data can be selected as the Leader. This embodiment does not limit this.

[0067] In some embodiments, the intersection data in the intersection dataset of this node is obtained by hashing the original data in the original dataset of this node according to the target hash algorithm. For example, before distributing the original data of this node to other nodes, this node first transforms the original data of this node. Specifically, it transforms each piece of original data u in the original dataset u of this node. n Hash calculations are performed according to the target hash algorithm to obtain the corresponding hash digest data w. n .

[0068] u = {u1, u2, ..., u} S};

[0069] w n =hash(u n );

[0070] After completing the calculation, the intersection dataset w of this node is obtained.

[0071] w = {w1, w2, ..., w} s}

[0072] In this way, during the multi-party interaction process, it can be ensured that each node cannot know the original data of other nodes except for the data of the multi-party intersection, and the process data and result data intercepted by the malicious attacker cannot be used to deduce the original data.

[0073] In some embodiments, if the master node is this node, then sending the intersection data in the intersection dataset of this node to each other node includes: traversing the intersection data in the intersection dataset of this node, and sequentially sending each intersection data in the intersection dataset to each of the other nodes.

[0074] Specifically, this node iterates through the intersection data in its local intersection dataset w, reads the first intersection data w1 in sequence, and distributes w1 to other nodes participating in the multi-party intersection calculation; then it reads the second intersection data w2 and distributes w2 to other nodes participating in the multi-party intersection calculation; and so on.

[0075] Based on this, such as Figure 5 As shown, the step of determining the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the feedback data generated after each of the other nodes performs the intersection calculation on the intersection data includes:

[0076] S1031. For each intersection data, determine whether the intersection data is the intersection data between this node and each of the other nodes based on the feedback data generated by each of the other nodes based on the intersection data;

[0077] In step S1031, the other nodes (non-Leader nodes participating in the multi-party intersection calculation) receive the intersection data w sent by the Leader node (this node). n Then, first put w n The intersection data is compared with the intersection data in the local intersection dataset w to check if there is any matching data. Based on the search results, feedback data is generated and sent back to the Leader node. The Leader node determines whether the intersection data is the intersection data between itself and each of the other nodes based on the feedback data generated by each other node.

[0078] S1032. Based on the intersection data between this node and each of the other nodes in the intersection data, obtain the data intersection of each node participating in the multi-party intersection calculation in the blockchain network.

[0079] In step S1032, for each intersection data w between the current node and each of the other nodes in the intersection data, n Find w n The corresponding raw data u n The original data corresponding to all the intersecting data constitute the data intersection.

[0080] like Figure 6 As shown, in some embodiments, the method further includes:

[0081] S104. If the master node is this node, then a random dataset is generated based on the number of other nodes in the blockchain network, wherein the number of random numbers in the random dataset is equal to the number of other nodes;

[0082] In step S104, the Leader node generates a random dataset v, where v = {v1, v2, ..., v}, based on the number T of other nodes participating in the multi-way intersection calculation. T}; The sum of random numbers in dataset v is calculated as f = sum(v), and the sum of random numbers f is cached locally.

[0083] S105. Distribute each random number in the random dataset to each of the other nodes, wherein each random number is distributed to one of the other nodes, and the random numbers distributed to each of the other nodes are different.

[0084] In step S105, the Leader node (this node) iterates through the random numbers in the dataset v, and the data v iterates through... n The data is distributed via the data transmission module to another randomly selected node participating in the multi-party intersection calculation. After distribution, the node that received the random number obtains v. nThey are different. For example, there are 4 nodes participating in the multi-intersection calculation. Node 1 is the leader node, which generates v = {5, 8, 2} and f = 15. Nodes 2, 3, and 4 are assigned to 8, 2, and 5 respectively.

[0085] Based on this, in some embodiments, determining whether the intersection data is the intersection data between the current node and the other nodes based on the feedback data generated by each of the other nodes for each intersection data includes: for each intersection data, if the sum of the feedback data generated by each of the other nodes based on the intersection data is equal to the sum of the random numbers in the random dataset, then the intersection data is determined to be the intersection data between the current node and the other nodes.

[0086] Specifically, taking the intersection data w1 currently sent by the Leader node (this node) to the other nodes as an example, the other nodes (non-Leader nodes participating in the multi-party intersection calculation) receive the intersection data w1 and random number v distributed by the Leader node (this node) through the data transmission module. n Next, compare w1 with the intersection data in the local intersection dataset w to check if there is matching data. If so, set the feedback data g. n The value is v n If it does not exist, then set the feedback data g. n The value is a newly generated random number h (h must not be equal to v). n For example, in node 2 above, if there are identical values, then the feedback data g is set. n Set the value to 8; if it does not exist, set the feedback data to g. n It is 23.

[0087] The leader node receives feedback data from all other nodes. After determining that it has received all feedback data from other nodes regarding the intersection data w1, it obtains the feedback dataset g, where g = {g1, g2, ..., g...}. T}

[0088] The Leader node sums the data in dataset g using the formula f1 = sum(g), obtaining the total sum f1 of the data in dataset g. It then compares f1 with the cached value of f. If they match, it means that the intersection data w1 exists in all other nodes participating in the multi-party intersection calculation. The Leader node then finds the original data u1 corresponding to w1 and stores it in the data intersection set m. If they do not match, it means that at least one other node participating in the multi-party intersection calculation does not have the intersection data w1.

[0089] Secondly, one embodiment of the present invention provides a decentralized multi-party data intersection method based on blockchain, such as... Figure 7As shown, the decentralized multi-party data intersection method based on blockchain provided in this embodiment of the invention includes:

[0090] S201. Based on the multi-party intersection calculation request, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network;

[0091] The execution process of step S201 is similar to that of step S101 in the above embodiment, and will not be described again here.

[0092] S202. After the master node reaches consensus, if the master node is a node other than this node, then obtain the intersection request data sent by the master node.

[0093] In step S202, after each node participating in the multi-party intersection calculation selects a Leader, it initiates consensus among the nodes. After the Leader passes the consensus, the Leader node distributes its local intersection data to other nodes participating in the multi-party intersection calculation. If the Leader node is a node other than this node, this node receives the intersection data sent to it by the Leader node.

[0094] S203. Compare the intersection data with the intersection data in the intersection dataset of this node to obtain the data intersection result;

[0095] In step S203, after receiving the intersection data distributed by the Leader node, the local node (a non-Leader node participating in the intersection calculation) first compares the intersection data with its local intersection data to check if there is matching data. If there is matching data, the intersection data is determined to be the intersection data between the local node and the Leader node; if there is no matching data, the intersection data is determined not to be the intersection data between the local node and the Leader node.

[0096] S204. Generate feedback data based on the data intersection result and send the feedback data to the master node, wherein the master node is used to determine the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the feedback data sent by other nodes.

[0097] In step S204, this node generates feedback data based on the data intersection results and sends the feedback data back to the Leader node. The Leader node determines the data intersection of each node participating in the multi-party intersection calculation based on the feedback data of other non-Leader nodes.

[0098] This invention provides a decentralized multi-party data intersection method based on blockchain. Based on a multi-party intersection calculation request, a master node is determined among the nodes participating in the multi-party intersection calculation in the blockchain network. After the master node reaches consensus, if the master node is a node other than the current node, the intersection data sent by the master node is obtained. The intersection data is compared with the intersection data in the current node's intersection dataset to obtain the data intersection result. Feedback data is generated based on the data intersection result and sent to the master node. The master node is used to determine the data intersection of the nodes participating in the multi-party intersection calculation in the blockchain network based on the feedback data sent by other nodes. This eliminates the need to aggregate the intersection data of all participants to a third party for multi-party intersection calculation. Instead, a master node is dynamically selected from the participating nodes through an election mechanism. This master node handles data distribution and aggregation, and other nodes perform data intersection calculations based on the data distributed by the master node, achieving decentralized multi-party intersection calculation. This overcomes the data leakage problem caused by entrusting data to a third party for intersection calculation in existing technologies.

[0099] like Figure 8 As shown, in some embodiments, determining the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request includes:

[0100] S2011. Based on the multi-party intersection calculation request, obtain the number of intersection data of other nodes participating in the multi-party intersection calculation in the blockchain network;

[0101] S2022. Based on the number of intersection data of each of the other nodes and the number of intersection data of this node, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network.

[0102] Step S2011 is similar to the execution process of step S1011 in the above embodiment, and step S2012 is similar to the execution process of step S1012 in the above embodiment, so it will not be described again here.

[0103] In some embodiments, the intersection data sent by the master node is obtained by hashing the original data in the master node's original dataset according to the target hash algorithm; the intersection data in the intersection dataset of this node is obtained by hashing the original data in the original dataset of this node according to the target hash algorithm.

[0104] For example, before distributing its local raw data to other nodes, the Leader node first transforms its local raw data. Specifically, it transforms each piece of raw data u in its local raw dataset u. nHash calculations are performed according to the target hash algorithm to obtain the corresponding hash digest data w. n .

[0105] u = {u1, u2, ..., u} S};

[0106] w n =hash(u n );

[0107] After the calculation is completed, the local intersection dataset w is obtained.

[0108] w = {w1, w2, ..., w} s}

[0109] In this way, during multi-party interactions, each node is guaranteed not to know the original data of other nodes except for the intersection data, and malicious attackers cannot deduce the original data from the intercepted process and result data. To facilitate comparison with the intersection data sent by the Leader node, this node (non-Leader node) uses the same method to perform hash calculations on the original data in its own original dataset according to the target hash algorithm to obtain its own intersection dataset.

[0110] In some embodiments, the master node sends one intersection data point at a time; based on this, comparing the intersection data point with the intersection data points in the node's intersection dataset to obtain the data intersection result includes:

[0111] For each intersection data sent by the master node, the intersection data is compared with the intersection data in the intersection dataset of this node to obtain the data intersection result of the intersection data;

[0112] The step of generating feedback data based on the data intersection result and sending the feedback data to the master node includes: for each intersection data sent by the master node, generating feedback data for the intersection data based on the data intersection result of the intersection data; and sending the feedback data of the intersection data to the master node.

[0113] Specifically, this node (a non-Leader participating intersection calculation node) receives one of the intersection data w distributed by the Leader node. n Then, first put w n The intersection data is compared with the intersection data in the local intersection dataset w to check if there is any matching data. Based on the search results, feedback data is generated and sent back to the Leader node. The Leader node determines whether the intersection data is the intersection data between itself and each of the other nodes based on the feedback data generated by each other node.

[0114] In some embodiments, the method further includes: if the master node is a node other than this node, then obtaining a random number sent by the master node to this node; based on this, generating feedback data of the intersection data according to the data intersection result of the intersection data includes:

[0115] If the intersection data exists in the intersection dataset of this node, then the random number is determined as the feedback data of the intersection data;

[0116] If the intersection data does not exist in the intersection dataset of this node, a new random number is determined as the feedback data of the intersection data, wherein the new random number is different from the random number sent to this node by the master node.

[0117] Specifically, taking the intersection data w1 sent by the Leader node to this node as an example, this node (a non-Leader node participating in the intersection calculation) receives the intersection data w1 and the random number v sent by the Leader node through the data transmission module. n Next, compare w1 with the intersection data in the local intersection dataset w to check if there is matching data. If so, set the feedback data g. n The value is v n If it does not exist, then set the feedback data g. n The value is a newly generated random number h (h must not be equal to v). n For example, in node 2 above, if there are identical values, then the feedback data g is set. n Set the value to 8; if it does not exist, set the feedback data to g. n It is 23.

[0118] The following specific embodiment illustrates the decentralized multi-party data intersection method based on blockchain provided by the present invention.

[0119] Figure 9 This is a flowchart illustrating a decentralized multi-party data intersection method based on blockchain, provided in a specific embodiment of the present invention. Figure 9 As shown in the figure, a specific embodiment of the present invention provides a decentralized multi-party data intersection method based on blockchain, comprising:

[0120] S301. After receiving a multi-party intersection calculation request, the intersection calculation node initiates the Leader confirmation step.

[0121] Specifically, a leader election mechanism dynamically selects a node with the role of leader from among the nodes participating in the multi-party intersection calculation. The leader node then performs the calculation, scheduling, and data aggregation, eliminating the need for a centralized node. Because the data of each node changes with business transactions, the leader node for each intersection calculation is not fixed.

[0122] After the Leader election is initiated, each node performs a data volume count on the original data in its local dataset. The original dataset u for each node is represented in the form: u = {u1, u2, ..., u...} S}; The number of data points j in the statistical data set u, j = c(u).

[0123] Each node interacts with each other for a number of data points, j. These j values ​​are compared, and the node with the largest j value is elected as the Leader node. During the multi-intersection calculation, the final intersection data point r must be data present in all nodes.

[0124] S302. After determining the Leader node, each node performs transformation processing on the original data of its own node.

[0125] The specific approach is to first process each original data u in the original dataset of this node. n Perform hash calculation to obtain the corresponding hash digest data w n w n =hash(u n ).

[0126] After completing the calculation, we obtain the intersection dataset w for this node, w = {w1, w2, ..., w...} s}

[0127] S303. The Leader node iterates through the intersection data in its own intersection dataset w, reading the first data w1 sequentially. The Leader node then distributes w1 to other nodes participating in the multi-party intersection calculation via the data transmission module. Next, a random dataset v is generated according to the number T of other participating nodes, v = {v1, v2, ..., v...}. T}

[0128] Sum the random numbers in the random dataset v to obtain the total sum f of the random numbers in the random dataset, f = sum(v), and cache f locally.

[0129] The leader node iterates through the random numbers in the random dataset v, and the random numbers v it encounters are... nThe data is distributed through the data transmission module to another randomly selected node participating in the multi-party intersection calculation.

[0130] After the distribution is complete, the nodes that received the random numbers all get the same w1, but v n They are different. For example, there are 4 computations involved in the multi-intersection calculation. Node 1 is the Leader node, the generated random dataset v is {5, 8, 2}, its f is 15, and nodes 2, 3, and 4 are assigned to 8, 2, and 5 respectively.

[0131] S304. Non-Leader participating multi-party intersection calculation mechanism nodes receive data w1 and v1 distributed by the Leader node through the data transmission module. n Next, w1 is compared with the intersection dataset w obtained by this node in step S302 to check if there is matching data in the intersection dataset w of this node. If there is, the feedback data g is set. n The value is v n If it does not exist, then set the feedback data g. n The value is a newly generated random number h (h must not be equal to v). n For example, for node 2, if matching data exists, the feedback data g is set. n Set the value to 8; if it does not exist, set the feedback data to g. n It is 23.

[0132] S305. After step S304, each non-Leader node participating in the intersection calculation will send its feedback data g. n The data transmission module returns the data to the Leader node. The Leader node receives feedback data from all other nodes. After determining that it has received all feedback data from other nodes, it obtains the feedback dataset g, where g = {g1, g2, ..., g...}. T}

[0133] S306. The Leader node sums the data in dataset g, f1 = sum(g), to obtain the total sum f1 of the data in dataset g.

[0134] Compare f1 with the cached f value. If they match, it means the intersection data w1 exists in all other nodes participating in the multi-party intersection calculation. Then, find the original data u1 corresponding to w1 and store it in the data intersection m. If they don't match, it means that at least one other node participating in the multi-party intersection calculation does not have the intersection data w1. For example, suppose nodes 2, 3, and 4 return data 8, 2, and 5, and their f1 is 15, which is equal to f, indicating that u1 exists in nodes 2, 3, and 4. Suppose nodes 2, 3, and 4 return data 23, 2, and 7, and their f1 is 32, which is not equal to f, indicating that u1 is missing in some nodes.

[0135] S307. The Leader node determines whether the local intersection dataset w has been traversed. If the traversal is not complete, it jumps to step S303 and continues to traverse w, reading the second data w2 in sequence. The Leader node sends w2 to other nodes participating in the multi-party intersection calculation through the data transmission module. If the traversal is complete, it proceeds to the next step S308.

[0136] After S308 and Leader nodes have completed their traversal, the data intersection m can be obtained by summarizing the data. This step completes the main calculation process of finding the intersection of multiple data sources.

[0137] S309. Based on the blockchain consensus mechanism, consensus is reached on the data intersection m calculated through the aggregation intersection calculation. The Leader transforms the data in the data intersection m using a hash algorithm to obtain a new dataset m1, which is then distributed to other nodes participating in the multi-party intersection calculation. Each node compares the data in m1 with the data in its local intersection dataset w to determine whether there is any data in m1 that is not present in w, i.e., whether the data matches the target dataset.

[0138] If the judgment result of each of the above nodes is... If consensus is reached and data verification is successful, then the consensus is passed; otherwise, the judgment result of at least one node is inconsistent. This indicates that the data was tampered with during the multi-party intersection calculation, resulting in a failure to reach a consensus and a failure to verify the data.

[0139] S310. If data verification is successful, the Leader node records the dataset m1 and related processes on the blockchain through the data storage module. Since the data in dataset m1 consists of data that exists in each node, and the original dataset m cannot be deduced after external interception of m1, there is no data leakage issue. This data is stored as evidence for future auditing and traceability.

[0140] S311. After storage is completed on the blockchain, the Leader node returns a message indicating that the multi-party intersection calculation was successful.

[0141] S312. After verification fails, the Leader node returns a message indicating that the multi-party intersection calculation failed.

[0142] The above process in this embodiment describes the processing flow of a decentralized multi-party data intersection method based on blockchain smart contracts, providing blockchain members with the function of multi-party data intersection.

[0143] This invention provides a decentralized multi-party data intersection method based on blockchain, which innovatively proposes the following three mechanisms to ensure security:

[0144] 1) The Leader node is determined by the amount of data in the intersection calculation of each participating node. The Leader node then leads the subsequent intersection process without exposing the original data of each party.

[0145] 2) The Leader node distributes its own data, which has been transformed by a hash algorithm. n Other nodes participating in the multi-party intersection calculation will... n The data is compared with the data in our own dataset w, which has been transformed by a hash algorithm. During this intersection calculation, the data transmitted and compared is not the original data u. n Instead, it is deformed data w n By using hash algorithms, even if a malicious attacker intercepts w, it can still prevent such attacks. n It is also impossible to deduce the original data of the Leader node. n The technical effect, while the hash algorithm can guarantee the accuracy of two compared data w n If they are consistent, the original data u n They must be the same. The distributed nodes, upon comparison, reveal w. n Once a match is found, the corresponding original data u can be further discovered. n But this raw data u n This data also belongs to the distributed nodes. The distributed nodes only know that this data has an intersection, but cannot deduce the other data of the Leader node.

[0146] 3) Each distributed node will send the result data g n Returning data, this is not the original data u. n Furthermore, since it is merely a set of random numbers, even if a malicious attacker intercepts it, they cannot use it. After the Leader node obtains the returned dataset g, it calculates with the cached value to confirm whether the intersection data exists in the multiple parties. At this point, the Leader node only knows the corresponding original data u. n It exists simultaneously in multiple parties, but the data in other nodes participating in the multi-party intersection calculation cannot be known.

[0147] The aforementioned security mechanisms ensure that no party can access original data beyond the shared data of other parties, and that malicious external parties cannot access any original data from any party.

[0148] The decentralized multi-party data intersection method based on blockchain provided in this invention solves the problem of potential data leakage or tampering caused by the need to aggregate data from all participants to a single third party during multi-party data intersection. It ensures data privacy while performing data computation. The introduction of a trusted multi-party data intersection smart contract offers the following advantages: It uses a decentralized deployment and communication model, eliminating reliance on third parties during multi-party intersection computation; computation is based on smart contracts, which, due to their transparent mechanism, ensure that the logic and process of data processing are open and auditable; data security algorithms prevent any party from accessing the original data of other participants outside the intersection data during the data intersection computation, and malicious attackers cannot deduce the original data from intercepted process and result data; the blockchain consensus mechanism guarantees the correctness and tamper-proof nature of the final multi-party intersection computation result; and storing the computation result data and computation process in the blockchain ensures data auditability and traceability. In summary, the method provided by this invention solves the trust issues among parties regarding data processing and data privacy, and can further promote industry interconnectivity in areas such as data assets, data elements, and data trading markets.

[0149] Thirdly, one embodiment of the present invention provides a decentralized multi-party data intersection device based on blockchain, such as... Figure 10 As shown in the figure, an embodiment of the present invention proposes a decentralized multi-party data intersection device based on blockchain, comprising:

[0150] The first determining module 41 is used to determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request;

[0151] The sending module 42 is used to send the intersection data in the intersection dataset of the current node to each other node after the master node has reached a consensus, if the master node is the current node.

[0152] The second determining module 43 is used to determine the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the feedback data generated after each of the other nodes performs the intersection calculation on the intersection data.

[0153] The decentralized multi-party data intersection device based on blockchain provided in this invention does not require aggregating the intersection data of all participants to a third party for multi-party intersection calculation. Instead, it dynamically selects a master node from the nodes participating in the multi-party intersection calculation through an election mechanism. The master node distributes and aggregates the data, and other nodes perform data intersection calculation based on the data distributed by the master node, thus realizing decentralized multi-party intersection calculation. This overcomes the data leakage problem caused by entrusting data to a third party for intersection calculation in the prior art.

[0154] In some embodiments, the first determining module is specifically used for:

[0155] Based on the multi-party intersection calculation request, obtain the number of intersection data of other nodes participating in the multi-party intersection calculation in the blockchain network;

[0156] Based on the number of intersection data from each of the other nodes and the number of intersection data from this node, the master node among the nodes participating in the multi-party intersection calculation in the blockchain network is determined.

[0157] In some embodiments, the intersection data in the intersection dataset of this node is obtained by hashing the original data in the original dataset of this node according to the target hash algorithm.

[0158] In some embodiments, the sending module is specifically used to: traverse the intersection data in the intersection dataset of this node, and sequentially send each intersection data in the intersection dataset to each of the other nodes;

[0159] The second determining module is specifically used for: for each intersection data, determining whether the intersection data is the intersection data between this node and each of the other nodes based on the feedback data generated by each of the other nodes based on the intersection data; and obtaining the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the intersection data between this node and each of the other nodes in the intersection data.

[0160] In some embodiments, the apparatus further includes:

[0161] The distribution module is configured to, if the master node is this node, generate a random dataset based on the number of other nodes in the blockchain network, wherein the number of random numbers in the random dataset is equal to the number of other nodes; and distribute each random number in the random dataset to each of the other nodes, wherein each random number is distributed to one of the other nodes, and the random numbers distributed to each of the other nodes are different.

[0162] In some embodiments, the second determining module, for each intersection data point, determines whether the intersection data is the intersection data between the current node and the other nodes based on the feedback data generated by each of the other nodes.

[0163] For each intersection data point, if the sum of the feedback data generated by each of the other nodes based on the intersection data point is equal to the sum of the random numbers in the random dataset, then the intersection data point is determined to be the intersection data between this node and each of the other nodes.

[0164] The embodiments of the apparatus provided in this invention can be used to execute the processing flow of the various method embodiments provided in the first aspect above. Its functions will not be repeated here, but can be referred to the detailed description of the method embodiments above.

[0165] Fourthly, one embodiment of the present invention provides a decentralized multi-party data intersection device based on blockchain, such as... Figure 11 As shown in the figure, an embodiment of the present invention proposes a decentralized multi-party data intersection device based on blockchain, comprising:

[0166] The determination module 51 is used to determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request;

[0167] The acquisition module 52 is used to acquire the intersection data sent by the master node after the master node has reached a consensus, if the master node is a node other than this node.

[0168] The comparison module 53 is used to compare the intersection data with the intersection data in the intersection dataset of this node to obtain the data intersection result;

[0169] The sending module 54 is used to generate feedback data based on the data intersection result and send the feedback data to the master node, wherein the master node is used to determine the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the feedback data sent by other nodes.

[0170] The decentralized multi-party data intersection device based on blockchain provided in this invention does not require aggregating the intersection data of all participants to a third party for multi-party intersection calculation. Instead, it dynamically selects a master node from the nodes participating in the multi-party intersection calculation through an election mechanism. The master node distributes and aggregates the data, and other nodes perform data intersection calculation based on the data distributed by the master node, thus realizing decentralized multi-party intersection calculation. This overcomes the data leakage problem caused by entrusting data to a third party for intersection calculation in the prior art.

[0171] In some embodiments, the determining module is specifically used for:

[0172] Based on the multi-party intersection calculation request, obtain the number of intersection data of other nodes participating in the multi-party intersection calculation in the blockchain network;

[0173] Based on the number of intersection data from each of the other nodes and the number of intersection data from this node, the master node among the nodes participating in the multi-party intersection calculation in the blockchain network is determined.

[0174] In some embodiments, the intersection data sent by the master node is obtained by hashing the original data in the master node's original dataset according to the target hash algorithm; the intersection data in the intersection dataset of this node is obtained by hashing the original data in the original dataset of this node according to the target hash algorithm.

[0175] In some embodiments, the master node sends one intersection request at a time;

[0176] The comparison module is specifically used for:

[0177] For each intersection data sent by the master node, the intersection data is compared with the intersection data in the intersection dataset of this node to obtain the data intersection result of the intersection data;

[0178] The sending module is specifically used for:

[0179] For each intersection data sent by the master node, feedback data for the intersection data is generated based on the data intersection result of the intersection data; the feedback data for the intersection data is then sent to the master node.

[0180] In some embodiments, the acquisition module is further configured to: if the master node is a node other than this node, then acquire the random number sent by the master node to this node;

[0181] The sending module generates feedback data based on the intersection result of the intersection data, including:

[0182] If the intersection data exists in the intersection dataset of this node, then the random number is determined as the feedback data of the intersection data;

[0183] If the intersection data does not exist in the intersection dataset of this node, a new random number is determined as the feedback data of the intersection data, wherein the new random number is different from the random number sent to this node by the master node.

[0184] The embodiments of the apparatus provided in this invention can be used to execute the processing flow of the various method embodiments provided in the second aspect above. Its functions will not be repeated here, but can be referred to the detailed description of the method embodiments above.

[0185] It should be noted that the blockchain-based decentralized multi-party data intersection method and apparatus provided in this embodiment of the invention can be used in the financial field, or in any technical field other than the financial field. This embodiment of the invention does not limit the application field of the blockchain-based decentralized multi-party data intersection method and apparatus.

[0186] Figure 12 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, as shown below. Figure 12 As shown, the electronic device may include a processor 601, a communications interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communications interface 602, and the memory 603 communicate with each other via the communication bus 604. The processor 601 may call logical instructions in the memory 603 to execute the methods described in any of the above embodiments.

[0187] Furthermore, the logical instructions in the aforementioned memory 603 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0188] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments.

[0189] This embodiment provides a computer-readable storage medium storing a computer program that causes the computer to perform the methods provided in the above-described method embodiments.

[0190] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0191] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0192] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0193] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0194] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0195] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A decentralized multi-party data intersection method based on blockchain, characterized in that, include: Based on the multi-party intersection calculation request, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network; After the master node reaches consensus, if the master node is this node, then the intersection data in the intersection dataset of this node is traversed, and each intersection data in the intersection dataset is sent to each other node in turn. According to the number of other nodes in the blockchain network, a random dataset is generated, and each random number in the random dataset is distributed to each other node. The number of random numbers in the random dataset is equal to the number of other nodes, and each random number is distributed to one of the other nodes. The random numbers distributed to each other node are different. For each intersection data, if the sum of the feedback data generated by each of the other nodes based on the intersection data is equal to the sum of the random numbers in the random dataset, then the intersection data is determined to be the intersection data between this node and each of the other nodes; Based on the intersection data between this node and each of the other nodes in the intersection data, the data intersection of each node participating in the multi-party intersection calculation in the blockchain network is obtained.

2. The method according to claim 1, characterized in that, The process of determining the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request includes: Based on the multi-party intersection calculation request, obtain the number of intersection data of other nodes participating in the multi-party intersection calculation in the blockchain network; Based on the number of intersection data from each of the other nodes and the number of intersection data from this node, the master node among the nodes participating in the multi-party intersection calculation in the blockchain network is determined.

3. The method according to claim 1 or 2, characterized in that, The intersection data in the intersection dataset of this node is obtained by hashing the original data in the original dataset of this node according to the target hash algorithm.

4. A decentralized multi-party data intersection method based on blockchain, characterized in that, include: Based on the multi-party intersection calculation request, determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network; After the master node reaches consensus, if the master node is a node other than this node, then the intersection data and random number sent by the master node are obtained. The intersection data is compared with the intersection data in the intersection dataset of this node to obtain the data intersection result; Feedback data is generated based on the data intersection results and sent to the master node. The master node is used to determine the data intersection of the nodes participating in the multi-party intersection calculation in the blockchain network based on the feedback data sent by other nodes. The step of generating feedback data based on the data intersection result includes: If the intersection data exists in the intersection dataset of this node, then the random number is determined as the feedback data of the intersection data; If the intersection data does not exist in the intersection dataset of this node, a new random number is determined as the feedback data of the intersection data, wherein the new random number is different from the random number sent to this node by the master node.

5. The method according to claim 4, characterized in that, The process of determining the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request includes: Based on the multi-party intersection calculation request, obtain the number of intersection data of other nodes participating in the multi-party intersection calculation in the blockchain network; Based on the number of intersection data from each of the other nodes and the number of intersection data from this node, the master node among the nodes participating in the multi-party intersection calculation in the blockchain network is determined.

6. The method according to claim 4 or 5, characterized in that, The intersection data sent by the master node is obtained by hashing the original data in the master node's original dataset according to the target hash algorithm; The intersection data in the intersection dataset of this node is obtained by hashing the original data in the original dataset of this node according to the target hash algorithm.

7. The method according to claim 6, characterized in that, The master node sends one intersection request at a time. The step of comparing the intersection data with the intersection data in the intersection dataset of this node to obtain the data intersection result includes: For each intersection data sent by the master node, the intersection data is compared with the intersection data in the intersection dataset of this node to obtain the data intersection result of the intersection data; The step of generating feedback data based on the data intersection result and sending the feedback data to the master node includes: For each intersection data sent by the master node, feedback data for the intersection data is generated based on the data intersection result of the intersection data; the feedback data for the intersection data is then sent to the master node.

8. A decentralized multi-party data intersection device based on blockchain, characterized in that, include: The first determining module is used to determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request; The sending module is used to, after the master node reaches consensus, if the master node is the current node, traverse the intersection data in the intersection dataset of the current node and send each intersection data in the intersection dataset to each other node in turn; The distribution module is used to generate a random dataset based on the number of other nodes in the blockchain network if the master node is this node, and distribute each random number in the random dataset to each of the other nodes respectively, wherein the number of random numbers in the random dataset is equal to the number of other nodes, each random number is distributed to one of the other nodes, and the random numbers distributed to each of the other nodes are different; The second determining module is used to determine, for each intersection data, if the sum of the feedback data generated by each of the other nodes based on the intersection data is equal to the sum of the random numbers in the random dataset, that the intersection data is the intersection data between this node and each of the other nodes; and to obtain the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the intersection data between this node and each of the other nodes in the intersection data.

9. A decentralized multi-party data intersection device based on blockchain, characterized in that, include: The determination module is used to determine the master node among the nodes participating in the multi-party intersection calculation in the blockchain network based on the multi-party intersection calculation request; The acquisition module is used to acquire the intersection data and random number sent by the master node after the master node has reached consensus, if the master node is a node other than this node. The comparison module is used to compare the intersection data with the intersection data in the intersection dataset of this node to obtain the data intersection result; The sending module is used to generate feedback data based on the data intersection result and send the feedback data to the master node, wherein the master node is used to determine the data intersection of each node participating in the multi-party intersection calculation in the blockchain network based on the feedback data sent by other nodes; Specifically, the sending module is used for: If the intersection data exists in the intersection dataset of this node, then the random number is determined as the feedback data of the intersection data; If the intersection data does not exist in the intersection dataset of this node, a new random number is determined as the feedback data of the intersection data, wherein the new random number is different from the random number sent to this node by the master node.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3 or claims 4 to 7.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3 or claims 4 to 7.

Citation Information

Patent Citations

  • Private data processing method, device and system

    CN112632610A

  • Consensus method and device employing blockchain system

    WO2021036702A1