A data intersection method, apparatus, system, electronic device, and storage medium

By sharding and encrypting the data of both the local end and the participants in the intersection, and using the same sharding algorithm and public key encryption, the problems of large computational load and low efficiency in data intersection are solved, and efficient and secure determination of data intersection is achieved.

CN115544562BActive Publication Date: 2025-10-31HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211204841.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2025-10-31
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Existing data intersection methods are computationally intensive, inefficient, and cannot efficiently perform data comparisons.

Method used

The same data sharding algorithm is used to shard the data of the local end and the intersection participants, and the same public key is used to encrypt the data. The intersection data is determined by comparing whether the encrypted data is the same.

Benefits of technology

It reduces the computational load in the data intersection process, improves the efficiency of data intersection, and ensures data security and privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115544562B_ABST
    Figure CN115544562B_ABST
Patent Text Reader

Abstract

This application provides a data intersection method, apparatus, system, electronic device, and storage medium. The local device can receive first data to be intersected sent by intersecting participants. Based on a first public key in the first data to be intersected, it encrypts second data in a second data fragment that matches the fragment identifier of the first data fragment, obtaining second encrypted data. Then, it compares the second encrypted data with the first encrypted data in the first data to be intersected. If the second encrypted data is the same as the first encrypted data, it can be determined that the second data corresponding to the second encrypted data is the intersection data. Since the local device's second data fragment matches the fragment identifier of the intersecting participant's first data fragment, the local device can compare the second encrypted data with the intersecting participant's first encrypted data, without needing to compare every piece of data from the local device with the intersecting participant's data. This reduces the computational load in the data intersection process and improves the efficiency of data intersection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data intersection technology, and in particular to a data intersection method, apparatus, system, electronic device and storage medium. Background Technology

[0002] Privacy-preserving data intersection techniques can obtain the intersection of data held by participating data parties without revealing any additional information. These techniques are widely used for data alignment in fields such as privacy-preserving machine learning and federated learning.

[0003] In the process of finding intersections for privacy-preserving data, it is necessary to compare the data held by multiple participants to determine the intersection between the data held by the local end and the data held by the participants seeking intersection. In current data intersection methods, the data received from the participants seeking intersection is usually compared with the local end's data one by one. The data intersection process involves a large amount of computation and has low efficiency. Summary of the Invention

[0004] The purpose of this application is to provide a data intersection method, apparatus, system, electronic device, and storage medium to reduce the computational load and improve the efficiency of data intersection. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a data intersection method, the method comprising:

[0006] Receive first data to be submitted for submission from a submission participant, wherein the first data to be submitted for submission includes a first fragment identifier, a first public key and first encrypted data, wherein the encrypted data is obtained by the submission participant encrypting the first data of the submission participant using the first public key, and the first fragment identifier is used to indicate the first data fragment to which the first data belongs;

[0007] Each piece of second data included in the second data fragment is encrypted using the first public key to obtain second encrypted data. The second data fragment is a local data fragment whose fragment identifier matches the first fragment identifier. The local end and the intersection participant use the same data fragmentation algorithm to fragment their own data.

[0008] If the second encrypted data is the same as the first encrypted data, the second data on the local end corresponding to the second encrypted data is determined to be the intersection data with the intersection participant.

[0009] Optionally, before the step of receiving the data to be interleaved sent by the interleaving participants, the method further includes:

[0010] The number of first shards is determined based on the data size of the second data on this end, and the number of second shards is obtained based on the data size of the first data of the intersection participant.

[0011] Based on the number of the first fragment and the number of the second fragment, the target number of fragments is determined through negotiation with the parties seeking the intersection.

[0012] Based on the target number of shards and the consensus participants, a sharding algorithm is determined. The second data is then sharded according to the sharding algorithm to determine the data shard to which each piece of second data belongs.

[0013] Optionally, the step of dividing the second data into fragments according to the fragmentation algorithm and determining the data fragment to which each piece of second data belongs includes:

[0014] Add fictitious data to the second data;

[0015] The second data, after the addition of fictitious data, is sharded according to the sharding algorithm to determine the data shard to which each piece of second data belongs.

[0016] Optionally, the step of determining that the second data on the local end corresponding to the second encrypted data is the intersection data with the intersection participant if the second encrypted data is the same as the first encrypted data includes:

[0017] If the second encrypted data is the same as the first encrypted data, and the second data on the local end corresponding to the second encrypted data is not fictitious data, then the second data is determined to be the intersection data with the intersection participant.

[0018] Optionally, the method further includes:

[0019] The second data is encrypted using the second public key to obtain the third encrypted data;

[0020] Send the second data to be intersected to the intersecting party, so that the intersecting party uses the second public key to encrypt each piece of first data included in the third data fragment to obtain fourth encrypted data. If the fourth encrypted data is the same as the third encrypted data, the first data corresponding to the fourth encrypted data is determined to be the intersection data with the local end. The second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data. The second fragment identifier is used to indicate the second data fragment to which the second data belongs. The third data fragment is the data fragment of the intersecting party whose fragment identifier matches the second fragment identifier.

[0021] Optionally, before the step of encrypting the second data using the second public key to obtain the third encrypted data, the method further includes:

[0022] Receive fragment identifiers of data fragments that are not empty, sent by the parties requesting the intersection;

[0023] The fragment identifiers of the non-empty data fragments on the local end are intersected with the received fragment identifiers to obtain the fragment identifier intersection set;

[0024] The step of encrypting the second data using the second public key to obtain the third encrypted data includes:

[0025] The second public key is used to encrypt the second data included in the data fragment to be encrypted to obtain the third encrypted data, wherein the data fragment to be encrypted is the data fragment corresponding to the fragment identifier included in the intersection of the fragment identifiers.

[0026] Optionally, the method further includes:

[0027] The mapping relationship of the intersection data is recorded, wherein the mapping relationship includes: the data identifier of the second data on the local end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data.

[0028] Secondly, embodiments of this application provide a data intersection apparatus, the apparatus comprising:

[0029] The first data to be submitted for submission receiving module is used to receive the first data to be submitted for submission sent by the submission participants. The first data to be submitted for submission includes a first fragment identifier, a first public key and first encrypted data. The encrypted data is obtained by the submission participants encrypting the first data of the submission participants using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs.

[0030] The second data encryption module is used to encrypt each piece of second data included in the second data fragment using the first public key to obtain second encrypted data. The second data fragment is a local data fragment whose fragment identifier matches the first fragment identifier. The local end and the intersection participant use the same data fragmentation algorithm to fragment their own data.

[0031] The intersection data determination module is used to determine, if the second encrypted data is the same as the first encrypted data, the second data on the local end corresponding to the second encrypted data is the intersection data with the intersection participant.

[0032] Optionally, the device further includes:

[0033] The first fragment number determination module is used to determine the first fragment number based on the data size of the second data on the local end before receiving the data to be submitted by the submission participant, and to obtain the second fragment number determined by the submission participant based on the data size of the first data of the submission participant.

[0034] The target fragment number determination module is used to negotiate and determine the target fragment number with the parties to the request for intersection based on the first fragment number and the second fragment number before receiving the data to be submitted by the parties to the request for intersection.

[0035] The second data sharding module is used to negotiate and determine a sharding algorithm with the participants based on the target number of shards before receiving the data to be sharded sent by the participants, and to shard the second data according to the sharding algorithm to determine the data shard to which each piece of second data belongs.

[0036] The second data sharding module includes:

[0037] A fictitious data addition unit is used to add fictitious data to the second data;

[0038] The second data sharding unit is used to shard the second data after adding fictitious data according to the sharding algorithm, and determine the data shard to which each piece of second data belongs.

[0039] The intersection data determination module includes:

[0040] The intersection data determination unit is used to determine that the second data is the intersection data with the intersection participant if the second encrypted data is the same as the first encrypted data and the second data of the local end corresponding to the second encrypted data is not fictitious data;

[0041] The device further includes:

[0042] The third encrypted data acquisition module is used to encrypt the second data using the second public key to obtain the third encrypted data;

[0043] The second data to be intersected sending module is used to send the second data to be intersected to the intersecting party, so that the intersecting party uses the second public key to encrypt each piece of first data included in the third data fragment to obtain fourth encrypted data. If the fourth encrypted data is the same as the third encrypted data, the first data corresponding to the fourth encrypted data is determined to be the intersection data with the local end. The second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data. The second fragment identifier is used to indicate the second data fragment to which the second data belongs. The third data fragment is the data fragment of the intersecting party whose fragment identifier matches the second fragment identifier.

[0044] The device further includes:

[0045] The fragment identifier receiving module is used to receive fragment identifiers of data fragments that are not empty, sent by the intersection participant, before the second data is encrypted using the second public key to obtain the third encrypted data.

[0046] The fragment identifier intersection module is used to find the intersection of the fragment identifiers of the non-empty data fragments on the local end with the received fragment identifiers before encrypting the second data with the second public key to obtain the third encrypted data, so as to obtain the fragment identifier intersection set.

