Data hiding query method and device, equipment and storage medium

By using privacy interception and concealment retrieval methods in data concealment query, the problem of low data computing and communication efficiency in the existing technology is solved, efficient concealment query is realized, and data privacy is ensured.

CN119884193APending Publication Date: 2025-04-25SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311409517.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the existing hidden query scheme, the calculation amount and communication volume of query requests are large, resulting in low data calculation and communication efficiency, thereby reducing query efficiency.

Method used

In response to the query request for the query data to be queried, the query ID of the data to be queried is determined, the index result corresponding to the query ID in the service party is obtained based on the privacy request method, and the target encryption query information of the data to be queried is determined based on the index result based on the hidden search method, and the target encryption query information is sent to the service party to obtain the target encryption response information, and finally the target plaintext information corresponding to the data to be queried is obtained through decryption.

Benefits of technology

It greatly reduces the amount of data and calculation complexity, improves data calculation and communication efficiency, and ensures data privacy of queryers and service providers while ensuring correctness, thereby improving the efficiency of hidden queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884193A_ABST
    Figure CN119884193A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data hiding query method and device, equipment and a medium. The method comprises the steps of determining a query ID of to-be-queried data in response to a query request for the to-be-queried data, obtaining an index result corresponding to the query ID in a service party based on a privacy intersection mode, determining target encrypted query information of the to-be-queried data according to the index result based on a hidden retrieval mode, and sending the target encrypted query information to the service party, and sending the target encrypted query information to the server, so that the server performs response processing on the target encrypted query information to obtain target encrypted response information, receiving the target encrypted response information sent by the server, and decrypting the target encrypted response information to obtain target plaintext information corresponding to the to-be-queried data. By means of the privacy intersection mode and the hidden retrieval mode, in the data query and transmission process, the data size and the calculation complexity are greatly reduced, the data calculation and communication efficiency is improved, and the data hidden query efficiency is improved while the query information safety is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a data anonymity query method, device, equipment and storage medium. Background Art

[0002] In the data query scenario, the querying party submits plaintext query conditions to the database (data holder) to directly query. The data holder directly knows the query content of the querying party, and the privacy of the query conditions of the querying party cannot be guaranteed, which may lead to security issues of data privacy leakage. Therefore, by using hidden query, the querying party encrypts its query conditions before submitting them for query, thereby ensuring the privacy of the querying party's data.

[0003] However, the amount of computation and communication required for query requests in existing hidden query solutions is large, and will increase significantly as the amount of data held by participants increases, which in turn leads to reduced data computation and communication efficiency, and a sharp drop in query efficiency. Therefore, how to improve data computation and communication efficiency has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] Based on this, it is necessary to provide a data anonymity query method, device, equipment and storage medium to address the above technical issues, so as to solve the problem of low efficiency of data calculation and communication in the prior art.

[0005] A first aspect of an embodiment of the present application provides a data anonymity query method, which is applied to a querying party. The data anonymity query method includes:

[0006] In response to a query request for the data to be queried, determining a query ID of the data to be queried;

[0007] Based on the privacy intersection method, obtain the index result corresponding to the query ID in the service provider;

[0008] Based on the hidden retrieval method, determining the target encrypted query information of the data to be queried according to the index result;

[0009] Sending the target encrypted query information to the service provider, so that the service provider responds to the target encrypted query information and obtains target encrypted response information;

[0010] The target encrypted response information sent by the service provider is received, and the target encrypted response information is decrypted to obtain the target plaintext information corresponding to the data to be queried.

[0011] A second aspect of an embodiment of the present application provides a data anonymity query method, which is applied to a service provider. The data anonymity query method includes:

[0012] Receiving a query ID of the data to be queried from the querying party, and querying an index result corresponding to the query ID, wherein the index result is obtained based on a privacy intersection method;

[0013] Sending the index result to the query party, so that the query party determines the target encrypted query information of the data to be queried according to the index result, wherein the target encrypted query information is obtained based on the hidden retrieval method;

[0014] Receiving the target encrypted query information sent by the querying party, parsing and processing the target encrypted query information, and obtaining target encrypted response information;

[0015] The target encrypted response information is sent to the querying party, so that the querying party decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

