Anonymous query method and device

By selecting obfuscated columns in the data query method and generating an anonymous query request, the problems of low efficiency and insufficient data privacy in the existing technology are solved, and an efficient and secure data query process is realized.

CN114860735BActive Publication Date: 2025-04-11BEIJING CHIBO INFORMATION ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210602612.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-04-11
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

The existing technology is difficult to improve the efficiency of anonymous query while ensuring data privacy, especially in cross-enterprise data transactions and use, and faces the risk of data breaches and abuse.

Method used

An anonymous query method and device are proposed. By receiving batch data query requests, the target column and the target location are determined, the obfuscated column is selected and anonymous query requests are generated, and the data provider is sent to the data provider to receive the encrypted query results, and finally the target privacy data is output.

Benefits of technology

It realizes the efficiency of anonymous query while ensuring the privacy of data query parties, reduces data transmission volume and system communication pressure, and is suitable for building a safe and controllable data open platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860735B_ABST
    Figure CN114860735B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for anonymous query, which includes: receiving batch data query requests, determining the target column and target position corresponding to each data query request in a preset index matrix; judging whether the target columns corresponding to each data query request are different, and if so, selecting obfuscated columns from the preset index matrix, and generating multiple anonymous query requests according to the pre-acquired random codes corresponding to the target columns and obfuscated columns, each anonymous query request includes: a unique corresponding column number, a pre-acquired random code and an index sequence; sending each anonymous query request to a data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider; determining and outputting the target privacy data corresponding to each data query request according to the encrypted query results corresponding to each anonymous query request and each target position. The present application can ensure the privacy of the data query party and improve the efficiency of anonymous query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an anonymous query method and device. Background Art

[0002] With the continuous development of big data technology in recent years, the value of data assets has been increasingly valued by a large number of companies and institutions. The issue of data privacy leakage has also become a hot topic that has attracted much attention, and data privacy leakage has caused huge losses to the companies involved.

[0003] In order to avoid data privacy leakage, data islands are constantly being formed, and a large amount of data is dormant and cannot play its value. A lot of personal data and corporate data will not be directly used for plain text transactions; for some companies, many data are core assets of the company and are unwilling to share or conduct plain text transactions; even if data transactions can be agreed between companies, it is technically difficult to ensure the authentication of systems and identities across companies. At the same time, these plain text data face the risk of being leaked and abused after the transaction, and the value of the data cannot be preserved. Summary of the invention

[0004] In response to at least one problem in the prior art, the present application proposes an anonymous query method and device, which can ensure the privacy of the data query party and improve the efficiency of the anonymous query.

[0005] In order to solve the above technical problems, this application provides the following technical solutions:

[0006] In a first aspect, the present application provides an anonymous query method, comprising:

[0007] Receive batch data query requests, determine the target column and target position corresponding to each data query request in a preset index matrix, each data query request includes: a target hash code uniquely identifying a target query object, the preset index matrix is ​​composed of hash codes of respective unique identifiers of multiple query objects;

[0008] Determine whether the target columns corresponding to the various data query requests are all different. If so, select the obfuscated column from the preset index matrix, and generate multiple anonymous query requests according to the pre-acquired random codes corresponding to the target column and the obfuscated column, each anonymous query request including: a unique corresponding column number, a pre-acquired random code and an index sequence;

[0009] Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider;

[0010] According to the encrypted query results corresponding to each anonymous query request and each target location, the target privacy data corresponding to each data query request is determined and output.

[0011] Furthermore, the anonymous query method further includes:

[0012] Receive the hash code that uniquely identifies each batch query object sent by the data provider;

[0013] Classify the hash codes of the unique identifiers of the batch query objects into multiple hash code classes according to a preset first classification rule;

[0014] According to various hash code classes, construct the preset index matrix;

[0015] The hash code groups correspond one-to-one to the columns in the preset index matrix.

[0016] Furthermore, the selecting of the obfuscation column from the preset index matrix and the generation of multiple anonymous query requests according to the pre-acquired random codes corresponding to the target column and the obfuscation column respectively include:

[0017] Randomly selecting at least one column from the columns other than the target column in the preset index matrix to be determined as the confusion column;

[0018] Generate index sequences corresponding to the target column and the obfuscated column, respectively, wherein the number of bits of each column index sequence is the same as the number of bits of the target column, the position corresponding to the target position in the index sequence is filled modulo a non-quadratic remainder of a pre-acquired random number, and the remaining positions in the index sequence are filled modulo a quadratic remainder of a pre-acquired random number;

[0019] Generate multiple anonymous query requests according to the column number corresponding to the target column, the pre-acquired random number, the index sequence, the column number corresponding to the obfuscated column, the pre-acquired random number and the index sequence.

[0020] Furthermore, after determining whether the target columns corresponding to the respective data query requests are different, the method further includes:

[0021] If there are multiple data query requests corresponding to the same target column, the target hash code is divided into multiple hash code groups, and the target columns to which the hash codes in each hash code group belong are different;

[0022] For each group of hash code groups, an obfuscated column is selected from the preset index matrix, and a plurality of anonymous query requests are generated according to the pre-acquired random codes corresponding to the target column and the obfuscated column corresponding to the hash code group, each anonymous query request includes: a unique corresponding column number, a pre-acquired random code and an index sequence;

[0023] Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider;

[0024] According to the encrypted query result corresponding to each anonymous query request and the target position corresponding to the hash code group, the target privacy data of each data query request corresponding to the hash code group is determined and output.

[0025] Furthermore, before selecting the confusion column from the preset index matrix, the method further includes:

[0026] If there are multiple data query requests corresponding to the same target column, the preset index matrix is ​​reconstructed according to the preset second classification rule and the hash code that uniquely identifies the batch query object, and the target columns corresponding to the various data query requests in the reconstructed index matrix are different.

[0027] In a second aspect, the present application provides an anonymous query device, comprising:

[0028] A receiving module, used to receive batch data query requests, and determine the target column and target position corresponding to each data query request in a preset index matrix, wherein each data query request includes: a target hash code uniquely identifying a target query object, and the preset index matrix is ​​composed of hash codes of respective unique identifiers of multiple query objects;

