Privacy query method and system based on intersection of unbalanced privacy sets

By using secure hash function and hash bucketing technology in the non-balanced privacy set interception scenario, the pseudo-random function value is calculated, and efficient privacy query is solved, which solves the problem of difficult to apply to scenarios with large data changes and massive data in the existing technology, and improves query efficiency and applicability.

CN119293298BActive Publication Date: 2025-03-28YUNNAN PROVINCIAL BIG DATA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411814307.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-28
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

The existing privacy query method is difficult to apply to scenarios where data changes are large and data is massive, especially in the interception of unbalanced privacy sets. The calculation complexity and time complexity are high, making it difficult to reduce complexity.

Method used

The privacy query method based on the interception of non-balanced privacy sets is adopted, and the hash value of data keywords is calculated through the secure hash function, the data is mapped to the bucket using cuckoo hash and ordinary hash, and the pseudo-random function value is calculated to realize the privacy query of one- and multiple and batch query.

Benefits of technology

It improves the query efficiency of batch privacy query, solves the problem of efficient batch query in scenarios such as large data changes and massive data. It is suitable for one-check and batch query scenarios, and supports massive data query and frequent data changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293298B_ABST
    Figure CN119293298B_ABST
Patent Text Reader

Abstract

The present invention relates to a privacy query method and system based on the intersection of unbalanced privacy sets, and belongs to the field of privacy query. The present invention comprises: the first participant calculates the hash value of the keyword of the data to be queried based on the secure hash function, and sends the value of the specific bit to the second participant; the second participant calculates the hash value of the keyword of the data to be queried based on the secure hash function, and compares it with the hash value sent by the first participant to determine the target data set to be queried; the two parties respectively map and bucket the keywords of the data to be queried of both parties based on cuckoo hash and ordinary hash, and calculate the pseudo-random function values ​​of the keywords of the data of both parties; the second participant selects the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, and packages the first half of the pseudo-random function value and the encrypted data content to the first participant; the first participant determines the query content based on the comparison of the pseudo-random function values ​​of both parties. The present invention improves the query efficiency of existing batch privacy queries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a privacy query method and system for finding the intersection of unbalanced privacy sets, and belongs to the technical field of privacy query. Background Art

[0002] Privacy query is one of the most widely used technologies in privacy computing technology, and is widely used in government affairs query, social network, e-commerce shopping and other fields.

[0003] Unbalanced private set intersection is one of the private set intersection techniques, specifically referring to private set intersection in scenarios where the data sets of the participants have large differences in size. For example, in a scenario where two parties jointly model data alignment, one party holds 10,000 pieces of data and the other party holds 1 billion pieces of data. The data alignment of the two parties with orders of magnitude difference in data usually uses unbalanced private set intersection. When there is a large order of magnitude difference in the data held by the participants, the computational complexity and time complexity of using traditional private set intersection techniques often depend on the size of the maximum data combination, which is linearly related to the size of the large data set and will not decrease with the reduction of the amount of data on one side. In this context, unbalanced private set intersection techniques have been widely studied and used to solve the above problems and reduce the complexity of intersection in unbalanced scenarios.

[0004] Privacy query belongs to the privacy protection query technology and is one of the important privacy protection technologies at present. This technology can enable the query party to obtain the query results without disclosing the identity information and query information, and ensure that other non-query data is not leaked, protecting the privacy security of the non-query data in the queried party's data set. The main purpose of this technology is to protect user privacy and provide users with a safe and private information query and retrieval method. It has been widely used in joint risk control, query of dishonest persons subject to execution, privacy query of telecommunications blacklist personnel, and privacy query of criminal suspects by public security organs. There are currently multiple implementation paths for privacy query technology. From the query type, it can be divided into index-based privacy query and keyword-based privacy query. Index-based query can be implemented based on homomorphic encryption protocol and OT protocol, but this type of privacy query method is not suitable for scenarios where data changes frequently, and it is difficult to apply to scenarios with massive and frequent data updates. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the present invention provides a privacy query method and system based on the intersection of unbalanced privacy sets. The present invention solves the problem of secure intersection efficiency in scenarios where the data volume gap between the querying party and the data party is large, and solves the problem of protecting the privacy security of the querying party's queried data and the privacy security of the data party's non-query data. The present invention realizes a privacy query method for one-query-many and batch query, which can be applied to privacy query scenarios with massive data and frequent data updates.