[0047] The third encrypted data acquisition module includes:

[0048] The third encrypted data acquisition unit is used to encrypt the second data included in the data fragment to be encrypted using the second public key to obtain the third encrypted data, wherein the data fragment to be encrypted is the data fragment corresponding to the fragment identifier included in the fragment identifier intersection;

[0049] The device further includes:

[0050] The mapping relationship recording module is used to record the mapping relationship of the intersection data, wherein the mapping relationship includes: the data identifier of the second data on the local end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data.

[0051] Thirdly, embodiments of this application provide a data intersection system, the system comprising a first device and a second device, wherein:

[0052] The first device is configured to encrypt the first data on its own end using the first public key to obtain the first encrypted data; and send the first data to be handed over to the second device, wherein the first data to be handed over includes a first fragment identifier, the first public key and the first encrypted data, and the first fragment identifier is used to indicate the first data fragment to which the first data belongs;

[0053] The second device is configured to receive the first data to be intersected, encrypt each piece of second data included in the second data fragment using the first public key to obtain second encrypted data; if the second encrypted data is the same as the first encrypted data, determine that the second data of the local end corresponding to the second encrypted data is the intersection data with the first device, wherein the second data fragment is the local data fragment whose fragment identifier matches the first fragment identifier, and the first device and the second device use the same data fragmentation algorithm to fragment their own data;

[0054] The second device is further configured to encrypt the second data on its own end using the second public key to obtain the third encrypted data; and send the second data to be handed over to the first device, wherein the second data to be handed over includes the second fragment identifier, the second public key and the third encrypted data, and the second fragment identifier is used to indicate the second data fragment to which the second data belongs;

[0055] The first device is further configured to receive the second data to be intersected, encrypt each piece of first data included in the third data fragment using the second public key to obtain fourth encrypted data; if the fourth encrypted data is the same as the third encrypted data, determine that the first data corresponding to the fourth encrypted data is the intersection data with the second device, wherein the second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data, the second fragment identifier is used to indicate the second data fragment to which the second data belongs, and the third data fragment is the data fragment of the second device whose fragment identifier matches the second fragment identifier.

[0056] Fourthly, embodiments of this application provide an electronic device, including:

[0057] Memory, used to store computer programs;

[0058] When a processor executes a program stored in memory, it implements any of the methods described in the first aspect above.

[0059] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described in the first aspect above.

[0060] Beneficial effects of the embodiments in this application:

[0061] In the scheme provided in this application embodiment, the local end can receive first data to be submitted for submission sent by the submission participant. The first data to be submitted for submission includes a first fragment identifier, a first public key, and first encrypted data. The encrypted data is obtained by the submission participant encrypting the first data of the submission participant using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs. The local end encrypts each piece of second data included in the second data fragment using the first public key to obtain second encrypted data. The second data fragment is the local end's data fragment whose fragment identifier matches the first fragment identifier. The local end and the submission participant use the same data fragmentation algorithm to fragment their own data. If the second encrypted data is the same as the first encrypted data, the local end's second data corresponding to the second encrypted data is determined to be the intersection data with the submission participant. In this scheme, since both the local end and the participants in the intersection process use the same data fragmentation algorithm to fragment their own data, only data fragments with matching fragment identifiers are likely to contain the same data. Therefore, after receiving the first data to be interleaved from the participants, the local end can compare the first encrypted data only with each second data item in the second data fragment whose fragment identifier matches the first fragment identifier, instead of comparing each piece of data from the local end with the first encrypted data one by one. This significantly reduces the computational load in the data intersection process and improves the efficiency of data intersection. Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above simultaneously. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of this application 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 this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0063] Figure 1 A flowchart illustrating the data intersection method provided in the embodiments of this application;

[0064] Figure 2 Based on Figure 1 A flowchart illustrating the data fragmentation method in the illustrated embodiment;

[0065] Figure 3 Based on Figure 2 A flowchart illustrating the data fragmentation method in the illustrated embodiment;

[0066] Figure 4 for Figure 2 A specific flowchart of step S203 in the illustrated embodiment;

[0067] Figure 5 Based on Figure 3The flowchart shown in the embodiment illustrates a data intersection method including fictitious data;

[0068] Figure 6 Based on Figure 1 Another flowchart of the data intersection method in the illustrated embodiment;

[0069] Figure 7 Based on Figure 6 The flowchart shown is a method for finding the intersection of data based on the intersection of fragment identifiers in the embodiment.

[0070] Figure 8 Based on Figure 7 Another flowchart of the data intersection method based on the intersection of fragment identifiers in the illustrated embodiment;

[0071] Figure 9 A flowchart illustrating the data intersection method provided in the embodiments of this application;

[0072] Figure 10 for Figure 1 Another flowchart of the data intersection method in the illustrated embodiment;

[0073] Figure 11 Based on Figure 1 The diagram shows a structural schematic of a data intersection system according to an embodiment.

[0074] Figure 12 This is a schematic diagram of the structure of a data intersection device provided in an embodiment of this application;

[0075] Figure 13 This is a schematic diagram of the structure of a data intersection system provided in an embodiment of this application;

[0076] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0077] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0078] To improve the efficiency of data intersection calculations, embodiments of this application provide a data intersection method, apparatus, system, electronic device, and computer-readable storage medium. The following first describes a data intersection method provided by an embodiment of this application.

[0079] like Figure 1As shown, a data intersection method is described, the method comprising:

[0080] S101, Receive the first data to be submitted for submission from the submission participants;

[0081] The first data to be intersected includes a first fragment identifier, a first public key, and first encrypted data. The encrypted data is obtained by the intersecting party encrypting its first data using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs.

[0082] S102, use the first public key to encrypt each piece of second data included in the second data fragment to obtain the second encrypted data;

[0083] Wherein, the second data shard is the local data shard whose shard identifier matches the first shard identifier, and the local end and the intersection participant use the same data sharding algorithm to shard their own data;

[0084] S103, if the second encrypted data is the same as the first encrypted data, determine that the second data of the local end corresponding to the second encrypted data is the intersection data with the intersection participant.

[0085] As can be seen, in the scheme provided by the embodiments of this application, the local end can receive the first data to be shared sent by the sharing participant. The first data to be shared includes a first fragment identifier, a first public key, and first encrypted data. The encrypted data is obtained by the sharing participant encrypting the first data of the sharing participant using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs. The first public key is used to encrypt each piece of second data included in the second data fragment to obtain second encrypted data. The second data fragment is the data fragment of the local end whose fragment identifier matches the first fragment identifier. The local end and the sharing participant use the same data fragmentation algorithm to fragment their own data. If the second encrypted data is the same as the first encrypted data, the second data of the local end corresponding to the second encrypted data is determined to be the intersection data with the sharing participant. In this scheme, since the local end and the participants in the intersection process use the same data fragmentation algorithm to fragment their own data, the data fragments with matching fragment identifiers are likely to contain the same data. Therefore, after the local end receives the first data to be intersected sent by the participants in the intersection process, it can compare the first encrypted data only with each second data fragment contained in the second data fragment whose fragment identifier matches the first fragment identifier, instead of comparing each data fragment of the local end with the first encrypted data one by one. This can greatly reduce the amount of computation in the data intersection process and improve the efficiency of data intersection.

[0086] The data intersection method disclosed in this application is applied to the field of privacy computing technology. Specifically, it can be applied to privacy data intersection. This privacy data intersection technology can obtain the intersection of data held by the participating parties and the parties seeking the intersection without disclosing any additional information from the participating parties. The parties seeking the intersection are those other than the participating parties among the multiple parties involved in the data intersection.

[0087] For example, in federated learning, collaborative modeling can be achieved while ensuring the privacy and security of data from multiple participants. Before the federated learning process begins, the data from multiple participants can be aligned using the intersection method disclosed in this application, which involves finding the intersection of their data. In this way, each participant uses the intersection of their data during the federated learning process, while data outside this intersection is not leaked, thus guaranteeing the privacy and security of each participant's data.

[0088] Because comparing the local data with the data of the participants one by one during the data intersection process is computationally inefficient, before step S101, the local data and the participants can perform data segmentation based on the same segmentation algorithm. Since the segmentation operation is based on the segmentation algorithm, the data within the same data segment has a high degree of similarity, and the characteristics exhibited by the data within the data segment can be represented based on the segment identifier. In this way, the data range for data intersection between the local data and the participants can be narrowed down to data segments with matching data identifiers, significantly reducing the computational load during the data intersection process.

[0089] After the local end and the intersection participant perform data fragmentation operations on their respective data, the intersection participant can use the first public key to encrypt each piece of first data to obtain the first encrypted data. Here, the first data is the data that the intersection participant needs to perform data intersection, the first data fragment is a data fragment obtained by the intersection participant in the above fragmentation operation, and the fragment identifier of the first data fragment is the first fragment identifier.

[0090] In order for the local end to perform data intersection with the intersection participant, the intersection participant can send the first data to be intersection to the local end, wherein the first data to be intersection includes the first encrypted data, the first public key and the first fragment identifier.

