Data privacy query method and device, storage medium and electronic equipment
By generating a homomorphic encrypted private key on the data service provider's part, parsing the data query request, and constructing the target key string, the problem of the data service provider being unable to decrypt the ciphertext is solved, and the effect of accurately calculating the hit rate and obtaining feature data is achieved on the basis of stealth query.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU BODUN XIYAN TECH CO LTD
- Filing Date
- 2023-06-05
- Publication Date
- 2026-05-08
AI Technical Summary
In existing data query solutions, data service providers cannot decrypt the encrypted messages sent by the data querying party, and cannot know whether the data querying party has successfully retrieved the corresponding user data through the user identifier to be queried, resulting in low accuracy of the hit rate statistics.
The data service provider generates a homomorphically encrypted private key, obtains the target function and random polynomial by parsing the data query request, determines whether the target user identifier exists in the user identifier set, encrypts the user identifier and feature data based on the target key string, and sends the query result.
It enables accurate statistical data on the hit rate of queryers without exposing user identifiers, ensuring user identifier security, and obtaining feature data based on anonymous queries.
Smart Images

Figure CN116680324B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of cryptography, and more specifically, to a data anonymity query method, a data anonymity query device, a computer-readable storage medium, and an electronic device. Background Technology
[0002] In existing data query solutions, the data service provider cannot decrypt the encrypted messages sent by the data query party, and therefore cannot know whether the data query party has successfully retrieved the corresponding user data from the data service provider using the user identifier to be queried. Consequently, it is impossible to calculate the hit rate of the data query party, which reduces the accuracy of the hit rate statistics.
[0003] It should be noted that the information in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this disclosure is to provide a data anonymity query method, a data anonymity query device, a computer-readable storage medium, and an electronic device, thereby overcoming, at least to some extent, the problem of low accuracy of statistical results of hit rates due to limitations and defects in related technologies.
[0005] According to one aspect of this disclosure, a data anonymity query method is provided, configured on a data service provider, the data anonymity query method comprising:
[0006] The data query request sent by the data query party is parsed to obtain the first objective function and the first objective random polynomial;
[0007] Based on the first objective function, determine whether there exists a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request;
[0008] When the existence of the target user identifier is determined, the feature data corresponding to the target user identifier is obtained, and a target key string is constructed according to the first target random polynomial;
[0009] The user identifier and feature data to be queried are encrypted based on the target key string to obtain the data query result, and the data query result is sent to the data querying party.
[0010] In one exemplary embodiment of this disclosure, the data query request sent by the data querying party is parsed to obtain a first objective function and a first objective random polynomial, including:
[0011] In response to the data query request sent by the data querying party, the data query request is parsed to obtain the first encryption function and the first encryption polynomial;
[0012] Obtain the homomorphic encryption key pair corresponding to the data query party, and based on the homomorphic encryption private key in the homomorphic encryption key pair, decrypt the first encryption function and the first encryption polynomial to obtain the first target function and the first target random polynomial.
[0013] In an exemplary embodiment of this disclosure, determining whether a target user identifier corresponding to the user identifier to be queried in the query request exists in a preset set of user identifiers according to the first objective function includes:
[0014] After substituting the user identifier to be queried into the first objective function, the function value of the first objective function is calculated;
[0015] Based on the function value, determine whether there exists a target user identifier in the preset set of user identifiers that corresponds to the user identifier to be queried in the query request.
[0016] In an exemplary embodiment of this disclosure, if the function value is zero, then the preset user identifier set contains a target user identifier corresponding to the user identifier to be queried in the query request;
[0017] If the function value is any random constant, then there is no target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request.
[0018] In one exemplary embodiment of this disclosure, constructing a target key string based on the first target random polynomial includes:
[0019] Obtain the first primitive random polynomial corresponding to the target user identifier, and calculate the first ratio between the first target random polynomial and the first primitive random polynomial;
[0020] The first ratio is hashed to obtain a first hash string, and the first hash string is fragmented to obtain a first key string and a second key string;
[0021] The target key string is constructed based on the first key string and the second key string.
[0022] In one exemplary embodiment of this disclosure, the user identifier and feature data to be queried are encrypted based on the target key string to obtain a data query result, including:
[0023] The identifier of the user to be queried is encrypted based on the first key string in the target key string;
[0024] The feature data is encrypted based on the second key string in the target key string, and the data query result is obtained based on the encrypted user identifier and the encrypted feature data.
[0025] In one exemplary embodiment of this disclosure, the data anonymity query method further includes:
[0026] Obtain the target user identifier corresponding to the data query party, and calculate the first identifier count of the target user identifier;
[0027] The number of hits for the data query party is determined based on the number of first identifiers, and the data query fee payable by the data query party is calculated based on the number of hits.
[0028] In one exemplary embodiment of this disclosure, the data anonymity query method further includes:
[0029] Obtain the original user identifier held by the data service provider itself, and construct the preset user identifier set based on the original user identifier;
[0030] Based on the original user identifiers included in the user identifier set, construct a first original user identifier polynomial and calculate the first identifier polynomial coefficients of the first original user identifier polynomial.
[0031] Construct the first primitive random polynomial and calculate the coefficients of the first random polynomial.
[0032] The first identifier polynomial coefficients and the first random polynomial coefficients are encrypted using the homomorphic encryption public key in the homomorphic encryption key pair. The encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients are then sent to the data query party, so that the data query party can generate a data query request based on the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients.
[0033] According to one aspect of this disclosure, a data anonymity query method is provided, configured on a data querying party, the data anonymity query method comprising:
[0034] Receive the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients sent by the data service provider;
[0035] A data query request is generated based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, the preset second random number, and the user identifier to be queried.
[0036] The data query request is sent to the data service provider, and the data service provider responds to the data query request. When it is determined that the user identifier to be queried exists in the user identifier set held by the data service provider, the data query result is fed back.
[0037] The data query result is decrypted based on the second random number to obtain feature data corresponding to the user identifier to be queried.
[0038] In one exemplary embodiment of this disclosure, a data query request is generated based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, a preset second random number, and the identifier of the user to be queried, including:
[0039] Generate a second random number, and calculate the first objective function based on the second random number and the coefficients of the encrypted first identifier polynomial, and calculate the first objective random polynomial based on the second random number and the coefficients of the encrypted first random polynomial;
[0040] The first objective function and the first objective random polynomial are encrypted using the homomorphic encryption public key in the homomorphic encryption key pair to obtain the first encryption function and the first encryption polynomial.
[0041] A data query request is generated based on the first encryption function, the first encryption polynomial, and the user identifier to be queried.
[0042] In one exemplary embodiment of this disclosure, the data query result is decrypted based on the second random number to obtain feature data corresponding to the identifier of the user to be queried, including:
[0043] Calculate a standard key string corresponding to the user identifier to be queried based on the second random number, and decrypt the data query result based on the standard key string to obtain the feature data corresponding to the user identifier to be queried.
[0044] In one exemplary embodiment of this disclosure, calculating the standard key string corresponding to the user identifier to be queried based on a second random number includes:
[0045] The second random number is hashed to obtain a second hash string, and the second hash string is fragmented to obtain a third key string and a fourth key string;
[0046] The standard key string is obtained based on the third key string and the fourth key string.
[0047] In one exemplary embodiment of this disclosure, the data query result is decrypted based on the standard key string to obtain feature data corresponding to the user identifier to be queried, including:
[0048] Decrypt the encrypted user identifier in the data query result based on the third key string in the standard key string;
[0049] After confirming that the encrypted user identifier to be queried has been successfully decrypted, the encrypted feature data in the data query result is decrypted based on the fourth key string in the standard key string to obtain the feature data corresponding to the user identifier to be queried.
[0050] According to one aspect of this disclosure, a data anonymity query device is provided, configured in a data service provider, the data anonymity query device comprising:
[0051] The data query request parsing module is used to parse the data query request sent by the data query party to obtain the first objective function and the first objective random polynomial;
[0052] The user identifier determination module is used to determine, based on the first objective function, whether there exists a target user identifier in the preset user identifier set that corresponds to the user identifier in the query request.
[0053] The feature data acquisition module is used to acquire feature data corresponding to the target user identifier when it is determined that the target user identifier exists, and to construct a target key string according to the first target random polynomial.
[0054] The data query result feedback module is used to encrypt the user identifier and feature data to be queried based on the target key string, obtain the data query result, and send the data query result to the data query party.
[0055] According to one aspect of this disclosure, a data anonymity query device is provided, configured on a data querying party, the data anonymity query device comprising:
[0056] The first receiving module is used to receive the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients sent by the data service provider.
[0057] The data query request generation module is used to generate a data query request based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, the preset second random number, and the identifier of the user to be queried.
[0058] The data query result receiving module is used to send the data query request to the data service provider and receive the data service provider's response to the data query request. When it is determined that the user identifier to be queried exists in the user identifier set held by the data service provider, the module provides the data query result.
[0059] The data query result decryption module is used to decrypt the data query result based on the second random number to obtain feature data corresponding to the user identifier to be queried.
[0060] According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the data anonymity query method described in any of the preceding claims.
[0061] According to one aspect of this disclosure, an electronic device is provided, comprising:
[0062] Processor; and
[0063] Memory for storing the executable instructions of the processor;
[0064] The processor is configured to execute any of the above-described data anonymity query methods by executing the executable instructions.
[0065] This disclosure provides a data anonymity query method. Firstly, it parses a data query request sent by a data querying party to obtain a first objective function and a first objective random polynomial. Then, based on the first objective function, it determines whether a target user identifier corresponding to the user identifier to be queried in the query request exists in a preset user identifier set. Next, upon determining the existence of a target user identifier, it acquires feature data corresponding to the target user identifier and constructs a target key string based on the first objective random polynomial. Finally, it encrypts the user identifier to be queried and the feature data based on the target key string to obtain the data query result, which is then sent to the data querying party. Since the data service provider can determine whether the user identifier to be queried exists in the user identifier set, the method allows for data anonymity querying. When the user identifier is in the user identifier set, it is considered that the data query has been successful. This solves the problem in existing technologies where the data service provider cannot know whether the data query provider has successfully retrieved the corresponding user data from the data service provider using the user identifier to be queried, thus making it impossible to statistically analyze the hit rate and reducing the accuracy of the hit rate statistics. On the other hand, since the existence of the user identifier to be queried is determined by the first objective function, the feature data can be queried without exposing the user identifier to be queried. That is, the corresponding feature data can be retrieved from the data service provider through anonymous querying, thus enabling data querying while ensuring the security of the user identifier to be queried.
[0066] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0067] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0068] Figure 1 The flowchart illustrates an example embodiment of a data anonymity query method configured on a data service provider according to the present disclosure.
[0069] Figure 2 An example diagram illustrating a data query system according to an exemplary embodiment of the present disclosure is shown.
[0070] Figure 3 The diagram illustrates a method flowchart for generating a data query request according to an example embodiment of the present disclosure.
[0071] Figure 4 The flowchart illustrates an example embodiment of a data anonymity query method configured on a data querying party according to the present disclosure.
[0072] Figure 5 The diagram illustrates an example of an interactive data anonymity query method based on two-sided interaction, according to an exemplary embodiment of this disclosure.
[0073] Figure 6 This diagram schematically illustrates a data anonymity query apparatus configured on a data service provider according to an example embodiment of the present disclosure.
[0074] Figure 7 The diagram schematically illustrates a data anonymity query apparatus configured on a data querying party according to an exemplary embodiment of the present disclosure.
[0075] Figure 8 An electronic device for implementing the above-described data anonymity query method is illustrated according to an example embodiment of this disclosure. Detailed Implementation
[0076] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0077] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0078] Currently, the most common method for anonymous querying in practical applications is Labeled PSI (Private Set Intersection), which utilizes homomorphic encryption and DH-OPRF (Diffie Hellman-Oblivious Pseudorandom Function) to complete most of the computation offline, with the query completed online through minimal communication. However, because this approach uses homomorphic encryption to encrypt the original data, the service provider cannot obtain information about whether the user's identifier has been matched, thus hindering metering and billing and making it difficult to implement in business applications.
[0079] In one example embodiment, data querying based on Labeled PSI in practical applications can be divided into three stages: bucketing, data preprocessing, and querying. Specifically, firstly, to balance computational efficiency and anonymity for ease of application, the data is bucketed before querying, with two indistinguishability levels set: tens of thousands and millions. Secondly, after bucketing, the data is preprocessed, placing a large amount of computation in the preprocessing stage to improve query efficiency and shorten query time. Furthermore, the overall query process is as follows:
[0080] First, assume M(c) is the ID dataset of the queried party (data service provider), that is, the ID feature pair of the queried party, which is a random plaintext element; second, the two parties negotiate a homomorphic encryption scheme, with the querying party generating a public-private key pair and keeping the private key; then, the data service provider pre-buckets and preprocesses its data; further, the querying party homomorphically encrypts the ID and sends the ciphertext to the service provider; even further, the service provider performs a cryptomorphic calculation of the intersection polynomial and the feature polynomial in the bucket corresponding to the ciphertext; the intersection polynomial can be specifically referred to as the following formula (1):
[0081]
[0082] Where M(c) is the intersection polynomial, r i Here, x is a random number, c is the identifier of the user to be queried, and x is the user ID. i Let X be the original user identifier, and let X be the set of user identifiers; meanwhile, the characteristic polynomial can be specifically represented by the following formula (2):
[0083]
[0084] Where L(c) represents the data query result, l i For the characteristic data, RandomElemet is a random number; furthermore, the data query result is encrypted and the ciphertext is sent to the data queryer; finally, the data queryer first decrypts the result of the intersection polynomial M(c), and if M(c) = 0, then decrypts the characteristic polynomial to obtain the query result l. i (That is, feature data).
[0085] Based on the above-described scheme, it can be seen that in the data query scheme based on Labeled PSI, since the private key is generated by the data querying party, the data service provider cannot decrypt the ciphertext including the data query request sent by the data querying party during the data query process. Consequently, it cannot know whether the query identifier included in the data query request exists in the hash bucket described above, thus making it impossible to know whether the query result is hit when querying the query identifier included in the data query request.
[0086] Based on the above description, to enable the data querying party to know whether the queried identifier has been matched, it is advisable to generate a homomorphically encrypted private key at the data service provider. This allows the data service provider to decrypt the data based on the private key, thereby obtaining information on whether the queried data identifier has been matched. Therefore, this example embodiment first provides a data anonymity query method, which can run on the server, server cluster, or cloud server where the data service provider is located. Of course, those skilled in the art can also run the method disclosed herein on other platforms as needed, and this exemplary embodiment does not impose any special limitations on this. Specifically, refer to... Figure 1 As shown, this data anonymity query method may include the following steps:
[0087] Step S110. Parse the data query request sent by the data query party to obtain the first objective function and the first objective random polynomial;
[0088] Step S120. Determine whether there exists a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request, based on the first objective function;
[0089] Step S130. When it is determined that the target user identifier exists, obtain the feature data corresponding to the target user identifier, and construct the target key string according to the first target random polynomial;
[0090] Step S140. Encrypt the user identifier and feature data to be queried based on the target key string to obtain the data query result, and send the data query result to the data query party.
[0091] In the aforementioned anonymous data query method, on the one hand, the data query request sent by the data querying party is parsed to obtain a first objective function and a first objective random polynomial; then, based on the first objective function, it is determined whether a target user identifier corresponding to the user identifier to be queried in the query request exists in the preset user identifier set; then, if the existence of a target user identifier is determined, the feature data corresponding to the target user identifier is obtained, and a target key string is constructed based on the first objective random polynomial; finally, the user identifier to be queried and the feature data are encrypted based on the target key string to obtain the data query result, and the data query result is sent to the data querying party. The data service provider determines that the user identifier to be queried exists in the user identifier set. When the query is successful, it can be considered that the data queryer has successfully retrieved the data. This solves the problem in existing technologies where the data service provider cannot know whether the data queryer has successfully retrieved the corresponding user data from the data service provider using the user identifier to be queried, thus making it impossible to calculate the hit rate and reducing the accuracy of the hit rate statistics. On the other hand, since the existence of the user identifier to be queried is determined by the first objective function, the query of feature data can be achieved without exposing the user identifier to be queried. That is, the corresponding feature data can be retrieved from the data service provider through anonymous query, thus enabling data query while ensuring the security of the user identifier to be queried.
[0092] The data anonymity query method described in the exemplary embodiments of this disclosure will be further explained and illustrated below with reference to the accompanying drawings.
[0093] First, the application scenarios of the exemplary embodiments of this disclosure will be explained and described. The data anonymity query method described in the exemplary embodiments of this disclosure can be used in anonymity query scenarios. Specifically, anonymity query refers to the querying party obtaining the field information (i.e., feature data) corresponding to the query identifier from the data service provider (i.e., the data provider) without disclosing the query identifier. In actual business applications, the service provider often needs to know whether each query is successful and to charge based on the number of successful queries. Meanwhile, the data anonymity query method described in the exemplary embodiments of this disclosure allows the data service provider to only know whether the querying party's target identifier is matched, but not which specific target identifier was matched; therefore, it enables the data querying party to achieve the purpose of data querying while remaining anonymous, thereby improving the security of the target identifier.
[0094] Secondly, the data query system involved in the exemplary embodiments of this disclosure will be explained and described. Specifically, refer to... Figure 2As shown, the data query system may include a data query party 210 and a data service party 220; wherein, the data query party can communicate with the data service party through a wired network or a wireless network; in practical applications, the data query party can be used to send data query requests to the data service party, and the data service party can be used to implement the data anonymity query method for configuring the data query party as described in the example embodiments of this disclosure.
[0095] In one possible example embodiment, the data querying party described above can be the user's terminal device, which may include a mobile terminal (such as a smartphone, tablet, or personal computer) or a fixed terminal (such as a desktop computer). In practical applications, when a user needs to query data, they can send a data query request to the data service provider through their terminal device; meanwhile, the data service provider may include servers, server clusters, and cloud servers, etc., and this example does not impose any special limitations on this.
[0096] The following will combine Figure 3 This document explains and illustrates the specific process of generating data query requests involved in the exemplary embodiments of this disclosure. Specifically, please refer to... Figure 3 As shown, the specific process of generating a data query request may include the following steps:
[0097] Step S310: Obtain the original user identifier held by the data service provider itself, and construct the preset user identifier set based on the original user identifier;
[0098] Step S320: Construct a first original user identifier polynomial based on the original user identifiers included in the user identifier set, and calculate the first identifier polynomial coefficients of the first original user identifier polynomial.
[0099] Step S330: Construct the first primitive random polynomial and calculate the first random polynomial coefficients of the first primitive random polynomial;
[0100] Step S340: The first identifier polynomial coefficients and the first random polynomial coefficients are encrypted based on the homomorphic encryption public key in the homomorphic encryption key pair, and the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients are sent to the data query party so that the data query party can generate a data query request based on the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients.
[0101] The following will explain and describe steps S310-S340.
[0102] Specifically, firstly, the data service provider needs to generate a homomorphic encryption key pair based on homomorphic encryption. This key pair can include a homomorphic encryption public key (pk) and a homomorphic encryption private key (sk). Simultaneously, the public key (pk) needs to be sent to the data querying party. It should be noted that in practical applications, different data anonymity query methods can correspond to different homomorphic encryption key pairs, or they can correspond to the same homomorphic encryption key pair; this example does not impose any special restrictions. It should also be noted that the reason for limiting the homomorphic encryption key pair to be generated by the data service provider is to avoid the data service provider being unable to decrypt the ciphertext and thus unable to definitively determine whether the data has been matched.
[0103] Secondly, the data service provider obtains all the original user identifiers it holds; these original user identifiers may include, but are not limited to, user ID card numbers, phone numbers, bank card numbers, etc., and this example does not impose any special restrictions on them; then, it constructs a preset user identifier set X using the original user identifiers it holds; where X = (x1, x2, ..., x...). n Further, a first original user identifier polynomial is generated based on the user identifier set X; wherein, the first original user identifier polynomial can be referred to as shown in formula (3):
[0104]
[0105] Where M(x) is the first original user identifier polynomial, x i Let x be the original user identifier, which can be used to replace the user identifier to be queried sent by each data querying party. Based on this, if the user identifier to be queried exists in the user identifier set, then M(x) = 0. Conversely, if the user identifier to be queried is substituted into the first original user identifier polynomial and M(x) = 0, then the user identifier to be queried exists in the user identifier set. Furthermore, to improve the security of the original data identifier, it is also necessary to calculate the coefficients z of the first identifier polynomial. i Let i = 0, ..., n, and encrypt the coefficients of the first identifier polynomial using a homomorphic encryption public key to obtain the encrypted coefficients of the first identifier polynomial. And send it to the data queryer; in addition, generate a first primitive random polynomial R(x), and calculate the first random polynomial coefficients {r} of the first primitive random polynomial R(x). i Then, the coefficients r of the first random polynomial are encrypted using a homomorphic public key. i After encryption, the first random polynomial coefficients {Enc(r)} are obtained. i )} i=0,...,nThe encrypted first random polynomial coefficients are then sent to the data querying party.
[0106] Finally, after the data querying party receives the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients, it generates a second random number r, and generates a data query request based on the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients, and then sends the data query request to the data service provider.
[0107] The following will combine Figure 2 as well as Figure 3 right Figure 1 The data anonymity query method shown will be further explained and illustrated. Specifically:
[0108] In step S110, the data query request sent by the data query party is parsed to obtain the first objective function and the first objective random polynomial.
[0109] In this example embodiment, parsing the data query request sent by the data querying party to obtain the first objective function and the first objective random polynomial can be achieved in the following way:
[0110] First, in response to the data query request sent by the data querying party, the data query request is parsed to obtain the first encryption function and the first encryption polynomial;
[0111] Next, a homomorphic encryption key pair corresponding to the data query party is obtained, and based on the homomorphic encryption private key in the homomorphic encryption key pair, the first encryption function and the first encryption polynomial are decrypted to obtain a first objective function and a first objective random polynomial. The first objective function obtained after decryption is f(x), and the first objective random polynomial obtained after decryption is R(x)·r, where r is a second random number generated by the data query party.
[0112] In step S120, the first objective function is used to determine whether there exists a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request.
[0113] Specifically, determining whether a target user identifier exists in the preset set of user identifiers corresponding to the user identifier to be queried in the query request, based on the first objective function, can be achieved in the following way:
[0114] First, the user identifier to be queried is substituted into the first objective function, and then the function value of the first objective function is calculated;
[0115] Secondly, based on the function value, it is determined whether there exists a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request. Specifically, if the function value is zero, then there exists a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request; if the function value is any random constant, then there does not exist a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request. That is, when f(x) = 0, it can be determined that there exists a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request (i.e., x∈X); when f(x) is any random number, it can be determined that there does not exist a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request (i.e., x∈X). In other words, in practical applications, the user identifier recorded here can be the user's ID card number or mobile phone number, etc.; whether it is the original user identifier of the service provider or the identifier to be queried by the querying party, it is a string of data generated by homomorphic encryption; at the same time, since the same encryption method is used, the ciphertext data obtained by the same user identifier is also the same; therefore, if the function value obtained by substituting the data string is zero, it can be considered a hit.
[0116] In step S130, when it is determined that the target user identifier exists, feature data corresponding to the target user identifier is obtained, and a target key string is constructed according to the first target random polynomial.
[0117] In this example embodiment, firstly, it is determined that a target user identifier x corresponding to the user identifier x to be queried exists in the preset set of user identifiers. i In this case, feature data corresponding to the target user identifier can be obtained from the database of the data service provider. The feature data recorded here can also be considered as tag information corresponding to the target user. This feature data may include user attribute information, user consumption information, user health information, and user asset information corresponding to the target user identifier. User attribute information may include, for example, user age, place of origin, education level, user preferences, address, and contact information. User consumption information may include user purchasing habits and purchasing power. User health information may include user health examination reports and medical records. User asset information may include user savings and the user's real estate or stock funds, etc. This example does not impose any special restrictions on these aspects.
[0118] It should be further explained here that the user identifier to be queried recorded in the example embodiments of this disclosure can be used to represent the user identifier that the data querying party needs to query; that is, the data querying party needs to query the feature data corresponding to the user identifier to be queried from the data service provider based on the user identifier to be queried; the original user identifier recorded in the example embodiments of this disclosure can be used to represent the user identifier held by the data service provider; that is, the data service provider may include multiple original user identifiers, and each original user identifier may correspond to corresponding feature data; the target user identifier recorded in the example embodiments of this disclosure can be used to represent the user identifier held by the data service provider that corresponds to the identifier to be queried; alternatively, it may be necessary to determine whether the data querying party's identifier to be queried matches the query by whether a target user identifier exists in the data service provider. For example, suppose the data querying party is a credit institution and the data service provider is a bank; when the credit institution needs to assess the risk of a user, it can request the corresponding feature data from the bank to conduct the risk assessment.
[0119] Secondly, a target key string is constructed based on the first target random polynomial. Specifically, this can be achieved as follows: First, obtain the first original random polynomial corresponding to the target user identifier, and calculate the first ratio between the first target random polynomial and the first original random polynomial; second, perform hash processing on the first ratio to obtain a first hash string, and perform fragmentation processing on the first hash string to obtain a first key string and a second key string; then, construct the target key string based on the first key string and the second key string.
[0120] That is, firstly, the data service provider constructs (k1,k2,...,k) based on R(x)·r. n That is, constructing the original key string for each original user identifier; then, let Secondly, in practical applications, calculating the target key string corresponding to the target user identifier can yield the first target random polynomial R(x) and the first original random polynomial R(x). i Then, the first ratio, which is also the second random number r, is calculated; further, the second random number r is hashed to obtain the first hash string, and the first hash string is fragmented to obtain the first key string id_key. i and the second key string label_key i Then, concatenating the first key string and the second key string yields the target key string k. i ; where k i =id_key i label_keyi .
[0121] In step S140, the user identifier and feature data to be queried are encrypted based on the target key string to obtain the data query result, and the data query result is sent to the data querying party.
[0122] Specifically, firstly, the user identifier to be queried and the feature data are encrypted based on the target key string to obtain the data query result. This can be achieved as follows: First, the user identifier to be queried is encrypted based on the first key string; secondly, the feature data is encrypted based on the second key string, and the data query result is obtained based on the encrypted user identifier to be queried and the encrypted feature data. Specifically, the obtained data query result can be {(id_key...} i E(label) i Then, the data query result is sent to the data query party so that the data query party can obtain the corresponding feature data after decryption.
[0123] Furthermore, the data anonymity query method described in the exemplary embodiments of this disclosure may further include the following steps: First, obtaining the target user identifier corresponding to the data querying party, and calculating a first identifier count of the target user identifier; second, determining the hit count of the data querying party based on the first identifier count, and calculating the data query fee payable by the data querying party based on the hit count. That is, the data anonymity query method described in the exemplary embodiments of this disclosure implements fee calculation based on the number of hits of the target user identifier.
[0124] At this point, all data anonymity query methods for data service providers have been implemented. The following, combined with... Figure 4 This disclosure provides an explanation and description of the data anonymity query method configured on the data querying party, as described in the example embodiments. Specifically, refer to... Figure 4 As shown, this data anonymity query method may include the following steps:
[0125] Step S410: Receive the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients sent by the data service provider.
[0126] Specifically, generating a data query request based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, a preset second random number, and the user identifier to be queried can be achieved as follows: First, generate the second random number, and calculate the first objective function based on the second random number and the encrypted first identifier polynomial coefficients; then calculate the first target random polynomial based on the second random number and the encrypted first random polynomial coefficients. Second, encrypt the first objective function and the first target random polynomial based on the homomorphic encryption public key in the homomorphic encryption key pair to obtain the first encryption function and the first encryption polynomial. Finally, generate a data query request based on the first encryption function, the first encryption polynomial, and the user identifier to be queried.
[0127] Step S420: Generate a data query request based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, the preset second random number, and the user identifier to be queried.
[0128] Step S40: Send the data query request to the data service provider and receive the data service provider's response to the data query request. When it is determined that the user identifier to be queried exists in the user identifier set held by the data service provider, the data query result is fed back.
[0129] Step S440: Decrypt the data query result based on the second random number to obtain feature data corresponding to the user identifier to be queried.
[0130] Specifically, the data query result is decrypted based on the second random number to obtain the feature data corresponding to the user identifier to be queried. This can be achieved as follows: a standard key string corresponding to the user identifier to be queried is calculated based on the second random number, and the data query result is decrypted based on the standard key string to obtain the feature data corresponding to the user identifier to be queried.
[0131] In one example embodiment, the standard key string corresponding to the user identifier to be queried can be calculated based on a second random number in the following way: the second random number is hashed to obtain a second hash string, and the second hash string is fragmented to obtain a third key string and a fourth key string; the standard key string is obtained based on the third key string and the fourth key string.
[0132] In one example embodiment, decrypting the data query result based on the standard key string to obtain feature data corresponding to the user identifier to be queried can be achieved as follows: First, decrypt the encrypted user identifier to be queried in the data query result based on the third key string; second, after confirming that the encrypted user identifier to be queried has been successfully decrypted, decrypt the encrypted feature data in the data query result based on the fourth key string to obtain feature data corresponding to the user identifier to be queried.
[0133] The following will explain and illustrate steps S410-S440. Specifically, in practical applications, when the data querying party receives the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients, it can generate a corresponding data query request based on the user identifier to be queried and send the data query request to the data service provider. Simultaneously, after receiving the data query result from the data service provider, it can decrypt the data query result to obtain the feature data corresponding to the user identifier to be queried.
[0134] Specifically, in the process of decrypting the data query results, the data querying party first calculates the standard key string k of the user identifier x to be queried. x ; where the standard key string k x The specific calculation process is as follows: k x =H(pk) r The formula is: ) = id_key || label_key; Secondly, after obtaining the standard key string, it can be compared with the id_key in the data query result. i The comparison is performed one by one for i = 0, ..., n. When id_key = id_key i If so, it can be considered that a matching ID (target user identifier) has been found, and then the label_key can be used to decrypt and obtain the feature data corresponding to the user identifier to be queried.
[0135] It is worth noting that, in practical applications, the original key string k of each original user identifier... i The specific calculation process is as follows: First, Secondly, in practical applications, calculating the target key string corresponding to the target user identifier can yield the first target random polynomial R(x) and the first original random polynomial R(x). i Then, the first ratio, which is also the second random number r, is calculated; further, the second random number r is hashed to obtain the first hash string, and the first hash string is fragmented to obtain the first key string id_key. iand the second key string label_key i Then, concatenating the first key string and the second key string yields the target key string k. i The specific calculation process for the standard key string is as follows: k x =H(pk) r = id_key || label_key; That is, in fact, if the data is matched, both the standard key string and the target key string of the user identifier to be queried are generated by the second random number r; that is, the second random number is hashed to obtain a string, and then it is divided into the first key string, the second key string, the third key string, and the fourth key string using the same segmentation method; Thus, the encryption process of the user identifier to be queried and the retrieved feature data on the data service provider can be realized; and the decryption process of the user identifier to be queried and the retrieved feature data on the data query provider can be realized, thereby achieving the purpose of data query.
[0136] At this point, the user data query method described in the exemplary embodiments of this disclosure has been fully implemented. The following will be combined with... Figure 5 The data anonymity query method described in the exemplary embodiments of this disclosure will be further explained and illustrated. Specifically, refer to... Figure 5 As shown, this data anonymity query method may include the following steps:
[0137] Step S510: The data service provider generates a homomorphic encryption key pair and sends the homomorphic encryption public key in the homomorphic encryption key pair to the data query party;
[0138] Step S520: The data service provider obtains the original user identifier it holds and constructs a preset user identifier set based on the original user identifier.
[0139] Step S530: The data service provider constructs a first original user identifier polynomial based on the original user identifiers included in the user identifier set, and calculates the first identifier polynomial coefficients of the first original user identifier polynomial.
[0140] Step S540: The data service provider constructs a first primitive random polynomial and calculates the first random polynomial coefficients of the first primitive random polynomial.
[0141] In step S550, the data service provider encrypts the first identifier polynomial coefficients and the first random polynomial coefficients based on the homomorphic encryption public key in the homomorphic encryption key pair, and sends the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients to the data querying party.
[0142] Step S560: The data querying party generates a data query request based on the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients, and sends the data query request to the data service provider.
[0143] Step S570: The data service provider responds to the data query request and generates the data query result when it determines that the user identifier to be queried exists in the user identifier set held by the data service provider.
[0144] Step S580: The data service provider sends the data query results to the data query provider;
[0145] In step S590, the data querying party decrypts the data query result based on the second random number to obtain the feature data corresponding to the identifier of the user to be queried.
[0146] Thus, the data anonymity query method described in the exemplary embodiments of this disclosure has been fully implemented. Based on the foregoing description, it can be understood that the data anonymity query method described in the exemplary embodiments of this disclosure enables the service provider to obtain whether the user identifier to be queried is matched through decryption, but does not know the specific representation information of the user identifier to be queried, thereby achieving the purpose of anonymity; at the same time, the data querying party also obtains the feature number, thereby achieving the purpose of data query.
[0147] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein. Specifically:
[0148] This disclosure also provides an example embodiment of a data anonymity query device, which can be configured on a data service provider. Specifically, refer to... Figure 6 As shown, the data anonymity query device may include a data query request parsing module 610, a user identifier determination module 620, a feature data acquisition module 630, and a data query result feedback module 640. Wherein:
[0149] The data query request parsing module 610 can be used to parse the data query request sent by the data query party to obtain the first objective function and the first objective random polynomial;
[0150] The user identifier determination module 620 can be used to determine whether there is a target user identifier in the preset user identifier set that corresponds to the user identifier in the query request, based on the first objective function.
[0151] The feature data acquisition module 630 can be used to acquire feature data corresponding to the target user identifier when it is determined that the target user identifier exists, and construct a target key string according to the first target random polynomial;
[0152] The data query result feedback module 640 can be used to encrypt the user identifier and feature data to be queried based on the target key string, obtain the data query result, and send the data query result to the data query party.
[0153] In the aforementioned data anonymity query device, on the one hand, the data query request sent by the data querying party is parsed to obtain a first objective function and a first objective random polynomial; then, based on the first objective function, it is determined whether a target user identifier corresponding to the user identifier to be queried in the query request exists in the preset user identifier set; then, when it is determined that a target user identifier exists, the feature data corresponding to the target user identifier is obtained, and a target key string is constructed based on the first objective random polynomial; finally, the user identifier to be queried and the feature data are encrypted based on the target key string to obtain the data query result, and the data query result is sent to the data querying party. The data service provider determines that the user identifier to be queried exists in the user identifier set. When the query is successful, it can be considered that the data queryer has successfully retrieved the data. This solves the problem in existing technologies where the data service provider cannot know whether the data queryer has successfully retrieved the corresponding user data from the data service provider using the user identifier to be queried, thus making it impossible to calculate the hit rate and reducing the accuracy of the hit rate statistics. On the other hand, since the existence of the user identifier to be queried is determined by the first objective function, the query of feature data can be achieved without exposing the user identifier to be queried. That is, the corresponding feature data can be retrieved from the data service provider through anonymous query, thus enabling data query while ensuring the security of the user identifier to be queried.
[0154] In one exemplary embodiment of this disclosure, parsing a data query request sent by a data querying party to obtain a first objective function and a first objective random polynomial includes: responding to the data query request sent by the data querying party, parsing the data query request to obtain a first encryption function and a first encryption polynomial; obtaining a homomorphic encryption key pair corresponding to the data querying party, and decrypting the first encryption function and the first encryption polynomial based on the homomorphic encryption private key in the homomorphic encryption key pair to obtain the first objective function and the first objective random polynomial.
[0155] In one exemplary embodiment of this disclosure, determining whether a target user identifier corresponding to the user identifier to be queried in the query request exists in a preset set of user identifiers according to the first objective function includes: substituting the user identifier to be queried into the first objective function and calculating the function value of the first objective function; and determining whether a target user identifier corresponding to the user identifier to be queried in the query request exists in the preset set of user identifiers according to the function value.
[0156] In one exemplary embodiment of this disclosure, if the function value is zero, then the preset user identifier set contains a target user identifier corresponding to the user identifier to be queried in the query request; if the function value is any random constant, then the preset user identifier set does not contain a target user identifier corresponding to the user identifier to be queried in the query request.
[0157] In one exemplary embodiment of this disclosure, constructing a target key string based on the first target random polynomial includes: obtaining a first original random polynomial corresponding to the target user identifier, and calculating a first ratio between the first target random polynomial and the first original random polynomial; performing hash processing on the first ratio to obtain a first hash string, and performing fragmentation processing on the first hash string to obtain a first key string and a second key string; and constructing the target key string based on the first key string and the second key string.
[0158] In one exemplary embodiment of this disclosure, encrypting the user identifier to be queried and the feature data based on the target key string to obtain a data query result includes: encrypting the user identifier to be queried based on a first key string in the target key string; encrypting the feature data based on a second key string in the target key string; and obtaining a data query result based on the encrypted user identifier to be queried and the encrypted feature data.
[0159] In one exemplary embodiment of this disclosure, the data anonymity query device further includes:
[0160] The first identifier quantity calculation module can be used to obtain the target user identifier corresponding to the data query party and calculate the first identifier quantity of the target user identifier;
[0161] The data query fee calculation module can be used to determine the number of hits of the data query party based on the first number of identifiers, and calculate the data query fee that the data query party needs to pay based on the number of hits.
[0162] In one exemplary embodiment of this disclosure, the data anonymity query device further includes:
[0163] The user identifier set construction module can be used to obtain the original user identifiers held by the data service provider itself, and construct the preset user identifier set based on the original user identifiers;
[0164] The first original user identifier polynomial construction module can be used to construct a first original user identifier polynomial based on the original user identifiers included in the user identifier set, and to calculate the first identifier polynomial coefficients of the first original user identifier polynomial.
[0165] The first primitive random polynomial construction module can be used to construct the first primitive random polynomial and calculate the first random polynomial coefficients of the first primitive random polynomial.
[0166] The coefficient encryption module can be used to encrypt the first identifier polynomial coefficients and the first random polynomial coefficients based on the homomorphic encryption public key in the homomorphic encryption key pair, and send the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients to the data query party, so that the data query party can generate a data query request based on the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients.
[0167] This disclosure also provides another data anonymity query apparatus, which can be configured on the data querying party. Specifically, refer to... Figure 7 As shown, the data anonymity query device may include a first receiving module 710, a data query request generation module 720, a data query result receiving module 730, and a data query result decryption module 740. Wherein:
[0168] The first receiving module 710 can be used to receive the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients sent by the data service provider.
[0169] The data query request generation module 720 can be used to generate a data query request based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, the preset second random number, and the identifier of the user to be queried.
[0170] The data query result receiving module 730 can be used to send the data query request to the data service provider and receive the data service provider's response to the data query request, and when it is determined that the user identifier to be queried exists in the user identifier set held by the data service provider, the data query result is fed back.
[0171] The data query result decryption module 740 can be used to decrypt the data query result based on the second random number to obtain feature data corresponding to the user identifier to be queried.
[0172] In one exemplary embodiment of this disclosure, generating a data query request based on encrypted first identifier polynomial coefficients, encrypted first random polynomial coefficients, a preset second random number, and a user identifier to be queried includes: generating a second random number; calculating a first objective function based on the second random number and encrypted first identifier polynomial coefficients; calculating a first target random polynomial based on the second random number and encrypted first random polynomial coefficients; encrypting the first objective function and the first target random polynomial based on the homomorphic encryption public key in a homomorphic encryption key pair to obtain a first encryption function and a first encryption polynomial; and generating a data query request based on the first encryption function, the first encryption polynomial, and the user identifier to be queried.
[0173] In one exemplary embodiment of this disclosure, decrypting the data query result based on the second random number to obtain feature data corresponding to the user identifier to be queried includes: calculating a standard key string corresponding to the user identifier to be queried based on the second random number, and decrypting the data query result based on the standard key string to obtain feature data corresponding to the user identifier to be queried.
[0174] In one exemplary embodiment of this disclosure, calculating the standard key string corresponding to the user identifier to be queried based on a second random number includes: hashing the second random number to obtain a second hash string, and fragmenting the second hash string to obtain a third key string and a fourth key string; and obtaining the standard key string based on the third key string and the fourth key string.
[0175] In one exemplary embodiment of this disclosure, decrypting the data query result based on the standard key string to obtain feature data corresponding to the user identifier to be queried includes: decrypting the encrypted user identifier to be queried in the data query result based on the third key string in the standard key string; and after determining that the encrypted user identifier to be queried has been successfully decrypted, decrypting the encrypted feature data in the data query result based on the fourth key string in the standard key string to obtain feature data corresponding to the user identifier to be queried.
[0176] The specific details of each module in the aforementioned data anonymity query device have been described in detail in the corresponding data anonymity query method, so they will not be repeated here.
[0177] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0178] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0179] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0180] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0181] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0182] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including storage unit 820 and processing unit 810), and a display unit 840.
[0183] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 810 can perform actions such as... Figure 1The steps shown are as follows: Step S110: Parse the data query request sent by the data query party to obtain a first objective function and a first objective random polynomial; Step S120: Determine whether there is a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request based on the first objective function; Step S130: When it is determined that the target user identifier exists, obtain the feature data corresponding to the target user identifier, and construct a target key string based on the first objective random polynomial; Step S140: Encrypt the user identifier to be queried and the feature data based on the target key string to obtain the data query result, and send the data query result to the data query party.
[0184] For example, the processing unit 810 can perform actions such as Figure 4 The steps shown are as follows: Step S410: Receive the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients sent by the data service provider; Step S420: Generate a data query request based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, the preset second random number, and the user identifier to be queried; Step S430: Send the data query request to the data service provider and receive the data service provider's response to the data query request, and when it is determined that the user identifier to be queried exists in the user identifier set held by the data service provider, the data query result is fed back; Step S440: Decrypt the data query result based on the second random number to obtain the feature data corresponding to the user identifier to be queried.
[0185] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.
[0186] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0187] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0188] Electronic device 800 can also communicate with one or more external devices 900 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0189] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of this disclosure.
[0190] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.
[0191] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0192] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0193] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0194] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0195] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0196] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0197] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not invented by this disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for anonymous data query, characterized in that, Configured on the data service provider, the data anonymity query method includes: Parsing a data query request sent by a data querying party to obtain a first objective function and a first objective random polynomial includes: responding to the data query request sent by the data querying party, parsing the data query request to obtain a first encryption function and a first encryption polynomial; obtaining a homomorphic encryption key pair corresponding to the data querying party, and decrypting the first encryption function and the first encryption polynomial based on the homomorphic encryption private key in the homomorphic encryption key pair to obtain the first objective function and the first objective random polynomial; Based on the first objective function, determine whether there exists a target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request; When the existence of the target user identifier is determined, feature data corresponding to the target user identifier is obtained, and a target key string is constructed based on the first target random polynomial, including: obtaining a first original random polynomial corresponding to the target user identifier, and calculating a first ratio between the first target random polynomial and the first original random polynomial; performing hash processing on the first ratio to obtain a first hash string, and performing fragmentation processing on the first hash string to obtain a first key string and a second key string; and constructing the target key string based on the first key string and the second key string. The user identifier and feature data to be queried are encrypted based on the target key string to obtain the data query result, and the data query result is sent to the data querying party; The data anonymity query method also includes: Obtain the original user identifier held by the data service provider itself, and construct the preset user identifier set based on the original user identifier; Based on the original user identifiers included in the user identifier set, construct a first original user identifier polynomial and calculate the first identifier polynomial coefficients of the first original user identifier polynomial. Construct the first primitive random polynomial and calculate the coefficients of the first random polynomial. The first identifier polynomial coefficients and the first random polynomial coefficients are encrypted using the homomorphic encryption public key in the homomorphic encryption key pair. The encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients are then sent to the data query party, so that the data query party can generate a data query request based on the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients.
2. The data anonymity query method according to claim 1, characterized in that, Determining whether a target user identifier exists in the preset user identifier set according to the first objective function, and including: After substituting the user identifier to be queried into the first objective function, the function value of the first objective function is calculated; Based on the function value, determine whether there exists a target user identifier in the preset set of user identifiers that corresponds to the user identifier to be queried in the query request.
3. The data anonymity query method according to claim 2, characterized in that, If the function value is zero, then the preset user identifier set contains a target user identifier that corresponds to the user identifier to be queried in the query request; If the function value is any random constant, then there is no target user identifier in the preset user identifier set that corresponds to the user identifier to be queried in the query request.
4. The data anonymity query method according to claim 1, characterized in that, The user identifier and feature data to be queried are encrypted based on the target key string to obtain the data query results, including: The identifier of the user to be queried is encrypted based on the first key string in the target key string; The feature data is encrypted based on the second key string in the target key string, and the data query result is obtained based on the encrypted user identifier and the encrypted feature data.
5. The data anonymity query method according to claim 1, characterized in that, The data anonymity query method also includes: Obtain the target user identifier corresponding to the data query party, and calculate the first identifier count of the target user identifier; The number of hits for the data query party is determined based on the number of first identifiers, and the data query fee payable by the data query party is calculated based on the number of hits.
6. A method for anonymous data query, characterized in that, Configured on the data querying side, the data anonymity query method includes: The system receives encrypted first identifier polynomial coefficients and encrypted first random polynomial coefficients from a data service provider. The encrypted first identifier polynomial coefficients and encrypted first random polynomial coefficients are generated by the data service provider through the following methods: obtaining its own original user identifiers and constructing a preset user identifier set; constructing a first original user identifier polynomial based on the user identifier set and calculating its first identifier polynomial coefficients; constructing a first original random polynomial and calculating its first random polynomial coefficients; and encrypting the first identifier polynomial coefficients and the first random polynomial coefficients based on the homomorphic encryption public key in a homomorphic encryption key pair. The process involves generating a data query request based on the encrypted first identifier polynomial coefficients, the encrypted first random polynomial coefficients, a preset second random number, and the user identifier to be queried. This includes: generating a second random number; calculating a first objective function based on the second random number and the encrypted first identifier polynomial coefficients; calculating a first target random polynomial based on the second random number and the encrypted first random polynomial coefficients; encrypting the first objective function and the first target random polynomial using the homomorphic encryption public key in a homomorphic encryption key pair to obtain a first encryption function and a first encryption polynomial; and generating a data query request based on the first encryption function, the first encryption polynomial, and the user identifier to be queried. The data query request is sent to the data service provider, and the data service provider responds to the data query request. When it is determined that the user identifier to be queried exists in the user identifier set held by the data service provider, the data query result is fed back. The data query result is obtained by the data service provider in the following ways: parsing the data query request to obtain a first objective function and a first objective random polynomial; determining whether the user identifier to be queried exists in the preset user identifier set based on the first objective function; if it exists, obtaining the corresponding feature data and constructing a target key string based on the first objective random polynomial; encrypting the user identifier to be queried and the feature data based on the target key string. The data query result is decrypted based on the second random number to obtain feature data corresponding to the user identifier to be queried, including: calculating a standard key string corresponding to the user identifier to be queried based on the second random number, and decrypting the data query result based on the standard key string to obtain feature data corresponding to the user identifier to be queried.
7. The data anonymity query method according to claim 6, characterized in that, Calculate the standard key string corresponding to the user identifier to be queried based on the second random number, including: The second random number is hashed to obtain a second hash string, and the second hash string is fragmented to obtain a third key string and a fourth key string; The standard key string is obtained based on the third key string and the fourth key string.
8. The data anonymity query method according to claim 6, characterized in that, The data query result is decrypted based on the standard key string to obtain feature data corresponding to the user identifier to be queried, including: Decrypt the encrypted user identifier in the data query result based on the third key string in the standard key string; After confirming that the encrypted user identifier to be queried has been successfully decrypted, the encrypted feature data in the data query result is decrypted based on the fourth key string in the standard key string to obtain the feature data corresponding to the user identifier to be queried.
9. A data anonymity query device, characterized in that, The data anonymity query device, configured on the data service provider, includes: A data query request parsing module is used to parse a data query request sent by a data query party to obtain a first objective function and a first objective random polynomial. The module includes: responding to the data query request sent by the data query party by parsing the data query request to obtain a first encryption function and a first encryption polynomial; obtaining a homomorphic encryption key pair corresponding to the data query party; and decrypting the first encryption function and the first encryption polynomial based on the homomorphic encryption private key in the homomorphic encryption key pair to obtain the first objective function and the first objective random polynomial. The user identifier determination module is used to determine, based on the first objective function, whether there exists a target user identifier in the preset user identifier set that corresponds to the user identifier in the query request. The feature data acquisition module is used to acquire feature data corresponding to the target user identifier when it is determined that the target user identifier exists, and to construct a target key string based on the first target random polynomial, including: acquiring a first original random polynomial corresponding to the target user identifier, and calculating a first ratio between the first target random polynomial and the first original random polynomial; performing hash processing on the first ratio to obtain a first hash string, and performing fragmentation processing on the first hash string to obtain a first key string and a second key string; and constructing the target key string based on the first key string and the second key string. The data query result feedback module is used to encrypt the user identifier and feature data to be queried based on the target key string, obtain the data query result, and send the data query result to the data query party; The device is further configured to: obtain the original user identifier held by the data service provider itself, and construct the preset user identifier set based on the original user identifier; construct a first original user identifier polynomial based on the original user identifiers included in the user identifier set, and calculate the first identifier polynomial coefficients of the first original user identifier polynomial; construct a first original random polynomial, and calculate the first random polynomial coefficients of the first original random polynomial; encrypt the first identifier polynomial coefficients and the first random polynomial coefficients based on the homomorphic encryption public key in the homomorphic encryption key pair, and send the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients to the data query party, so that the data query party generates a data query request based on the encrypted first identifier polynomial coefficients and the encrypted first random polynomial coefficients.
10. A data anonymity query device, characterized in that, The data anonymity query device, configured on the data querying side, includes: The first receiving module is configured to receive encrypted first identifier polynomial coefficients and encrypted first random polynomial coefficients sent by the data service provider; wherein the encrypted first identifier polynomial coefficients and encrypted first random polynomial coefficients are generated by the data service provider in the following manner: obtaining its own original user identifiers and constructing a preset user identifier set; constructing a first original user identifier polynomial based on the user identifier set and calculating its first identifier polynomial coefficients; constructing a first original random polynomial and calculating its first random polynomial coefficients; encrypting the first identifier polynomial coefficients and the first random polynomial coefficients based on the homomorphic encryption public key in the homomorphic encryption key pair; A data query request generation module is used to generate a data query request based on encrypted first identifier polynomial coefficients, encrypted first random polynomial coefficients, a preset second random number, and the identifier of the user to be queried. The module includes: generating a second random number; calculating a first objective function based on the second random number and the encrypted first identifier polynomial coefficients; calculating a first target random polynomial based on the second random number and the encrypted first random polynomial coefficients; encrypting the first objective function and the first target random polynomial based on the homomorphic encryption public key in the homomorphic encryption key pair to obtain a first encrypted function and a first encrypted polynomial; and generating a data query request based on the first encrypted function, the first encrypted polynomial, and the identifier of the user to be queried. A data query result receiving module is used to send the data query request to a data service provider and receive the data service provider's response to the data query request. When it is determined that the user identifier to be queried exists in the user identifier set held by the data service provider, the data query result is fed back. The data query result is obtained by the data service provider through the following methods: parsing the data query request to obtain a first objective function and a first objective random polynomial; determining whether the user identifier to be queried exists in the preset user identifier set based on the first objective function; if it exists, obtaining the corresponding feature data and constructing a target key string based on the first objective random polynomial; encrypting the user identifier to be queried and the feature data based on the target key string. The data query result decryption module is used to decrypt the data query result based on the second random number to obtain feature data corresponding to the user identifier to be queried, including: calculating a standard key string corresponding to the user identifier to be queried based on the second random number, and decrypting the data query result based on the standard key string to obtain feature data corresponding to the user identifier to be queried.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data anonymity query method according to any one of claims 1-8.
12. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the data anonymity query method according to any one of claims 1-8 by executing the executable instructions.
Citation Information
Patent Citations
Online hidden trace query method and system supporting efficient updating and related equipment
CN116032667A