[0029] A judgment module, used to judge whether the target columns corresponding to the various data query requests are all different. If so, a confusion column is selected from the preset index matrix, and a plurality of anonymous query requests are generated according to the pre-acquired random codes corresponding to the target column and the confusion column, each anonymous query request including: a unique corresponding column number, a pre-acquired random code and an index sequence;

[0030] A query module, used to send each anonymous query request to a data provider, and receive encrypted query results corresponding to each anonymous query request sent by the data provider;

[0031] The first determination module is used to determine and output the target privacy data corresponding to each data query request based on the encrypted query result corresponding to each anonymous query request and each target location.

[0032] Furthermore, the anonymous query device also includes:

[0033] A hash code receiving module is used to receive the hash codes uniquely identifying the batch query objects sent by the data provider;

[0034] A classification module, used for classifying the hash codes of the unique identifiers of the batch query objects into multiple hash code classes according to a preset first classification rule;

[0035] A generation module is used to construct the preset index matrix according to various types of hash code classes; wherein the hash code groups correspond to the columns in the preset index matrix one by one.

[0036] Furthermore, the judging module comprises:

[0037] A selection unit, configured to randomly select at least one column from the columns other than the target column in the preset index matrix to be determined as the confusion column;

[0038] A filling unit, used to generate index sequences corresponding to the target column and the obfuscated column, respectively, wherein the number of bits of each column index sequence is the same as the number of bits of the target column, the position corresponding to the target position in the index sequence is filled modulo a non-quadratic remainder of a pre-acquired random number, and the remaining positions in the index sequence are filled modulo a quadratic remainder of a pre-acquired random number;

[0039] A generating unit is used to generate multiple anonymous query requests according to the column number corresponding to the target column, the pre-acquired random number, the index sequence, the column number corresponding to the obfuscated column, the pre-acquired random number and the index sequence.

[0040] Furthermore, the anonymous query device further includes:

[0041] A division module, configured to divide the target hash code into multiple hash code groups if there are multiple data query requests corresponding to the same target column, wherein the target columns to which the hash codes in each hash code group belong are different;

[0042] A generating module, for each group of hash code groups, selecting obfuscated columns from the preset index matrix, and generating multiple anonymous query requests according to the pre-acquired random codes corresponding to the target columns and obfuscated columns corresponding to the hash code groups, each anonymous query request including: a unique corresponding column number, a pre-acquired random code and an index sequence;

[0043] A query module, used to send each anonymous query request to a data provider, and receive encrypted query results corresponding to each anonymous query request sent by the data provider;

[0044] The second determination module is used to determine and output the target privacy data of each data query request corresponding to the hash code group according to the encrypted query result corresponding to each anonymous query request and the target position corresponding to the hash code group.

[0045] In a third aspect, the present application 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 anonymous query method when executing the program.

[0046] In a fourth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, which implement the anonymous query method when the instructions are executed.

[0047] It can be seen from the above technical solution that the present application provides a method and device for anonymous query. Among them, the method includes: receiving batch data query requests, determining the target column and target position corresponding to each data query request in a preset index matrix, each data query request includes: a target hash code that uniquely identifies the target query object, and the preset index matrix is ​​composed of hash codes that uniquely identify multiple query objects; judging whether the target columns corresponding to each data query request are different, if so, selecting obfuscated columns from the preset index matrix, and generating multiple anonymous query requests according to the pre-acquired random codes corresponding to the target columns and obfuscated columns, each anonymous query request includes: a unique corresponding column number, a pre-acquired random code and an index sequence; sending each anonymous query request to the data provider The data provider receives the encrypted query results corresponding to each anonymous query request sent by the data provider; determines and outputs the target privacy data corresponding to each data query request according to the encrypted query results corresponding to each anonymous query request and each target location, which can ensure the privacy of the data query party and improve the efficiency of anonymous query, which is beneficial to privacy protection and data usage billing; multiple query requests can be packaged and processed in batches to reduce the workload and communication volume; it is beneficial to build a unified, standardized, interconnected, secure and controllable data open platform, and enhance the ability to use data to serve economic and social development; for data users, anonymous query intermediate services are provided to reduce the technical costs and pressures of data users. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 It is a flowchart of the anonymous query method in the embodiment of the present application;

[0050] Figure 2 It is a flowchart of steps 201 to 203 of the anonymous query method in the embodiment of the present application;

[0051] Figure 3 It is a flowchart of steps 301 to 303 of the anonymous query method in the embodiment of the present application;

[0052] Figure 4 It is a flowchart of steps 401 to 404 of the anonymous query method in the embodiment of the present application;

[0053] Figure 5is a hash code X in an index matrix preset in an example of this application ij Location diagram;

[0054] Figure 6 is a hash code X in an index matrix preset in an example of this application ij and X i’j’ Schematic diagram of the corresponding positions and sequences;

[0055] Figure 7 It is a schematic diagram of the position groups of batch target hash codes in a preset index matrix before and after grouping in an example of the present application;

[0056] Figure 8 It is a schematic diagram of the position groups corresponding to the batch target hash codes before and after the index matrix preset in an example of the present application is reconstructed;

[0057] Fig. 9 This is a schematic diagram of a process of dynamically constructing an index matrix in an example of the present application;

[0058] Fig.10 is a schematic diagram of the positional relationship between the target column and the index sequence in an example of the present application;

[0059] Fig.11 It is a logical schematic diagram of the anonymous query method in the application example of this application;

[0060] Fig.12 It is a schematic diagram of the structure of the anonymous query device in the embodiment of the present application;

[0061] Fig.13 is a schematic diagram of the structure of an anonymous query device in another embodiment of the present application;

[0062] Fig.14 A schematic block diagram of the system structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0063] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0064] Anonymous query, also known as privacy data retrieval, means that the data query party hides the keywords or customer ID information of the queried object, and the data provider provides matching encrypted query results but cannot know which specific query object it corresponds to;

[0065] At present, the anonymous query method usually completes the query through multiple database copies that do not communicate with each other, allowing users to submit different queries to different servers, and then merging the response messages of these servers to obtain the final encrypted query results; in this process, no single server obtains private information about the user. In this method, the workload of several servers is large and the anonymous query efficiency is low.

[0066] Privacy computing is a technology that ensures data is “available but invisible” and is applied in various data security fields. Privacy computing includes technologies such as secure multi-party computing and federated learning.