[0091] Since the same data, when encrypted using the same public key, will result in identical encrypted data, the parties involved in the data intersection and the local end can use the same public key to encrypt their respective data. This ensures both data security and enables data intersection. In step S102, the local end can use the first public key received in step S101 to encrypt each piece of second data included in the second data fragment. Here, the second data is the data that the local end needs to intersect, and the second data fragment is the local end's data fragment whose fragment identifier matches the first fragment identifier.

[0092] For example, if the first fragment identifier is 1, then the second data fragment can be the local data fragment with the fragment identifier also being 1. If the second data fragment includes 10 data items, then the electronic device can encrypt the 10 data items using the first public key to obtain 10 second encrypted data items.

[0093] Since the public key used by this end to encrypt the second data is the same as the public key used by the intersection participant to encrypt the first data, if the second encrypted data is the same as the first encrypted data, it means that the second data of this end corresponding to the second encrypted data is also the same as the first data of the intersection participant corresponding to the first encrypted data. In step S103, this end can compare the second encrypted data with the first encrypted data. If the second encrypted data is the same as the first encrypted data, it can be determined that the second data of this end corresponding to the second encrypted data is the intersection data with the intersection participant.

[0094] Continuing from the previous example, this end uses the first public key to encrypt the 10 data items included in the second data fragment, resulting in second encrypted data items of 1, 3, 11, 15, 24, 45, 68, 75, 82, and 85. This end receives first encrypted data items from the intersection participants of 3, 21, 34, 35, 39, 43, 52, 68, 73, and 84. Comparing the first and second encrypted data reveals that the second encrypted data items identical to the first are 3 and 68. Therefore, it can be determined that the second data items corresponding to 3 and 68 on this end are the intersection data with the intersection participants.

[0095] As can be seen, since the local end and the participants in the intersection process use the same data fragmentation algorithm to fragment their own data, the data included in the data fragments with matching fragmentation identifiers are likely to be the same. Therefore, after the local end receives the first data to be intersected sent by the participants in the intersection process, it can compare the first encrypted data only with each second data included in the second data fragment whose fragmentation identifier matches the first fragmentation identifier, instead of comparing each data of the local end with the first encrypted data one by one. This can greatly reduce the amount of computation in the data intersection process and improve the efficiency of data intersection.

[0096] As one embodiment of the present invention, such as Figure 2 As shown, prior to the step of receiving the data to be interleaved sent by the interleaving participants, the method further includes:

[0097] S201, determine the number of first shards based on the data size of the second data on the local end, and obtain the number of second shards determined by the intersection participant based on the data size of the first data of the intersection participant;

[0098] To improve the efficiency of data intersection calculations while ensuring data security, the number of shards can be determined based on the data size of the participants. The local end can determine the first shard number based on the data size of the second data, where the first shard number is the number of data shards generated after sharding the second data. Correspondingly, the second shard number is the number of data shards generated after sharding the first data. If the data size is larger, the number of data shards can also be larger; therefore, the data size of the second data and the first shard number can be positively correlated, and the data size of the first data and the second shard number can also be positively correlated.

[0099] S202, based on the first number of shards and the second number of shards, negotiate with the parties seeking the intersection to determine the target number of shards;

[0100] If the target number of shards is large, smaller datasets will be divided into a larger number of shards, resulting in smaller datasets within each shard. This makes it easier for other participants to decipher the data during the intersection process, posing a higher risk of data leakage. Therefore, the weaker party in the data intersection process can negotiate a smaller target number of shards to protect their data security. The weaker party is defined as the party whose data size is smaller compared to other participants during the data intersection process.

[0101] If the target number of fragments is small, and each data fragment contains a large amount of data, then the data size of the data fragments that match the fragment identifiers increases, the amount of computation in the data intersection process increases, and the efficiency of data intersection decreases.

[0102] Therefore, the local end and the parties seeking intersection can negotiate and determine the target number of data fragments based on the first fragment number and the second fragment number. The target fragment number is the number of data fragments generated by the data fragmentation operation.

[0103] As one embodiment of this application, the target number of fragments can also be determined based on manual negotiation.

[0104] Therefore, the local end and the parties involved in the data intersection can determine an appropriate target number of shards based on the data scale of each party or through manual negotiation, so as to balance the computational efficiency of data intersection with data security.

[0105] S203, based on the target number of shards and the negotiation with the intersection participants, a sharding algorithm is determined, and the second data is sharded according to the sharding algorithm to determine the data shard to which each piece of second data belongs.

[0106] The local end and the participating parties can negotiate and determine the sharding algorithm based on the target number of shards. Specifically, the sharding algorithm can be a sharding algorithm based on the remainder or a sharding algorithm based on the hash value; no specific limitation is made here.

[0107] For example, if the sharding algorithm is based on the remainder, the electronic device can sequentially perform a remainder operation on the data identifier corresponding to each data point. Data points with the same remainder can be grouped into the same data shard, and the remainder can be used as the shard identifier for that data shard. During the data intersection process, the data included in data shards with the same shard identifier can be compared.

[0108] As one implementation of this application, the parties seeking a crossover can encrypt each data segment using a public key. In other words, the parties seeking a crossover can use different public keys to encrypt the data included in different data segments. Correspondingly, for the data included in the local data segment that matches the segment identifier of the crossover party's data segment, the local party can also encrypt it based on the same public key as the crossover party. This can increase the difficulty for other parties to crack the local party's data during the crossover process and further enhance data security.

[0109] As one implementation method of this application, the process of determining the fragmentation algorithm can be as follows: Figure 3 As shown.

[0110] S301, Data Preparation;

[0111] The local end and the parties involved in the data exchange can prepare the data they need to exchange.

[0112] S302, Determine whether manual negotiation of fragmentation is required; if not, proceed to steps S303-S307; if yes, proceed to step S308.

[0113] The sharding algorithm can be determined in two ways. The first way is to automatically generate the sharding algorithm. The local end and the parties involved in the intersection can negotiate to determine the target number of shards based on the data size of the first data and the second data, and then negotiate to determine the sharding algorithm, i.e., steps S303-S307. The second way is to manually negotiate the sharding algorithm, i.e., to determine the sharding algorithm through manual negotiation.

[0114] S303, Data size confirmed;

[0115] The local end and the parties involved in the intersection can confirm the data size, which can be used to determine the maximum number of blocks and the sharding algorithm.

[0116] S304, the maximum number of blocks is determined;

[0117] Based on the data size confirmed in step S303, the local end and the parties involved in the intersection can determine the maximum number of data fragments, which is the maximum number of data fragments that can be obtained after the fragmentation operation.

[0118] S305, obtain the fragmentation scale of other data sources;

[0119] The local end and the parties seeking intersection can obtain the shard sizes of other data parties. In other words, the local end and the parties seeking intersection can obtain each other's shard sizes. The shard size is the data size included in a data shard. The local end and the parties seeking intersection can negotiate and determine a suitable shard size based on each other's shard sizes to balance the computational efficiency and data security of data sharding.

[0120] S306, Comparison of minimum fragment size;

[0121] The local end and the intersection participants can compare the minimum fragment size, which is the minimum data size included in the data fragments obtained after the fragmentation operation. If the fragment size is small, the data fragments contain less data, making it easier for the other party to crack the data. Therefore, the local end and the intersection participants can negotiate and determine a suitable minimum fragment size based on the data size.

[0122] S307, Determine whether the sharding algorithm is confirmed; if yes, proceed to step S308; if no, return to step S304.

[0123] The local end and the parties seeking the intersection can confirm the sharding algorithm based on the negotiated target number of shards. If the local end and the parties seeking the intersection do not confirm the sharding algorithm, the process returns to step S304 and repeats the sharding algorithm confirmation process of steps S304-S307 until the local end and the parties seeking the intersection confirm the sharding algorithm.

[0124] S308, data is fragmented.

[0125] The local end and the parties involved in the intersection can divide their respective data into fragments based on the fragmentation algorithm confirmed in step S307 or based on the fragmentation algorithm confirmed through manual negotiation, for use in subsequent data intersection.

[0126] As can be seen, in this embodiment, the local end can determine the number of first fragments based on the data size of the second data, and the intersection participants can determine the number of second fragments based on the data size of the first data. The local end and the intersection participants negotiate to determine the target number of fragments based on the number of first and second fragments, and negotiate to determine a suitable fragmentation algorithm. If the target number of fragments is large, the difficulty and cost of cracking the data of the party with the smaller data size in the data intersection is lower, and the data security is poor. If the target number of fragments is small, the data size for intersection between data fragments with matching fragment identifiers increases, and the computational efficiency of data intersection decreases. Since in this application, the target number of fragments and the fragmentation algorithm can be determined by the local end and the intersection participants through negotiation based on the data sizes of the first and second data, the computational efficiency and data security of data intersection are high.

[0127] As one implementation method of this application, such as Figure 4 As shown, the step of dividing the second data into shards according to the sharding algorithm and determining the data shard to which each piece of second data belongs may include:

[0128] S401, add fictitious data to the second data;