[0006] The technical solution of the present invention is: a privacy query method based on the intersection of unbalanced privacy sets, the method comprising:

[0007] S1. The first party is the querying party, which calculates the hash value of the keyword of the data to be queried based on the secure hash function, selects the value of a specific bit of the hash value and sends it to the second party;

[0008] S2. The second party calculates the hash value of the data keyword based on the secure hash function, and compares it with the hash value sent by the first party to determine the target data set to be queried;

[0009] S3. The first party and the second party map the keywords of the data to be queried by both parties into buckets based on cuckoo hash and ordinary hash, respectively, and calculate the pseudo-random function values ​​of the keywords of the data of both parties;

[0010] S4. The second party selects the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, and packages the first half of the pseudo-random function value and the encrypted data content and sends it to the first party;

[0011] S5. The first participant determines the query content based on the comparison of the pseudo-random function values ​​of both parties.

[0012] Furthermore, in S1, the hash value of the keyword of the data to be queried is calculated based on the secure hash function, and the value of a specific bit of the hash value is selected and sent to the second participant, which specifically includes:

[0013] S11. The calculation of the hash value of the keyword of the data to be queried based on the secure hash function refers to selecting a hash function with anti-collision properties. Calculate the hash function value for the first participant's data keyword to be queried, where the first participant's data keyword to be queried is Indicates the number of keywords to be queried. The hash value calculated by the keyword is , The length is The hash sequence of

[0014] S12. The method of selecting a specific bit of the hash value and sending it to the second party refers to selecting a hash value of a keyword of the data to be queried according to a certain rule. In Bit ,satisfy , Indicates the first party Data Hash value No. Bit.

[0015] Furthermore, in S2, the second participant calculates the hash value of the data keyword based on the secure hash function, and compares it with the hash value sent by the first participant to determine the data set to be queried, specifically including:

[0016] S21. The second party calculates the hash value of the data keyword based on the secure hash function, which means that the second party selects a hash function with anti-collision properties like the first party. Calculate the keyword hash function value for the data held by the second party , where the second party holds a data set of , Indicates that the second party Keywords of the data, Indicates that the second party The data content, Indicates the number of data sets held by the second participant, ;

[0017] S22. The hash value sent by the first participant is compared with the corresponding position of the hash value holding the data keyword to filter out the data set to be queried, specifically including:

[0018] The second participant receives the first participant's Query data Hash value The first participant selects In Hash value , , and compare them in turn Are the hash values ​​equal? If the hash values ​​are equal, Add the target data set to be queried by the second participant Among them, Indicates that the second party Keywords of the data, Indicates that the second party The data content, Indicates the number of entries in the target data set to be queried by the second participant, ;

[0019] By placing the first party The data are related to the second party The above comparison is performed on the data to filter out the target data set to be queried by the second participant. .

[0020] Furthermore, the S3 specifically includes:

[0021] S31. The first participant maps the keywords of the data to be queried to the corresponding buckets based on cuckoo hashing, wherein the first participant selects a cuckoo hashing function, and , and , the data to be queried Map into buckets;

[0022] S32. The second participant maps the target data set to be queried in S2 to the corresponding bucket based on the ordinary hash function, wherein the second participant maps the target data set to be queried in S2 to the corresponding bucket based on the ordinary hash function. , and , the target data set to be queried by the second participant Chinese data keywords Mapping to 3 hash functions , and In the corresponding bucket, Indicates the use of hash functions The second party Keywords of the data Mapping to hash function In the corresponding bucket;

[0023] S33. Calculating the pseudo-random function value of the corresponding bucket position data of both parties based on the inadvertent pseudo-random function protocol, specifically including:

[0024] The first party inputs , the second party inputs Random numbers , the second party obtains Oblivious Pseudo-Random Function , the first participant obtains Pseudo-random function value of the keyword of the data to be queried ;