[0067] Generally speaking, multi-party secure computing (MPC) refers to multiple participants holding their own private data, jointly executing a computing logic (such as maximum value calculation) and obtaining the calculation results. However, in the process, each participating party will not disclose the calculation of their own data, which is called MPC computing. MPC computing can be achieved through the design of the protocol without relying on a trusted third party. The characteristics of this technology are: MPC can jointly use the data of all parties to achieve specific effects while ensuring the security of the data of all parties, thereby giving full play to the value of the data. Private Information Retrieval (PIR), also known as anonymous query technology, is an important protocol for multi-party secure computing for specific problems. The main purpose of PIR technology is to complete the query under the condition that the user's query privacy information is not leaked, that is, during the process, the server or database does not know the user's specific query information and the retrieved data items. Later, PIR was expanded to Symmetric PIR, which requires that the private information of the database cannot be leaked. PIR technology has broad application prospects in the fields of medicine, commercial competition (such as patent data query, stock data query, digital product trading), military cooperation, etc.

[0068] The simplest strategy to implement anonymous query is to transmit the entire database to the user, and the user performs information retrieval locally. This solution does not protect the privacy of the data owner and the amount of data transmitted is too large.

[0069] At present, there is another common PIR scheme, which is to transmit data after cryptographic calculations; after several rounds of interaction, the privacy of the data query party and the data provider can be guaranteed; the disadvantage is that the amount of database calculations in each query increases linearly with the size of the database, which is not practical; many third-party organizations have emerged to provide intermediary services for data query parties and data providers, such as various data markets and data exchanges. Based on this background of data interconnection and interoperability, new requirements are further put forward for PIR technology: between the data query party (client) and the data provider (database end), there is a trustworthy third-party organization to provide data sharing and circulation services, which can protect the privacy and rights of both parties while connecting the data query party and the data provider, and can also reduce the technical requirements for the data query party.

[0070] Common privacy information retrieval technologies have disadvantages such as low computing efficiency and large amounts of data to be transmitted. At the same time, unified privacy computing nodes need to be deployed on the information retrieval query party and the data provider, which places high demands on the technology and computing resources of all parties. Currently, there are few privacy query solutions for third-party institutions that provide data services. They are still based on traditional privacy information retrieval technology and do not optimize or batch process requests. For example, a secure hidden three-factor query method mainly describes a method for querying privacy verification of three-factor data. This solution does not involve optimizing requests or packaging batch processing.

[0071] In order to solve at least one of the problems existing in the above-mentioned prior art, the present application provides an anonymous query method and device. The purpose of this application is to ensure the privacy of the data query party and the rights and interests of the data provider, and to solve the problem of how a trusted third party can protect the privacy of the query process; at the same time, it can provide a data service call statistics function to facilitate the billing of data usage; when there are a large number of data requests from multiple data query parties, ordinary privacy data retrieval solutions will bring huge computing and communication volume. This application can improve computing efficiency, reduce system communication pressure, and accelerate the data query process.

[0072] In this application, a trusted third party T can receive data query requests from multiple data query parties, and perform unified obfuscation and packaging according to their request targets. Based on the packaged requests, T runs a common PIR protocol with the data provider to obtain batch encrypted query results. T processes and distributes the batch results to each data query party, and records the data usage at the same time. Through the batch anonymous processing of requests by the trusted third party, the data provider does not know the information of the data query party, nor does it determine each specific query request. After the batch encrypted query results are returned to the trusted third party, the batch encrypted query results are used to perform decryption operations and processing of the intermediate results, decompose the results required by each data query party, and then return them to the data query party separately, which can reduce the amount of data transmission; the trusted third party can record the query volume and the amount of data used by each data query party based on the retained information, which is conducive to accurate billing.

[0073] Based on this, in order to ensure the privacy of the data query party and improve the efficiency of anonymous query, the embodiment of the present application provides an anonymous query device, which can be a server or a client device, and the client device can include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, and a smart wearable device, etc. Among them, the smart wearable device can include smart glasses, smart watches, and smart bracelets, etc.

[0074] In actual applications, the part of performing the anonymous query can be executed on the server side as described above, or all operations can be completed in the client device. The specific selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.

[0075] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0076] The server and the client device may communicate using any suitable network protocol, including network protocols that have not yet been developed on the date of filing this application. The network protocol may include, for example, TCP / IP protocol, UDP / IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol may also include, for example, RPC protocol (Remote Procedure Call Protocol) and REST protocol (Representational State Transfer) used on top of the above protocols.

[0077] It should be noted that the anonymous query method and device disclosed in the present application can be used in the field of financial technology, and can also be used in any field other than the field of financial technology. The application field of the anonymous query method and device disclosed in the present application is not limited.

[0078] The details are described through the following embodiments.

[0079] In order to ensure the privacy of the data query party and improve the efficiency of anonymous query, this embodiment provides an anonymous query method in which the execution subject is an anonymous query device, and the anonymous query device includes but is not limited to a server, such as Figure 1 As shown, the method specifically includes the following contents:

[0080] Step 101: receiving batch data query requests, determining the target column and target position corresponding to each data query request in a preset index matrix, each data query request including: a target hash code uniquely identifying a target query object, the preset index matrix consisting of hash codes uniquely identifying multiple query objects.

[0081] Specifically, the anonymous query device can receive a data query request sent by a data query party, which can be equivalent to a trusted third party. The trusted third party serves as an intermediate processor of the anonymous query and connects the data query party and the data provider; parses the data query party's retrieval request, performs anonymous processing, and then merges the request and sends it to the data provider; coordinates the data retrieval processing method with the data provider, obtains the data retrieval result, and distributes it to the data query party; the data query party includes but is not limited to a server; for example, in a blacklist query, the data query party uses the user ID number (ID number, mobile phone number, etc.) as a retrieval index item, and the retrieval index item is the above-mentioned target query object unique identifier, and the return result value is 1 or 0, indicating whether the user is in the blacklist; there can be multiple data query parties; the data query party first performs hash coding and desensitization on the target query object unique identifier that needs to be requested, which is the same as the algorithm on the database side, that is, the algorithm can ensure that the same ID after conversion has the same encoding; the target column and target position to which the target hash code belongs in the preset index matrix can be obtained; the preset index matrix is ​​composed of hash codes of batch query object unique identifiers, and the batch query object unique identifier contains the target query object unique identifier.