[0129] To enhance data security during the intersection process, fictitious data can be added to the second set of data. This means that the second set of data received by the intersection participants includes fictitious data, increasing the difficulty for them to decipher the local data and thus improving the security of the intersection process.

[0130] S402, the second data after adding fictitious data is sharded according to the sharding algorithm to determine the data shard to which each piece of second data belongs.

[0131] The local end can fragment the second data after adding fictitious data based on a fragmentation algorithm agreed upon with the intersection participants. In this way, the second data fragment received by the intersection participants, which matches the fragmentation identifier of the first data fragment, includes fictitious data. During the intersection process, due to the obfuscation of fictitious data, the intersection participants cannot know the authenticity of the data provided by the local end during the calculation, which can improve the security of data intersection.

[0132] As can be seen, in this embodiment, the local end can add fictitious data to the second data and then fragment the second data after adding fictitious data to determine the data fragment to which each piece of second data belongs. In this way, the second data received by the intersection participants includes fictitious data, which can mislead the intersection participants' guesses and inferences about the distribution of the local end's data during the data intersection process, thereby improving the security of the data intersection.

[0133] As one implementation of this application, the step of determining that the second data of the local end corresponding to the second encrypted data is the intersection data with the intersection participant if the second encrypted data is the same as the first encrypted data may include:

[0134] If the second encrypted data is the same as the first encrypted data, and the second data on the local end corresponding to the second encrypted data is not fictitious data, then the second data is determined to be the intersection data with the intersection participant.

[0135] Since fictitious data was added to the second data in step S401, and this fictitious data is used to obfuscate the local data, it is not part of the data to be intersected. Therefore, if, during the data intersection process, the second data corresponding to the second encrypted data that is identical to the first encrypted data is fictitious data, then this fictitious data does not belong to the intersection data.

[0136] To enhance the security of data intersection, the local end can add fictitious data to the second data. Correspondingly, when the local end adds fictitious data to the second data, the data intersection process can be as follows: Figure 5 As shown.

[0137] S501, initiate a task request;

[0138] In order to obtain the intersection of the data held by the local end and the intersection participants without disclosing any additional information, the intersection participants can initiate an intersection task to perform data intersection with the local end.

[0139] S502, select a fragment;

[0140] Since fragment identifiers can be used to represent data fragments, intersection of data in data fragments with matching fragment identifiers can yield intersection data. Therefore, the participants in the intersection can select the first data fragment that matches the fragment identifier of the second data fragment on their end and perform subsequent intersection operations.

[0141] S503, generate public / private key pair;

[0142] The parties involved in the request can generate a public-private key pair to encrypt the first data included in the first fragment identifier.

[0143] S504, Data ID public key encryption;

[0144] The data ID is used to represent the data identifier. The parties involved in the intersection can encrypt the first data corresponding to the first data identifier based on the public key generated in step S503, thereby obtaining the first encrypted data.

[0145] S505, send public key and encrypted data;

[0146] The parties seeking intersection can send their public keys and encrypted data to the local end. The local end can then encrypt its second data using the public key generated by the parties seeking intersection, thus obtaining the second encrypted data. Since the first and second encrypted data are obtained using the same public key, if the first and second encrypted data are identical, then the second data corresponding to the second encrypted data that is identical to the first encrypted data is the intersection data.

[0147] S506, the other party's data and public key are encrypted;

[0148] The other party encrypts the data and public key, that is, the local end encrypts the second data based on the public key sent by the party seeking the handover in step S505, and thus obtains the second encrypted data.

[0149] S507, Data Comparison;

[0150] This end can compare the second encrypted data with the first encrypted data. If the second encrypted data is the same as the first encrypted data, then the second data corresponding to the second encrypted data is the intersection data.

[0151] S508, Determine whether all sharding has been completed; if yes, proceed to step S509; if no, return to step S502.

[0152] Determine whether all fragments have been completed, that is, determine whether all data included in the data fragments whose fragment identifiers match those of the participants in the intersection have been fully compared. If the data comparison of the data fragments whose fragment identifiers match has been completed, then the local end can record the data identifier of the intersection data, that is, execute step S509. If the data comparison of the data fragments whose fragment identifiers match has not been completed, then steps S502-S507 can be repeated until the data comparison of the data fragments whose fragment identifiers match has been completed.

[0153] S509, records ID data;

[0154] This end can record ID data, that is, this end can record the data identifier of the intersection data. In this way, this end can determine that the data corresponding to the data identifier is the intersection data.

[0155] S510, eliminate false information.

[0156] Since the second data of this end may include fictitious information, this end can remove fictitious information from the data identifier of the intersection data obtained in step S509. That is, this end can remove the data identifier of fictitious information from the data identifier of the intersection data, and then obtain the intersection data of this end and the intersection participant.

[0157] As can be seen, in this embodiment, since the local end adds fictitious data to the second data, and the fictitious data does not belong to the data to be intersected, the local end can determine the second data that is the same as the first encrypted data and is not fictitious data as the intersection data during the intersection process, which can improve the security and accuracy of data intersection.

[0158] As one implementation method of this application, such as Figure 6 As shown, the above method may further include:

[0159] S601, the second data is encrypted using the second public key to obtain the third encrypted data;

[0160] The local end can use the second public key to encrypt the second data, resulting in third encrypted data. This third encrypted data can then be sent to the participants seeking a data intersection. Because the third encrypted data is encrypted, it is more difficult for the participants to crack it, thus improving the security of the data intersection.

[0161] S602, send the second data to be intersected to the intersecting party, so that the intersecting party uses the second public key to encrypt each piece of first data included in the third data fragment to obtain fourth encrypted data. If the fourth encrypted data is the same as the third encrypted data, determine that the first data corresponding to the fourth encrypted data is the intersection data with the local end.

[0162] The second data to be intersected includes a second fragment identifier, a second public key, and the third encrypted data. The second fragment identifier is used to indicate the second data fragment to which the second data belongs, and the third data fragment is the data fragment of the intersecting party whose fragment identifier matches the second fragment identifier.

[0163] This end can send the second data to be intersected, including the second public key, the second fragment identifier, and the third encrypted data, to the intersecting party. The intersecting party can then encrypt the first data included in the third data fragment using the same public key as this end, obtaining the fourth encrypted data. The third data fragment is the data fragment of the intersecting party whose fragment identifier matches the second fragment identifier. Since the fragment identifiers of the third and second data fragments match, the intersecting party can compare the fourth encrypted data with the third encrypted data. Because both the fourth and third encrypted data use the second public key, if the fourth and third encrypted data are identical, then the first data corresponding to the fourth encrypted data is identical to the second data corresponding to the third encrypted data. Therefore, it can be determined that the first data corresponding to the fourth encrypted data, which is identical to the third encrypted data, is the intersection data.

[0164] As can be seen, in this embodiment, the local end can use the second public key to encrypt the second data to obtain the third encrypted data, and send the second data to be intersected, including the second public key, the second fragment identifier, and the third encrypted data, to the intersection participant. The intersection participant can encrypt the first data included in the third data fragment based on the second public key to obtain the fourth encrypted data. Since the fragment identifiers of the third data fragment and the second data fragment match, and intersection is only possible between data fragments with matching fragment identifiers, the intersection participant can intersect the fourth encrypted data with the third encrypted data, without needing to intersect every single piece of the first and second data, thus improving the computational efficiency of data intersection.

[0165] As one implementation method of this application, based on Figure 6 The illustrated embodiments, such as Figure 7 As shown, before the step of encrypting the second data with the second public key to obtain the third encrypted data, that is, before step S601, the above method may further include:

[0166] S701, Receive the fragment identifier of the data fragment that is not empty, sent by the requesting party;

[0167] The participants in the intersection process can fragment the third data based on a fragmentation algorithm to obtain a third data fragment. If a data fragment containing empty data in the third data fragment of the participant in the intersection process is intersected with the data in the second data fragment of the local end, the resulting intersected data will necessarily be empty. Therefore, the participant in the intersection process can send the fragment identifiers of the data fragments containing non-empty data to the local end.

[0168] S702, intersect the fragment identifiers of the non-empty data fragments on the local end with the received fragment identifiers to obtain the fragment identifier intersection;

[0169] Since the intersection of data fragments with matching fragment identifiers can yield intersection data, this end can perform intersection between the fragment identifiers of data fragments that are not empty and the fragment identifiers sent by the intersection participants in step S701. The resulting fragment identifier intersection is the fragment identifier corresponding to the data fragment whose fragment identifiers match.

[0170] After obtaining the intersection of fragment identifiers, the local end can use the second public key to encrypt the second data in the data fragment corresponding to the fragment identifier in the intersection of fragment identifiers, obtaining the third encrypted data, and then send the second fragment identifier, the second public key, and the third encrypted data to the intersection participant. The intersection participant can use the second public key to encrypt the first data in the third data fragment that matches the fragment identifier of the second data fragment, obtaining the fourth encrypted data.