[0016] A third aspect of the embodiments of the present application provides a hidden query device, which is configured at a querying party, and the hidden query device includes:

[0017] A query ID determination module, configured to determine a query ID of the data to be queried in response to a query request for the data to be queried;

[0018] An index result acquisition module is used to acquire the index result corresponding to the query ID in the service provider based on a privacy intersection method;

[0019] An encrypted query information determination module is used to determine the target encrypted query information of the to-be-queried data according to the index result based on the hidden retrieval method;

[0020] An encrypted response information module, used to send the target encrypted query information to the service provider, so that the service provider responds to the target encrypted query information and obtains target encrypted response information;

[0021] The decryption response information module is used to receive the target encrypted response information sent by the service provider, and decrypt the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

[0022] A fourth aspect of the embodiments of the present application provides a hidden query device, which is configured at a service provider, and the hidden query device includes:

[0023] A query index result module, used to receive a query ID of the data to be queried from the query party, and query the index result corresponding to the query ID, wherein the index result is obtained based on a privacy intersection method;

[0024] A query information determination module, used to send the index result to the query party, so that the query party determines the target encrypted query information of the data to be queried according to the index result, wherein the target encrypted query information is obtained based on a hidden retrieval method;

[0025] A response information obtaining module is used to receive the target encrypted query information sent by the querying party, parse the target encrypted query information, and obtain target encrypted response information;

[0026] The module for obtaining plaintext information is used to send the target encrypted response information to the querying party, so that the querying party decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

[0027] In a fifth aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements any one of the data anonymity query methods provided in the embodiments of the present application.

[0028] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any one of the data anonymity query methods provided in the embodiments of the present application.

[0029] In summary, the present invention provides a data anonymity query method, device, equipment and medium. This application determines the query ID of the data to be queried by responding to the query request of the data to be queried, obtains the index result corresponding to the query ID in the service party based on the privacy intersection method, determines the target encrypted query information of the data to be queried according to the index result based on the hidden retrieval method, sends the target encrypted query information to the service party, so that the service party responds to the target encrypted query information and obtains the target encrypted response information, receives the target encrypted response information sent by the service party, and decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried. This application greatly reduces the amount of data and the computational complexity during the data query transmission process through the privacy intersection method and the hidden retrieval method, improves the efficiency of data calculation and communication, and ensures the data privacy of the query party and the service party on the premise of ensuring correctness, thereby improving the efficiency of hidden query. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0031] Figure 1 This is a schematic diagram of an application environment of a data anonymity query method provided by an embodiment of the present invention;

[0032] Figure 2 It is a flowchart of a data anonymity query method provided by an embodiment of the present invention;

[0033] Figure 3 It is another flowchart of a data anonymity query method provided by one embodiment of the present invention;

[0034] Figure 4 It is a structural diagram of a data anonymity query device provided by an embodiment of the present invention;

[0035] Figure 5 It is another structural schematic diagram of a data anonymity query device provided by one embodiment of the present invention;

[0036] Figure 6 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of 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.

[0038] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0039] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0040] As used in the present specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]", depending on the context.

[0041] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0042] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0043] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0044] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0045] An embodiment of the present invention provides a data anonymity query method, which can be applied in the following situations: Figure 1 In the application environment, the query party and the service party communicate with each other and implement data anonymity query based on the privacy intersection method and the anonymity retrieval method. Figure 1 Taking the client as an example) use data information query, the service party ( Figure 1The server side is used as an example to obtain the actual data information corresponding to the database. In this process, the server side is required to be unaware of the query content of the client side. Among them, the client side includes but is not limited to handheld computers, desktop computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers, UMPC), netbooks, personal digital assistants (personal digital assistants, PDA) and other computer devices. The server side can be implemented with an independent server or a server cluster consisting of multiple servers.

[0046] In actual business applications, there is a large gap between the amount of data on the client and the server. For example, the amount of data on the client is large (e.g., 1 billion) and the amount of data on the server is large (e.g., 5 billion). In this scenario, the number of queries executed by the client is proportional to the amount of data, and there will be a large amount of data, resulting in a gradual increase in the amount of computing and communication.