[0082] Specifically, the preset index matrix is ​​a two-dimensional matrix of n×n; assuming that the total number of records in the database is m, then n≥m 1 / 2 , the matrix can store all m hash codes, such as 64 records can construct an 8×8 matrix.

[0083] For example, data query party A requests C a , data query party B requests C b , assuming C a The hash code of the request is X ij , C b The hash code of the request is X i’j’ , the corresponding positions in the matrix are (i,j) and (i',j').

[0084] Step 102: Determine whether the target columns corresponding to the various data query requests are all different. If so, select an obfuscated column from the preset index matrix, and generate multiple anonymous query requests based on the pre-acquired random codes corresponding to the target column and the obfuscated column, each of which includes: a unique corresponding column number, a pre-acquired random code and an index sequence.

[0085] Specifically, 1 to n / 2 obfuscation columns can be randomly selected from a preset index matrix and added; for example, the j*th column is randomly selected as the obfuscation column; a certain PIR protocol is run on the target column and the obfuscation column, for example, the jth column, the j'th column and the j*th column, respectively, to generate encrypted query data. The specific scheme of the basic PIR protocol is not limited here.

[0086] For example, generate the random number m1 corresponding to the jth column, the random number m2 corresponding to the j'th column, and the random number m3 corresponding to the j*th column, that is, for each column in (j, j', j*), generate the corresponding random number (m1, m2, m3); then generate the random n-dimensional arrays corresponding to m1, m2, m3 respectively, and for the jth column, generate n-1 QR values ​​(a1, ... a i-1 ,a i+1 ,...) sequence, any a satisfies: there exists an integer x such that x 2 mod m1=a; generate a QNR value b modulo m1 i , b i Satisfies: There is no integer x such that x 2 mod m1=b i ; The final combined sequence is U=(a1,...a i-1 ,b i ,a i+1 ,...), where the position of the non-real request is filled with the QR value a (quadratic remainder) modulo m, and the position of the real request (i.e. the position corresponding to the data query request) is filled with the QNR value b (quadratic non-residue) modulo m; U' and U* are generated in the same way; where U, U' and U* can be equivalent to the above-mentioned index sequence.

[0087] Step 103: Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider.

[0088] Specifically, the data provider performs a certain operation specified by the PIR protocol on the corresponding columns (j, j', j*) of the locally stored result data matrix Y according to each index sequence to obtain an encrypted query result; the data provider includes but is not limited to the server; the data provider: can provide privacy database services; cooperate with the trusted third party to complete the anonymous data retrieval operation and return the retrieval results to the trusted third party; to simplify the description, it is assumed that only two data columns, customer ID and whether it is in the blacklist (value is 0 or 1), are stored in the database, and other more complex data can be expanded in the same way.

[0089] For example, for the data provider, U, U' and U* are three random number vectors U = (u1, u2, ...), U' = (u'1, u'2, ...), U* = (u*1, u*2, ...), and the data provider cannot distinguish which is the real requested data location. The data provider calculates the three columns in the result matrix Y separately. The jth column is: Among them, y 1j Represents X 1jThe value of is the privacy data corresponding to the hash code of the 1st row and the jth column in the preset index matrix. In the blacklist query scenario, y 1j It can be 1 or 0, indicating whether the user corresponding to the hash code in the 1st row and jth column is on the blacklist; similarly, v' and v* are obtained; v, v' and v* can be equivalent to the encrypted query results of each of the above-mentioned index sequences; the elements in the result matrix Y and the preset index matrix can correspond one to one, and the result matrix Y can be composed of the privacy data that uniquely identifies each of the batch query objects; the privacy data corresponding to the hash code in the result matrix Y can be determined according to the position of the hash code in the preset index matrix, for example, the position of the hash code in the preset index matrix is ​​the i-th row and j-th column, then the privacy data corresponding to the hash code is the data in the i-th row and j-th column in the result matrix Y.

[0090] Step 104: According to the encrypted query result corresponding to each anonymous query request and each target location, the target privacy data corresponding to each data query request is determined and output.

[0091] Specifically, the encrypted query result of each index sequence is decrypted to ensure that only the position X corresponding to the corresponding data query request can be decrypted. ij , X i’j’ The value of Y ij , Y i’j’ .

[0092] For example, the CPIR protocol can be used to verify whether the returned result v is the QR or QNR of m1; if v is QR, then Y ij is 0 if yes, otherwise it is 1.

[0093] In order to improve the reliability of the preset index matrix and thus improve the reliability of anonymous query, see Figure 2 In one embodiment of the present application, before step 101, the method further includes:

[0094] Step 201: Receive the hash codes of the unique identifiers of the batch query objects sent by the data provider.

[0095] Specifically, the data provider may pre-store batch query object unique identifiers and their corresponding privacy data; the batch query object unique identifiers include the target query object unique identifier.

[0096] Step 202: Classify the hash codes of the unique identifiers of the batch query objects into multiple hash code classes according to a preset first classification rule.

[0097] Specifically, the preset classification rule may be to classify hash codes with the same first x digits into one category, where x may be set according to actual needs, or may be sorted by some middle digits or even randomly.

[0098] Step 203: construct the preset index matrix according to each type of hash code class; the hash code groups correspond to the columns in the preset index matrix one by one.

[0099] Specifically, each position in the preset index matrix corresponds to a unique hash code.

[0100] For example, the data provider sends all hash codes to the anonymous query device, which groups these hash codes in a custom way (for example, by the first few digits of the hash code, or by some middle digits, or even randomly), and finally forms an n×n two-dimensional matrix X; assuming that the total number of records in the database is m, then n≥m 1 / 2 , the matrix can store m hash codes. For example, 64 records can construct an 8×8 matrix, i.e., the hash code X ij Stored in the i-th row and j-th column of the matrix, (0≤i,j<n).

[0101] In order to prevent the data provider from knowing the unique identifier of the target query object and improve the privacy security of the data query party during the anonymous query process, see Figure 3 In one embodiment of the present application, the step 102 of selecting an obfuscated column from the preset index matrix and generating multiple anonymous query requests according to the pre-acquired random codes corresponding to the target column and the obfuscated column respectively includes:

[0102] Step 301: randomly selecting at least one column from the columns other than the target column in the preset index matrix to be determined as the confusion column.

[0103] Step 302: Generate index sequences corresponding to the target column and the obfuscated column respectively, wherein the number of bits of each column index sequence is the same as the number of bits of the target column, the position corresponding to the target position in the index sequence is filled modulo a non-quadratic remainder of a pre-acquired random number, and the remaining positions in the index sequence are filled modulo a quadratic remainder of a pre-acquired random number.

[0104] Step 303: Generate multiple anonymous query requests according to the column number corresponding to the target column, the pre-acquired random number, the index sequence, the column number corresponding to the obfuscated column, the pre-acquired random number and the index sequence.

[0105] Specifically, privacy can be increased by adding obfuscation columns. Considering extreme cases, if the amount of data in the database is extremely small, it is easier to guess which data is to be queried based on the query column. Adding obfuscation columns reduces this possibility.

[0106] See also Figure 4In order to avoid the problem of being unable to locate during encryption and decryption, in one embodiment of the present application, after determining whether the target columns corresponding to each data query request are different in step 102, the following is further included:

[0107] Step 401: if there are multiple data query requests corresponding to the same target column, the target hash code is divided into multiple hash code groups, and the target columns to which the hash codes in each hash code group belong are different.

[0108] Specifically, multiple hash codes in the same group belong to different target columns; if there are multiple data query requests corresponding to the same target column and after the preset index matrix is ​​reconstructed respectively according to a preset number of classification rules, there are still multiple data query requests corresponding to the same target column, then the target hash code can be divided into multiple hash code groups, and the target columns to which the hash codes in each hash code group belong are different; the preset number of classification rules can be set according to actual needs.

[0109] Step 402: For each group of hash code groups, select an obfuscation column from the preset index matrix, and generate multiple anonymous query requests according to the pre-acquired random codes corresponding to the target column corresponding to the hash code group and the obfuscation column, each anonymous query request includes: a unique corresponding column number, a pre-acquired random code and an index sequence.

[0110] Step 403: Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider.

[0111] Step 404: According to the encrypted query result corresponding to each anonymous query request and the target location corresponding to the hash code group, the target privacy data of each data query request corresponding to the hash code group is determined and output.

[0112] In order to avoid the problem of being unable to locate during encryption and decryption, in one embodiment of the present application, before selecting the obfuscated column from the preset index matrix in step 102, it also includes: if there are multiple data query requests corresponding to the same target column, then the preset index matrix is ​​reconstructed according to the preset second classification rule and the hash code that uniquely identifies the batch query object, and the target columns corresponding to the various data query requests in the reconstructed index matrix are different.

[0113] Specifically, the first classification rule and the second classification rule are different classification rules. Assume that the first classification rule is to classify hash codes with the same first x bits into one category; the second classification rule can be to sort by some middle bits or even randomly classify, etc. Next, the confusion column can be selected from the reconstructed index matrix.

[0114] In order to further illustrate this solution, this application provides an application example of an anonymous query method, which is specifically described as follows:

[0115] Take the scenario of blacklist query in the financial industry as an example; usually financial institutions maintain their own customer blacklists for use in business areas such as credit risk control; assuming that a financial institution provides blacklist query services to the outside world, some other institutions want to check whether a certain customer is on the blacklist, but do not want to know who is being queried, because the query information itself is also part of the business secrets.

[0116] 1. Preparation stage (offline):

[0117] 1) Perform hash coding and desensitization on the retrieval index; for example, convert the customer ID column into the corresponding 128-bit hash code to ensure that the plain text information of the ID is not transmitted during the entire query process; here the three parties should unify the hash coding scheme, such as md5, SHA1 and other common hash coding methods can be used. First, convert all indexes in the database into hash codes, for example, convert the customer's 18-digit ID number into a string of hash codes (such as: ID: 11010819900702****=>b9944e9367d2e40dd1f0c404********), the hash code cannot be restored, so the original ID number cannot be restored through the algorithm.