[0025] The second party is based on Oblivious Pseudo-Random Function Calculate the target data set to be queried by the second participant Chinese data keywords The value of the random pseudo-random function ,in , so that the second participant obtains the inadvertent pseudo-random function value of the keyword of the to-be-queried data corresponding to the bucket of the first participant.

[0026] Furthermore, the S4 specifically includes:

[0027] S41. The second participant selects the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, including:

[0028] The second participant selects the target data set to be queried by the second participant Chinese data keywords The value of the random pseudo-random function The second half of ,in , The length is , select the second half, that is, select The value of the random pseudo-random function , the first half is ,satisfy = ;

[0029] ‌ Indicates that the first half With the second half Stitch together;

[0030] The second half value is used as a symmetric encryption key to encrypt the data content corresponding to the data keyword, wherein As a secret key for symmetric encryption Encrypted Data Keywords Corresponding data content , get the encrypted ciphertext of the data content ;

[0031] S42. Packing the first half of the pseudo-random function value and the encrypted data content and sending them to the first participant means Packed and sent to the first participant, where , .

[0032] Furthermore, the S5 specifically includes:

[0033] S51. The first party determines to obtain the query content based on the comparison of the pseudo-random function values ​​of both parties, which means that the first party compares the pseudo-random function value of the first half of the data keyword sent by the second party with the pseudo-random function value of the first half of the data to be queried to determine whether the query matches, and if so, uses the pseudo-random function value of the second half of the data to be queried to decrypt the data content sent by the second party;

[0034] S52. The first party compares the pseudo-random function value of the first half of the data keyword sent by the second party with the pseudo-random function value of the first half of the data to be queried to determine whether the query matches, including:

[0035] The first participant selects Pseudo-random function value of the keyword of the data to be queried The first half of the pseudo-random function value ,in Indicates that the first participant Query data keywords The first half of the pseudo-random function value of the pseudo-random function value, length is ;

[0036] The first participant compares the pseudo-random function value of the first half of the data keyword sent by the second participant with the pseudo-random function value of the first half of the data to be queried, which means that the first participant Query data keywords The first half of the pseudo-random function value of , and the corresponding bucket sent by the second participant , and The pseudo-random function value of the keyword of the data to be queried is compared with For comparison, Representation and The data keyword to be queried of the second participant corresponding to the cuckoo hash bucket position, y p ⊆ [ y 1 ,⋯, y N 3 ] ;

[0037] The matching refers to comparing and Whether the elements at corresponding positions are equal, such as If all the position elements are equal, it means a match. If not If the elements at positions are equal, there is no match;

[0038] S53. If the match is made, the first participant uses the pseudo-random function value of the second half of the data to be queried to decrypt the data content sent by the second participant, wherein the use As the decryption key, decrypt , get the query keywords Corresponding query content ; Indicates the use As a secret key for symmetric encryption Encrypted Data Keywords Corresponding query content , the encrypted ciphertext of the data content obtained;

[0039] like and The corresponding position elements are equal, but the decryption Get content If it is a random number, it means the query failed and the query content does not exist.

[0040] The present invention also provides a privacy query system based on unbalanced privacy set intersection, comprising a module for executing the above-mentioned privacy query method based on unbalanced privacy set intersection.

[0041] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned privacy query method based on intersection of unbalanced privacy sets when executing the program.

[0042] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the privacy query method based on the intersection of unbalanced privacy sets is implemented.

[0043] The present invention also provides a computer program product, including a computer program, which implements the above-mentioned privacy query method based on unbalanced privacy set intersection when executed by a processor.

[0044] The beneficial effects of the present invention are: the present invention improves the query efficiency of existing batch privacy queries, and solves the problem that existing privacy query methods are difficult to apply to efficient batch queries in scenarios with large data changes and massive data; the method and system proposed in the present invention are applicable to two-party and multi-party scenarios, and to one-query-many and batch query scenarios, without loss of generality, and a two-party scenario is taken as an example in the method introduction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 It is a flow chart of a privacy query method based on intersection of unbalanced privacy sets provided by the present invention;

[0047] Figure 2 It is a module connection diagram of the privacy query system based on unbalanced privacy set intersection provided by the present invention;

[0048] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention.

[0049] Reference numerals:

[0050] 110: secure hash function calculation module; 120: determination module; 130: pseudo-random function calculation module; 140: data encryption module; 150: data comparison and query decryption module.

[0051] 310: processor; 320: communication interface; 330: memory; 340: communication bus. DETAILED DESCRIPTION

[0052] Example 1: Figure 1-Figure 3 As shown, a privacy query method based on unbalanced privacy set intersection includes:

[0053] S1. The first party is the querying party, which calculates the hash value of the keyword of the data to be queried based on the secure hash function, selects the value of a specific bit of the hash value and sends it to the second party;

[0054] Furthermore, in S1, the hash value of the keyword of the data to be queried is calculated based on the secure hash function, and the value of a specific bit of the hash value is selected and sent to the second participant, which specifically includes:

[0055] S11. The calculation of the hash value of the keyword of the data to be queried based on the secure hash function refers to selecting a hash function with anti-collision properties. Calculate the hash function value for the first participant's data keyword to be queried, where the first participant's data keyword to be queried is Indicates the number of keywords to be queried. The hash value calculated by the keyword is , The length is The hash sequence of

[0056] S12. The method of selecting a specific bit of the hash value and sending it to the second party refers to selecting a hash value of a keyword of the data to be queried according to a certain rule. In Bit ,satisfy , Indicates the first party Data Hash value No. Bit.

[0057] S2. The second party calculates the hash value of the data keyword based on the secure hash function, and compares it with the hash value sent by the first party to determine the target data set to be queried;

[0058] Furthermore, in S2, the second participant calculates the hash value of the data keyword based on the secure hash function, and compares it with the hash value sent by the first participant to determine the data set to be queried, specifically including:

[0059] S21. The second party calculates the hash value of the data keyword based on the secure hash function, which means that the second party selects a hash function with anti-collision properties like the first party. Calculate the keyword hash function value for the data held by the second party , where the second party holds a data set of , Indicates that the second party Keywords of the data, Indicates that the second party The data content, Indicates the number of data sets held by the second participant, ;

[0060] S22. The hash value sent by the first participant is compared with the corresponding position of the hash value holding the data keyword to filter out the data set to be queried, specifically including:

[0061] The second participant receives the first participant's Query data Hash value The first participant selects In Hash value , , and compare them in turn Are the hash values ​​equal? If the hash values ​​are equal, Add the target data set to be queried by the second participant Among them, Indicates that the second party Keywords of the data, Indicates that the second party The data content, Indicates the number of entries in the target data set to be queried by the second participant, ;

[0062] By placing the first party The data are related to the second party The above comparison is performed on the data to filter out the target data set to be queried by the second participant. .

[0063] S3. The first party and the second party map the keywords of the data to be queried by both parties into buckets based on cuckoo hash and ordinary hash, respectively, and calculate the pseudo-random function values ​​of the keywords of the data of both parties;

[0064] Furthermore, the S3 specifically includes:

[0065] S31. The first participant maps the keywords of the data to be queried to the corresponding buckets based on cuckoo hashing, wherein the first participant selects a cuckoo hashing function, and , and , the data to be queried Map into buckets;

[0066] S32. The second participant maps the target data set to be queried in S2 to the corresponding bucket based on the ordinary hash function, wherein the second participant maps the target data set to be queried in S2 to the corresponding bucket based on the ordinary hash function. , and , the target data set to be queried by the second participant Chinese data keywords Mapping to 3 hash functions , and In the corresponding bucket, Indicates the use of hash functions The second party Keywords of the data Mapping to hash function In the corresponding bucket;

[0067] S33. Calculating the pseudo-random function value of the corresponding bucket position data of both parties based on the inadvertent pseudo-random function protocol, specifically including:

[0068] The first party inputs , the second party inputs Random numbers , the second party obtains Oblivious Pseudo-Random Function , the first participant obtains Pseudo-random function value of the keyword of the data to be queried ;

[0069] The second party is based on Oblivious Pseudo-Random Function Calculate the target data set to be queried by the second participant Chinese data keywords The value of the random pseudo-random function ,in , so that the second participant obtains the inadvertent pseudo-random function value of the keyword of the to-be-queried data corresponding to the bucket of the first participant.