[0047] Based on this, Figure 1 As shown, the embodiments of the present application provide a data anonymity query method, device, equipment and medium, which establishes communication between the client and the server in advance, and then queries the index result corresponding to the query identifier based on the privacy intersection method (PSI protocol), and then encrypts the index result homomorphically based on the hidden retrieval method (PSI protocol) to generate query information-response information-decryption information, and finally obtains the target retrieval data. For example, in the original usage scenario, the data can be reduced to tens of millions of data sets through the privacy intersection method. In this way, the computational overhead and communication overhead in the subsequent query process are greatly reduced. The privacy of the data can be protected through the hidden retrieval method, which greatly improves the efficiency of hidden queries.

[0048] See also Figure 2 , is a flow chart of a data anonymity query method provided by an embodiment of the present invention. The above data anonymity query method can be applied to Figure 1 The querying party (client) in Figure 2 As shown, the data anonymity query method may include the following steps.

[0049] S201: In response to a query request for data to be queried, determining a query ID of the data to be queried.

[0050] In this embodiment, the data to be queried may be data that the user needs to query. The query request may be a request obtained by the querying party for the user to query the data to be queried. Specifically, the query request may include a query ID of the data to be queried. The query ID refers to a digital identification of the query data, which is convenient for indexing, extraction, etc. That is, the querying party holds the query ID of the data to be queried, that is, {i0,i1,...,is-1}. Generate a data set based on the query ID of the data to be queried For example, when a user needs to query the data to be queried, the user enters the data name of the data to be queried on the query side. At this time, the query side obtains the user's query request, responds to the query request, and then determines the query ID of the data to be queried.

[0051] S202: Based on the privacy intersection method, obtain the index result corresponding to the query ID in the service provider.

[0052] In this embodiment, the privacy intersection method is the PSI protocol, which means that a group of private data set owners who do not trust each other jointly calculate the intersection of private sets, and each private set owner cannot obtain any information other than the data intersection of both parties. For example, suppose that parties B, C, and D need to use their own data and party A's data to intersect. The intersection of A and B, A and C, and A and D requires three decryption and reading operations on party A's data file. The index result refers to the query ID corresponding to the query result provided by the data party. After determining the query ID, the query party sends the query ID to the service party based on the privacy intersection method, and then instructs the service party to query the index result corresponding to the query ID according to the query ID by sending the query ID to the service party.

[0053] In this embodiment, based on the privacy intersection method, the index result corresponding to the query ID in the service party is obtained, which can ensure that the data communicated by both parties will not leak the original data of both parties. That is, the query party can only obtain the target retrieval data and will not obtain other information in the database. At the same time, the service party cannot obtain the query party's retrieval and index, thereby meeting the data privacy requirements.

[0054] In one embodiment, before obtaining the index result corresponding to the query ID in the service party, the following steps are included:

[0055] Pre-obtain the optimal number of concurrent processes in the server;

[0056] Determine whether the number of query requests for the data to be queried exceeds a preset number of query requests;

[0057] If the number of query requests for the data to be queried exceeds the preset number of query requests, the service provider is enabled to execute multiple concurrent processes with the optimal number of concurrent processes correspondingly according to the number of query requests of the querying party.

[0058] In this embodiment, the querying party has multiple query requirements, and the service party can execute concurrent processes corresponding to the multiple query requirements of the querying party, and allocate a dedicated port to each process. Each process executes a single anonymous retrieval separately, which effectively reduces the query time compared to executing multiple rounds of queries in serial. When the querying party's query requirements are large, it is necessary to obtain the optimal number of concurrent processes in the service party in advance, and then determine whether the number of query requests for the data to be queried exceeds the preset number of query requests. If the number of query requests for the data to be queried exceeds the preset number of query requests, the service party is required to execute multiple concurrent processes with the optimal number of concurrent processes corresponding to the number of query requests of the querying party, that is, batch queries can be performed. Assuming that the maximum number of concurrent processes that the running machine can support at one time is m, the concurrent execution is as shown in the following table:

[0059]

