Information query method and device, equipment and storage medium
By combining the Bloom filter and the obfuscated Bloom filter with the oblivious transmission protocol, the problem of high computational complexity of private information retrieval in billions of data volumes in the existing technology is solved, and efficient data query and privacy protection are achieved.
Patent Information
- Application Number
- CN202410867246.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-29
AI Technical Summary
Existing privacy information retrieval technology has high computational complexity when the amount of server-side data reaches hundreds of millions, making it difficult to operate normally and unable to effectively protect the privacy of data query parties and data holders.
Bloom filters and obfuscated Bloom filters are combined with oblivious transmission protocols to determine the location of the data to be queried through hash function set negotiation, and through XOR secret sharing and public key encryption technology to achieve privacy protection and efficiency improvement for data queries.
When the amount of data on the server side reaches hundreds of millions, the computational complexity of the information query method is reduced, it can run normally, the efficiency of information query is improved, and the privacy of the data query party and the data holder is effectively protected.
Smart Images

Figure CN118869269A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication security technology, and in particular to an information query method, device, equipment and storage medium. Background Art
[0002] With the accelerated development of network equipment and computing equipment, the scale of communications has also expanded rapidly. The rapid expansion of the scale of communications has also increased the security risks in the communication process and the risk of privacy information leakage of all parties.
[0003] In recent years, in order to solve the above problems, Secure Multi-Party Computation (SMPC) has been proposed to solve the data security and privacy protection problems in multi-party communication scenarios. SMPC is a technology collection that includes a variety of basic data encryption technologies. For example, SMPC includes Private Information Retrival (PIR). The above PIR is a cryptographic technology used to protect the security of queries submitted by the client to the server in the data query scenario in the server / client mode, that is, the server is required to return the correct query information to the client but cannot know the query content of the client; most of the existing privacy information retrieval technologies are constructed based on technologies such as homomorphic encryption and obfuscated circuits, and these technologies have high computational complexity. When the amount of data on the server side reaches the billion-level data commonly seen in the industry, the corresponding privacy information retrieval is difficult to operate normally. Summary of the invention
[0004] The present application provides an information query method, apparatus, device and storage medium, which are applied to data providers and data query parties. When the query party queries data, the privacy of the data query party and the data holder can be protected. In addition, the information query method of the present application has low computational complexity. When the data volume on the server side reaches the billion-level data volume commonly seen in the industry, the information query can also run normally, thereby improving the efficiency of information query.
[0005] In a first aspect, the present application provides an information query method, which is applied to a data provider, comprising:
[0006] Receive a Bloom filter BF sent by a data query party, wherein the BF is used to determine the location information of the data to be queried according to the index of the data to be queried and a hash function set H; wherein the hash function set H is determined by negotiation between the data provider and the data query party;
[0007] Confused Bloom filter GBF constructed for data providers i According to the oblivious transfer protocol OT, the location information of the data to be queried is transmitted to the GBFi Match and determine the GBF i The corresponding data to be queried; among them, GBF i represents the i-th confused Bloom filter constructed by the data provider, the GBF i The location where the data to be queried is stored is determined according to the index of the data to be queried and the hash function set H;
[0008] Sending the data to be queried to the data querying party based on the OT protocol, so that the data querying party determines whether the data to be queried is correct information;
[0009] When it is determined that the query is unsuccessful according to the feedback from the data query party, the next GBF is generated according to the location information. i+1 Matching is performed until the query is determined to be successful.
[0010] In one or more possible embodiments, the data provider constructs the obfuscated Bloom filter GBF in the following manner:
[0011] Determine a maximum value M of the obfuscated Bloom filter GBF for storing data;
[0012] According to the data volume S of the data provider and the maximum value M of the GBF storage data, the data is divided into Group and construct GBF is used to store the data, where Indicates rounding up.
[0013] In one or more possible embodiments, the structure GBF is used to store the data, including:
[0014] For any group of data, determine the jth data of the ith group as (ID ij ,F ij ), where ID ij represents the index of the jth data of the i-th group, F ij Represents the data of the jth data in the i-th group. The value range of i is The value range of j is 1≤j≤M;
[0015] The F ij Divide it into k shares, namely F ij1 、F ij2 …F ijk ;
[0016] According to the k hash functions included in the hash function set H and the ID ijDetermine to put k shares into the i-th GBF i The corresponding position in ;
[0017] Until Insert all group data GBF, determine the structure GBF.
[0018] In one or more possible embodiments, the k hash functions included in the hash function set H and the ID ij Determine to put k shares into the i-th GBF i The corresponding positions in include:
[0019] According to the k hash functions included in the hash function set H and the ID ij Calculate H1(ID ij ),…,H k (ID ij ), used to characterize GBF i Position in
[0020] The ID ij And F ij1 、F ij2 …F ijk Combine to obtain k first data;
[0021] According to the H1(ID ij ),…,H k (ID ij ) represents the position, determine the k first data into GBF i The corresponding position in .
[0022] In one or more possible embodiments, the determination is to put k first data into GBF i The corresponding positions in include:
[0023] The k first data are encrypted with a public key to obtain k data to be queried, and the k data to be queried are placed in the i-th GBF i The corresponding position in , wherein the public key is generated by the data querying party through the key generation algorithm Gen.
[0024] In a second aspect, the present application provides an information query method, which is applied to a data query party, comprising:
[0025] Receive the index of the data to be queried sent by the user;
[0026] According to the index of the data to be queried and the hash function set H, a Bloom filter BF for determining the location information of the data to be queried is constructed and sent to the data provider; wherein the hash function set H is determined by negotiation between the data provider and the data query party;
[0027] Receiving the data to be queried sent by the data provider based on the oblivious transfer protocol OT, and determining whether the information query is successful according to whether the data to be queried contains the index corresponding to the data to be queried;
[0028] Feedback to the data provider whether the query is successful.
[0029] In one or more possible embodiments, constructing a Bloom filter BF according to the index of the data to be queried and a hash function set H includes:
[0030] Determine k pieces of location information corresponding to the information to be queried according to the index of the data to be queried and the k hash functions included in the hash function set H;
[0031] According to the k pieces of position information of the information to be queried, it is determined in the BF that the k positions corresponding to the k pieces of position information are inserted with a first fixed value, and the other positions are inserted with a second fixed value.
[0032] In one or more possible embodiments, the receiving the data to be queried sent by the data provider based on the oblivious transfer protocol OT, and determining whether the information query is successful according to whether the data to be queried contains an index corresponding to the data to be queried, includes:
[0033] Receiving the data to be queried sent by the data provider based on the oblivious transfer protocol OT, wherein the number of the data to be queried is k, which is obtained according to the first fixed value inserted into the k positions in the BF;
[0034] Decrypt the k data to be queried according to the private key to obtain k first data, and determine whether the k first data all contain the index corresponding to the data to be queried, wherein the private key is generated by the data query party through the key generation algorithm Gen;
[0035] If yes, it is determined that the information query is successful, and if no, it is determined that the information query is unsuccessful.
[0036] In one or more possible embodiments, after determining that the information query is successful, the method further includes:
[0037] The k first data are processed by a secret sharing XSS method based on XOR to obtain the data for successful query.
[0038] In a third aspect, the present application provides an information query device, which is applied to a data provider, comprising:
[0039] A BF receiving module, used to receive a Bloom filter BF sent by a data query party, wherein the BF is used to determine the location information of the data to be queried according to the index of the data to be queried and a hash function set H; wherein the hash function set H is determined by negotiation between the data provider and the data query party;
[0040] The module for acquiring the data to be queried is used to construct the obfuscated Bloom filter GBF for the data provider i According to the oblivious transfer protocol OT, the location information of the data to be queried is transmitted to the GBF i Match and determine the GBF i The corresponding data to be queried; among them, GBF i represents the i-th confused Bloom filter constructed by the data provider, the GBF i The location where the data to be queried is stored is determined according to the index of the data to be queried and the hash function set H;
[0041] A module for sending data to be queried, used for sending the data to be queried to the data query party based on the OT protocol, so that the data query party can determine whether the data to be queried is correct information;
[0042] The polling matching module is used to determine that the query is unsuccessful according to the feedback of the data query party, and then match the next GBF according to the location information. i+1 Matching is performed until the query is determined to be successful.
[0043] In a fourth aspect, the present application provides an information query device, which is applied to a data query party, including:
[0044] An index receiving module, used to receive the index of the data to be queried sent by the user;
[0045] A BF construction module is used to construct a Bloom filter BF for determining the location information of the data to be queried according to the index of the data to be queried and the hash function set H, and send it to the data provider; wherein the hash function set H is determined by the data provider and the data query party through consultation;
[0046] A to-be-queried data receiving module, used to receive the to-be-queried data sent by the data provider based on the oblivious transfer protocol OT, and determine whether the information query is successful according to whether the to-be-queried data contains the index corresponding to the to-be-queried data;
[0047] The result sending module is used to feedback to the data providing method whether the query is successful.
[0048] In a fifth aspect, the present application provides an information query device, the device comprising:
[0049] At least one processor; and a memory in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method as described in any one of the first aspect or the second aspect
[0050] In a sixth aspect, the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, wherein the computer program is used to cause a computer to execute the method as described in any one of the first aspect or the second aspect.
[0051] According to an information query method, device, equipment and storage medium provided by the present application, which are applied to data providers and data query parties, the privacy of data query parties and data holders can be protected when the query party queries data. In addition, the information query method of the present application has low computational complexity, and when the data volume on the server side reaches the billion-level data volume commonly seen in the industry, information query can also operate normally, thereby improving the efficiency of information query. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0053] Figure 1 A flowchart of an information query method applied to a data provider according to an embodiment;
[0054] Figure 2 is a schematic diagram of a Bloom filter BF provided according to an embodiment;
[0055] Figure 3 A schematic diagram of a confused Bloom filter GBF provided according to an embodiment;
[0056] Figure 4 A schematic diagram of a data grouping provided according to an embodiment;
[0057] Figure 5 A schematic diagram of storing data in a confused Bloom filter GBF provided according to an embodiment;
[0058] Figure 6 A flowchart of an information query method applied to a data query party provided according to an embodiment;
[0059] Figure 7A diagram of an information query device applied to a data provider according to an embodiment;
[0060] Figure 8 A diagram of an information query device applied to a data query party according to an embodiment;
[0061] Fig. 9 An information query device is provided according to an embodiment;
[0062] Fig.10 The present invention is a schematic diagram of a computer storage medium provided according to an embodiment. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0065] Furthermore, in the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0066] The following is an introduction to the professional terms involved in this application:
[0067] Bloom Filter (BF) is a data structure that encodes a set using several independently distributed hash functions H = {H1, H2, ..., H k},H i :{0,1} *→[L] maps each element in the set to a one-dimensional array of 0 and 1. The method of inserting elements is to use each hash function to operate on the inserted elements respectively, set the corresponding position of the hash value to 1, and set the empty position to 0 after all elements are inserted. In this way, a set can be stored in a Bloom filter structure. A BF is represented by BF(k,L,H), where k represents the number of hash functions, L represents the size of the Bloom filter, and H represents the set of solder functions.
[0068] Garbled Bloom Filter (GBF) is a BF variant based on XOR operation secret sharing technology. GBF is formally an array of strings. The length of each string in the array is λ, which is also recorded as the security parameter of GBF. By modifying the value of λ, a GBF that meets the corresponding security requirements can be obtained. A GBF is expressed as GBF(λ, k, L, H), where λ represents the string length, k represents the number of hash functions, L represents the size of the garbled Bloom filter, and H represents the set of hash functions.
[0069] XOR-based Secret Share (XSS) refers to dividing an element x into k shares based on XOR operation, that is,
[0070] Private Information Retrival (PIR) is a cryptographic technology used in server / client data query scenarios to protect the security of data queries submitted by clients to servers. That is, it requires the server to return correct query information to the client but cannot know the client's query content. In addition, PIR requires that the communication volume in the secret interaction between the server and the client should be less than the communication volume when the server directly sends the full ciphertext.
[0071] Public Key Encryption (PKE) is a cryptographic technology that uses the public and private keys of both parties to perform encryption and decryption operations to achieve confidential communication. A public key encryption algorithm PKE usually includes three basic algorithms: key generation algorithm Gen, public key encryption algorithm Enc and decryption algorithm Dec.
[0072] The Oblivious Transfer (OT) protocol is a privacy-protected two-party communication protocol. The privacy of the receiver is not known by the sender, so that the two parties can transmit messages in a choice-ambiguous way. This protocol allows the sender to send multiple messages to the receiver, and the receiver can selectively receive one of the messages, but the sender cannot determine which message the receiver has chosen, thereby protecting the receiver's privacy. At the same time, the receiver can only obtain the message he chooses and cannot obtain other messages, which provides confidentiality for the sender's message.
[0073] With the accelerated development of network equipment and computing equipment, the scale of communications has also expanded rapidly. The rapid expansion of the scale of communications has also increased the security risks in the communication process and the risk of privacy information leakage of all parties.
[0074] In recent years, in order to solve the above problems, Secure Multi-Party Computation (SMPC) has been proposed to solve the data security and privacy protection problems in multi-party communication scenarios. SMPC is a technology collection that includes a variety of basic data encryption technologies. For example, SMPC includes Private Information Retrival (PIR). The above PIR is a cryptographic technology used to protect the security of queries submitted by the client to the server in the data query scenario in the server / client mode, that is, the server is required to return the correct query information to the client but cannot know the query content of the client; most of the existing privacy information retrieval technologies are constructed based on technologies such as homomorphic encryption and obfuscated circuits, and these technologies have high computational complexity. When the amount of data on the server side reaches the billion-level data commonly seen in the industry, the corresponding privacy information retrieval is difficult to operate normally.
[0075] Based on the above problems, the present application provides an information query method, device, equipment and storage medium, which are applied to data providers and data query parties. When the query party queries data, the privacy of the data query party and the data holder can be protected. The information query method of the present application has low computational complexity, and the information query can also operate normally when the data volume on the server side reaches the billion-level data volume commonly seen in the industry.
[0076] Example 1
[0077] This application provides an information query method, which is applied to data providers, such as Figure 1 As shown, including:
[0078] Step 101, receiving a Bloom filter BF sent by a data query party, wherein the BF is used to determine the location information of the data to be queried according to the index of the data to be queried and a hash function set H; wherein the hash function set H is determined by negotiation between the data provider and the data query party;
[0079] In one or more possible embodiments, the data provider may be an operator, the data query party may be a financial institution, etc., and the Bloom filter BF is constructed by the data query party according to the index corresponding to the data to be queried and the hash function set H, such as Figure 2 As shown in FIG. 1 , it is a schematic diagram of the BF constructed by the data query party, which is used to determine the location information of the data to be queried, 1 indicates the location of the data to be queried, and 0 indicates that there is no data to be queried at this location; the above hash function set H is determined by the above data provider and the data query party through negotiation, H = {H1, H2, …, H k That is to say, the data provider and the data query party jointly negotiate k hash functions, and the k hash functions are independently distributed hash functions.
[0080] Step 102: Constructing a confusion bloom filter GBF for the data provider i According to the oblivious transfer protocol OT, the location information of the above-mentioned data to be queried is combined with the above-mentioned GBF i Match and determine the above GBF i The corresponding data to be queried; among them, GBF i represents the i-th confused Bloom filter constructed by the data provider. The above GBF i The location where the above-mentioned data to be queried is stored is determined according to the index of the above-mentioned data to be queried and the hash function set H;
[0081] In one or more possible embodiments, the data provider generates at least one obfuscated Bloom filter. i ,like Figure 3 As shown, the above confusion Bloom filter GBF i The data to be queried contained in is C1, C2, C3, C4, and the location information of the above-mentioned data to be queried is combined with the above-mentioned GBF according to the oblivious transfer protocol OT. i Match according to Figure 2 In the example, the data at the 3rd and 4th positions are 1, which indicates that the position of the data to be queried is in GBF. i The 3rd and 4th positions are also shown in the figure, that is, the data to be queried based on the above OT protocol matching are C2 and C3 respectively.
[0082] Step 103, sending the data to be queried to the data querying party based on the OT protocol, so that the data querying party can determine whether the data to be queried is correct information;
[0083] In one or more possible embodiments, after the data to be queried is determined based on the above-mentioned OT protocol, the above-mentioned data to be queried will be directly output to the above-mentioned data query party. After the above-mentioned data provider sends the data to be queried to the above-mentioned data query party based on the OT protocol, the data query party will determine whether the information is correct based on the content contained in the above-mentioned data to be queried.
[0084] Step 104: when it is determined that the query is unsuccessful according to the feedback from the data query party, the next GBF is searched according to the location information. i+1 Matching is performed until the query is determined to be successful.
[0085] In one or more possible embodiments, if the data querying party feedbacks that the query is unsuccessful, it means that the data to be queried is not the data required by the data querying party, and then the data provider will calculate the query result based on the BF of the data querying party and the next GBF. i+1 The matching is performed, and then the matched data to be queried is sent to the above-mentioned data query party until the above-mentioned data query party determines that the query is successful.
[0086] In one or more possible embodiments, the data provider constructs the obfuscated Bloom filter GBF in the following manner:
[0087] Determine the maximum value M of the data stored in the obfuscated Bloom filter GBF; divide the data into Group and construct GBF is used to store the above data, among which, Indicates rounding up; for example, the maximum value M of the data stored in the above GBF is 9, and the data volume S of the above data provider is 500, then it is necessary to divide the data into 56 groups and construct 56 GBFs to store 500 data.
[0088] In one or more possible embodiments, the above structure GBF is used to store the above data, including:
[0089] For any group of data, determine the jth data of the ith group as (ID ij ,F ij ), where ID ij represents the index of the jth data of the i-th group, F ij Represents the data of the jth data in the i-th group. The value range of i is The value range of j is 1≤j≤M; for example, the first data of the first group is (ID 11 ,F 11 ), the second data of the first group is (ID 12 ,F 12 ), if the maximum value M of the constructed GBF storage data is 9, and the data volume S of the above data provider is 500, then That is, 1≤i≤56, 1≤j≤9; Figure 4 As shown, it is a schematic diagram of data provider grouping data, including 3 groups of data.
[0090] The above F is converted into ij Divide it into k shares, namely F ij1 、F ij2 …F ijk ; For example, k = 2, the first data of the first group is split using the secret sharing XSS method based on XOR, Get 2 shares, namely F 111 and F 112 .
[0091] According to the k hash functions contained in the above hash function set H and the above ID ij Determine to put k shares into the i-th GBF i The above hash function set H is determined by the above data provider and the data query party through consultation, H = {H1, H2, ..., H k}, including k hash functions in total. For example, when k is 2, it means there are two hash functions, H1 and H2. Calculate H1(ID ij )=3,H2(ID ij )=5, which means that the two shares F ij1 and F ij2 Put them into GBF i The third and fifth positions.
[0092] Until Insert all group data GBF, determine the structure GBF.
[0093] In one or more possible embodiments, the k hash functions included in the hash function set H and the ID ij Determine to put k shares into the i-th GBF i The corresponding positions in include:
[0094] According to the k hash functions contained in the above hash function set H and the above IDij Calculate H1(ID ij ),…,H k (ID ij ), used to characterize GBF i Position in; the above ID ij And F ij1 、F ij2 …F ijk Combine to obtain k first data; according to the above H1(ID ij ),…,H k (ID ij ) represents the position, determine the k first data into GBF i The corresponding position in GBF; wherein the above determination places k first data into GBF i The corresponding position in the ith GBF includes: encrypting the k first data with a public key to obtain the k data to be queried, and placing the k data to be queried into the ith GBF i The corresponding position in , wherein the public key is generated by the data querying party through the key generation algorithm Gen.
[0095] In one or more possible embodiments, according to the k hash functions included in the above hash function set H and the above ID ij Calculate H1(ID ij ),…,H k (ID ij ), used to characterize GBF i Then, set the ID ij And F ij1 、F ij2 …F ijk Combine them to get k first data, and perform public key pk on the k first data c Encryption, get k of the above query data; that is, the first H1 (ID ij ) position has the value Enc(ID ij , F ij1 ,pk c )=C ij1 、H k (ID ij ) position has the value Enc(ID ij , F ijk ,pk c )=C ijk , where Enc represents the public key encryption algorithm, such as Figure 5 As shown, GBF i Schematic diagram of the data to be queried stored in .
[0096] In one or more possible embodiments, an information query method is applied to a data provider, and the complete process is as follows:
[0097] First, the data provider constructs a preset number of obfuscated Bloom filters, including:
[0098] The data provider and the data query party negotiate k commonly used hash functions H = {H1, H2, ..., H k}, the data provider and the data query party negotiate a common public key encryption algorithm PKE = (Gen, Enc, Dec). The data provider initializes the obfuscated Bloom filter GBF (λ, k, L, H) locally, where λ represents the string length, k represents the number of hash functions jointly negotiated by the data provider and the data query party, L represents the size of the obfuscated Bloom filter, and H represents the set of hash functions jointly negotiated by the data provider and the data query party. And the data query party generates a pair of its own public and private keys through the key generation algorithm Gen of the public key encryption algorithm PKE, denoted as (pk c ,sk c ), public key pk c Public, private key sk c Keep it secret and use it for the encryption step in the following process. Now the preparation is complete.
[0099] The data provider groups all the data in the database. The data is represented as (ID, F), where ID represents the index of data F and F represents the data itself. For example, when searching for information, you need to use a mobile phone number to search for the ID number corresponding to the mobile phone number. Then the mobile phone number is the index of the corresponding ID number. Here, ID represents the mobile phone number and F represents the corresponding ID number. There are S pieces of data in the database. For example, a confused Bloom filter can store at most M pieces of data. The data provider groups all the data into (round up) group, which means that we need to generate A confused Bloom filter is used to store all data, and the size L of the confused Bloom filter should be greater than kM to avoid collision when data is stored in the confused Bloom filter.
[0100] The data provider generates a confusion Bloom filter for each data group, generating a total of Confused Bloom filters, denoted as Therefore, the jth data of the i-th group can be expressed as The jth data (ID ij ,F ij ) to calculate the shared share, that is to say For example, for the second data of the first group, k is 2, and the shares obtained are F121 and F 122 ; After determining the data share, the index part ID of the jth data of the i-th group ij Calculate the hash value and get H1(ID ij ),…,H k (ID ij ), the above H1(ID ij ),…,H k (ID ij ) means GBF i H1(ID ij ),…,H k (ID ij ) bit, for example, H1(ID ij )=3 means GBF i 3rd position.
[0101] Then the shared shares are encrypted according to the public key encryption algorithm PKE and stored in the corresponding location, for example, the obfuscated Bloom filter GBF i H1(ID ij ) position has the value Enc(ID ij ,F ij1 ,pk c ), and so on, until all data are inserted into the obfuscated Bloom filter. If there are still empty positions in the obfuscated Bloom filter, they will be filled with 0. At this point, the data provider generates A confused Bloom filter is used to store S pieces of data in the database.
[0102] When it is determined that the data query party needs to query data, the data provider receives the Bloom filter BF sent by the data query party, and then matches the Bloom filter BF with the obfuscated Bloom filter in turn. The matching process adopts the OT protocol. After each match, the obfuscated Bloom filter GBF i The corresponding data to be queried is sent to the data querying party so that the data querying party can determine whether the data to be queried is correct information.
[0103] Example 2
[0104] This application provides an information query method, which is applied to data query parties, such as Figure 6 As shown, including:
[0105] Step 601, receiving the index of the data to be queried sent by the user;
[0106] In one or more possible embodiments, the data query party receives the index of the data to be queried input by the user. For example, if the user wants to obtain the ID number corresponding to a mobile phone number based on the mobile phone number, then the mobile phone number is the index of the ID number.
[0107] Step 602: construct a Bloom filter BF for determining the location information of the data to be queried based on the index of the data to be queried and the hash function set H, and send it to the data provider; wherein the hash function set H is determined by negotiation between the data provider and the data query party;
[0108] In one or more possible embodiments, the above hash function set H is determined by the above data provider and the data query party through consultation, where H = {H1, H2, ..., H k That is to say, the data provider and the data query party jointly negotiate k hash functions, the k hash functions are independently distributed hash functions, the Bloom filter BF is constructed by the data query party according to the index corresponding to the data to be queried and the hash function set H, and the k position information corresponding to the information to be queried is determined according to the index of the data to be queried and the k hash functions included in the hash function set H; according to the k position information of the information to be queried, it is determined in the BF to insert the first fixed value into the k positions corresponding to the k position information, and to insert the second fixed value into other positions; Figure 2 As shown, it is a schematic diagram of the BF constructed by the data query party, which is used to determine the location information of the data to be queried. The above-mentioned first fixed value is 1, which indicates the location of the data to be queried, and the second fixed value is 0, which indicates that there is no data to be queried at this location, and the determined Bloom filter BF is sent to the data provider.
[0109] Step 603, receiving the data to be queried sent by the data provider based on the oblivious transfer protocol OT, and determining whether the information query is successful according to whether the data to be queried contains the index corresponding to the data to be queried;
[0110] In one or more possible embodiments, the data to be queried sent by the data provider based on the oblivious transfer protocol OT is received, wherein the number of the data to be queried is k, which is obtained according to the first fixed value inserted into the k positions in the BF; the k data to be queried are decrypted according to the private key to obtain k first data, and it is determined whether the k first data all contain the index corresponding to the data to be queried, wherein the private key is generated by the data query party through the key generation algorithm Gen; if so, it is determined that the information query is successful, if not, it is determined that the information query is unsuccessful; for example, the index entered by the user is a mobile phone number, and the information to be queried is an ID number. If the k first data all contain the mobile phone number entered by the user, it means that the information query is successful, and if there is a first data that does not contain the mobile phone number entered by the user, it is determined that the information query is unsuccessful.
[0111] Step 604: Feedback to the data providing method whether the query is successful.
[0112] In one or more possible embodiments, after determining that the information query is successful, the query result is sent to the data provider, and then the data query party processes the k first data using a secret sharing XSS method based on XOR to obtain the query successful data; if it is determined that the information query is unsuccessful, it is necessary to send the query result to the data provider, and then the data provider processes the next GBF according to the location information, that is, BF. i+1 Matching is performed until the query is determined to be successful.
[0113] In one or more possible embodiments, similarly, an information query method is applied to a data query party, and the complete process is as follows:
[0114] First, the data provider and the data query party negotiate k commonly used hash functions H = {H1, H2, ..., H k}, the data query party generates a Bloom filter BF for the data to be queried. For example, when querying information, you need to use the mobile phone number to query the ID card number corresponding to the mobile phone number. Then the mobile phone number is the index of the corresponding ID card number. Then the user needs to enter the mobile phone number. The data query party generates a Bloom filter BF based on the mobile phone number and k commonly used hash functions H={H1,H2,…,H k}Determine the storage value corresponding to each position in BF; according to ID j Calculate k hash functions, namely H1(ID j ),…,H k (ID j ), these k calculation results are used as the H1(ID j ),…,H k (ID j) bits, and then assign values to these k positions, assigning the corresponding positions to 1; for example, H1(ID j )=2, fill the second position in BF with 1, H k (ID j )=5, fill the fifth position in BF with 1 until all elements to be queried are mapped to the Bloom filter BF. If there are still empty positions in the Bloom filter, fill them with 0, such as Figure 2 As shown, this is a schematic diagram of the final generated BF.
[0115] After determining that the data query party generates a Bloom filter BF, the above BF is sent to the data provider. i The data to be queried is obtained, and the data to be queried includes Enc(ID ij ,F ij1 ,pk c )…Enc(ID ij ,F ijk ,pk c ), that is, the above F ij Divided into several shares, there will be several pieces of data to be queried. The data provider sends the data to be queried to the data query party, and the data query party uses the private key sk c Decrypt the data to be queried and compare the ID contained in the decrypted data to be queried ij Is the index the same as the one entered by the user? If so, the decrypted F ij1 …F ijk Process and obtain the final data to be queried; if they are not the same, send a continue query instruction to the data provider to continue to compare BF with the next GBF. i+1 Match and obtain the corresponding data to be queried until the ID contained in the decrypted data to be queried is ij The same index as the user input, the decrypted F is obtained according to the XSS method ij1 …F ijk Process and obtain the final data to be queried.
[0116] Example 3
[0117] The present application provides an information query device, which is applied to a data provider, such as Figure 7 As shown, including:
[0118] The BF receiving module 701 is used to receive the Bloom filter BF sent by the data query party, and the above BF is used to determine the location information of the data to be queried according to the index of the above data to be queried and the hash function set H; wherein the above hash function set H is determined by the above data provider and the data query party through consultation;
[0119] The module 702 for obtaining the data to be queried is used to construct a confusion Bloom filter GBF for the data provider. i According to the oblivious transfer protocol OT, the location information of the above-mentioned data to be queried is combined with the above-mentioned GBF i Match and determine the above GBF i The corresponding data to be queried; among them, GBF i represents the i-th confused Bloom filter constructed by the data provider. The above GBF i The location where the above-mentioned data to be queried is stored is determined according to the index of the above-mentioned data to be queried and the hash function set H;
[0120] The to-be-queried data sending module 703 is used to send the to-be-queried data to the data querying party based on the OT protocol, so that the data querying party can determine whether the to-be-queried data is correct information;
[0121] The polling matching module 704 is used to determine that the query is unsuccessful according to the feedback from the data query party, and then match the next GBF according to the location information. i+1 Matching is performed until the query is determined to be successful.
[0122] Example 4
[0123] The present application provides an information query device, which is applied to data query parties, such as Figure 8 As shown, including:
[0124] The index receiving module 801 is used to receive the index of the data to be queried sent by the user;
[0125] The BF construction module 802 is used to construct a Bloom filter BF for determining the location information of the data to be queried according to the index of the data to be queried and the hash function set H, and send it to the data provider; wherein the hash function set H is determined by the data provider and the data query party through consultation;
[0126] The to-be-queried data receiving module 803 is used to receive the to-be-queried data sent by the data provider based on the oblivious transfer protocol OT, and determine whether the information query is successful according to whether the to-be-queried data contains the index corresponding to the to-be-queried data;
[0127] The result sending module 804 is used to feed back to the data providing method whether the information query is successful.
[0128] Example 5
[0129] The present application provides an information query device, the device comprising:
[0130] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the information query method provided in the above-mentioned embodiment 1 or embodiment 2.
[0131] like Fig. 9 As shown, the device includes a processor 901, a memory 902, a communication interface 903 and a bus 904. The processor 901, the memory 902 and the communication interface 903 are connected to each other via the bus 904.
[0132] The processor 901 is used to read and execute instructions in the memory 902, so that at least one processor can execute the information query method provided in the above-mentioned embodiment 1 or embodiment 2.
[0133] The memory 902 is used to store various instructions and programs of the information query method provided in the above-mentioned embodiment 1 or embodiment 2.
[0134] The bus 904 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0135] The processor 901 may be a central processing unit (CPU), a network processor (NP), a graphic processing unit (GPU), or any combination of CPU, NP, and GPU. It may also be a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0136] Example 6
[0137] The present application also provides a computer-readable storage medium, such as Fig.10 As shown, the computer storage medium stores a computer program, and the computer program is used to enable a computer to execute any one of the methods in the above embodiments.
[0138] The memory may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1001 and / or a cache memory 1002 , and may further include a read-only memory (ROM) 1003 .
[0139] The memory may also include a program / utility 1005 having a set (at least one) of program modules 1004, such program modules 1004 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0140] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0141] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0144] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An information query method, characterized in that: Applicable to data providers, including: Receive a Bloom filter BF sent by a data query party, wherein the BF is used to determine the location information of the data to be queried according to the index of the data to be queried and a hash function set H; wherein the hash function set H is determined by negotiation between the data provider and the data query party; Confused Bloom filter GBF constructed for data providers i According to the oblivious transfer protocol OT, the location information of the data to be queried is transmitted to the GBF i Match and determine the GBF i The corresponding data to be queried; among them, GBF i represents the i-th confused Bloom filter constructed by the data provider, the GBF i The location where the data to be queried is stored is determined according to the index of the data to be queried and the hash function set H; Sending the data to be queried to the data querying party based on the OT protocol, so that the data querying party determines whether the data to be queried is correct information; When it is determined that the query is unsuccessful according to the feedback from the data query party, the next GBF is generated according to the location information. i+1 Matching is performed until the query is determined to be successful.
2. The method according to claim 1, characterized in that: The data provider constructs the obfuscated Bloom filter GBF in the following manner: Determine a maximum value M of the obfuscated Bloom filter GBF for storing data; According to the data volume S of the data provider and the maximum value M of the GBF storage data, the data is divided into Group and construct GBF is used to store the data, where Indicates rounding up.
3. The method according to claim 2, characterized in that The construction GBF is used to store the data, including: For any group of data, determine the jth data of the ith group as (ID ij ,F ij ), where ID ij represents the index of the jth data of the i-th group, F ij Represents the data of the jth data in the i-th group. The value range of i is The value range of j is 1≤j≤M; The F ij Divide it into k shares, namely F ij1 、F ij2 …F ijk ; According to the k hash functions included in the hash function set H and the ID ij Determine to put k shares into the i-th GBF i The corresponding position in ; Until Insert all group data GBF, determine the structure GBF.
4. The method according to claim 3, characterized in that The k hash functions included in the hash function set H and the ID ij Determine to put k shares into the i-th GBF i The corresponding positions in include: According to the k hash functions included in the hash function set H and the ID ij Calculate H1(ID ij ),…,H k (ID ij ), used to characterize GBF i Position in The ID ij And F ij1 、F ij2 …F ijk Combine to obtain k first data; According to the H1(ID ij ),…,H k (ID ij ) represents the position, determine the k first data into GBF i The corresponding position in .
5. The method according to claim 4, characterized in that The k first data are placed in GBF i The corresponding positions in include: The k first data are encrypted with a public key to obtain k data to be queried, and the k data to be queried are placed in the i-th GBF i The corresponding position in , wherein the public key is generated by the data querying party through the key generation algorithm Gen.
6. An information query method, characterized in that: Applicable to data query parties, including: Receive the index of the data to be queried sent by the user; According to the index of the data to be queried and the hash function set H, a Bloom filter BF for determining the location information of the data to be queried is constructed and sent to the data provider; wherein the hash function set H is determined by negotiation between the data provider and the data query party; Receiving the data to be queried sent by the data provider based on the oblivious transfer protocol OT, and determining whether the information query is successful according to whether the data to be queried contains the index corresponding to the data to be queried; Feedback to the data provider whether the query is successful.
7. The method according to claim 6, characterized in that The constructing a Bloom filter BF according to the index of the data to be queried and a hash function set H includes: Determine k pieces of location information corresponding to the information to be queried according to the index of the data to be queried and the k hash functions included in the hash function set H; According to the k pieces of position information of the information to be queried, it is determined in the BF that the k positions corresponding to the k pieces of position information are inserted with a first fixed value, and the other positions are inserted with a second fixed value.
8. The method according to claim 7, characterized in that The receiving the data to be queried sent by the data provider based on the oblivious transfer protocol OT, and determining whether the information query is successful according to whether the data to be queried contains an index corresponding to the data to be queried, includes: Receiving the data to be queried sent by the data provider based on the oblivious transfer protocol OT, wherein the number of the data to be queried is k, which is obtained according to the first fixed value inserted into the k positions in the BF; Decrypt the k data to be queried according to the private key to obtain k first data, and determine whether the k first data all contain the index corresponding to the data to be queried, wherein the private key is generated by the data query party through the key generation algorithm Gen; If yes, it is determined that the information query is successful, and if no, it is determined that the information query is unsuccessful.
9. The method according to claim 8, characterized in that After the information query is determined to be successful, the method further includes: The k first data are processed by a secret sharing XSS method based on XOR to obtain the data for successful query.
10. An information query device, characterized in that: Applicable to data providers, including: A BF receiving module, used to receive a Bloom filter BF sent by a data query party, wherein the BF is used to determine the location information of the data to be queried according to the index of the data to be queried and a hash function set H; wherein the hash function set H is determined by negotiation between the data provider and the data query party; The module for acquiring the data to be queried is used to construct the obfuscated Bloom filter GBF for the data provider i According to the oblivious transfer protocol OT, the location information of the data to be queried is transmitted to the GBF i Match and determine the GBF i The corresponding data to be queried; among them, GBF i represents the i-th confused Bloom filter constructed by the data provider, the GBF i The location where the data to be queried is stored is determined according to the index of the data to be queried and the hash function set H; A module for sending data to be queried, used for sending the data to be queried to the data query party based on the OT protocol, so that the data query party can determine whether the data to be queried is correct information; The polling matching module is used to determine that the query is unsuccessful according to the feedback of the data query party, and then match the next GBF according to the location information. i+1 Matching is performed until the query is determined to be successful.
11. An information query device, characterized in that: Applicable to data query parties, including: An index receiving module, used to receive the index of the data to be queried sent by the user; A BF construction module is used to construct a Bloom filter BF for determining the location information of the data to be queried according to the index of the data to be queried and the hash function set H, and send it to the data provider; wherein the hash function set H is determined by the data provider and the data query party through consultation; A to-be-queried data receiving module, used to receive the to-be-queried data sent by the data provider based on the oblivious transfer protocol OT, and determine whether the information query is successful according to whether the to-be-queried data contains the index corresponding to the to-be-queried data; The result sending module is used to feedback to the data providing method whether the query is successful.
12. An information query device, characterized in that: The device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute a method as claimed in any one of claims 1-5 or 6-9.
13. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and the computer program is used to make a computer execute the method according to any one of claims 1-5 or 6-9.