[0070] S4. The second party selects the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, and packages the first half of the pseudo-random function value and the encrypted data content and sends it to the first party;

[0071] Furthermore, the S4 specifically includes:

[0072] S41. The second participant selects the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, including:

[0073] The second participant selects the target data set to be queried by the second participant Chinese data keywords The value of the random pseudo-random function The second half of ,in , The length is , select the second half, that is, select The value of the random pseudo-random function , the first half is ,satisfy = ;

[0074] ‌ Indicates that the first half With the second half Stitch together;

[0075] The second half value is used as a symmetric encryption key to encrypt the data content corresponding to the data keyword, wherein As a secret key for symmetric encryption Encrypted Data Keywords Corresponding data content , get the encrypted ciphertext of the data content ;

[0076] S42. Packing the first half of the pseudo-random function value and the encrypted data content and sending them to the first participant means Packed and sent to the first participant, where , .

[0077] S5. The first participant determines the query content based on the comparison of the pseudo-random function values ​​of both parties.

[0078] Furthermore, the S5 specifically includes:

[0079] S51. The first party determines to obtain the query content based on the comparison of the pseudo-random function values ​​of both parties, which means that the first party compares the pseudo-random function value of the first half of the data keyword sent by the second party with the pseudo-random function value of the first half of the data to be queried to determine whether the query matches, and if so, uses the pseudo-random function value of the second half of the data to be queried to decrypt the data content sent by the second party;

[0080] S52. The first party compares the pseudo-random function value of the first half of the data keyword sent by the second party with the pseudo-random function value of the first half of the data to be queried to determine whether the query matches, including:

[0081] The first participant selects Pseudo-random function value of the keyword of the data to be queried The first half of the pseudo-random function value ,in Indicates that the first participant Query data keywords The first half of the pseudo-random function value of the pseudo-random function value, length is ;

[0082] The first participant compares the pseudo-random function value of the first half of the data keyword sent by the second participant with the pseudo-random function value of the first half of the data to be queried, which means that the first participant Query data keywords The first half of the pseudo-random function value of , and the corresponding bucket sent by the second participant , and The pseudo-random function value of the keyword of the data to be queried is compared with For comparison, Representation and The data keyword to be queried of the second participant corresponding to the cuckoo hash bucket position, y p ⊆ [ y 1 ,⋯, y N 3 ] ;

[0083] The matching refers to comparing and Whether the elements at corresponding positions are equal, such as If all the position elements are equal, it means a match. If not If the elements at positions are equal, there is no match;

[0084] S53. If the match is made, the first participant uses the pseudo-random function value of the second half of the data to be queried to decrypt the data content sent by the second participant, wherein the use As the decryption key, decrypt , get the query keywords Corresponding query content ; Indicates the use As a secret key for symmetric encryption Encrypted Data Keywords Corresponding query content , the encrypted ciphertext of the data content obtained;

[0085] like and The corresponding position elements are equal, but the decryption Get content If it is a random number, it means the query failed and the query content does not exist.

[0086] like Figure 2 As shown, the present invention also provides a privacy query system based on unbalanced privacy set intersection, including:

[0087] A secure hash function calculation module, for the first participant being the querying party, to calculate the hash value of the keyword of the data to be queried based on the secure hash function, and to select the value of a specific bit of the hash value and send it to the second participant;

[0088] A determination module, used for the second party to calculate the hash value of the data keyword based on a secure hash function, and compare it with the hash value sent by the first party to determine the target data set to be queried;

[0089] A pseudo-random function calculation module is used for the first party and the second party to map and bucket the keywords of the data to be queried by both parties based on cuckoo hash and ordinary hash respectively, and calculate the pseudo-random function values ​​of the keywords of the data of both parties;

[0090] A data encryption module, used for the second participant to select the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, and to package the first half of the pseudo-random function value and the encrypted data content and send them to the first participant;

[0091] The data comparison and query decryption module is used by the first participant to determine the query content based on the comparison of the pseudo-random function values ​​of both parties.

[0092] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned privacy query method based on intersection of unbalanced privacy sets when executing the program.

[0093] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the privacy query method based on the intersection of unbalanced privacy sets is implemented.