[0060] For example, if you need to perform a search for 30 IDs, but a process can be executed at most 7 times concurrently, then execute 7 times concurrently each time, and execute 5 times in series. In addition, in the first concurrent process, the various parameters initialized and calculated by the query party and the service party do not need to be initialized repeatedly, and can be used directly, saving some computing resources. That is, each time the above PIR protocol is executed, before the query party and the service party execute query information query-reply information reply-decryption information decode, some parameters need to be calculated in advance. These parameters can be used in subsequent steps for interaction, and there is no need to repeatedly calculate these parameters, thereby improving query efficiency.

[0061] In this embodiment, by executing concurrent processes and allocating a dedicated port to each process, each process can execute a single anonymous search separately, so as to correctly and quickly obtain the target query plaintext information. Compared with executing data queries serially, the efficiency of data calculation and communication is improved, and the query time is effectively reduced.

[0062] S203: Based on the hidden retrieval method, determine the target encrypted query information of the data to be queried according to the index result.

[0063] In this embodiment, the hidden retrieval method is equivalent to the PIR protocol, which allows users to retrieve the required information from the database stored on the server without disclosing the user's query for the information. The PIR protocol needs to meet both correctness and security. The former means that the querying party can retrieve the target information, and the latter means that the service provider knows nothing about the information retrieved by the querying party. The target encrypted query information may be information about the data corresponding to the data to be queried, and is used to obtain the data to be queried. The querying party obtains the index result, and uses the encryption algorithm of the hidden retrieval method to obtain the target encrypted query information of the data to be queried. The target encrypted query information can be understood as the information that the user actually wants to query.

[0064] It is understandable that the number of target encrypted query information can be one, two or more. When the query party sends batches of target encrypted query information, the service party can confuse and query one by one according to the target query information, and finally return the batches to the query party.

[0065] In one embodiment, determining target encrypted query information of the data to be queried includes:

[0066] Based on the hidden retrieval method, the index result is homomorphically encrypted to obtain the target encrypted query information;

[0067] The target encrypted query information is converted into the target encrypted query information in a communicable form by using a serialization function, and the target encrypted query information in the communicable form is sent to the service party.

[0068] In this embodiment, the index result is homomorphically encrypted using the PIR protocol based on the SEAL homomorphic encryption library to obtain the target encrypted query information. Homomorphic encryption is an encryption method that allows algebraic calculations to be performed on encrypted data. Ensure that the operation is performed on the encrypted data and the decryption result is equivalent to the calculation result after the same operation is performed on the corresponding plaintext data. For example, the data information in the calculation query party includes N pieces, that is, the data list includes N pieces of data information, and the query index that the query party wants to query is i, i∈[0,N]. When the query party receives the query index input by the user, the query party generates a public-private key pair, and the query party uses the private key and adopts a fully homomorphic encryption algorithm to encrypt the query index i to obtain the encrypted target encrypted query information.

[0069] In this embodiment, after obtaining the target encrypted query information, the target encrypted query information is converted into the target encrypted query information in a communicable form using a serialization function, and the target encrypted query information in the communicable form is sent to the service provider. The serialization function is a process of converting a data structure or object into a storable or transmission format. For example, the data structure or object can be converted into JSON, XML, binary or other formats to facilitate transmission or storage between different computers, programming languages ​​or operating systems.

[0070] S204: Send the target encrypted query information to the service provider, so that the service provider responds to the target encrypted query information and obtains target encrypted response information.

[0071] In this embodiment, after the target encrypted query information in communicative form is sent to the service party, the service party first uses a deserialization function to convert the target encrypted query information in communicative form into target encrypted query information in computable form, and then uses the PIR protocol to respond to the target encrypted query information in computable form, thereby obtaining the target encrypted response information in computable form corresponding to the target encrypted query information in computable form, and performs serialization function processing on the target encrypted response information in computable form to obtain the target encrypted response information in communicable form, and feeds it back to the query party.

[0072] S205: Receive the target encrypted response information sent by the service provider, and decrypt the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

[0073] In this embodiment, after receiving the target encrypted response information in a communicable form sent by the service provider, the target encrypted response information in the communicable form is converted and decrypted to obtain the target plaintext information corresponding to the data to be queried.

[0074] In one embodiment, determining target encrypted query information of the data to be queried includes:

[0075] The target encrypted response information is converted into target encrypted response information in a computable form by using a deserialization function, and the target encrypted response information in the computable form is decrypted based on a hidden retrieval method to obtain a decryption result;

[0076] Formatting the decryption result to obtain formatted target data;

[0077] The formatted target data is integrated according to the data type to obtain the target plaintext information corresponding to the data to be queried.

[0078] In this embodiment, the deserialization function converts the serialized data back to the original data structure or object, and the serialization function is usually used in pairs with the deserialization function. After the querying party obtains the target encrypted response information in a communicable form, the deserialization function is used to convert the target encrypted response information in a communicable form into a computable form, and based on the hidden retrieval method, the computable form of the target encrypted response information is decrypted to obtain the decrypted result. It should be noted that different data types and programming languages ​​have different serialization and deserialization methods, so compatibility and correctness should be paid attention to when performing serialization and deserialization operations.

[0079] Since database information generally cannot be directly involved in mathematical calculations, it is necessary to format the decrypted data first to obtain the formatted target data, and then integrate the formatted target data according to the data type to obtain the target plaintext information corresponding to the data to be queried. It can be understood that the formatted target data can be a collection of at least one of document data, image data and video data, so only when these data meet the conditions corresponding to their data categories can they be integrated according to the data type to obtain the target plaintext information corresponding to the data to be queried, that is, a reversible conversion is performed according to the actual meaning and type of the data field.

[0080] For example, when the database information is blacklist information, the general format is "user ID-registration / review date-user age". The registration / review date can be converted into a date interval from January 1, 2000 [considering that the registration dates in the database all occurred in 2000], and then the age is used as the last two digits and concatenated with the former to obtain a computable data. The last two digits of the decryption result are the age, and the remaining part is the date interval from the registration date to January 1, 2000, so as to deduce the target plaintext information corresponding to the data to be queried.

[0081] In this embodiment, after obtaining the final search result, the final search result is compared with the plaintext information in the database for consistency. If the final search result is consistent with the plaintext information in the database, that is, the querying party can correctly obtain the target plaintext information with practical significance. If the final search result is inconsistent with the plaintext information in the database, it is necessary to re-execute the steps of the data anonymity query method until the target plaintext information is obtained. After obtaining the target plaintext information, the original format of the target plaintext information can be restored and integrated into a csv file, and then saved to a specified path to facilitate subsequent hidden queries.

[0082] In summary, the present invention provides a data anonymity query method, device, equipment and medium. This application determines the query ID of the data to be queried by responding to the query request of the data to be queried, obtains the index result corresponding to the query ID in the service party based on the privacy intersection method, determines the target encrypted query information of the data to be queried according to the index result based on the hidden retrieval method, sends the target encrypted query information to the service party, so that the service party responds to the target encrypted query information and obtains the target encrypted response information, receives the target encrypted response information sent by the service party, and decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried. This application greatly reduces the amount of data and the computational complexity during the data query transmission process through the privacy intersection method and the hidden retrieval method, improves the efficiency of data calculation and communication, and ensures the data privacy of the query party and the service party on the premise of ensuring correctness, thereby improving the efficiency of hidden query.

[0083] See also Figure 3 , is another flow chart of a data anonymity query method provided by an embodiment of the present invention. The above data anonymity query method can be applied to Figure 1 The service side (server side) in Figure 3 As shown, the data anonymity query method may include the following steps.

[0084] S301: Receive a query ID of the data to be queried from the querying party, and query an index result corresponding to the query ID, wherein the index result is obtained based on a privacy intersection method.

[0085] In this embodiment, since the service provider holds all the data DB = (ID, info) = {db0, db1, ..., db N-1}, so the data is stored in the form of key-value pairs, that is, db j =(id j ,info j ), First, extract the ID information column of the data to get the data set That is, the ID index data set, where index j For id j The corresponding information is indexed in the database DB, and , is a data set of the "index-information" type, that is, an information index data set. That is to say, the service party's database storage area includes an ID index data set and an information index data set. After receiving the query ID of the data to be queried from the query party, the service party queries the index result corresponding to the query ID in the database based on the privacy intersection method. The data is stored as a set of key-value pairs, where the key is used as a unique identifier. The key-value database has the advantages of simple operation and strong scalability. Common key-value memory databases include Redis and LevelDB.