[0118] 2) The trusted third party T negotiates with the database end (data provider) S to construct a matrix grouping scheme for index hash codes. The following scheme can be selected: First, the database end S sends all hash codes to T, and T groups these hash codes in a custom way (for example, sorting by the first few digits of the hash code, or by some middle digits, or even randomly), and finally forms an n×n two-dimensional matrix X. Assume that the total number of records on the database end is m, then n≥m 1 / 2 , the matrix can store all m hash codes, for example, 64 records can construct an 8×8 matrix. Figure 5 As shown, the hash code X ij Stored in the i-th row and j-th column of the index matrix (0≤i,j<n).

[0119] 3) The trusted third party T synchronizes the constructed index matrix X with the database end S; that is, T and S store the same matrix locally; the query for the hash code of a certain index can be simplified to a request for the index matrix (i, j), so that subsequent requests only need to pass the values ​​of two integers i and j.

[0120] 2. Query phase:

[0121] 1) The data query party first performs hash coding to desensitize the index ID to be requested; the algorithm is the same as that on the database side, which ensures that the hash code after conversion of the same ID is also the same.

[0122] Data query party: sends a query retrieval request to a trusted third party to obtain encrypted query results; for example, in a blacklist query, the data query party sends the user ID number (unique identifier such as an ID card) as a search index item, and the returned result value is 1 or 0, indicating whether the user is on the blacklist; there can be multiple data query parties.

[0123] 2) The data query party sends a request to the trusted third party T; for example, data query party A requests C a , data query party B requests C b .

[0124] 3) T receives request C a , C b ,like Figure 6 As shown, assuming C a The requested query index is X ij , C b The requested query index is X i’j’ ; That is, the corresponding positions in the index matrix are (i,j) and (i',j'), and T retains the original request locally.

[0125] 4) T repackages the two requests. The packaging process is as follows:

[0126] a. Optimize the grouping scheme and dynamically construct the matrix; first, through trial calculation, determine all the indexes X involved in this request ij , X i’j’ Will they be grouped in the same group? If they have indexes in the same group, can other grouping schemes be used to group them in different groups (different columns of the matrix)? Find a decentralized grouping scheme to map requests to different columns to avoid the problem of being unable to locate during encryption and decryption. Figure 7 As shown in , if there are more data indexes that cannot be dispersed, they are broken down into multiple requests for packaging to find a solution for optimal index dispersion. Figure 8 As shown, assuming that originally X ij , X i’j’ Assigned to the same column j + , through trial calculation, find a better solution and change X ij , X i’j’ Divide into 2 columns. At this time, T reconstructs the grouping matrix according to the new scheme and synchronizes the new grouping scheme to S. Data party S updates the local matrix.

