Data fuzzy intersection method based on privacy protection and electronic device

The data fuzzy intersection method based on encryption and modular operation solves the problem of data leakage in the intersection of privacy sets, achieves a balance between security and cost-effectiveness, and is suitable for advertising in commercial cooperation.

CN120434046BActive Publication Date: 2025-09-23LANXIANG ZHILIAN (HANGZHOU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510913063.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-09-23
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

The existing privacy set intersection technology is prone to leaking one party's user data during the intersection calculation of both parties' user data, leading to data privacy and security issues, and the high cost of blind advertising for all users is too high.

Method used

A privacy-preserving data fuzzy intersection method is adopted. Through encryption and modular operations, the fuzzy intersection result obtained by the second party contains precise intersection data and a certain proportion of non-intersection data. Elliptic curve encryption and hash function mapping are used to protect data privacy, and the number of intersections is calculated using an algorithm that does not expose intermediate results.

Benefits of technology

It protects the data privacy and security of both parties without leaking precise intersection data, reduces advertising costs, and improves cost-effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434046B_ABST
    Figure CN120434046B_ABST
Patent Text Reader

Abstract

The present invention discloses a data fuzzy intersection method based on privacy protection and an electronic device, comprising the following steps: a first party and a second party negotiate a value of a modulus k, respectively encrypt data sets A and B using secret keys pk1 and pk2 to obtain encrypted data sets FA1 and FB1, and send them to the other party; the first party and the second party respectively encrypt the encrypted data sets FB1 and FA1 using secret keys pk1 and pk2 to obtain encrypted data sets FB2 and FA2; the first party and the second party respectively perform a modulus operation on FB2 and FA2 with the modulus k to obtain a data set Q B , Q A , the first party takes the dataset Q B Send it to the second party, and the second party will send the data set Q A With dataset Q B An intersection operation is performed to obtain an intersection D, and data corresponding to the intersection D is found from the data set B to obtain a fuzzy intersection E. The present invention enables the fuzzy intersection result obtained by the second party to include both precise intersection data and non-intersection data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data intersection, and in particular to a data fuzzy intersection method based on privacy protection and an electronic device. Background Art

[0002] Private Set Intersection (PSI) is a specific application problem in the field of privacy computing, possessing both significant theoretical significance and strong practical application value. With the increasing demand for privacy protection of user data, PSI can maximize the privacy of personal information while ensuring the convenience of services that rely on it. PSI allows multiple parties holding their own private data sets to compute the intersection of their data without disclosing any information beyond the intersection.

[0003] Existing technology generally requires the first and second parties to input data to perform an intersection of privacy sets, with one party obtaining the intersection result. If the data used for the intersection is personal user data (for example, ID number, mobile phone number, etc.), the party obtaining the intersection result will know the personal user data of the other party, and will leak the other party's core user list.

[0004] At present, the intersection of two parties' private data is widely used when two commercial companies want to perform intersection operations on each other's customer lists in order to carry out corresponding business activities. For example, a sales company hopes to use a traffic platform to deliver advertisements to the sales company's users in order to activate dormant users. The existing technology is to let the sales company and the traffic platform perform private set intersection on their respective customer lists. The traffic platform obtains the intersection result and delivers advertisements, but this leaks the user data of the sales company. If the sales company does not want to leak its own user data, it can only let the traffic platform blindly deliver advertisements to all users, but the cost of such advertising is too high. Summary of the Invention

[0005] In order to solve the above technical problems, the present invention provides a data fuzzy intersection method and electronic device based on privacy protection, which ensures that the fuzzy intersection result obtained by the second party contains both precise intersection data and a certain proportion of non-intersection data, making it impossible for the second party to obtain precise intersection data, thereby protecting the privacy and security of the private data of both parties.

[0006] In order to solve the above problems, the present invention adopts the following technical solutions:

[0007] The present invention provides a data fuzzy intersection method based on privacy protection. A first party holds a data set A, and a second party holds a data set B, comprising the following steps:

[0008] S1: The first and second parties negotiate the value of the modulus k;

[0009] S2: The first party encrypts data set A with secret key pk1 to obtain encrypted data set FA1, and sends it to the second party. The second party encrypts encrypted data set FA1 with secret key pk2 to obtain encrypted data set FA2. The second party performs a modulus operation on each data in the encrypted data set FA2 with modulus k to obtain data set Q. A ;

[0010] The second party encrypts the data set B with the secret key pk2 to obtain the encrypted data set FB1 and sends it to the first party. The first party encrypts the encrypted data set FB1 with the secret key pk1 to obtain the encrypted data set FB2. The first party performs a modulus operation on each data in the encrypted data set FB2 with the modulus k to obtain the data set Q. B , and send it to the second party;

[0011] S3: The second party sends the dataset Q A With dataset Q B Perform the intersection operation to obtain the intersection D, find the data corresponding to the intersection D from the data set B, and obtain the fuzzy intersection E of the plaintext.

[0012] In this scheme, dataset A and dataset B are first encrypted by the first party and the second party respectively, so that neither party can obtain the other party's plaintext data. After that, the encrypted datasets FA2 and FB2 are modulo-operated with the modulus k to obtain the dataset Q. A , dataset Q B The data in the exact intersection of dataset A and dataset B will be in the intersection D after the modulo operation of modulus k, and the data that were originally not in the intersection of dataset A and dataset B may be in the intersection D after the modulo operation of modulus k. In this way, the fuzzy intersection E of the plaintext contains the exact intersection data and a certain proportion of non-intersection data, and the certain proportion of non-intersection data is located in dataset B, so that the privacy of private data of both parties is not leaked.

[0013] The first and second parties encrypt the data set to satisfy the following condition: Enc(pk2,Enc(pk1,x))=Enc(pk1,Enc(pk2,x)), where x is a constant, Enc(pk1,x) is the result of encrypting x using the secret key pk1, Enc(pk2,x) is the result of encrypting x using the secret key pk2, Enc(pk2,Enc(pk1,x)) is the result of encrypting Enc(pk1,x) using the secret key pk2, and Enc(pk1,Enc(pk2,x)) is the result of encrypting Enc(pk2,x) using the secret key pk1.

[0014] Preferably, step S1 includes the following steps:

[0015] S11: The second party, with the cooperation of the first party, uses a private set intersection algorithm that does not expose intermediate results to calculate the number of data in the intersection I of dataset A and dataset B;

[0016] S12: The second party calculates the value of the modulus k based on the number of data in the intersection I, the preset intersection coverage, the number of data in the data set A, and the number of data in the data set B, and sends the modulus k to the first party.

[0017] The first and second parties use a privacy set intersection algorithm that does not expose intermediate results to calculate the number of data in the intersection I of data sets A and B. The second party obtains the plaintext result of the number of data. During the calculation process, neither the first nor the second party can obtain the plaintext data in the intersection I.

[0018] Preferably, the calculation formula of the modulus k in step S12 is as follows:

[0019] ,

[0020] Where a is the number of data in dataset A, b is the number of data in dataset B, m is the number of data in intersection I, e is the intersection coverage, and round(.) is the rounding function.

[0021] Preferably, the encryption method adopted by the first party and the second party in step S2 satisfies the following formula:

[0022] Enc(pk2,Enc(pk1,x))=Enc(pk1,Enc(pk2,x)),

[0023] Where x is a constant, Enc(pk1,x) is the result of encrypting x using secret key pk1, Enc(pk2,x) is the result of encrypting x using secret key pk2, Enc(pk2,Enc(pk1,x)) is the result of encrypting Enc(pk1,x) using secret key pk2, and Enc(pk1,Enc(pk2,x)) is the result of encrypting Enc(pk2,x) using secret key pk1.

[0024] Preferably, step S2 includes the following steps:

[0025] S21: The first and second parties negotiate an elliptic curve E with shared parameters.

[0026] S22: The first party maps each data in the data set A to the elliptic curve E to obtain the mapped point set M A ;

[0027] The second party maps each data in the data set B to the elliptic curve E and obtains the mapped point set M B ;

[0028] S23: The first party uses the secret key pk1 and the point set M A Perform elliptic curve multiplication to obtain the encrypted data set FA1 and send it to the second party. The second party uses the secret key pk2 to perform elliptic curve multiplication on the encrypted data set FA1 to obtain the encrypted data set FA2. The second party performs a modulus operation on each data in the encrypted data set FA2 with the modulus k to obtain the data set Q A ;

[0029] The second party uses the secret key pk2 and the point set M B Perform elliptic curve multiplication to obtain the encrypted data set FB1 and send it to the first party. The first party uses the secret key pk1 to perform elliptic curve multiplication on the encrypted data set FB1 to obtain the encrypted data set FB2. The first party performs a modulus operation on each data in the encrypted data set FB2 with the modulus k to obtain the data set Q. B , and sent to the second party.

[0030] Preferably, in step S22, the first party uses a hash function to hash the data in data set A, and maps each data in data set A to the elliptic curve E; the second party uses the same hash function to hash the data in data set B, and maps each data in data set B to the elliptic curve E.

[0031] Preferably, the shared parameters of the elliptic curve E are a six-tuple , p' is a prime number, a' and b' are parameters, G' is the base point used to generate the subgroup, n' is the order of the subgroup, and h' is the auxiliary factor of the subgroup.

[0032] As an example, the method of finding data corresponding to the intersection D from the data set B in step S3 to obtain the fuzzy intersection E of the plain text includes the following steps: B Find the location of the data that is consistent with the data in the intersection D, and then find the data at the corresponding position in the data set B. These data constitute the fuzzy intersection E of the plaintext.

[0033] An electronic device of the present invention includes a memory and a processor. The memory stores executable code. When the executable code is executed by the processor, the above-mentioned data fuzzy intersection method based on privacy protection is executed.

[0034] A computer-readable storage medium of the present invention stores a computer program thereon, and when the computer program is executed by a processor, the method for fuzzy intersection of data based on privacy protection is implemented.

[0035] The beneficial effect of the present invention is that the fuzzy intersection result obtained by the second party contains both precise intersection data and a certain proportion of non-intersection data, and the non-intersection data is only located in data set B, so that the second party cannot obtain precise intersection data, thereby protecting the privacy and security of the private data of both parties. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a flow chart of an embodiment. DETAILED DESCRIPTION

[0037] The technical solution of the present invention will be further specifically described below through embodiments and in conjunction with the accompanying drawings.

[0038] Example 1: This example is a data fuzzy intersection method based on privacy protection. The first party holds a data set A, and the second party holds a data set B. Figure 1 As shown, the following steps are included:

[0039] S1: The first and second parties negotiate the value of the modulus k;

[0040] S2: The first party encrypts data set A with secret key pk1 to obtain encrypted data set FA1, and sends it to the second party. The second party encrypts encrypted data set FA1 with secret key pk2 to obtain encrypted data set FA2. The second party performs a modulus operation on each data in the encrypted data set FA2 with modulus k to obtain data set Q. A ;

[0041] The second party encrypts the data set B with the secret key pk2 to obtain the encrypted data set FB1 and sends it to the first party. The first party encrypts the encrypted data set FB1 with the secret key pk1 to obtain the encrypted data set FB2. The first party performs a modulus operation on each data in the encrypted data set FB2 with the modulus k to obtain the data set Q. B , and send it to the second party;

[0042] The encryption method used by the first and second parties satisfies the following formula:

[0043] Enc(pk2,Enc(pk1,x))=Enc(pk1,Enc(pk2,x)),

[0044] Where x is a constant, Enc(pk1,x) is the result of encrypting x using the secret key pk1, Enc(pk2,x) is the result of encrypting x using the secret key pk2, Enc(pk2,Enc(pk1,x)) is the result of encrypting Enc(pk1,x) using the secret key pk2, and Enc(pk1,Enc(pk2,x)) is the result of encrypting Enc(pk2,x) using the secret key pk1.

[0045] S3: The second party sends the dataset Q A With dataset Q B Perform the intersection operation to obtain the intersection D, find the data corresponding to the intersection D from the data set B, and obtain the fuzzy intersection E of the plaintext.

[0046] In step S3, the method of finding the data corresponding to the intersection D from the data set B and obtaining the fuzzy intersection E of the plain text is as follows: B Find the location of the data that is consistent with the data in the intersection D, and then find the data at the corresponding position in the data set B. These data constitute the fuzzy intersection E of the plaintext.

[0047] In this scheme, dataset A and dataset B are first encrypted by the first party and the second party respectively, so that neither party can obtain the other party's plaintext data. After that, the encrypted datasets FA2 and FB2 are modulo-operated with the modulus k to obtain the dataset Q. A , dataset Q B , the second party can only perform the modulo operation on the data set Q A , dataset Q B Perform an intersection operation. Since the data in the exact intersection of datasets A and B will be in intersection D after modulo k, and the data that was originally not in the intersection of datasets A and B may be in intersection D after modulo k, the plaintext fuzzy intersection E contains the exact intersection data and a certain proportion of non-intersection data, and the certain proportion of non-intersection data is located in dataset B. In this way, the private data of both parties is not leaked.

[0048] In step S2, after the first party receives the encrypted dataset FB1, it does not change the position of the data in the encrypted dataset FB1, but directly encrypts the encrypted dataset FB1 using the secret key pk1 to obtain the encrypted dataset FB2. Then, it performs a modulus operation on each data in the encrypted dataset FB2 with the modulus k to obtain the dataset Q. B , so the dataset Q B The data in dataset Q corresponds one to one with the data in dataset B. BDuplicate data can exist in the data set. For example, if the data set B = {Y1, Y2, Y3} is encrypted by the second party with the secret key pk2, the result is FB1 = {Enc(pk2, Y1), Enc(pk2, Y2), Enc(pk2, Y3)}. After the first party encrypts it with the secret key pk1, the result is FB2 = {Enc(pk1, Enc(pk2, Y1)), Enc(pk1, Enc(pk2, Y2)), Enc(pk1, Enc(pk2, Y3))}. After performing a modulus operation on the modulus k, the result is Q B ={f(Y1), f(Y2), f(Y3)}, f(Y1) corresponds to Y1, f(Y2) corresponds to Y2, and f(Y3) corresponds to Y3. So the second party is from the data set Q B After finding the position of the data that is consistent with the data in the intersection D, the data at the same position in data B can be determined, and these data constitute the fuzzy intersection E of the plaintext.

[0049] Step S2 includes the following steps:

[0050] S21: The first and second parties negotiate an elliptic curve E with shared parameters. The shared parameters are a six-tuple. , p' is a prime number, a' and b' are parameters, G' is the base point used to generate the subgroup, n' is the order of the subgroup, and h' is the auxiliary factor of the subgroup;

[0051] S22: The first party uses a hash function to hash the data in data set A, maps each data in data set A to the elliptic curve E, and obtains the mapped point set M A ;

[0052] The second party uses the same hash function to hash the data in data set B, maps each data in data set B to the elliptic curve E, and obtains the mapped point set M B ;

[0053] S23: The first party uses the secret key pk1 and the point set M A Perform elliptic curve multiplication to obtain the encrypted data set FA1 and send it to the second party. The second party uses the secret key pk2 to perform elliptic curve multiplication on the encrypted data set FA1 to obtain the encrypted data set FA2. The second party performs a modulus operation on each data in the encrypted data set FA2 with the modulus k to obtain the data set Q A ;

[0054] The second party uses the secret key pk2 and the point set M BPerform elliptic curve multiplication to obtain the encrypted data set FB1 and send it to the first party. The first party uses the secret key pk1 to perform elliptic curve multiplication on the encrypted data set FB1 to obtain the encrypted data set FB2. The first party performs a modulus operation on each data in the encrypted data set FB2 with the modulus k to obtain the data set Q. B , and sent to the second party.

[0055] The first and second parties encrypt the dataset using elliptic curve cryptography. Reverse multiplication on elliptic curves is difficult, thus protecting the data security of both parties. The data in the encrypted datasets FA2 and FB2 must be at least 32 bits. Both parties are computing terminals.

[0056] For example:

[0057] The first party holds dataset A, where A = {X1, X2, X3, X4, X5, X6, X7}. The second party holds dataset B, where B = {Y1, Y2, Y3, Y4, Y5, Y6, Y7}. The first and second parties agree on a modulus k of 100.

[0058] The first and second parties negotiate an elliptic curve E with shared parameters;

[0059] The first party uses a hash function to hash the data in dataset A, maps each data in dataset A to the elliptic curve E, and obtains the mapped point set M A , ;

[0060] The second party uses the same hash function to hash the data in data set B, maps each data in data set B to the elliptic curve E, and obtains the mapped point set M B , ;

[0061] The first party uses the secret key pk1 and the point set M A Perform elliptic curve multiplication to obtain the encrypted data set FA1 and send it to the second party. The second party uses the secret key pk2 to perform elliptic curve multiplication on the encrypted data set FA1 to obtain the encrypted data set FA2. The second party uses the secret key pk2 to perform elliptic curve multiplication on the point set M B Perform elliptic curve multiplication operation to obtain encrypted data set FB1, and send it to the first party. The first party uses the secret key pk1 to perform elliptic curve multiplication operation on the encrypted data set FB1 to obtain encrypted data set FB2.

[0062] Assume that the encrypted dataset FA2 = {100, 101, 102, 103, 105, 202, 205}, and the encrypted dataset FB2 = {200, 302, 102, 104, 106, 502, 413};

[0063] The second party performs a modulo operation on each data in the encrypted data set FA2 with respect to 100 to obtain the data set Q A , Q A ={00,01,02,03,05,02,05};

[0064] The first party performs a modulo operation on each data in the encrypted data set FB2 with respect to 100 to obtain the data set Q B , Q B ={00,02,02,04,06,02,13} and sent to the second party;

[0065] The second party takes the dataset Q A With dataset Q B Perform intersection operation to obtain the intersection D, D={00,02}, from the data set Q B The data positions that are consistent with the data in the intersection D are found to be 1, 2, 3, and 6, so as to find the data at the corresponding positions in the data set B and obtain the fuzzy intersection E of the plaintext, E={Y1, Y2, Y3, Y6}.

[0066] The exact intersection of the encrypted data set FA2 and the encrypted data set FB2 is 102, that is, the exact intersection of data set A and data set B is Y3, which is only 1 data, while the fuzzy intersection E obtained by this method has 4 data. These 4 data include both exact intersection data and a certain proportion of non-intersection data, and the non-intersection data is only located in data set B, so that the second party cannot obtain the exact intersection, protecting the data privacy of the first party. At the same time, the first party cannot obtain the plaintext data of the second party during the entire process, protecting the data privacy of the second party.

[0067] This method can be used in advertising delivery application scenarios. For example, the first party is the computing terminal of a sales company, and the second party is the computing terminal of a traffic platform. The sales company hopes to deliver advertisements to the sales company's users through the traffic platform to activate dormant users. However, the sales company does not want the traffic platform to obtain accurate intersection results of user data, such as ID card number, mobile phone number, etc. Instead, it wants to obtain a population package (i.e., fuzzy intersection). The population package contains the intersection content of the two parties and a certain proportion of non-intersection content, so that the traffic platform cannot accurately obtain which users are users of the sales company. The traffic platform then uses the population package for advertising delivery. Compared with blindly delivering advertisements to all users of the traffic platform, this solution is more cost-effective and protects the user information of the sales company.

[0068] An electronic device of this embodiment includes a memory and a processor. The memory stores executable code. When the executable code is executed by the processor, the above-mentioned data fuzzy intersection method based on privacy protection is performed.

[0069] A computer-readable storage medium of this embodiment stores a computer program thereon. When the computer program is executed by a processor, the above-mentioned data fuzzy intersection method based on privacy protection is implemented.

[0070] Example 2: This example is a data fuzzy intersection method based on privacy protection. It is different from Example 1 only in step S1, and the rest of the steps are the same.

[0071] Step S1 includes the following steps:

[0072] S11: With the cooperation of the first party, the second party uses a private set intersection algorithm that does not expose intermediate results to calculate the number of data in the intersection I of data set A and data set B.

[0073] The first and second parties use a privacy set intersection algorithm that does not expose intermediate results to calculate the number of data in the intersection I of data sets A and B. The second party obtains the plaintext result of the number of data. During the calculation process, neither the first nor the second party can obtain the plaintext data in the intersection I.

[0074] The specific steps of step S11 are as follows:

[0075] S111: The first party uses the Cuckoo Hash algorithm to assign each data item in the data set A to a storage location in the corresponding hash bucket of the Cuckoo Hash. The Cuckoo Hash has K hash buckets, each of which has only one storage location. The storage location that is not assigned to data is stored with a random number a1.

[0076] The second party uses a simple hash algorithm to assign each data point in the dataset B to the corresponding storage location in the corresponding hash bucket of the simple hash. The simple hash has K hash buckets, each hash bucket has d storage locations, and stores the random number b1 in the storage location that is not assigned to the data point.

[0077] S112: The first party and the second party cooperate to use the comparison protocol of the secret sharing algorithm to compare the data stored in each hash bucket of the cuckoo hash with the d data stored in the hash bucket with the same number of the simple hash. If the two data are different, the first party obtains a comparison result [enc(0)]0 and the second party obtains a comparison result [enc(0)]1; if the two data are the same, the first party obtains a comparison result [enc(1)]0 and the second party obtains a comparison result [enc(1)]1;

[0078] enc(0)= [enc(0)]0+[enc(0)]1,

[0079] enc(1)= [enc(1)]0+[enc(1)]1,

[0080] Where enc(0) represents the encrypted value obtained by encrypting the value 0 using the secret sharing algorithm, [enc(0)]0 represents the 0th fragment of enc(0), [enc(0)]1 represents the 1st fragment of enc(0), enc(1) represents the encrypted value obtained by encrypting the value 1 using the secret sharing algorithm, [enc(1)]0 represents the 0th fragment of enc(1), and [enc(1)]1 represents the 1st fragment of enc(1);

[0081] S113: The first party accumulates all the comparison results obtained by using the secret sharing algorithm to obtain an accumulated value [enc(F)]0. The second party accumulates all the comparison results obtained by using the secret sharing algorithm to obtain an accumulated value [enc(F)]1, where enc(F) represents an encrypted value obtained by encrypting the value F using the secret sharing algorithm, [enc(F)]0 represents the 0th fragment of enc(F), and [enc(F)]1 represents the 1st fragment of enc(F).

[0082] S114: The first party and the second party cooperate to use a secret sharing algorithm to decrypt the accumulated value [enc(F)]0 and the accumulated value [enc(F)]1 to obtain a value F. The value F is the value of the number m of data in the intersection I of the data set A and the data set B.

[0083] Both Cuckoo Hashing and Simple Hashing use the same H hash functions. K = max(a,b)*q, where a is the number of data in dataset A, b is the number of data in dataset B, and q is a coefficient greater than 1.

[0084] S12: The second party calculates the value of the modulus k based on the number of data in the intersection I, the preset intersection coverage, the number of data in the data set A, and the number of data in the data set B, and sends the modulus k to the first party.

[0085] The calculation formula of the modulus k in step S12 is as follows:

[0086] ,

[0087] Where a is the number of data in dataset A, b is the number of data in dataset B, m is the number of data in intersection I, e is the intersection coverage, and round(.) is the rounding function.

[0088] The calculation formula of the modulus k is obtained by the following method:

[0089] The data in the fuzzy intersection E consists of two parts: Part 1: the data belonging to the intersection I, and Part 2: the data belonging to AB, where AB represents the difference between datasets A and B. Due to the expected linear property, the number of data n in the fuzzy intersection E is equal to the sum of the expected contribution of Part 1 and the expected contribution of Part 2.

[0090] For part one:

[0091] Consider an element h∈A∩B=I, let v=Enc(h) mod k, Enc(h) represents the encrypted value of h, then the event Enc(h) mod k∈Q A ∩Q B Equivalent to event v∈Q A ∩Q B , because h∈A∩B, so h is in both data set A and data set B;

[0092] It can be obtained that: if h∈A, then v∈Q A ; If h∈B, then v∈Q B Therefore, for any h∈A∩B, its encrypted value modulo k v=Enc(h) mod k must also belong to Q A and Q B There are m such h in total (because the dataset Q A and dataset Q B The number of data in the intersection I of is m), so the number of contributions of this part to the expectation is m.

[0093] For part two:

[0094] Consider an element h∈AB, let v=Enc(h) mod k, because h∈AB, so h∈A but h does not belong to B, so v∈Q A , v∈Q B Must be contributed by other elements in dataset B;

[0095] Therefore the event Enc(h) mod k∈Q A ∩Q B Equivalent to v∈Q B . v∈Q B This means that there is at least one data in dataset B that is equal to v modulo k. There are b data in dataset B, and these b data are also independently uniformly distributed modulo k. Then the probability that a data in dataset B is equal to v modulo k is 1 / k, and the probability that it is not equal to v is 1-1 / k. Then the probability that there is no data in dataset B that is equal to v modulo k is (1-1 / k)^b, and the probability that there is a data in dataset B that is equal to v modulo k is 1-(1-1 / k)^b. That is, event v∈Q BThe probability of occurrence is 1-(1-1 / k)^b. There are am such values ​​in part 2, so the expectation is (am)*(1-(1-1 / k)^b).

[0096] In summary, the expected value of n is: n=m+(am)*(1-(1-1 / k)^b), and the intersection coverage e is: , thus obtaining .

[0097] This method can calculate the value of the modulus k based on the intersection coverage, and is applicable to situations where the number of data in datasets A and B is very large. For example, a financial institution hopes to use a traffic platform to deliver advertisements to its users in order to activate dormant users. Since the number of users of a financial institution is very large, generally in the order of hundreds of thousands or millions, this method can be used to calculate a suitable value for the modulus k. Assuming that the dataset A held by the financial institution as the first party has 1 million data, and the dataset B held by the traffic platform as the second party has 10 million data, the number of data in the precise intersection of the two parties is 100,000, and the financial institution hopes that the intersection coverage is 4, then the number of data in the fuzzy intersection E should be 400,000. This method can be used to calculate a suitable value for the modulus k, which is convenient for financial institutions to control advertising costs.

[0098] For example:

[0099] Taking the number of data a=150,000 in data set A, the number of data b=200,000 in data set B, the number of data m=80,000 in intersection I, and the preset intersection coverage e=1.5 as an example, the modulus k=236,045 is calculated, and 10 tests are performed using the method of this embodiment.

[0100] The process of each test is as follows:

[0101] Randomly generate datasets A and B, which meet the above conditions (i.e., dataset A contains 150,000 data points, dataset B contains 200,000 data points, and the intersection I of datasets A and B contains 80,000 data points). Use the method of this embodiment to perform fuzzy intersection and obtain fuzzy intersection E.

[0102] The average value of the number of data n in the fuzzy intersection E obtained from 10 tests is 119953.2, and the actual intersection coverage rate e=n / m=119953.2 / 80000=1.4994, which is only 0.04% different from the preset intersection coverage rate e=1.5.

[0103] An electronic device of this embodiment includes a memory and a processor. The memory stores executable code. When the executable code is executed by the processor, the above-mentioned data fuzzy intersection method based on privacy protection is performed.

[0104] A computer-readable storage medium of this embodiment stores a computer program, which, when executed by a processor, implements the above-mentioned data fuzzy intersection method based on privacy protection.

Claims

1. A data fuzzy intersection method based on privacy protection, wherein the first party holds a data set A and the second party holds a data set B, characterized in that: The following steps are involved: S1: The first and second parties negotiate the value of the modulus k; S2: The first party encrypts data set A with secret key pk1 to obtain encrypted data set FA1, and sends it to the second party. The second party encrypts encrypted data set FA1 with secret key pk2 to obtain encrypted data set FA2. The second party performs a modulus operation on each data in the encrypted data set FA2 with modulus k to obtain data set Q. A ; The second party encrypts the data set B with the secret key pk2 to obtain the encrypted data set FB1 and sends it to the first party. The first party encrypts the encrypted data set FB1 with the secret key pk1 to obtain the encrypted data set FB2. The first party performs a modulus operation on each data in the encrypted data set FB2 with the modulus k to obtain the data set Q. B , and send it to the second party; S3: The second party sends the dataset Q A With dataset Q B Perform the intersection operation to obtain the intersection D, find the data corresponding to the intersection D from the data set B, and obtain the fuzzy intersection E of the plaintext.

2. The data fuzzy intersection method based on privacy protection according to claim 1 is characterized in that: The step S1 comprises the following steps: S11: The second party, with the cooperation of the first party, uses a private set intersection algorithm that does not expose intermediate results to calculate the number of data in the intersection I of dataset A and dataset B; S12: The second party calculates the value of the modulus k based on the number of data in the intersection I, the preset intersection coverage, the number of data in the data set A, and the number of data in the data set B, and sends the modulus k to the first party.

3. The data fuzzy intersection method based on privacy protection according to claim 2 is characterized in that: The calculation formula of the modulus k in step S12 is as follows: , where a is the number of data in dataset A, b is the number of data in dataset B, m is the number of data in intersection I, e is the intersection coverage, and round(.) is the rounding function.

4. The data fuzzy intersection method based on privacy protection according to claim 1 is characterized in that: The encryption method used by the first party and the second party in step S2 satisfies the following formula: Enc(pk2,Enc(pk1,x))=Enc(pk1,Enc(pk2,x)), Where x is a constant, Enc(pk1,x) is the result of encrypting x using secret key pk1, Enc(pk2,x) is the result of encrypting x using secret key pk2, Enc(pk2,Enc(pk1,x)) is the result of encrypting Enc(pk1,x) using secret key pk2, and Enc(pk1,Enc(pk2,x)) is the result of encrypting Enc(pk2,x) using secret key pk1.

5. The data fuzzy intersection method based on privacy protection according to claim 1 is characterized in that: The step S2 comprises the following steps: S21: The first and second parties negotiate an elliptic curve E with shared parameters. S22: The first party maps each data in the data set A to the elliptic curve E to obtain the mapped point set M A ; The second party maps each data in the data set B to the elliptic curve E and obtains the mapped point set M B ; S23: The first party uses the secret key pk1 and the point set M A Perform elliptic curve multiplication to obtain the encrypted data set FA1 and send it to the second party. The second party uses the secret key pk2 to perform elliptic curve multiplication on the encrypted data set FA1 to obtain the encrypted data set FA2. The second party performs a modulus operation on each data in the encrypted data set FA2 with the modulus k to obtain the data set Q A ; The second party uses the secret key pk2 and the point set M B Perform elliptic curve multiplication to obtain the encrypted data set FB1 and send it to the first party. The first party uses the secret key pk1 to perform elliptic curve multiplication on the encrypted data set FB1 to obtain the encrypted data set FB2. The first party performs a modulus operation on each data in the encrypted data set FB2 with the modulus k to obtain the data set Q. B , and sent to the second party.

6. The data fuzzy intersection method based on privacy protection according to claim 5 is characterized in that: In step S22, the first party uses a hash function to hash the data in data set A, and maps each data in data set A to the elliptic curve E; the second party uses the same hash function to hash the data in data set B, and maps each data in data set B to the elliptic curve E.

7. The data fuzzy intersection method based on privacy protection according to claim 5 is characterized in that: The shared parameters of the elliptic curve E are six-tuples , p' is a prime number, a' and b' are parameters, G' is the base point used to generate the subgroup, n' is the order of the subgroup, and h' is the auxiliary factor of the subgroup.

8. The data fuzzy intersection method based on privacy protection according to claim 1 is characterized in that: The method of finding data corresponding to the intersection D from the data set B in step S3 to obtain the fuzzy intersection E of the plain text includes the following steps: B Find the location of the data that is consistent with the data in the intersection D, and then find the data at the corresponding position in the data set B. These data constitute the fuzzy intersection E of the plaintext.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores executable codes, and when the executable codes are executed by the processor, the method according to any one of claims 1 to 8 is executed.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Privacy-protected method, device and system for determining common data

    CN114611131A

  • Privacy intersection method and device

    CN115982768A