[0171] In this way, the participants in the intersection can intersect the third encrypted data and the fourth encrypted data. Since the data intersected between the local end and the participants belongs to the data fragment corresponding to the fragment identifier in the fragment identifier intersection set, instead of intersecting the first data of the participants with the second data of the local end one by one, the computational efficiency of data intersection can be improved.

[0172] The step of encrypting the second data with the second public key to obtain the third encrypted data, i.e., step S601, may include:

[0173] S703, the second public key is used to encrypt the second data included in the data fragment to be encrypted, to obtain the third encrypted data;

[0174] The data fragment to be encrypted is the data fragment corresponding to the fragment identifier included in the intersection of the fragment identifiers.

[0175] In this embodiment, in step S702, the local end can perform intersection between the fragment identifier of the non-empty data fragments included in the local end and the fragment identifier of the non-empty data fragments included in the intersection participants obtained in step S701, thereby obtaining the fragment identifier intersection.

[0176] To improve the efficiency of data intersection, the participants can intersect the first data in the data fragment corresponding to the participant's fragment identifier included in the fragment identifier intersection set with the second data in the data fragment corresponding to their own fragment identifier included in the fragment identifier intersection set. Accordingly, in step S703, the local end can encrypt the data in the data fragment corresponding to the fragment identifier included in the fragment identifier intersection set.

[0177] As one implementation of this application, the local end and the intersection participants can perform intersection based on the data included in the data fragments in the intersection set of fragment identifiers, such as... Figure 8 As shown.

[0178] S801, Virtual data addition;

[0179] The local end can add virtual data to the second data, that is, add fictitious data to the second data. In this way, after the intersection participants receive the second data from the local end, since the second data includes fictitious data, the difficulty for the intersection participants to crack the local data is increased, which can improve the security of data intersection.

[0180] S802, slice algorithm execution;

[0181] After adding fictitious data to the second data on the local end, the local end can perform sharding on the second data based on the sharding algorithm to obtain the second data shards.

[0182] S803, retrieve the shard ID and the data ID under the shard;

[0183] This end can obtain the shard ID and the data ID under the shard corresponding to the second data shard. The shard ID is the identifier of the second shard, and the data ID under the shard is the data identifier of the second data.

[0184] Since the local end can perform two rounds of intersection with the data identifier of the first data and the second fragment identifier corresponding to the second data fragment, respectively, and the data identifier of the first data and the third fragment identifier corresponding to the third data fragment of the intersection participant, that is, the local end can perform two rounds of intersection with the fragment identifier of the data fragment and the data to be intersected, which can effectively reduce the data size and improve the computational efficiency of data intersection.

[0185] S804, find the intersection of fragment IDs using standard methods;

[0186] This end can perform a regular intersection of fragment IDs, meaning it can also perform an intersection of fragment identifiers. Specifically, this end can receive fragment identifiers of data fragments that are not empty, sent by the participants in the intersection calculation, and then perform an intersection calculation between the fragment identifiers of its own data fragments that are not empty and the received fragment identifiers to obtain the intersection of fragment identifiers.

[0187] Data intersection based on fragment identifier intersection can significantly reduce the amount of computation required for intersection, which is more pronounced when there is a large difference in the size of the two data sets or a low overlap rate.

[0188] S805 filters overlapping fragments.

[0189] This end can filter intersecting fragments, meaning it retains the data fragments corresponding to the fragment identifiers included in the intersection of fragment identifiers. In this way, the data used for data intersection belongs to the data fragments corresponding to the fragment identifiers included in the intersection of fragment identifiers, which can improve the efficiency of data intersection calculation and reduce the pressure on the server.

[0190] As can be seen, in this embodiment, the intersection participant can send the fragment identifiers of the non-empty data fragments included in the intersection participant's data set to the local end. The local end can then perform an intersection calculation between the fragment identifiers of its own non-empty data fragments and the fragment identifiers sent by the intersection participant, thereby obtaining the fragment identifier intersection set. Accordingly, the local end can use a second public key to encrypt the second data in the data fragments corresponding to the fragment identifiers included in the fragment identifier intersection set. Since the data used by the local end and the intersection participant for data intersection can belong to the data fragments corresponding to the fragment identifiers included in the fragment identifier intersection set, the computational efficiency of data intersection can be improved.

[0191] As one embodiment of this application, the above method may further include:

[0192] The mapping relationship of the intersection data is recorded, wherein the mapping relationship includes: the data identifier of the second data on the local end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data.

[0193] During the data intersection process, the local end can compare the second encrypted data with the first encrypted data of the intersection participants to obtain the intersection data. Since the participants in the data intersection process and subsequent privacy computing tasks do not directly provide plaintext data IDs, that is, they do not directly provide data to be intersected without public key encryption, the local end can record the mapping relationship of the intersection data after obtaining it based on the data intersection, thereby determining the intersection data in the local end's second data.

[0194] In addition, the local end can also perform subsequent calculations based on its own encrypted data in the mapping relationship, that is, the second data encrypted with the second public key provided by the local end, which can improve the security of data in the subsequent calculation process.

[0195] Specifically, this end can record the data identifier of the second data of this end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data, that is, to establish the correspondence between its own data, its own encrypted data, and other parties' encrypted data that is the same as its own encrypted data.

[0196] For example, this end finds the intersection of its own data and the data of participant A. The intersection data are data ID-A and data ID-B. The encrypted data obtained by encrypting data ID-A with the public key is its own encrypted data a1, and the encrypted data that is the same as its own encrypted data a1 is participant A's encrypted data a2. Similarly, the encrypted data obtained by encrypting data ID-B with the public key is its own encrypted data b1, and the encrypted data that is the same as its own encrypted data b1 is participant A's encrypted data b2. Then, the mapping relationship table of its own data, its own encrypted data, and other parties' encrypted data that are the same as its own encrypted data can be shown in the following table.

[0197] Self-data Self-encrypted data Encrypted data from other parties that is identical to its own encrypted data. Data ID-A Self-encrypted data a1 Participant A encrypts data a2 Data ID-B Self-encrypted data b1 Participant A encrypts data b2

[0198] As one implementation of this application, the mapping relationship provided in this embodiment can be used as a recording method for the dataset after intersection. The data identifiers used in the subsequent calculations of data intersection are all encrypted data in the mapping relationship. In other words, the data identifiers used in the subsequent calculations of data intersection are all ciphertext. In this way, there is no identifier data in the data interaction process, which can ensure the security and reliability of the subsequent calculations.

[0199] As can be seen, in this embodiment, the local end can record the mapping relationship of the intersection data. Specifically, the local end can record the mapping relationship between its own data, its own encrypted data, and encrypted data identical to its own encrypted data. During the intersection process, the local end can determine that the data corresponding to its own encrypted data that is identical to the encrypted data of other parties is the intersection data. Since the local end does not obtain the plaintext data of other parties, it can determine the data as the intersection data based on the recorded mapping relationship, thus improving the accuracy of the data intersection operation. The local end can also perform subsequent calculations based on its own encrypted data in the mapping relationship, that is, the second data encrypted with the second public key provided in this section, which can improve the security of data in subsequent calculations.

[0200] As one implementation of this application, since there is data interaction between the participants in the data intersection process, such as fragment negotiation, intersection process, and key distribution, the HTTPS protocol (Hypertext Transfer Security Protocol) can be used to forward requests, shielding the internal service details of the participants, thereby protecting data security during data transmission.

[0201] As one implementation of this application, endpoint A and endpoint B perform data intersection. End-A needs to perform data intersection on dataset A, which contains 5 million data entries. End-B needs to perform data intersection on dataset B, which contains 100,000 data entries. A schematic diagram of the data intersection between endpoint A and endpoint B is shown below. Figure 9 As shown.

[0202] Both client A and client B estimate the number of shards based on the size of their respective data to be interleaved. Specifically, client A can determine the first number of shards (10,000 shards) based on the size of its data to be interleaved, while client B can determine the second number of shards (100 shards). Based on the first and second shard numbers, clients A and B can negotiate to determine a target number of shards (5,000 shards) that both protects the data security of the weaker party and ensures the efficiency of the data intersection operation. Clients A and B can then negotiate and determine the sharding algorithm based on the target number of shards.

[0203] After A and B complete their negotiation, to further enhance the security of the data intersection and increase the difficulty for the other party to crack the data, A and B can add a certain amount of fake data to their respective datasets based on the size of their data to be intersected. For example, A adds 100,000 fake data entries to dataset A, and B adds 50,000 fake data entries to dataset B.

[0204] After adding spoof data, A and B, based on a negotiated sharding algorithm, sharded their respective interleaved data. The sharding algorithm works by sharding data according to a certain rule, ensuring that the number of shards obtained is the target number. The actual shards are the target number of data shards, where each shard contains non-empty data. A obtained 3000 shards based on the sharding algorithm, while B obtained 500 shards.