[0127] like Fig. 9As shown, the process of dynamically constructing the index matrix may include: step 91: determine whether the number of request indexes of the same group is greater than 1, step 92: if the number of request indexes of the same group is greater than 1, determine whether all grouping schemes have been tried, step 93: if all grouping schemes have been tried, divide the request indexes into 2 groups to form 2 new requests, and return to step 11 to recalculate the grouping; step 94: if the number of request indexes of the same group is less than or equal to 1, construct the T local matrix according to the grouping scheme; step 95: synchronize the new grouping scheme to S; step 96: S constructs the local matrix according to the updated grouping scheme.

[0128] b. Randomly select 1 to n / 2 obfuscated columns to add; for example, randomly select the j*th column as the obfuscated data column.

[0129] c. Run a certain PIR protocol on the index column and the obfuscated column, for example, the jth column, the j'th column, and the j*th column, to generate encrypted query data. The specific scheme of the basic PIR protocol is not limited here. The following describes the packaging process of a new request by taking the typical CPIR protocol as an example.

[0130] d. For each column in (j, j', j*), generate the corresponding random number (m1, m2, m3), and then generate the random n-dimensional sequence corresponding to m1, m2, m3; among which, the position where the non-real request is located is filled with the QR value a (quadratic residue) modulo m, and the position where the real request is located is filled with the QNR value b (non-quadratic residue) modulo m, which are combined into 3 groups of n-dimensional sequences: U, U', U*.

[0131] For example: for the jth column, generate n-1 QR values ​​(a1,...a i-1 ,a i+1 ,...) sequence, where any a satisfies: there exists an integer x, x 2 mod m1=a; generate a QNR value b modulo m1 i , where b satisfies: there does not exist an integer x, x 2 mod m1=b; the final combined sequence is U=(a1,...a i-1 ,b i ,a i+1 ,...) Similarly generate U' and U*; Fig.10 As shown, it is equivalent to filling the b type (QNR) number at the location of the real request in the index matrix and filling the a type (QR) number at the location of the non-real request to generate U, U', U*.

[0132] e. The final batch data request Q, each column corresponds to a triple; T sends this request to S, Q = {(j,m1,U),(j',m2,U'),(j*,m3,U*)}.

[0133] 5) The database end S receives the request Q and performs a PIR operation on the corresponding columns on the locally stored result matrix to form an encrypted result V.

[0134] a. First, S decomposes the columns j, j', j* that need to be calculated from the received request Q, and performs some operations specified by the PIR protocol on the corresponding columns (j, j', j*) of the locally stored result data matrix Y. Take CPIR as an example:

[0135] b. For S, U, U', U* are three random number vectors U = (u1, u2, ...), U* = (u*1, u*2, ...); it cannot distinguish which is the real requested data location. S calculates these three columns in the result matrix Y separately, for example, the jth column:

[0136] c. By operating on these three columns, we get three corresponding result values: v, v', v*.

[0137] dS returns the result (v,v',v*) to T.

[0138] 6) After receiving the result returned by S, T performs decryption calculation to ensure that only the corresponding requested index position X can be decrypted ij , X i’j’ For example, using the CPIR protocol, T verifies whether the returned result v is QR or QNR of m1; if v is QR, then X ij is 0 if yes, otherwise it is 1.

[0139] 3. Result distribution stage:

[0140] T decomposes the decrypted results according to the original query request and distributes them to different querying parties.

[0141] 1) T finds result X ij , X i’j’ Corresponding original data request correspondence C a , C b ;

[0142] 2) T will result X ij Distribute to C a The data requester A will send the result X i’j’ Distribute to C b The data requester B.

[0143] 4. Billing stage:

[0144] 1) T counts the number of encrypted query results and stores them in the database according to the requesting party's records.

[0145] 2) The database side S can request T for the number of queries and the number of data used as the basis for billing.

[0146] 5. Update phase: When there is data update on the database side S, the local index matrix is ​​locked, the update operation is performed and synchronized with the trusted third party T, and then unlocked.

[0147] For further explanation of this scheme, see Fig.11 , this application provides an application example of an anonymous query method, which is specifically described as follows:

[0148] The data query party sends multiple data query requests, which can be composed of hash codes or plaintext data query requests; the trusted third party performs request preprocessing; the trusted third party performs request anonymous processing; the trusted third party performs data query request sending; the data provider performs anonymous retrieval processing; the trusted third party performs response reception and processing; the trusted third party performs result distribution; the trusted third party performs query statistics; the data query party receives multiple plaintext query results; at the same time, the data provider pre-builds an index matrix and its corresponding result matrix, and the trusted third party synchronizes the index matrix; when the number of requests in the same group is greater than 1, the trusted third party reconstructs the index matrix, and the data provider synchronizes the reconstructed index matrix and builds its corresponding result matrix.

[0149] From the software level, in order to ensure the privacy of the data query party and improve the efficiency of anonymous query, the present application provides an embodiment of an anonymous query device for implementing all or part of the content of the anonymous query method, see Fig.12 The anonymous query device specifically includes the following contents:

[0150] The receiving module 10 is used to receive batch data query requests and determine the target column and target position corresponding to each data query request in a preset index matrix, wherein each data query request includes: a target hash code uniquely identifying a target query object, and the preset index matrix is ​​composed of hash codes of respective unique identifiers of multiple query objects;

[0151] The judging module 20 is used to judge whether the target columns corresponding to the various data query requests are all different. If so, the obfuscated column is selected from the preset index matrix, and a plurality of anonymous query requests are generated according to the pre-acquired random codes corresponding to the target column and the obfuscated column, each of which includes: a unique corresponding column number, a pre-acquired random code and an index sequence;

[0152] The query module 30 is used to send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider;

[0153] The first determination module 40 is used to determine and output the target privacy data corresponding to each data query request based on the encrypted query result corresponding to each anonymous query request and each target location.

[0154] See also Fig.13 In one embodiment of the present application, the anonymous query device further includes:

[0155] A hash code receiving module 50 is used to receive the hash codes of the batch query objects uniquely identified by the data provider;

[0156] A classification module 60, configured to classify the hash codes of the unique identifiers of the batch query objects into multiple hash code classes according to a preset first classification rule;

[0157] The generating module 70 is used to construct the preset index matrix according to various types of hash code classes; wherein the hash code groups correspond to the columns in the preset index matrix one by one.

[0158] In one embodiment of the present application, the judgment module includes:

[0159] A selection unit, configured to randomly select at least one column from the columns other than the target column in the preset index matrix to be determined as the confusion column;

[0160] A filling unit, used to generate index sequences corresponding to the target column and the obfuscated column, respectively, wherein the number of bits of each column index sequence is the same as the number of bits of the target column, the position corresponding to the target position in the index sequence is filled modulo a non-quadratic remainder of a pre-acquired random number, and the remaining positions in the index sequence are filled modulo a quadratic remainder of a pre-acquired random number;

[0161] A generating unit is used to generate multiple anonymous query requests according to the column number corresponding to the target column, the pre-acquired random number, the index sequence, the column number corresponding to the obfuscated column, the pre-acquired random number and the index sequence.

[0162] In one embodiment of the present application, the anonymous query device further includes:

[0163] A division module, configured to divide the target hash code into multiple hash code groups if there are multiple data query requests corresponding to the same target column, wherein the target columns to which the hash codes in each hash code group belong are different;

[0164] A generating module, for each group of hash code groups, selecting obfuscated columns from the preset index matrix, and generating multiple anonymous query requests according to the pre-acquired random codes corresponding to the target columns and obfuscated columns corresponding to the hash code groups, each anonymous query request including: a unique corresponding column number, a pre-acquired random code and an index sequence;

[0165] A query module, used to send each anonymous query request to a data provider, and receive encrypted query results corresponding to each anonymous query request sent by the data provider;

[0166] The second determination module is used to determine and output the target privacy data of each data query request corresponding to the hash code group according to the encrypted query result corresponding to each anonymous query request and the target position corresponding to the hash code group.

[0167] The embodiment of the anonymous query device provided in this specification can be specifically used to execute the processing flow of the embodiment of the above-mentioned anonymous query method. Its functions will not be repeated here, and reference can be made to the detailed description of the embodiment of the above-mentioned anonymous query method.

[0168] From the above description, it can be seen that the anonymous query method and device provided by this application can ensure the privacy of the data query party, while improving the efficiency of anonymous query, which is beneficial to privacy protection and data usage billing; it is beneficial to build a unified, standardized, interconnected, secure and controllable data open platform, and enhance the ability to use data to serve economic and social development; for data users, provide anonymous query intermediate services to reduce the technical costs and pressure of data users.

[0169] From the hardware level, in order to ensure the privacy of the data query party and improve the efficiency of anonymous query, the present application provides an embodiment of an electronic device for implementing all or part of the content of the anonymous query method. The electronic device specifically includes the following content:

[0170] A processor, a memory, a communications interface and a bus; wherein the processor, the memory and the communications interface communicate with each other through the bus; the communications interface is used to realize information transmission between the anonymous query device and related devices such as user terminals; the electronic device can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the electronic device can be implemented with reference to the embodiments for implementing the anonymous query method and the embodiments for implementing the anonymous query device, and the contents thereof are incorporated herein, and the repeated parts are not repeated.

[0171] Fig.14 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig.14 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig.14is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0172] In one or more embodiments of the present application, the anonymous query function may be integrated into the central processor 9100. The central processor 9100 may be configured to perform the following control:

[0173] Step 101: receiving batch data query requests, determining the target column and target position corresponding to each data query request in a preset index matrix, each data query request including: a target hash code uniquely identifying a target query object, the preset index matrix consisting of hash codes uniquely identifying multiple query objects.

[0174] Step 102: Determine whether the target columns corresponding to the various data query requests are all different. If so, select an obfuscated column from the preset index matrix, and generate multiple anonymous query requests based on the pre-acquired random codes corresponding to the target column and the obfuscated column, each of which includes: a unique corresponding column number, a pre-acquired random code and an index sequence.

[0175] Step 103: Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider.

[0176] Step 104: According to the encrypted query result corresponding to each anonymous query request and each target location, the target privacy data corresponding to each data query request is determined and output.

[0177] From the above description, it can be seen that the electronic device provided by the embodiments of the present application can ensure the privacy of the data query party while improving the efficiency of anonymous query.

[0178] In another embodiment, the anonymous query device can be configured separately from the central processor 9100. For example, the anonymous query device can be configured as a chip connected to the central processor 9100, and the anonymous query function can be realized through the control of the central processor.

[0179] like Fig.14 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig.14 In addition, the electronic device 9600 may also include Fig.14 For components not shown, reference may be made to the prior art.

[0180] like Fig.14As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0181] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0182] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0183] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0184] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0185] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0186] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0187] It can be seen from the above description that the electronic device provided by the embodiments of the present application can ensure the privacy of the data query party while improving the efficiency of anonymous query.

[0188] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the anonymous query method in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps in the anonymous query method in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0189] Step 101: receiving batch data query requests, determining the target column and target position corresponding to each data query request in a preset index matrix, each data query request including: a target hash code uniquely identifying a target query object, the preset index matrix consisting of hash codes uniquely identifying multiple query objects.

[0190] Step 102: Determine whether the target columns corresponding to the various data query requests are all different. If so, select an obfuscated column from the preset index matrix, and generate multiple anonymous query requests based on the pre-acquired random codes corresponding to the target column and the obfuscated column, each of which includes: a unique corresponding column number, a pre-acquired random code and an index sequence.

[0191] Step 103: Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider.

[0192] Step 104: According to the encrypted query result corresponding to each anonymous query request and each target location, the target privacy data corresponding to each data query request is determined and output.

[0193] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application can ensure the privacy of the data query party while improving the efficiency of anonymous query.

[0194] In this application, each embodiment of the above method is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For relevant parts, refer to the partial description of the method embodiment.

[0195] 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 include computer-usable program code.

[0196] 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 embodiments of 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 generate 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.

[0197] 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.

[0198] 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 A step that specifies a function in one or more boxes.