[0086] Specifically, the ID index data set in the database may be an index after the database stores data according to the data storage rule, and the corresponding data may be accessed according to the ID index data set, so as to improve the efficiency of hidden query.

[0087] S302: Send the index result to the query party, so that the query party determines target encrypted query information of the to-be-queried data according to the index result, wherein the target encrypted query information is obtained based on a hidden retrieval method.

[0088] In this embodiment, after obtaining the index results, the service party sends the index results to the query party, which then enables the query party to homomorphically encrypt the index results based on a hidden retrieval method to obtain target encrypted query information, and then serialize the target encrypted query information into a communicative form and send it to the service party.

[0089] S303: Receive the target encrypted query information sent by the querying party, parse and process the target encrypted query information, and obtain target encrypted response information.

[0090] In this embodiment, while receiving the target encrypted query information in a communicative form sent by the inquirer, the service provider also receives the information index data set that the service provider itself carries, and formats the information index data set, and then performs reversible data conversion according to the actual meaning and type of the data field. The service provider merges the formatted information index data set and the target encrypted query information in a communicative form sent by the inquirer to obtain the merged target encrypted query information, and then parses the merged target encrypted query information to obtain the target encrypted response information.

[0091] In one embodiment, obtaining target encrypted response information includes:

[0092] Using a deserialization function to convert the target encrypted query information into a computable target encrypted query information;

[0093] Based on the hidden retrieval method, calculating the target encrypted response information in a computable form corresponding to the target encrypted query information in a computable form;

[0094] The target encrypted response information in a computable form is converted into target response information in a communicable form by using a serialization function, and is fed back to the inquiring party.

[0095] In this embodiment, after obtaining the merged target encrypted query information in a communicative form, the deserialization function is used to convert the merged target encrypted query information in a communicative form into the merged target encrypted query information in a computable form, and by executing the PIR protocol based on the SEAL homomorphic encryption library, that is, the hidden retrieval method, the computable target encrypted response information corresponding to the computable target encrypted query information in a computable form is calculated, and then the computable target encrypted response information is converted into the target response information in a communicable form using the serialization function, and fed back to the inquiring party.

[0096] S304: Send the target encrypted response information to the querying party, so that the querying party decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

[0097] In this embodiment, the service party sends the target response information in a communicable form to the querying party, so that the querying party first uses a deserialization function to convert the target response information in a communicable form into a computable form, and then decrypts the computable form of the target response information based on a hidden retrieval method, and formats the decrypted data result to obtain the plaintext information of the data to be queried.

[0098] The present invention uses a privacy intersection method and a hidden retrieval method to realize the retrieval function of multiple rounds of query ID information, greatly reducing the amount of data and computational complexity, improving data calculation and communication efficiency, and ensuring the data privacy of the query party and the service party under the premise of ensuring correctness, thereby improving the efficiency of hidden queries. In addition, due to the limitations of the production environment, the message needs to be serialized in the communication stage, and when processing the received message, the received message needs to be deserialized first. The deserialization and serialization functions of the server response message are realized, so that the protocol can be efficiently implemented.

[0099] See also Figure 4 , Figure 4 Schematic diagram of the structure of the data anonymity query device provided by the embodiment of the present invention. In this embodiment, the terminal includes various units for executing Figure 2 For details, please refer to the steps in the corresponding embodiment. Figure 2 as well as Figure 2For the convenience of explanation, only the parts related to this embodiment are shown. Figure 4 The data anonymity query device 40 includes: a query ID determination module 41, an index result acquisition module 42, an encrypted query information determination module 43, an encrypted response information encryption module 44, and a decrypted response information module 45.

[0100] A query ID determination module 41 is used to determine the query ID of the data to be queried in response to a query request for the data to be queried;

[0101] An index result acquisition module 42 is used to acquire the index result corresponding to the query ID in the service provider based on a privacy intersection method;

[0102] An encrypted query information determination module 43 is used to determine the target encrypted query information of the to-be-queried data according to the index result based on the hidden retrieval method;