[0205] Fragment identifiers are used to represent data fragments. Only data fragments with the same fragment identifier can intersect each other. To improve the efficiency of the intersection process, endpoints A and B can perform fragment intersection based on their respective actual fragment IDs. In other words, endpoints A and B can perform intersection based on their respective actual fragment identifiers. The result of the fragment intersection between endpoints A and B is 300 fragments; that is, the intersection of the fragment identifiers of endpoints A and B is 300 fragments.

[0206] To enhance data security, endpoints A and B can each use the same public key to encrypt data within the data fragments with the same fragment identifier in the intersection of fragment identifiers. This results in encrypted data of the same fragment, which is the data within the data fragments with the same fragment identifier encrypted using the same public key. Endpoints A and B can then perform data intersection on the encrypted data of the same fragment to determine the unencrypted data corresponding to the same encrypted data of the same fragment. This data intersection yields 60 fragments, including the intersection data of endpoints A and B.

[0207] End-user A and end-user B can find the intersection of their data to obtain 60 data fragments for statistical analysis, thus acquiring 2000 data entries within these fragments. End-user A's 2000 data entries include 50 spurious entries, while end-user B's 2000 data entries include 30 spurious entries. The data to be intersected can be the intersection set. Since spurious data is not included in the intersection set, end-user A and end-user B need to filter out the spurious data. End-user A and end-user B can filter out the spurious data from the intersection set based on the data records, specifically the records containing spurious information, thus obtaining 1940 intersection data entries.

[0208] As one implementation method of this application, the data intersection process can be as follows: Figure 10 As shown.

[0209] S1001, Data Preparation;

[0210] The data preparation step involves users preparing the dataset content they need to intersect. In other words, the participants in the data intersection can prepare the data to be intersected, which will be used to determine the data shards and intersect the data later.

[0211] S1002, data fragmentation;

[0212] In data sharding, participants can negotiate the specific sharding size and implementation algorithm through automatic or manual means. In other words, based on automatic generation or manual negotiation, participants can negotiate the specific sharding size and the sharding algorithm to implement data sharding, so that the performance and security of privacy set intersection are kept at the best.

[0213] S1003, Sliced ​​Record;

[0214] In the sharded record, electronic devices can perform specific data sharding on the dataset and add fuzzy fake data to improve the security of the intersection process. In other words, electronic devices can add fictitious data to the data to be intersected, and the fictitious data is used to improve the security of the intersection process.

[0215] S1004, Key generation;

[0216] The security of the intersection data is achieved through key generation, preventing it from being intercepted and leaked by external parties. In other words, electronic devices can generate public keys and use them to encrypt the intersection data, thus achieving security protection for the intersection data and preventing it from being intercepted and leaked by external parties.

[0217] S1005, seeking privacy;

[0218] Privacy intersection is the process of finding intersections between actual data. In other words, during privacy intersection, electronic devices can find intersections between public-key encrypted data and other data, and finally obtain the intersection information that they need to provide later. In other words, electronic devices can obtain the intersection data of data intersections.

[0219] S1006, Mapping record.

[0220] Mapping records are used to store the associations of intersection identifiers. In other words, electronic devices can store data mapping relationships, including correspondences between their own data, their own encrypted data, and encrypted data from other parties that are identical to their own encrypted data. Electronic devices can determine the intersection data obtained during the intersection process based on these mapping relationships, and the mapping records can also be used for subsequent privacy-preserving computations.

[0221] As one embodiment of this application, the data intersection method provided in this application embodiment can be applied to, for example... Figure 11The data intersection system shown may include a data fragmentation management module 1101, a privacy intersection module 1102, a data communication module 1103, and a mapping record module 1104. Data can flow between data party A and data party B from the data fragmentation management module 1101 to the privacy intersection module 1102 and then to the mapping record module 1104. When data parties interact, i.e., when data party A and data party B are transmitting data, proxy requests can be implemented through the data communication module 1103.

[0222] The data sharding management module 1101 can be used to formulate sharding strategies for each participant, negotiate with other participants to determine the specific number of shards, and determine the sharding logic algorithm through manual negotiation or automatic generation to protect the data range of the weaker data party. The data sharding management module 1101 can also be used for data sharding and adding fictitious data to the data to be interleaved.

[0223] The privacy intersection module 1102 is used for key generation, data confidentiality, and intersection implementation during privacy intersection. In other words, it can generate a public key and encrypt the data to be intersected based on the public key to ensure data security during subsequent intersection processes. The privacy intersection module 1102 can also be used for data intersection, encryption of identified data, implementation of specific intersection logic, and removal of spurious data.

[0224] The data communication module 1103 can be used to prevent plaintext information from being obtained by the outside world when multiple participants are exchanging data, ensuring that the data only flows between the participants and can be used to protect the data from being intercepted by third parties during data communication between the participants.

[0225] The mapping record module 1104 can be used to record the mapping relationship of the intersection of multiple parties when privacy intersection is completed. The recorded mapping relationship is the correspondence between its own data, encrypted information and other parties' encrypted information, that is, the correspondence between its own data, its own encrypted data and other parties' encrypted data that is the same as its own encrypted data. The mapping relationship can be used for various subsequent privacy computing tasks.

[0226] Corresponding to the above data intersection method, this application embodiment also provides a data intersection device, which will be described below.

[0227] like Figure 12 As shown, a data intersection device includes:

[0228] The first data to be submitted receiving module 1201 is used to receive the first data to be submitted sent by the submitting party. The first data to be submitted includes a first fragment identifier, a first public key and first encrypted data. The encrypted data is obtained by the submitting party encrypting its first data using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs.

[0229] The second data encryption module 1202 is used to encrypt each piece of second data included in the second data fragment using the first public key to obtain second encrypted data. The second data fragment is a local data fragment whose fragment identifier matches the first fragment identifier. The local end and the intersection participant use the same data fragmentation algorithm to fragment their own data.

[0230] The intersection data determination module 1203 is used to determine, if the second encrypted data is the same as the first encrypted data, the second data on the local end corresponding to the second encrypted data is the intersection data with the intersection participant.

[0231] As can be seen, in the scheme provided by the embodiments of this application, the local end can receive the first data to be shared sent by the sharing participant. The first data to be shared includes a first fragment identifier, a first public key, and first encrypted data. The encrypted data is obtained by the sharing participant encrypting the first data of the sharing participant using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs. The first public key is used to encrypt each piece of second data included in the second data fragment to obtain second encrypted data. The second data fragment is the data fragment of the local end whose fragment identifier matches the first fragment identifier. The local end and the sharing participant use the same data fragmentation algorithm to fragment their own data. If the second encrypted data is the same as the first encrypted data, the second data of the local end corresponding to the second encrypted data is determined to be the intersection data with the sharing participant. In this scheme, since the local end and the participants in the intersection process use the same data fragmentation algorithm to fragment their own data, the data fragments with matching fragment identifiers are likely to contain the same data. Therefore, after the local end receives the first data to be intersected sent by the participants in the intersection process, it can compare the first encrypted data only with each second data fragment contained in the second data fragment whose fragment identifier matches the first fragment identifier, instead of comparing each data fragment of the local end with the first encrypted data one by one. This can greatly reduce the amount of computation in the data intersection process and improve the efficiency of data intersection.

[0232] As one embodiment of this application, the apparatus further includes:

[0233] The first fragment number determination module is used to determine the first fragment number based on the data size of the second data on the local end before receiving the data to be submitted by the submission participant, and to obtain the second fragment number determined by the submission participant based on the data size of the first data of the submission participant.

[0234] The target fragment number determination module is used to negotiate and determine the target fragment number with the parties to the request for intersection based on the first fragment number and the second fragment number before receiving the data to be submitted by the parties to the request for intersection.

[0235] The second data sharding module is used to negotiate and determine a sharding algorithm with the participants based on the target number of shards before receiving the data to be sharded from the participants, and to shard the second data according to the sharding algorithm to determine the data shard to which each piece of second data belongs.

[0236] As one embodiment of this application, the second data sharding module includes:

[0237] A fictitious data addition unit is used to add fictitious data to the second data;

[0238] The second data sharding unit is used to shard the second data after adding fictitious data according to the sharding algorithm, and determine the data shard to which each piece of second data belongs.

[0239] As one embodiment of this application, the intersection data determination module includes:

[0240] The intersection data determination unit is configured to determine that the second encrypted data is the intersection data with the intersection participant if the second encrypted data is the same as the first encrypted data and the second data of the local end corresponding to the second encrypted data is not fictitious data.

[0241] The device further includes:

[0242] The third encrypted data acquisition module is used to encrypt the second data using the second public key to obtain the third encrypted data;

[0243] The second data to be intersected sending module is used to send the second data to be intersected to the intersecting party, so that the intersecting party uses the second public key to encrypt each piece of first data included in the third data fragment to obtain fourth encrypted data. If the fourth encrypted data is the same as the third encrypted data, the first data corresponding to the fourth encrypted data is determined to be the intersection data with the local end. The second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data. The second fragment identifier is used to indicate the second data fragment to which the second data belongs. The third data fragment is the data fragment of the intersecting party whose fragment identifier matches the second fragment identifier.

[0244] As one embodiment of this application, the apparatus further includes:

[0245] The fragment identifier receiving module is used to receive fragment identifiers of data fragments that are not empty, sent by the intersection participant, before the second data is encrypted using the second public key to obtain the third encrypted data.

[0246] The fragment identifier intersection module is used to find the intersection of the fragment identifiers of the non-empty data fragments on the local end with the received fragment identifiers before encrypting the second data with the second public key to obtain the third encrypted data, so as to obtain the fragment identifier intersection set.

[0247] The third encrypted data acquisition module includes:

[0248] The third encrypted data acquisition unit is used to encrypt the second data included in the data fragment to be encrypted using the second public key to obtain the third encrypted data, wherein the data fragment to be encrypted is the data fragment corresponding to the fragment identifier included in the fragment identifier intersection.

[0249] As one embodiment of this application, the apparatus further includes:

[0250] The mapping relationship recording module is used to record the mapping relationship of the intersection data, wherein the mapping relationship includes: the data identifier of the second data on the local end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data.

[0251] This application also provides a data intersection system, such as... Figure 13 As shown, the system includes a first device 1301 and a second device 1302, wherein:

[0252] The first device 1301 is used to encrypt the first data on its own end using the first public key to obtain the first encrypted data; and to send the first data to be handed to the second device 1302, wherein the first data to be handed includes a first fragment identifier, the first public key and the first encrypted data, and the first fragment identifier is used to indicate the first data fragment to which the first data belongs;

[0253] The second device 1302 is used to receive the first data to be intersected, encrypt each piece of second data included in the second data fragment using the first public key to obtain second encrypted data; if the second encrypted data is the same as the first encrypted data, it is determined that the second data of the local end corresponding to the second encrypted data is the intersection data with the first device 1301, wherein the second data fragment is the local data fragment whose fragment identifier matches the first fragment identifier, and the first device 1301 and the second device 1302 use the same data fragmentation algorithm to fragment their own data;

[0254] The second device 1302 is further configured to encrypt the second data on its own end using the second public key to obtain the third encrypted data; and send the second data to be handed over to the first device 1301, wherein the second data to be handed over includes the second fragment identifier, the second public key and the third encrypted data, and the second fragment identifier is used to indicate the second data fragment to which the second data belongs;

[0255] The first device 1301 is further configured to receive the second data to be intersected, encrypt each piece of first data included in the third data fragment using the second public key to obtain fourth encrypted data; if the fourth encrypted data is the same as the third encrypted data, determine that the first data corresponding to the fourth encrypted data is the intersection data with the second device, wherein the second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data, the second fragment identifier is used to indicate the second data fragment to which the second data belongs, and the third data fragment is the data fragment of the second device 1302 whose fragment identifier matches the second fragment identifier.

[0256] As can be seen, in the scheme provided by the embodiments of this application, the first device can use a first public key to encrypt the first data on its own end to obtain first encrypted data; send first data to be intersected to the second device, wherein the first data to be intersected includes a first fragment identifier, a first public key, and first encrypted data, and the first fragment identifier is used to indicate the first data fragment to which the first data belongs; the second device can be used to receive the first data to be intersected, use the first public key to encrypt each piece of second data included in the second data fragment to obtain second encrypted data; if the second encrypted data is the same as the first encrypted data, determine that the second data on its own end corresponding to the second encrypted data is the intersection data with the first device, wherein the second data fragment is the data fragment on its own end whose fragment identifier matches the first fragment identifier, and the first device and the second device use the same data fragmentation algorithm to fragment their own data; the second device... The device is further configured to encrypt the second data on its own end using the second public key to obtain the third encrypted data; send the second data to be intersected to the first device, wherein the second data to be intersected includes a second fragment identifier, a second public key, and the third encrypted data, and the second fragment identifier is used to indicate the second data fragment to which the second data belongs; the first device is further configured to receive the second data to be intersected, encrypt each piece of first data included in the third data fragment using the second public key to obtain the fourth encrypted data; if the fourth encrypted data is the same as the third encrypted data, determine that the first data corresponding to the fourth encrypted data is the intersection data with the second device, wherein the second data to be intersected includes a second fragment identifier, a second public key, and the third encrypted data, the second fragment identifier is used to indicate the second data fragment to which the second data belongs, and the third data fragment is the data fragment of the second device whose fragment identifier matches the second fragment identifier. In this scheme, since the first and second devices use the same data fragmentation algorithm to fragment their own data, the data fragments with matching fragmentation identifiers are likely to contain the same data. Therefore, after the first and second devices receive the data to be intersected sent by the other party, they can compare each piece of data in the data fragments with matching fragmentation identifiers, instead of comparing each piece of data with the data sent by the other party one by one. This can greatly reduce the amount of computation in the data intersection process and improve the efficiency of data intersection.

[0257] As one embodiment of this application, the first device 1301 can also be used to determine the number of first shards based on the data size of the first data on its own end, and obtain the number of second shards determined by the second device 1302 based on the data size of the second data of the second device 1302; according to the number of first shards and the number of second shards, negotiate with the second device 1302 to determine the number of target shards; the first device 1301 can negotiate with the second device 1302 to determine the sharding algorithm based on the target number of shards, and the first device 1301 and the second device 1302 can shard their own data according to the sharding algorithm to determine the data shard to which each piece of data belongs.

[0258] As one embodiment of this application, the first device 1301 can be used to add fictitious data to the first data; and to segment the first data after adding fictitious data according to the segmentation algorithm to determine the data segment to which each piece of first data belongs. The second device 1302 can be used to add fictitious data to the second data; and to segment the second data after adding fictitious data according to the segmentation algorithm to determine the data segment to which each piece of second data belongs.

[0259] In one embodiment of this application, the first device 1301 can be configured to determine that the first data is the intersection data with the second device 1302 if the fourth encrypted data is the same as the third encrypted data and the first data on the local end corresponding to the fourth encrypted data is not fictitious data. The second device 1302 can be configured to determine that the second data is the intersection data with the first device 1301 if the second encrypted data is the same as the first encrypted data and the second data on the local end corresponding to the second encrypted data is not fictitious data.

[0260] As one embodiment of this application, the first device 1301 can also be used to receive fragment identifiers of data fragments that include non-empty data sent by the second device 1302; and to perform intersection calculations between the fragment identifiers of the non-empty data fragments on its own end and the received fragment identifiers to obtain a fragment identifier intersection set; the second device 1302 can also be used to receive fragment identifiers of data fragments that include non-empty data sent by the first device 1301; and to perform intersection calculations between the fragment identifiers of the non-empty data fragments on its own end and the received fragment identifiers to obtain a fragment identifier intersection set.

[0261] As one embodiment of this application, the first device 1301 can be specifically used to encrypt the first data included in the data fragment to be encrypted using a first public key to obtain first encrypted data. The second device 1302 can be specifically used to encrypt the second data included in the data fragment to be encrypted using a second public key to obtain third encrypted data, wherein the data fragment to be encrypted is the data fragment corresponding to the fragment identifier included in the intersection of the fragment identifiers.

[0262] As one embodiment of this application, the first device 1301 can also be used to record the mapping relationship of the intersection data, wherein the mapping relationship includes: the data identifier of the first data on the local end corresponding to the fourth encrypted data that is the same as the third encrypted data, the encrypted data obtained by encrypting the first data using the first public key, and the correspondence between the third encrypted data. The second device 1302 can also be used to record the mapping relationship of the intersection data, wherein the mapping relationship includes: the data identifier of the second data on the local end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data.

[0263] This application also provides an electronic device, such as... Figure 14 As shown, it includes:

[0264] Memory 1401 is used to store computer programs;

[0265] When the processor 1402 executes the program stored in the memory 1401, it implements the privacy data intersection interaction method steps described in any of the above embodiments.

[0266] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 1402, the communication interface, and the memory 1401 communicating with each other via the communication bus.

[0267] As can be seen, in the scheme provided by the embodiments of this application, the local end can receive the first data to be shared sent by the sharing participant. The first data to be shared includes a first fragment identifier, a first public key, and first encrypted data. The encrypted data is obtained by the sharing participant encrypting the first data of the sharing participant using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs. The first public key is used to encrypt each piece of second data included in the second data fragment to obtain second encrypted data. The second data fragment is the data fragment of the local end whose fragment identifier matches the first fragment identifier. The local end and the sharing participant use the same data fragmentation algorithm to fragment their own data. If the second encrypted data is the same as the first encrypted data, the second data of the local end corresponding to the second encrypted data is determined to be the intersection data with the sharing participant. In this scheme, since the local end and the participants in the intersection process use the same data fragmentation algorithm to fragment their own data, the data fragments with matching fragment identifiers are likely to contain the same data. Therefore, after the local end receives the first data to be intersected sent by the participants in the intersection process, it can compare the first encrypted data only with each second data fragment contained in the second data fragment whose fragment identifier matches the first fragment identifier, instead of comparing each data fragment of the local end with the first encrypted data one by one. This can greatly reduce the amount of computation in the data intersection process and improve the efficiency of data intersection.