[0199] Specific embodiments are used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core idea of ​​this application. At the same time, for those skilled in the art, according to the idea of ​​this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this application.

Claims

1. A method for anonymous query, characterized in that: include: Receive batch data query requests, determine the target column and target position corresponding to each data query request in a preset index matrix, each data query request includes: a target hash code uniquely identifying a target query object, the preset index matrix is ​​composed of hash codes of respective unique identifiers of multiple query objects; Determine whether the target columns corresponding to the various data query requests are all different. If so, select the obfuscated column from the preset index matrix, and generate multiple anonymous query requests according to the pre-acquired random codes corresponding to the target column and the obfuscated column, each anonymous query request including: a unique corresponding column number, a pre-acquired random code and an index sequence; Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider; According to the encrypted query result corresponding to each anonymous query request and each target location, determine and output the target privacy data corresponding to each data query request; The step of selecting an obfuscated column from the preset index matrix and generating a plurality of anonymous query requests according to pre-acquired random codes corresponding to the target column and the obfuscated column respectively includes: Randomly selecting at least one column from the columns other than the target column in the preset index matrix to be determined as the confusion column; Generate index sequences corresponding to the target column and the obfuscated column, respectively, wherein the number of bits of each column index sequence is the same as the number of bits of the target column, the position corresponding to the target position in the index sequence is filled modulo a non-quadratic remainder of a pre-acquired random number, and the remaining positions in the index sequence are filled modulo a quadratic remainder of a pre-acquired random number; Generate multiple anonymous query requests according to the column number corresponding to the target column, the pre-acquired random number, the index sequence, the column number corresponding to the obfuscated column, the pre-acquired random number and the index sequence.

2. The anonymous query method according to claim 1, characterized in that: Also includes: Receive the hash code that uniquely identifies each batch query object sent by the data provider; Classify the hash codes of the unique identifiers of the batch query objects into multiple hash code classes according to a preset first classification rule; According to various hash code classes, construct the preset index matrix; The hash code groups correspond one-to-one to the columns in the preset index matrix.

3. The anonymous query method according to claim 1, characterized in that: After determining whether the target columns corresponding to the various data query requests are different, the method further includes: If there are multiple data query requests corresponding to the same target column, the target hash code is divided into multiple hash code groups, and the target columns to which the hash codes in each hash code group belong are different; For each group of hash code groups, an obfuscated column is selected from the preset index matrix, and a plurality of anonymous query requests are generated according to the pre-acquired random codes corresponding to the target column and the obfuscated column corresponding to the hash code group, each anonymous query request includes: a unique corresponding column number, a pre-acquired random code and an index sequence; Send each anonymous query request to the data provider to receive the encrypted query results corresponding to each anonymous query request sent by the data provider; According to the encrypted query result corresponding to each anonymous query request and the target position corresponding to the hash code group, the target privacy data of each data query request corresponding to the hash code group is determined and output.

4. The anonymous query method according to claim 1, characterized in that: Before selecting the confusion column from the preset index matrix, the method further includes: If there are multiple data query requests corresponding to the same target column, the preset index matrix is ​​reconstructed according to the preset second classification rule and the hash code that uniquely identifies the batch query object, and the target columns corresponding to the various data query requests in the reconstructed index matrix are different.

5. An anonymous query device, characterized in that: include: A receiving module, used to receive batch data query requests, and determine the target column and target position corresponding to each data query request in a preset index matrix, wherein each data query request includes: a target hash code uniquely identifying a target query object, and the preset index matrix is ​​composed of hash codes of respective unique identifiers of multiple query objects; A judgment module, used to judge whether the target columns corresponding to the various data query requests are all different. If so, a confusion column is selected from the preset index matrix, and a plurality of anonymous query requests are generated according to the pre-acquired random codes corresponding to the target column and the confusion column, each anonymous query request including: a unique corresponding column number, a pre-acquired random code and an index sequence; A query module, used to send each anonymous query request to a data provider, and receive encrypted query results corresponding to each anonymous query request sent by the data provider; A first determination module, configured to determine and output the target privacy data corresponding to each data query request based on the encrypted query result corresponding to each anonymous query request and each target location; The judging module comprises: A selection unit, configured to randomly select at least one column from the columns other than the target column in the preset index matrix to be determined as the confusion column; A filling unit, used to generate index sequences corresponding to the target column and the obfuscated column, respectively, wherein the number of bits of each column index sequence is the same as the number of bits of the target column, the position corresponding to the target position in the index sequence is filled modulo a non-quadratic remainder of a pre-acquired random number, and the remaining positions in the index sequence are filled modulo a quadratic remainder of a pre-acquired random number; A generating unit is used to generate multiple anonymous query requests according to the column number corresponding to the target column, the pre-acquired random number, the index sequence, the column number corresponding to the obfuscated column, the pre-acquired random number and the index sequence.

6. The anonymous query device according to claim 5, characterized in that: Also includes: A hash code receiving module is used to receive the hash codes uniquely identifying the batch query objects sent by the data provider; A classification module, used for classifying the hash codes of the unique identifiers of the batch query objects into multiple hash code classes according to a preset first classification rule; A generation module, used to construct the preset index matrix according to various hash code classes; The hash code groups correspond to the columns in the preset index matrix one by one.

7. The anonymous query device according to claim 5, characterized in that: Also includes: A division module, configured to divide the target hash code into multiple hash code groups if there are multiple data query requests corresponding to the same target column, wherein the target columns to which the hash codes in each hash code group belong are different; A generating module, for each group of hash code groups, selecting obfuscated columns from the preset index matrix, and generating multiple anonymous query requests according to the pre-acquired random codes corresponding to the target columns and obfuscated columns corresponding to the hash code groups, each anonymous query request including: a unique corresponding column number, a pre-acquired random code and an index sequence; A query module, used to send each anonymous query request to a data provider, and receive encrypted query results corresponding to each anonymous query request sent by the data provider; The second determination module is used to determine and output the target privacy data of each data query request corresponding to the hash code group according to the encrypted query result corresponding to each anonymous query request and the target position corresponding to the hash code group.

8. 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 anonymous query method described in any one of claims 1 to 4 is implemented.

9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed, the anonymous query method described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Information memorization and management method and device based on Webkit browser

    CN103324671A

  • Personalized privacy information retrieval method based on block chain

    CN107454070A