[0103] The encrypted response information module 44 is used to send the target encrypted query information to the service provider, so that the service provider responds to the target encrypted query information and obtains the target encrypted response information;

[0104] The decryption response information module 45 is used to receive the target encrypted response information sent by the service provider, and decrypt the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

[0105] Optionally, the index result obtaining module 42 is specifically used to:

[0106] Pre-obtain the optimal number of concurrent processes in the server;

[0107] Determine whether the number of query requests for the data to be queried exceeds a preset number of query requests;

[0108] If the number of query requests for the data to be queried exceeds the preset number of query requests, the service provider is enabled to execute multiple concurrent processes with the optimal number of concurrent processes correspondingly according to the number of query requests of the querying party.

[0109] Optionally, the module for determining encrypted query information 43 is specifically used for:

[0110] Based on the hidden retrieval method, the index result is homomorphically encrypted to obtain the target encrypted query information;

[0111] The target encrypted query information is converted into the target encrypted query information in a communicable form by using a serialization function, and the target encrypted query information in the communicable form is sent to the service party.

[0112] Optionally, the decryption response information module 45 is specifically used for:

[0113] The target encrypted response information is converted into target encrypted response information in a computable form by using a deserialization function, and the target encrypted response information in the computable form is decrypted based on a hidden retrieval method to obtain a decryption result;

[0114] Formatting the decryption result to obtain formatted target data;

[0115] The formatted target data is integrated according to the data type to obtain the target plaintext information corresponding to the data to be queried.

[0116] It should be noted that the information interaction, execution process and other contents between the above-mentioned units are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0117] See also Figure 5 , Figure 5 Schematic diagram of the structure of the data anonymity query device provided by the embodiment of the present invention. In this embodiment, the terminal includes various units for executing Figure 3 For details, please refer to the steps in the corresponding embodiment. Figure 3 as well as Figure 3 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 5 The data hiding query device 50 includes: a query index result module 51, a query information determination module 52, a response information acquisition module 53, and a plain text information acquisition module 54.

[0118] The query index result module 51 is used to receive the query ID of the data to be queried from the query party, and query the index result corresponding to the query ID, wherein the index result is obtained based on the privacy intersection method;

[0119] A query information determination module 52, configured to send the index result to the querying party, so that the querying party determines the target encrypted query information of the to-be-queried data according to the index result, wherein the target encrypted query information is obtained based on a hidden retrieval method;

[0120] The response information obtaining module 53 is used to receive the target encrypted query information sent by the querying party, parse the target encrypted query information, and obtain the target encrypted response information;

[0121] The plaintext information obtaining module 54 is used to send the target encrypted response information to the querying party, so that the querying party decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

[0122] Optionally, the above-mentioned response information obtaining module 53 is specifically used for:

[0123] Using a deserialization function to convert the target encrypted query information into a computable target encrypted query information;

[0124] Based on the hidden retrieval method, calculating the target encrypted response information in a computable form corresponding to the target encrypted query information in a computable form;

[0125] The target encrypted response information in a computable form is converted into target response information in a communicable form by using a serialization function, and is fed back to the inquiring party.

[0126] It should be noted that the information interaction, execution process and other contents between the above-mentioned units are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0127] Figure 6 Schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 6 As shown, the computer device of this embodiment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in any of the above-mentioned data anonymity query method embodiments are implemented.

[0128] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Figure 6 This is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.

[0129] In one embodiment, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by a processor in a computer device, the computer device can perform the steps of any embodiment of the data anonymity query method disclosed in the present invention, which will not be repeated here. The computer-readable storage medium can be non-volatile or volatile.

[0130] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0131] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may also be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on a computer device. Further, the memory may also include both an internal storage unit of a computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs, etc. The memory may also be used to temporarily store data that has been output or is to be output.

[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0133] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0134] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0135] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A data anonymity query method, characterized in that: Applied to the querying party, the method comprises: In response to a query request for the data to be queried, determining a query ID of the data to be queried; Based on the privacy intersection method, obtain the index result corresponding to the query ID in the service provider; Based on the hidden retrieval method, determining the target encrypted query information of the data to be queried according to the index result; Sending the target encrypted query information to the service provider, so that the service provider responds to the target encrypted query information and obtains target encrypted response information; The target encrypted response information sent by the service provider is received, and the target encrypted response information is decrypted to obtain the target plaintext information corresponding to the data to be queried.