[0268] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0269] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0270] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0271] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0272] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described data intersection methods.

[0273] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the data intersection methods described above.

[0274] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0275] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0276] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0277] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A data intersection method, characterized in that, include: The number of first shards is determined based on the data size of the second data on this end, and the number of second shards is obtained based on the data size of the first data of the intersection participant. Based on the number of the first fragment and the number of the second fragment, the target number of fragments is determined through negotiation with the parties seeking the intersection. Based on the target number of shards and the consensus participants, a sharding algorithm is determined, and the second data is sharded according to the sharding algorithm to determine the data shard to which each piece of second data belongs; Receive first data to be submitted for submission from a submission participant, wherein the first data to be submitted for submission includes a first fragment identifier, a first public key and first encrypted data, the first encrypted data is obtained by the submission participant encrypting the first data of the submission participant using the first public key, and the first fragment identifier is used to indicate the first data fragment to which the first data belongs; Each piece of second data included in the second data fragment is encrypted using the first public key to obtain second encrypted data. The second data fragment is a local data fragment whose fragment identifier matches the first fragment identifier. The local end and the intersection participant use the same data fragmentation algorithm to fragment their own data. If the second encrypted data is the same as the first encrypted data, the second data on the local end corresponding to the second encrypted data is determined to be the intersection data with the intersection participant.

2. The method according to claim 1, characterized in that, The step of partitioning the second data according to the partitioning algorithm and determining the data partition to which each piece of second data belongs includes: Add fictitious data to the second data; The second data, after the addition of fictitious data, is sharded according to the sharding algorithm to determine the data shard to which each piece of second data belongs.

3. The method according to claim 2, characterized in that, The step of determining that the second encrypted data corresponding to the local end is the intersection data with the intersection participant if the second encrypted data is the same as the first encrypted data includes: If the second encrypted data is the same as the first encrypted data, and the second data on the local end corresponding to the second encrypted data is not fictitious data, then the second data is determined to be the intersection data with the intersection participant.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: The second data is encrypted using the second public key to obtain the third encrypted data; Send the second data to be intersected to the intersecting party, so that the intersecting party uses the second public key to encrypt each piece of first data included in the third data fragment to obtain fourth encrypted data. If the fourth encrypted data is the same as the third encrypted data, the first data corresponding to the fourth encrypted data is determined to be the intersection data with the local end. The second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data. The second fragment identifier is used to indicate the second data fragment to which the second data belongs. The third data fragment is the data fragment of the intersecting party whose fragment identifier matches the second fragment identifier.

5. The method according to claim 4, characterized in that, Before the step of encrypting the second data using the second public key to obtain the third encrypted data, the method further includes: Receive fragment identifiers of data fragments that are not empty, sent by the parties requesting the intersection; The fragment identifiers of the non-empty data fragments on the local end are intersected with the received fragment identifiers to obtain the fragment identifier intersection set; The step of encrypting the second data using the second public key to obtain the third encrypted data includes: The second public key is used to encrypt the second data included in the data fragment to be encrypted to obtain the third encrypted data, wherein the data fragment to be encrypted is the data fragment corresponding to the fragment identifier included in the intersection of the fragment identifiers.

6. The method according to any one of claims 1-3, characterized in that, The method further includes: The mapping relationship of the intersection data is recorded, wherein the mapping relationship includes: the data identifier of the second data on the local end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data.

7. A data intersection device, characterized in that, The device includes: The first data to be submitted for submission receiving module is used to receive the first data to be submitted for submission sent by the submission participants. The first data to be submitted for submission includes a first fragment identifier, a first public key and first encrypted data. The first encrypted data is obtained by the submission participants encrypting the first data of the submission participants using the first public key. The first fragment identifier is used to indicate the first data fragment to which the first data belongs. The second data encryption module is used to encrypt each piece of second data included in the second data fragment using the first public key to obtain second encrypted data. The second data fragment is a local data fragment whose fragment identifier matches the first fragment identifier. The local end and the intersection participant use the same data fragmentation algorithm to fragment their own data. The intersection data determination module is used to determine, if the second encrypted data is the same as the first encrypted data, the second data on the local end corresponding to the second encrypted data is the intersection data with the intersection participant; The device further includes: The first fragment number determination module is used to determine the first fragment number based on the data size of the second data on the local end before receiving the first data to be submitted by the submission participant, and to obtain the second fragment number determined by the submission participant based on the data size of the first data of the submission participant. The target fragment number determination module is used to negotiate and determine the target fragment number with the parties to the request for delivery based on the first fragment number and the second fragment number before receiving the first data to be delivered sent by the parties to the request for delivery. The second data sharding module is used to, before receiving the first data to be sharded sent by the sharding participants, negotiate and determine a sharding algorithm with the sharding participants based on the target number of shards, shard the second data according to the sharding algorithm, and determine the data shard to which each piece of second data belongs.

8. The apparatus according to claim 7, characterized in that, The second data sharding module includes: A fictitious data insertion unit is used to insert fictitious data into the second data; The second data sharding unit is used to shard the second data after adding fictitious data according to the sharding algorithm, and determine the data shard to which each piece of second data belongs. The intersection data determination module includes: The intersection data determination unit is used to determine that the second data is the intersection data with the intersection participant if the second encrypted data is the same as the first encrypted data and the second data of the local end corresponding to the second encrypted data is not fictitious data; The device further includes: The third encrypted data acquisition module is used to encrypt the second data using the second public key to obtain the third encrypted data; The second data to be intersected sending module is used to send the second data to be intersected to the intersecting party, so that the intersecting party uses the second public key to encrypt each piece of first data included in the third data fragment to obtain fourth encrypted data. If the fourth encrypted data is the same as the third encrypted data, the first data corresponding to the fourth encrypted data is determined to be the intersection data with the local end. The second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data. The second fragment identifier is used to indicate the second data fragment to which the second data belongs. The third data fragment is the data fragment of the intersecting party whose fragment identifier matches the second fragment identifier. The device further includes: The fragment identifier receiving module is used to receive fragment identifiers of data fragments that are not empty, sent by the intersection participant, before the second data is encrypted using the second public key to obtain the third encrypted data. The fragment identifier intersection module is used to find the intersection of the fragment identifiers of the non-empty data fragments on the local end with the received fragment identifiers before encrypting the second data with the second public key to obtain the third encrypted data, so as to obtain the fragment identifier intersection set. The third encrypted data acquisition module includes: The third encrypted data acquisition unit is used to encrypt the second data included in the data fragment to be encrypted using the second public key to obtain the third encrypted data, wherein the data fragment to be encrypted is the data fragment corresponding to the fragment identifier included in the fragment identifier intersection; The device further includes: The mapping relationship recording module is used to record the mapping relationship of the intersection data, wherein the mapping relationship includes: the data identifier of the second data on the local end corresponding to the second encrypted data that is the same as the first encrypted data, the encrypted data obtained by encrypting the second data using the second public key, and the correspondence between the first encrypted data.

9. A data intersection system, characterized in that, The system includes a first device and a second device, wherein: The first device is configured to encrypt the first data on its own end using the first public key to obtain the first encrypted data; and send the first data to be handed over to the second device, wherein the first data to be handed over includes a first fragment identifier, the first public key and the first encrypted data, and the first fragment identifier is used to indicate the first data fragment to which the first data belongs; The second device is configured to receive the first data to be intersected, encrypt each piece of second data included in the second data fragment using the first public key to obtain second encrypted data; if the second encrypted data is the same as the first encrypted data, determine that the second data of the local end corresponding to the second encrypted data is the intersection data with the first device, wherein the second data fragment is the local data fragment whose fragment identifier matches the first fragment identifier, and the first device and the second device use the same data fragmentation algorithm to fragment their own data; The second device is further configured to encrypt the second data on its own end using the second public key to obtain the third encrypted data; and send the second data to be handed over to the first device, wherein the second data to be handed over includes a second fragment identifier, the second public key and the third encrypted data, and the second fragment identifier is used to indicate the second data fragment to which the second data belongs; The first device is further configured to receive the second data to be intersected, encrypt each piece of first data included in the third data fragment using the second public key to obtain fourth encrypted data; if the fourth encrypted data is the same as the third encrypted data, determine that the first data corresponding to the fourth encrypted data is the intersection data with the second device, wherein the second data to be intersected includes a second fragment identifier, the second public key and the third encrypted data, the second fragment identifier is used to indicate the second data fragment to which the second data belongs, and the third data fragment is the data fragment of the second device whose fragment identifier matches the second fragment identifier; The second device is further configured to determine the number of first shards based on the data size of the second data on its own end, and obtain the number of second shards determined by the first device based on the data size of the first data; negotiate with the first device to determine the number of target shards based on the number of first shards and the number of second shards; negotiate with the first device to determine the sharding algorithm based on the number of target shards, shard the second data according to the sharding algorithm, and determine the data shard to which each piece of second data belongs.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-6.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-party safe intersection solving method and system

    CN114386070A

  • Federated learning for improving matching efficiency

    US20210398026A1