[0094] The present invention also provides a computer program product, including a computer program, which implements the above-mentioned privacy query method based on unbalanced privacy set intersection when executed by a processor.

[0095] In order to illustrate the effect of the present invention, a comparative experiment was conducted to verify the effect of the method of the present invention. The present invention makes comparative explanations from the following aspects. The present invention solves the problem that the existing privacy query method is difficult to apply to efficient batch query in scenarios with large data changes and massive data. The present invention supports one-check-multiple and batch query, and is suitable for massive data query and scenarios with frequent data changes.

[0096] Table 1: Comparison of privacy query methods

[0097] Query Method Security advantage shortcoming Query under plain text conditions Does not protect the data privacy of both parties Efficient Does not protect the data privacy of both parties Index-based privacy query Semi-honest security Efficient A large amount of offline calculations are required, and all data must be indexed. This is not suitable for scenarios where data changes frequently. Method of the present invention Semi-honest security Supports one-to-many query and batch query, suitable for massive data query and frequent data changes The query side only needs additional calculation

[0098] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

Claims

1. A privacy query method based on the intersection of unbalanced privacy sets, characterized by: The method comprises: S1. The first participant is the querying party, which calculates the hash value of the keyword of the data to be queried based on the secure hash function, selects the hash value and sends it to the second participant; S2. The second party calculates the hash value of the data keyword based on the secure hash function, and compares it with the hash value sent by the first party to determine the target data set to be queried; S3. The first party and the second party map and bucket the keywords of the data to be queried by both parties based on the cuckoo hash method and the ordinary hash method, and calculate the pseudo-random function values ​​of the keywords of the data of both parties; S4. The second party selects the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, and packages the first half of the pseudo-random function value and the encrypted data content and sends it to the first party; S5. The first party determines the query content based on the comparison of the pseudo-random function values ​​of both parties; The S5 specifically includes: S51. The first party determines to obtain the query content based on the comparison of the pseudo-random function values ​​of both parties, which means that the first party compares the pseudo-random function value of the first half of the data keyword sent by the second party with the pseudo-random function value of the first half of the data to be queried to determine whether the query matches, and if so, uses the pseudo-random function value of the second half of the data to be queried to decrypt the data content sent by the second party; S52. The first party compares the pseudo-random function value of the first half of the data keyword sent by the second party with the pseudo-random function value of the first half of the data to be queried to determine whether the query matches, including: The first participant selects Pseudo-random function value of the keyword of the data to be queried The first half of the pseudo-random function value ,in Indicates that the first participant Query data keywords The first half of the pseudo-random function value of the pseudo-random function value, length is ; The first participant compares the pseudo-random function value of the first half of the data keyword sent by the second participant with the pseudo-random function value of the first half of the data to be queried, which means that the first participant Query data keywords The first half of the pseudo-random function value of , and the corresponding bucket sent by the second participant , and The pseudo-random function value of the keyword of the data to be queried is compared with For comparison, Representation and The data keyword to be queried of the second participant corresponding to the cuckoo hash bucket position, ; The matching refers to comparing and Whether the elements at corresponding positions are equal, such as If all the position elements are equal, it means a match. If not If the elements at positions are equal, there is no match; S53. If the match is found, the first participant uses the pseudo-random function value of the second half of the data to be queried to decrypt the data content sent by the second participant, wherein the use As the decryption key, decrypt , get the query keywords Corresponding query content ; Indicates the use As a secret key for symmetric encryption Encrypted Data Keywords Corresponding query content , the encrypted ciphertext of the data content obtained; like and The corresponding position elements are equal, but the decryption Get content If it is a random number, it means the query failed and the query content does not exist.

2. The privacy query method based on unbalanced privacy set intersection according to claim 1, characterized in that: In S1, the hash value of the keyword of the data to be queried is calculated based on the secure hash function, and the hash value is selected and sent to the second participant, which specifically includes: S11. The calculation of the hash value of the keyword of the data to be queried based on the secure hash function refers to selecting a hash function with anti-collision properties. Calculate the hash function value for the first participant's data keyword to be queried, where the first participant's data keyword to be queried is Indicates the number of keywords to be queried. The hash value calculated by the keyword to be queried is , The length is The hash sequence of S12. The selection of hash values ​​to be sent to the second party refers to selecting the hash values ​​of the keywords of the data to be queried according to certain rules. In Bit ,satisfy , Indicates the first party Data Hash value No. Bit.