2. The data anonymity query method according to claim 1, characterized in that: Before obtaining the index result corresponding to the query ID in the service provider, the method includes: Pre-obtain the optimal number of concurrent processes in the server; Determine whether the number of query requests for the data to be queried exceeds a preset number of query requests; If the number of query requests for the data to be queried exceeds the preset number of query requests, the service provider is enabled to execute multiple concurrent processes with the optimal number of concurrent processes correspondingly according to the number of query requests of the querying party.

3. The data anonymity query method according to claim 1, characterized in that: The method of determining the target encrypted query information of the to-be-queried data based on the hidden retrieval method according to the index result includes: Based on the hidden retrieval method, the index result is homomorphically encrypted to obtain the target encrypted query information; The target encrypted query information is converted into the target encrypted query information in a communicable form by using a serialization function, and the target encrypted query information in the communicable form is sent to the service party.

4. The data anonymity query method according to claim 1, characterized in that: The decrypting the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried includes: The target encrypted response information is converted into target encrypted response information in a computable form by using a deserialization function, and the target encrypted response information in the computable form is decrypted based on a hidden retrieval method to obtain a decryption result; Formatting the decrypted result to obtain formatted target data; The formatted target data is integrated according to the data type to obtain the target plaintext information corresponding to the data to be queried.

5. A data anonymity query method, characterized in that: Applied to the service side, the method includes: Receiving a query ID of the data to be queried from the querying party, and querying an index result corresponding to the query ID, wherein the index result is obtained based on a privacy intersection method; Sending the index result to the query party, so that the query party determines the target encrypted query information of the data to be queried according to the index result, wherein the target encrypted query information is obtained based on the hidden retrieval method; Receiving the target encrypted query information sent by the querying party, parsing and processing the target encrypted query information, and obtaining target encrypted response information; The target encrypted response information is sent to the querying party, so that the querying party decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

6. The data anonymity query method according to claim 5, characterized in that: The step of parsing the target encrypted query information to obtain the target encrypted response information includes: Using a deserialization function to convert the target encrypted query information into a computable target encrypted query information; Based on the hidden retrieval method, calculating the target encrypted response information in a computable form corresponding to the target encrypted query information in a computable form; The target encrypted response information in a computable form is converted into target response information in a communicable form by using a serialization function, and is fed back to the inquiring party.

7. A hidden query device, characterized in that: Configured at the querying party, the device comprises: A query ID determination module, configured to determine a query ID of the data to be queried in response to a query request for the data to be queried; An index result acquisition module is used to acquire the index result corresponding to the query ID in the service provider based on a privacy intersection method; An encrypted query information determination module is used to determine the target encrypted query information of the to-be-queried data according to the index result based on the hidden retrieval method; An encrypted response information module, used to send the target encrypted query information to the service provider, so that the service provider responds to the target encrypted query information and obtains target encrypted response information; The decryption response information module is used to receive the target encrypted response information sent by the service provider, and decrypt the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

8. A hidden query device, characterized in that: Configured on the service side, the device includes: A query index result module, used to receive a query ID of the data to be queried from the query party, and query the index result corresponding to the query ID, wherein the index result is obtained based on a privacy intersection method; A query information determination module, used to send the index result to the query party, so that the query party determines the target encrypted query information of the data to be queried according to the index result, wherein the target encrypted query information is obtained based on a hidden retrieval method; A response information obtaining module is used to receive the target encrypted query information sent by the querying party, parse the target encrypted query information, and obtain target encrypted response information; The module for obtaining plaintext information is used to send the target encrypted response information to the querying party, so that the querying party decrypts the target encrypted response information to obtain the target plaintext information corresponding to the data to be queried.

9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the data anonymity query method as described in any one of claims 1 to 4, and / or implements the data anonymity query method as described in any one of claims 5 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the data anonymity query method as described in any one of claims 1 to 4, and / or implements the data anonymity query method as described in any one of claims 5 to 6.

Citation Information

Cited By

  • Data query method and device, equipment and storage medium

    CN120950677A