Blockchain-based data intersection method and apparatus
By using an unintentional pseudo-random function model and multinomial interpolation in blockchain technology to generate a secret shared value and perform an XOR operation, the problem of data leakage during multi-party data intersection is solved, and a secure data intersection method is realized.
Patent Information
- Application Number
- CN202310340134.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-03-31
AI Technical Summary
Existing blockchain technology has the problem of data leakage when finding the intersection of data from multiple parties. In particular, when finding the intersection of data between multiple parties, intermediate data may be obtained by nodes that should not know about it, leading to information leakage.
A blockchain-based data intersection method is adopted, which uses an unintentional pseudo-random function model and multinomial interpolation to generate a secret sharing value, and determines the data intersection through XOR operation to ensure that the data is not leaked during transmission.
This solution ensures data security and prevents the leakage of real data during the multi-party data intersection process, thus solving the data leakage problem in traditional solutions and guaranteeing data security.
Smart Images

Figure CN116455618B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of blockchain technology, and more specifically to a blockchain-based data intersection method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] Currently, secure multi-party computation in blockchain only supports data intersection between two parties. When faced with scenarios requiring intersection of data from multiple parties, it is necessary to first perform pairwise intersection, and then find the intersection of the results again. For example, if there are three parties A, B, and C, the values of the common elements in A and B need to be compared first to determine if there is an intersection A1. If there is an intersection A1, then the intersection of A1 and C is calculated to obtain the final result.
[0003] In the above process, A will obtain intermediate data for intersection, that is, A will obtain data of elements in B that are common to A. This data belongs to additional information that A should not know. This leads to unnecessary data being obtained by A in this process, which can easily cause information leakage. Summary of the Invention
[0004] In view of the above problems, this disclosure provides a data intersection method, apparatus, electronic device, storage medium and program product based on blockchain.
[0005] According to a first aspect of this disclosure, a blockchain-based data intersection method is provided, wherein the blockchain includes multiple intersection nodes, the multiple intersection nodes include a first intersection node and a second intersection node, the first intersection node includes first intersection data, the second intersection node includes second intersection data, and the data intersection method includes the following steps performed by the second intersection node:
[0006] Based on the second intersection data and the second key, a second secret sharing value is generated using an unintentional pseudo-random function model;
[0007] Based on the second intersection data and the first key sent by the first intersection node, the first secret sharing value is obtained through the unintentional pseudo-random function model;
[0008] Perform an XOR operation between the second secret sharing value and the first secret sharing value;
[0009] Based on the result of the XOR operation, determine whether there is a data intersection between the second intersection data and the first intersection data;
[0010] The second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
[0011] According to embodiments of this disclosure, the data intersection method further includes the step of generating the first key, wherein generating the first key includes:
[0012] Obtain multiple random keys, including the random key generated by the current first intersection node when triggering the unintentional pseudo-random function model, and the random keys generated by other intersection nodes when triggering the unintentional pseudo-random function model;
[0013] The second key is composed of multiple of the aforementioned random keys;
[0014] Based on the second key, an encryption operation is performed using the unintentional pseudo-random function model and polynomial interpolation to generate the first key.
[0015] According to embodiments of this disclosure, the step of generating the first key by performing encryption operations based on the second key using the unintentional pseudo-random function model and multinomial interpolation includes:
[0016] For the first intersection data, based on the second key, a third secret sharing value is generated through the unintentional pseudo-random function model;
[0017] Generate a first set of element points, each element of the first set of element points including at least one first intersection data and a third secret sharing value generated based on the first intersection data;
[0018] Based on the first set of element points, the perturbation value is determined using polynomial interpolation.
[0019] The first key is generated based on the second key and the perturbation value.
[0020] According to embodiments of this disclosure, the first set of element points includes n elements, and the step of determining the perturbation value based on the first set of element points using polynomial interpolation includes:
[0021] Based on the first set of element points, an n-1 order polynomial is generated using polynomial interpolation.
[0022] The coefficients of the polynomial are used as the perturbation values;
[0023] Wherein, n is a positive integer.
[0024] According to embodiments of this disclosure, the number of first intersection nodes is multiple, and each first intersection node generates at least one first key. The step of obtaining the first secret sharing value based on the second intersection data and the first key sent by the first intersection node, through the unintentional pseudo-random function model, includes:
[0025] Based on the second intersection data, and combined with each of the first keys, multiple first secret sharing values are generated through the unintentional pseudo-random function model;
[0026] The step of performing an XOR operation between the second secret sharing value and the first secret sharing value includes:
[0027] Perform a first XOR operation on the second secret sharing value and each of the first secret sharing values to obtain multiple first operation results;
[0028] Perform a second XOR operation on multiple first operation results to obtain a second operation result;
[0029] Determining whether the second intersection data and the first intersection data have a data intersection based on the result of the XOR operation includes:
[0030] When the result of the second operation is zero, it is determined that the second intersection data has a data intersection with the first intersection data in each of the first intersection nodes.
[0031] According to embodiments of this disclosure, each of the intersection participating nodes is configured with a corresponding blockchain ledger channel, and the blockchain ledger channel is configured to enable the intersection participating nodes to perform data uploading operations through the blockchain ledger channel configured with them.
[0032] In this context, data is isolated between different blockchain ledger channels.
[0033] A second aspect of this disclosure provides a blockchain-based data intersection device, wherein multiple nodes in the blockchain include multiple intersection nodes, the multiple intersection nodes include a first intersection node and a second intersection node, the first intersection node includes first intersection data, the second intersection node includes second intersection data, and each intersection node is equipped with the data intersection device, the data intersection device comprising:
[0034] The first processing module is used to generate a second secret sharing value based on the second intersection data and the second key, using an unintentional pseudo-random function model.
[0035] The second processing module is used to obtain the first secret sharing value based on the second intersection data and the first key sent by the first intersection node, through the unintentional pseudo-random function model.
[0036] The XOR module is used to perform an XOR operation between the second secret sharing value and the first secret sharing value.
[0037] The output module determines, based on the result of the XOR operation, whether there is a data intersection between the second intersection data and the first intersection data;
[0038] The second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
[0039] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the data intersection method described above.
[0040] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the data intersection method described above.
[0041] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described data intersection method.
[0042] The above one or more embodiments have the following advantages or benefits:
[0043] In the embodiments of this disclosure, the second intersection node can, based on the acquired first key and its own second intersection data, attempt to reconstruct the calculation process by which the first intersection node obtains the third secret sharing value using the unintentional pseudo-random function model of this disclosure. However, this process is not disclosed to the second intersection node, and the second key used by the first intersection node to obtain the third secret sharing value is not known to the second intersection node; the second intersection node can only obtain the first secret sharing value. The unintentional pseudo-random function model can truly reconstruct the calculation process by which the first intersection node obtains the third secret sharing value only when the first intersection data and the second intersection data are the same. In this case, the first secret sharing value should be the same as the aforementioned third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is, the first secret sharing value, the second secret sharing value, and the third secret sharing value are the same only when the first intersection data and the second intersection data are the same; otherwise, they are all different. Furthermore, the first secret sharing value is compared with the second secret sharing value. If they are the same, it indicates that the first intersection data and the second intersection data are the same.
[0044] In summary, the data intersection apparatus of the present disclosure ensures that multiple intersection nodes do not obtain each other's real data during the intersection process, which solves the problem of data leakage during data intersection in traditional solutions and thus ensures data security. Attached Figure Description
[0045] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0046] Figure 1 This diagram illustrates an application scenario of the data intersection method according to an embodiment of the present disclosure.
[0047] Figure 2 A flowchart illustrating a data intersection method according to an embodiment of the present disclosure is shown schematically.
[0048] Figure 3 A flowchart illustrating the generation of a first key according to an embodiment of the present disclosure is shown schematically;
[0049] Figure 4 A flowchart illustrating the generation of a first key using a combined polynomial interpolation method according to an embodiment of this disclosure is shown schematically.
[0050] Figure 5 A flowchart illustrating the determination of perturbation values using a combined polynomial interpolation method according to an embodiment of the present disclosure is shown schematically.
[0051] Figure 6 A flowchart illustrating parallel data intersection according to an embodiment of the present disclosure is shown schematically;
[0052] Figure 7 This schematic diagram illustrates a structural block diagram of a data intersection apparatus according to an embodiment of the present disclosure;
[0053] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a data intersection method according to an embodiment of the present disclosure. Detailed Implementation
[0054] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0055] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0056] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0057] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0058] It should be noted that the data intersection method, apparatus, electronic device, storage medium, and program product based on blockchain provided in the embodiments of this disclosure relate to the field of blockchain technology. The data intersection method, apparatus, electronic device, storage medium, and program product based on blockchain provided in the embodiments of this disclosure can be applied to the financial field or any field other than the financial field. The embodiments of this disclosure do not limit the application fields of the data intersection method, apparatus, electronic device, storage medium, and program product based on blockchain.
[0059] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.
[0060] This disclosure provides a blockchain-based data intersection method, characterized in that the blockchain includes multiple intersection nodes, including a first intersection node and a second intersection node. The first intersection node includes first intersection data, and the second intersection node includes second intersection data. The data intersection method includes the following steps performed by the second intersection node: generating a second secret sharing value using an unintentional pseudo-random function model based on the second intersection data and a second key; obtaining the first secret sharing value using the unintentional pseudo-random function model based on the second intersection data and a first key sent by the first intersection node; performing an XOR operation between the second secret sharing value and the first secret sharing value; and determining whether there is a data intersection between the second intersection data and the first intersection data based on the result of the XOR operation. The second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
[0061] In the embodiments of this disclosure, the second intersection node can, based on the acquired first key and its own second intersection data, attempt to reconstruct the calculation process by which the first intersection node obtains the third secret sharing value using the unintentional pseudo-random function model of this disclosure. However, this process is not disclosed to the second intersection node, and the second key used by the first intersection node to obtain the third secret sharing value is not known to the second intersection node; the second intersection node can only obtain the first secret sharing value. The unintentional pseudo-random function model can truly reconstruct the calculation process by which the first intersection node obtains the third secret sharing value only when the first intersection data and the second intersection data are the same. In this case, the first secret sharing value should be the same as the aforementioned third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is, the first, second, and third secret sharing values are the same only when the first and second intersection data are the same; otherwise, they are all different. Furthermore, since the first, second, and third secret sharing values are all calculated locally by each intersection node, leakage during transmission can be prevented. Then, the first secret sharing value is compared with the second secret sharing value. If they are the same, it means that the first intersection data and the second intersection data are the same.
[0062] In summary, the data intersection apparatus of the present disclosure ensures that multiple intersection nodes do not obtain each other's real data during the intersection process, which solves the problem of data leakage during data intersection in traditional solutions and thus ensures data security.
[0063] Figure 1 The diagram illustrates an application scenario of the data intersection method according to an embodiment of the present disclosure.
[0064] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, network 104, and server 105. Network 104 is used as a medium to provide a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0065] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0066] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0067] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0068] It should be noted that the data intersection method provided in this embodiment can generally be executed by server 105. Correspondingly, the data intersection device provided in this embodiment can generally be located in server 105. The data intersection method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the data intersection device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.
[0069] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0070] The following will be based on Figure 1 The described scene, through Figures 2-6 The blockchain-based data intersection method of the disclosed embodiments is described in detail.
[0071] In embodiments of this disclosure, the blockchain includes multiple intersection nodes, including a first intersection node and a second intersection node. The first intersection node includes first intersection data, and the second intersection node includes second intersection data.
[0072] To facilitate understanding of the solutions in the embodiments of this application, a brief introduction to the relevant concepts is given below:
[0073] First, blockchain technology.
[0074] Blockchain technology, also known as distributed ledger technology, is an emerging technology in which multiple computing devices jointly participate in "accounting" (i.e., recording transaction data) and maintain a complete distributed database. Due to its decentralized (i.e., no central node), transparent, and multi-device-participatory database recording capabilities, as well as its ability to quickly synchronize data between devices, blockchain technology has been widely applied in numerous fields.
[0075] Currently, blockchains can be categorized into public blockchains and consortium blockchains based on their deployment methods. A public blockchain refers to a blockchain that can be read by any device worldwide, or a blockchain where any device can participate in the consensus verification process for transactions. A consortium blockchain, also known as a community blockchain, refers to a blockchain formed by participating members of a designated blockchain. Business transactions between members are recorded in the blockchain, limiting the scale and permissions of its use. In the embodiments of this disclosure, unless otherwise specified, "blockchain" generally refers to a consortium blockchain.
[0076] Second, blockchain nodes.
[0077] The blockchain in this embodiment comprises multiple blockchain nodes (hereinafter referred to as nodes). Each node is a device with communication and storage capabilities, such as a device storing blockchain data. Each node can both receive and generate information. Different nodes maintain communication and data synchronization by maintaining a shared blockchain. Specifically, in the blockchain system, any node can generate new blockchain data based on transaction-related data sent by a client and broadcast it to other nodes, who can then verify this blockchain data. Once all nodes in the blockchain system reach a consensus, the new blockchain data can be added to the blockchain.
[0078] Optionally, the node in this embodiment can be understood as a processing unit. In one implementation, the node can be a physical device, such as a server or computer. In another implementation, the node can be a virtual computer; a virtual computer is a general term for the software-virtualized runtime environment in all types of virtualization devices, including virtual machines and containers. In other implementations, the node in this embodiment can be a process or a thread; a thread is the smallest unit of computation that an operating system can schedule, and a thread is contained within a process and is the actual unit of operation within a process; a process is a running activity of a program on a certain set of data in a computer, and is the basic unit for system resource allocation and scheduling.
[0079] In the embodiments of this disclosure, multiple nodes on the blockchain have equal status, and the functions they can perform are essentially the same. Although these nodes are referred to as the first intersection node and the second intersection node in the embodiments of this disclosure, this distinction is made within the current intersection scenario and does not constitute a limitation on the functions that the first and second intersection nodes can perform. For example, when node A requests data intersection from node B, node A can be designated as the second intersection node and node B as the first intersection node, thereby enabling both to perform the corresponding steps. Similarly, when node B requests data intersection from node A, node B can be designated as the second intersection node and node A as the first intersection node, thereby enabling both to perform the corresponding steps.
[0080] It should be noted that, in the embodiments of this disclosure, in addition to managing the shared blockchain ledger, the multiple nodes on the blockchain can also manage non-public data. This non-public data is held independently by each node and is isolated from each other. Accordingly, the intersection process in the embodiments of this disclosure involves finding the intersection of this non-public data. For example, the first intersection data and the second intersection data mentioned in the embodiments of this disclosure are non-public data managed by different nodes. The portion of this non-public data used for data intersection is also referred to below as the information to be intersected.
[0081] It should also be noted that the information to be intersected may include multiple elements. In the embodiments of this disclosure, the content of one element in the information to be intersected managed by the first intersection node is referred to as the first intersection data, and the content of one element in the information to be intersected managed by the second intersection node is referred to as the second intersection data. For ease of description, the content of one element in the information to be intersected will also be referred to as intersection data below. The first and second here do not constitute a limitation on the data content; they can be the same or different. For example, when node A requests data intersection from node B, node A can be designated as the second intersection node and node B as the first intersection node. In this case, the intersection data in node A is referred to as the second intersection data, and correspondingly, the intersection data in node B is referred to as the first intersection data. Conversely, when node B requests data intersection from node A, node B can be designated as the second intersection node and node A as the first intersection node. In this case, the intersection data in node B is referred to as the second intersection data, and the intersection data in node A is referred to as the first intersection data.
[0082] Optionally, in embodiments of this disclosure, in response to a request for intersection from one of the multiple nodes in the blockchain, the node involved in the request for intersection can be determined as multiple intersection nodes, and then, among these intersection nodes, a first intersection node and a second intersection node can be distinguished.
[0083] Figure 2A flowchart illustrating a data intersection method according to an embodiment of the present disclosure is shown schematically.
[0084] Reference Figure 2 The data intersection method in this embodiment includes steps S210 to S240. It should be noted that, although Figure 2 The steps in the diagram are shown sequentially as indicated by the arrows; however, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated herein, there is no strict order constraint on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the diagram may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0085] In step S210, based on the second intersection data and the second key, a second secret sharing value is generated using an unintentional pseudo-random function model.
[0086] In step S220, based on the second intersection data and the first key sent by the first intersection node, a first secret sharing value is obtained through an unintentional pseudo-random function model. The second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
[0087] In the embodiments of this disclosure, the first intersection data (or second intersection data) can refer to the content of an element in the information to be intersected managed by the first intersection node (or second intersection node). For example, the first intersection data (or second intersection data) may include an ID card number, etc. The information to be intersected in the first intersection node (or second intersection node) may include multiple elements. For example, in addition to the aforementioned ID card number, these elements may also include an address, etc. The specific elements can be determined according to actual needs and are not limited here. That is to say, in the embodiments of this disclosure, the number of first intersection data (or second intersection data) in the first intersection node (or second intersection node) is not limited to one; it can also be multiple, depending on the number of elements in the information to be intersected.
[0088] The Oblivious Pseudo-Random Function (OPRF) model is a two-party protocol model. In this protocol, one party is the sender S (e.g., the first intersection node in this embodiment), and the other party is the receiver R (e.g., the second intersection node in this embodiment). After running the OPRF protocol, the sender S obtains a random key. The sender S uses its held elements as input to the OPRF, obtaining a series of pseudo-random function calculation results. The receiver R also uses its held elements as input to the OPRF, also obtaining a series of pseudo-random function calculation results. During this process, if the sender S and receiver R use the same input and random key, the oblivious OPRF model will output the same value. Furthermore, the receiver R compares the two pseudo-random function calculation results locally. The sender S never sees the receiver R's input, and the receiver R also never sees the sender's input, thus ensuring data privacy for both parties.
[0089] Specifically, in the embodiments of this disclosure, when the first intersection node triggers the unintentional pseudo-random function model, it can obtain a second key and process it into a first key (e.g., through secondary encryption) and send it to the second intersection node. The second key corresponds one-to-one with each element in the intersection node; that is, each element generates a corresponding second key. The second key can be composed of multiple random keys. Each random key can be a key obtained by each intersection node when triggering the unintentional pseudo-random function model. These random keys are distributed among the multiple intersection nodes to form the second key. The random key is related to the content of the elements in the intersection node. Taking two intersection nodes as an example, when the content of the elements of the information to be intersected in the two intersection nodes is the same, they will obtain the same random key when triggering the unintentional pseudo-random function model. Thus, after the two intersection nodes distribute random keys to each other, the second key composed of these random keys is also the same. In other words, when the intersection data of the two intersection nodes is the same, the second key they hold is also the same.
[0090] The first intersection node can obtain the third secret sharing value of the first intersection data based on its own first intersection data and second key, using an unintentional pseudo-random function model. Correspondingly, the second intersection node can obtain the second secret sharing value of the second intersection data based on its own second intersection data and second key, using an unintentional pseudo-random function model. If the first and second intersection data are the same, then the second and third secret sharing values should be the same. To ensure the data security of the first intersection node is not leaked, in the embodiments of this disclosure, the third secret sharing value is not sent to the second intersection node; instead, the second key (i.e., the first key) from the first intersection node, after being encrypted twice, is sent to the second intersection node.
[0091] The second intersection node can, based on the obtained first key and its own second intersection data, attempt to reconstruct the calculation process by which the first intersection node obtains the third secret sharing value using the unintentional pseudo-random function model of this embodiment. However, this process is not disclosed to the second intersection node, and the second key used by the first intersection node to obtain the third secret sharing value is not known to the second intersection node; the second intersection node can only obtain the first secret sharing value. The unintentional pseudo-random function model can truly reconstruct the calculation process by which the first intersection node obtains the third secret sharing value only when the first intersection data and the second intersection data are the same. In this case, the first secret sharing value should be the same as the aforementioned third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is to say, the first, second, and third secret sharing values are the same only when the first and second intersection data are the same. Therefore, when comparing the first and second secret sharing values, if they are the same, it can be deduced that the first and second intersection data are the same. Furthermore, since the first secret sharing value, the second secret sharing value, and the third secret sharing value are all calculated locally at each intersection node, and they do not participate in data transmission, it is possible to prevent the three from being leaked during transmission.
[0092] Specifically, in step S230, the second secret sharing value is XORed with the first secret sharing value.
[0093] In step S240, based on the result of the XOR operation, it is determined whether there is a data intersection between the second intersection data and the first intersection data.
[0094] In the embodiments of this disclosure, when the second secret sharing value is the same as the first secret sharing value, the result of the XOR operation between the two is 0. Therefore, it can be determined that the second intersection data is the same as the first intersection data, that is, the two have an intersection.
[0095] Optionally, in the above steps, except for the result of the XOR operation, the data can be kept secret from the second intersection node. For example, the calculation process can be executed in a specific computing container to ensure data security and prevent data leakage. In this case, after initiating the data intersection, the second intersection node can only know the result of the XOR operation, that is, a "0" or a meaningless random number. Based on this, it can determine whether there is an intersection between the second intersection data and the first intersection data, and all real data can be effectively kept confidential in this process.
[0096] In summary, the data intersection method using the embodiments of this disclosure can solve the problem of data leakage during data intersection in traditional solutions, thereby ensuring data security.
[0097] The following is combined with Figures 2 to 6 The data intersection method in the embodiments of this disclosure will be further described.
[0098] Figure 3 A flowchart illustrating the generation of a first key according to an embodiment of this disclosure is shown schematically.
[0099] Reference Figure 3 In some specific embodiments, the data intersection method further includes a step S310 of generating a first key, which includes steps S311 and S313.
[0100] In step S311, multiple random keys are obtained, including the random key generated by the current first intersection node when triggering the unintentional pseudo-random function model, and the random keys generated by other intersection nodes when triggering the unintentional pseudo-random function model.
[0101] In step S312, a second key is formed by multiple random keys.
[0102] In step S313, based on the second key, an encryption operation is performed using an unintentional pseudo-random function model and a polynomial interpolation method to generate the first key.
[0103] In the embodiments of this disclosure, a random key can be generated by a key generation module based on each element in the intersection information of the intersection node. Elements with the same content generate the same random key; that is, the same intersection data generates the same random key.
[0104] Optionally, each intersection node can generate random keys for other intersection nodes and distribute them. For example, intersection node A can generate a random key k1 for intersection nodes B and C and distribute it to them. Similarly, intersection node B can generate a random key k2 for intersection nodes A and C and distribute it to them. Intersection node C can generate a random key k3 for intersection nodes B and A and distribute it to them.
[0105] Since the random keys generated from the same intersection data are the same, the second key composed of these random keys is also the same. That is, when the content of element X1 (or intersection data X11) in intersection nodes A, B, and C is the same, the random keys k1 generated by intersection node A, k2 generated by intersection node B, and k3 generated by intersection node C are also the same. After the three nodes distribute keys to each other, for intersection node A, it can form a second key composed of random keys k2 and k3, which is the same as the second key composed of random keys k1 and k3 for intersection node B.
[0106] In the embodiments of this disclosure, a second key can be composed of multiple random keys. Then, encryption operations are performed based on the second key, an unintentional pseudo-random function model, and a polynomial interpolation method. Specifically, the perturbation value hint of the unintentional pseudo-random function model can be calculated.
[0107] Figure 4 A flowchart illustrating the generation of a first key using a combined polynomial difference method according to an embodiment of the present disclosure is shown.
[0108] Reference Figure 4 In some specific embodiments, step S313 includes steps S3131 to S3134.
[0109] In step S3131, based on the second key, a third secret sharing value is generated from the first intersection data using an unintentional pseudo-random function model.
[0110] For example, in an embodiment of this disclosure, each random key in the second key can be input into the unintentional pseudo-random function model along with the first intersection data, and then the resulting values can be XORed and summed to obtain the third secret sharing value.
[0111] Optionally, multiple intersection nodes can generate and distribute random keys to each other in pairs. For example, in an intersection node, the multiple random keys in its second key are either random keys distributed to it by each intersection node before it, or random keys distributed to it by each intersection node after it. In this case, the unintentional pseudo-random function model can generate the third secret sharing value using the following formula. :
[0112] = (⊕F (x))⊕(⊕F (x))
[0113] Among them, ⊕F (x) represents the sum of the values of an unintentional pseudo-random function obtained by XORing multiple random keys generated from the j intersection nodes preceding the intersection node Wi. (x) represents the sum of the values of an unintentional pseudo-random function generated by multiple random keys from the j intersection nodes following the intersection node Wi, and then XORing them. Here, i and j are both positive integers, and k represents the random key.
[0114] In step S3132, a first element point set is generated, and each element of the first element point set includes at least one first intersection data and a third secret sharing value generated based on the first intersection data.
[0115] In step S3133, based on the first element point set, the perturbation value hint is determined using polynomial interpolation.
[0116] In the embodiments of this disclosure, perturbation values are generated using polynomial interpolation, which can hide the second key and thus prevent it from being leaked.
[0117] Figure 5 A flowchart illustrating the determination of perturbation values using a combined polynomial interpolation method according to an embodiment of the present disclosure is shown.
[0118] Reference Figure 5 In some specific embodiments, the first element point set includes n elements, and step S3133 includes steps S3133a and S3133b. Wherein, n is a positive integer.
[0119] In step S3133a, based on the first set of element points, an n-1 order polynomial is generated using polynomial interpolation.
[0120] In step S3133b, the coefficients of the polynomial are used as the perturbation value.
[0121] For example, the first element point set P is as follows:
[0122] ;
[0123] in, This represents the i-th element in the first intersection node. This represents the third secret share value of the i-th element.
[0124] Alternatively, the first element set can be further encrypted using an unintentional pseudo-random function, for example, using the following formula:
[0125] ;
[0126] in, This represents the nth element in the first intersection node. Let F(k, ) represent the third secret share value of the nth element. This means that an unintentional pseudo-random function is obtained for the nth element using a random key k. Polynomial interpolation is then performed on the first element's point set to obtain an (n-1)th order polynomial p( ):
[0127] ;
[0128] Then, the coefficients of this polynomial expansion are used as the perturbation value hint.
[0129] It should be noted that the random key k here can be the random key k mentioned above or a separately obtained random key k. The specific choice can be determined according to actual needs, and no restrictions are imposed here.
[0130] In step S3134, based on the second key and the perturbation value, the first key (K hint) is generated through an encryption operation. The specific encryption operation can be determined according to actual needs and is not limited here. The corresponding unintentional pseudo-random function is F(K, hint, z), where z is the input parameter of the unintentional pseudo-random function. Let the second intersection data be elements. The content, when the first intersection data (elements) The content) and the second intersection data (elements) When the content is the same, the element will be... Substituting z into the equation yields the following result, which is the first secret sharing value:
[0131] ;
[0132] Therefore, when the first intersection data and the second intersection data are the same, the first secret sharing value is also... The third secret sharing value mentioned earlier is the same; both are... .
[0133] In the embodiments of this disclosure, a random key is generated each time an unintentional pseudo-random function is calculated, and the random key changes in real time along with the content of the corresponding element.
[0134] Figure 6 A flowchart illustrating parallel data intersection according to an embodiment of the present disclosure is shown schematically.
[0135] Reference Figure 6 In some specific embodiments, there are multiple first intersection nodes, and each first intersection node generates at least one first key. Step S220 includes step S221.
[0136] In step S221, based on the second intersection data and combined with each first key, multiple first secret sharing values are generated through an unintentional pseudo-random function model.
[0137] Step S230 includes steps S231 and S232.
[0138] In step S231, the second secret sharing value is XORed with each of the first secret sharing values to obtain multiple first operation results.
[0139] In step S232, a second XOR operation is performed on the multiple first operation results to obtain the second operation result.
[0140] Step S240 includes step S241.
[0141] In step S241, when the result of the second operation is zero, it is determined that the second intersection data has a data intersection with the first intersection data in each of the first intersection nodes. Otherwise, there is no intersection.
[0142] For example, let the elements in the second intersection node be... The second secret sharing value is The first secret sharing value obtained through this element is Therefore, the XOR operation can be performed using the following formula:
[0143] ;
[0144] If the XOR result is 0, it means that the first intersection data and the second intersection data are the same and have an intersection. Otherwise, the XOR result is a meaningless random number, indicating that there is no intersection.
[0145] In the embodiments of this disclosure, the second intersection data can be intersected with the first intersection data of multiple first intersection nodes in parallel using the above method. That is, for intersection nodes A, B, and C, intersection nodes B and C can simultaneously send their respective first keys to intersection node A. Based on these two first keys, intersection node A inputs the second intersection data into the unintentional pseudo-random function model, thereby obtaining two first secret sharing values. These two first secret sharing values are XORed with the second secret sharing value. If the result is 0, it means that the three are the same, that is, the second intersection data intersects with the first intersection data of each of intersection nodes B and C. Compared with the traditional method, which can only be done serially (i.e., first calculating the intersection A1 of intersection node A and intersection node B, and then calculating the intersection of intersection A1 with intersection node C), the intersection efficiency is greatly improved.
[0146] In some specific embodiments, each participating node in the intersection request is configured with a corresponding blockchain ledger channel. This blockchain ledger channel is configured to enable participating nodes to perform data upload operations on the blockchain via their corresponding configured channel. Data is isolated between different blockchain ledger channels.
[0147] In this way, the channels are isolated from each other and kept confidential from each other, thereby achieving data confidentiality. Each intersection node cannot access data in other participants' channels across channels.
[0148] Through the blockchain ledger channel, all intermediate data involved in the above process can be stored on the chain, making each piece of data traceable, tamper-proof, and ensuring data reliability.
[0149] In the embodiments disclosed herein, external requests can be parsed through API interfaces, such as RESTful HTTP interfaces, gRPC interfaces, etc. The encryption algorithms in the blockchain can include Chinese national cryptographic algorithms, including but not limited to SM2 and SM3.
[0150] The data intersection method adopted in this disclosure can realize parallel data intersection and improve the confidentiality of data during the intersection process. The intermediate calculation results are put on the blockchain to make the entire algorithm execution process transparent and traceable, preventing the problem of unreliable calculation results caused by malicious tampering of intermediate calculation data.
[0151] Based on the above data intersection method, this disclosure also provides a blockchain-based data intersection device. The following will combine... Figure 7 The device is described in detail.
[0152] The multiple nodes in the blockchain include multiple intersection nodes, which include a first intersection node and a second intersection node. The first intersection node includes first intersection data, and the second intersection node includes second intersection data. Each intersection node is equipped with a data intersection device.
[0153] Figure 7 A schematic block diagram of a data intersection apparatus according to an embodiment of the present disclosure is shown.
[0154] like Figure 7 As shown, the data intersection device 700 of this embodiment includes a first processing module 710, a second processing module 720, an XOR module 730, and an output module 740.
[0155] The first processing module 710 is used to generate a second secret sharing value based on the second intersection data and the second key, using an unintentional pseudo-random function model. In one embodiment, the first processing module 710 can be used to execute step S210 described above, which will not be repeated here.
[0156] The second processing module 720 is used to obtain the first secret sharing value based on the second intersection data and the first key sent by the first intersection node, using an unintentional pseudo-random function model. In one embodiment, the second processing module 720 can be used to execute the step S220 described above, which will not be repeated here.
[0157] The XOR module 730 is used to perform an XOR operation between the second secret sharing value and the first secret sharing value. In one embodiment, the XOR module 730 can be used to perform step S230 described above, which will not be repeated here.
[0158] The output module 740 determines whether there is a data intersection between the second intersection data and the first intersection data based on the result of the XOR operation. In one embodiment, the output module 740 can be used to execute step S240 described above, which will not be repeated here.
[0159] The second key is obtained by each intersection node when the unintentional pseudo-random function model is triggered, and the first key is generated by the first intersection node based on the second key.
[0160] According to embodiments of this disclosure, any plurality of modules among the first processing module 710, the second processing module 720, the XOR module 730, and the output module 740 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first processing module 710, the second processing module 720, the XOR module 730, and the output module 740 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any one of the three implementation methods, or in a suitable combination of any of them. Alternatively, at least one of the first processing module 710, the second processing module 720, the XOR module 730, and the output module 740 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0161] In the embodiments of this disclosure, the second intersection node can, based on the acquired first key and its own second intersection data, attempt to reconstruct the calculation process by which the first intersection node obtains the third secret sharing value using the unintentional pseudo-random function model of this disclosure. However, this process is not disclosed to the second intersection node, and the second key used by the first intersection node to obtain the third secret sharing value is not known to the second intersection node; the second intersection node can only obtain the first secret sharing value. The unintentional pseudo-random function model can truly reconstruct the calculation process by which the first intersection node obtains the third secret sharing value only when the first intersection data and the second intersection data are the same. In this case, the first secret sharing value should be the same as the aforementioned third secret sharing value; otherwise, the first secret sharing value is a meaningless value. That is, the first, second, and third secret sharing values are the same only when the first and second intersection data are the same; otherwise, they are all different. Furthermore, since the first, second, and third secret sharing values are all calculated locally by each intersection node, leakage during transmission can be prevented. Then, the first secret sharing value is compared with the second secret sharing value. If they are the same, it means that the first intersection data and the second intersection data are the same.
[0162] In summary, the data intersection apparatus of the present disclosure ensures that multiple intersection nodes do not obtain each other's real data during the intersection process, which solves the problem of data leakage during data intersection in traditional solutions and thus ensures data security.
[0163] In some specific embodiments, the data intersection method further includes a step of generating a first key, which includes:
[0164] Obtain multiple random keys, including the random key generated by the current first intersection node when triggering the unintentional pseudo-random function model, and the random keys generated by other intersection nodes when triggering the unintentional pseudo-random function model.
[0165] The second key is composed of multiple random keys.
[0166] Based on the second key, encryption operations are performed using an unintentional pseudo-random function model and polynomial interpolation to generate the first key.
[0167] In some specific embodiments, based on the second key, encryption operations are performed using an unintentional pseudo-random function model and multinomial interpolation to generate the first key, including:
[0168] For the first intersection data, based on the second key, a third secret sharing value is generated through an unintentional pseudo-random function model.
[0169] Generate a first set of element points, each element of the first set of element points including at least one first intersection data and a third secret sharing value generated based on the first intersection data.
[0170] Based on the first element point set, the perturbation value is determined using polynomial interpolation.
[0171] The first key is generated based on the second key and the perturbation value.
[0172] In some specific embodiments, the first element point set includes n elements. Based on the first element point set, the perturbation value is determined using polynomial interpolation, including:
[0173] Based on the first element point set, an n-1 order polynomial is generated using polynomial interpolation.
[0174] The coefficients of the polynomial are used as perturbation values.
[0175] Where n is a positive integer.
[0176] In some specific embodiments, there are multiple first intersection nodes, each generating at least one first key. Based on the second intersection data and the first key sent by the first intersection node, a first secret sharing value is obtained through an unintentional pseudo-random function model, including:
[0177] Based on the second intersection data, and combined with each first key, multiple first secret sharing values are generated through an unintentional pseudo-random function model.
[0178] Perform an XOR operation between the second secret sharing value and the first secret sharing value, including:
[0179] Perform a first XOR operation on the second secret sharing value and each first secret sharing value to obtain multiple first operation results.
[0180] Perform a second XOR operation on multiple first operation results to obtain a second operation result.
[0181] Based on the result of the XOR operation, determine whether there is a data intersection between the second intersection data and the first intersection data, including:
[0182] When the result of the second operation is zero, it is determined that the second intersection data has a data intersection with the first intersection data in each first intersection node.
[0183] In some specific embodiments, each intersection participant node is configured with a corresponding blockchain ledger channel, which is configured to enable the intersection participant node to perform data uploading operations through its corresponding configured blockchain ledger channel.
[0184] In this system, data is isolated between different blockchain ledger channels.
[0185] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a data intersection method according to an embodiment of the present disclosure.
[0186] like Figure 8 As shown, an electronic device 800 according to an embodiment of this disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0187] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0188] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0189] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the data intersection method according to the embodiments of this disclosure.
[0190] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0191] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the data intersection method provided in the embodiments of this disclosure.
[0192] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0193] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0194] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by processor 801, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0195] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0196] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0197] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0198] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A data intersection method based on blockchain, characterized in that, The blockchain includes multiple intersection nodes, including a first intersection node and a second intersection node. The first intersection node includes first intersection data, and the second intersection node includes second intersection data. The data intersection method includes the following steps performed by the second intersection node: Based on the second intersection data and the second key, a second secret sharing value is generated using an unintentional pseudo-random function model; Based on the second intersection data and the first key sent by the first intersection node, the first secret sharing value is obtained through the unintentional pseudo-random function model; Perform an XOR operation between the second secret sharing value and the first secret sharing value; Based on the result of the XOR operation, determine whether there is a data intersection between the second intersection data and the first intersection data; Wherein, the second key is obtained by each of the intersection nodes when the unintentional pseudo-random function model is triggered, and the generation step of the first key includes: Obtain multiple random keys, including the random key generated by the current first intersection node when triggering the unintentional pseudo-random function model, and the random keys generated by other intersection nodes when triggering the unintentional pseudo-random function model; The second key is composed of multiple of the aforementioned random keys; Based on the second key, an encryption operation is performed using the unintentional pseudo-random function model and polynomial interpolation to generate the first key.
2. The data intersection method according to claim 1, characterized in that, The step of generating the first key by performing encryption operations based on the second key using the unintentional pseudo-random function model and multinomial interpolation includes: For the first intersection data, based on the second key, a third secret sharing value is generated through the unintentional pseudo-random function model; Generate a first set of element points, each element of the first set of element points including at least one first intersection data and a third secret sharing value generated based on the first intersection data; Based on the first set of element points, the perturbation value is determined using polynomial interpolation. The first key is generated based on the second key and the perturbation value.
3. The data intersection method according to claim 2, characterized in that, The first set of element points includes n elements. The step of determining the perturbation value based on the first set of element points using polynomial interpolation includes: Based on the first set of element points, an n-1 order polynomial is generated using polynomial interpolation. The coefficients of the polynomial are used as the perturbation values; Wherein, n is a positive integer.
4. The data intersection method according to claim 1, characterized in that, The number of first intersection nodes is multiple, and each first intersection node generates at least one first key. The step of obtaining the first secret sharing value based on the second intersection data and the first key sent by the first intersection node, through the unintentional pseudo-random function model, includes: Based on the second intersection data, and combined with each of the first keys, multiple first secret sharing values are generated through the unintentional pseudo-random function model; The step of performing an XOR operation between the second secret sharing value and the first secret sharing value includes: Perform a first XOR operation on the second secret sharing value and each of the first secret sharing values to obtain multiple first operation results; Perform a second XOR operation on multiple first operation results to obtain a second operation result; Determining whether the second intersection data and the first intersection data have a data intersection based on the result of the XOR operation includes: When the result of the second operation is zero, it is determined that the second intersection data has a data intersection with the first intersection data in each of the first intersection nodes.
5. The data intersection method according to claim 1, characterized in that, Each of the intersection participating nodes is configured with a corresponding blockchain ledger channel, which is configured to enable the intersection participating nodes to perform data uploading operations through the blockchain ledger channel configured with them. In this context, data is isolated between different blockchain ledger channels.
6. A data intersection device based on blockchain, characterized in that, The blockchain comprises multiple nodes, including multiple intersection nodes. Each intersection node includes a first intersection node and a second intersection node. The first intersection node includes first intersection data, and the second intersection node includes second intersection data. Each intersection node is equipped with a data intersection device, which includes: The first processing module is used to generate a second secret sharing value based on the second intersection data and the second key, using an unintentional pseudo-random function model. The second processing module is used to obtain the first secret sharing value based on the second intersection data and the first key sent by the first intersection node, through the unintentional pseudo-random function model. The XOR module is used to perform an XOR operation between the second secret sharing value and the first secret sharing value. The output module determines, based on the result of the XOR operation, whether there is a data intersection between the second intersection data and the first intersection data; Wherein, the second key is obtained by each of the intersection nodes when the unintentional pseudo-random function model is triggered, and the generation step of the first key includes: Obtain multiple random keys, including the random key generated by the current first intersection node when triggering the unintentional pseudo-random function model, and the random keys generated by other intersection nodes when triggering the unintentional pseudo-random function model; The second key is composed of multiple of the aforementioned random keys; Based on the second key, an encryption operation is performed using the unintentional pseudo-random function model and polynomial interpolation to generate the first key.
7. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors execute the data intersection method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, cause the processor to perform the data intersection method according to any one of claims 1 to 5.
9. A computer program product comprising a computer program that, when executed by a processor, implements the data intersection method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Hidden intersection method based on oblivious pseudo-random function
CN114861203A
Differential privacy protection set intersection and cardinal number calculation method, device and system
CN115242371A