3. The privacy query method based on unbalanced privacy set intersection according to claim 1, characterized in that: In S2, the second participant calculates the hash value of the data keyword based on the secure hash function, and compares it with the hash value sent by the first participant to determine the data set to be queried, specifically including: S21. The second party calculates the hash value of the data keyword based on the secure hash function, which means that the second party selects a hash function with anti-collision properties like the first party. Calculate the keyword hash function value for the data held by the second party , where the second party holds a data set of , Indicates that the second party Keywords of the data, Indicates that the second party The data content, Indicates the number of data sets held by the second participant, ; S22. The hash value sent by the first participant is compared with the corresponding position of the hash value holding the data keyword to filter out the data set to be queried, specifically including: The second participant receives the first participant's Query data Hash value , the first participant selects In Hash value , , and compare them in turn Are the hash values ​​equal? If the hash values ​​are equal, Add the target data set to be queried by the second participant Among them, Indicates that the second party Keywords of the data, Indicates that the second party The data content, Indicates the number of entries in the target data set to be queried by the second participant, ; By placing the first party The data are related to the second party The above comparison is performed on the data to filter out the target data set to be queried by the second participant. .

4. The privacy query method based on unbalanced privacy set intersection according to claim 1, characterized in that: The S3 specifically includes: S31. The first participant maps the keywords of the data to be queried to the corresponding buckets based on the cuckoo hash method, wherein the first participant selects the cuckoo hash method, through the hash function , and , the data to be queried Map into buckets; S32. The second participant maps the target data set to be queried in S2 to the corresponding bucket based on a common hash method, wherein the second participant maps the target data set to be queried in S2 to the corresponding bucket based on a hash function. , and , the target data set to be queried by the second participant Chinese data keywords Mapping to 3 hash functions , and In the corresponding bucket, Indicates the use of hash functions The second party Keywords of the data Mapping to hash function In the corresponding bucket; S33. Calculating the pseudo-random function value of the corresponding bucket position data of both parties based on the inadvertent pseudo-random function protocol, specifically including: The first party inputs , the second party inputs Random numbers , the second party obtains Oblivious pseudo-random function , the first participant obtains Pseudo-random function value of the keyword of the data to be queried ; The second party is based on Oblivious pseudo-random function Calculate the target data set to be queried by the second participant Chinese data keywords The value of the random pseudo-random function ,in , so that the second participant obtains the inadvertent pseudo-random function value of the keyword of the to-be-queried data corresponding to the bucket of the first participant.

5. The privacy query method based on unbalanced privacy set intersection according to claim 1, characterized in that: The S4 specifically includes: S41. The second participant selects the second half of the pseudo-random function value of the data keyword to encrypt the corresponding data content, including: The second participant selects the target data set to be queried by the second participant Chinese data keywords The value of the random pseudo-random function The second half of ,in , The length is , select the second half, that is, select The value of the random pseudo-random function , the first half is ,satisfy = ; ‌ Indicates that the first half With the second half Stitch together; The second half value is used as a symmetric encryption key to encrypt the data content corresponding to the data keyword, wherein As a secret key for symmetric encryption Encrypted Data Keywords Corresponding data content , get the encrypted ciphertext of the data content ; S42. Packing the first half of the pseudo-random function value and the encrypted data content and sending them to the first participant means Packed and sent to the first participant, , .

6. A privacy query system based on the intersection of unbalanced privacy sets, characterized in that: include: A module for executing the privacy query method based on unbalanced privacy set intersection as described in any one of claims 1 to 5.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the privacy query method based on unbalanced privacy set intersection as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the privacy query method based on unbalanced privacy set intersection as described in any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the privacy query method based on unbalanced privacy set intersection as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Privacy set operation method and system based on fully homomorphic encryption

    CN115529118A

  • Batch privacy information acquisition method based on oblivious pseudo-random function and hash function

    CN116541868A