Screening template-based anonymous query method, medium, electronic device and system
Through the anonymous query method based on screening templates, the blind signature algorithm and ID screening templates are used to reduce the encryption calculation amount of the data source, achieve efficient batch acquisition of intersection sample data, and solve the low efficiency problem of massive data and multi-object queries.
Patent Information
- Application Number
- CN202211014900.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Existing anonymous query solutions have high computational overhead when the data source has massive sample data, and require repeated encryption processing when querying multiple objects, resulting in low efficiency and poor practicality.
Abstract: In order to improve the accuracy of anonymous query, an anonymous query method based on screening template is proposed. The blind signature algorithm protocol is used to generate the signed ID set to be queried and the data source ID set. The ID screening template is used to pre-screen the data source ID set. Only the screening set is encrypted and calculated. The sample data in the intersection set is obtained in batches through the PIR protocol.
This method achieves efficient batch processing of multiple query objects in one anonymous query process, reduces the computation and communication overhead of the data source, and improves the practicality of anonymous queries.
Smart Images

Figure CN115935340B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data security and privacy protection, and specifically to a screening template-based anonymous query method, storage medium, electronic device, and system for privacy computing, privacy data, and federated learning. Background Art
[0002] With the increasing emphasis on data security and privacy protection, and the introduction of relevant laws and regulations such as the Data Security Law and the Personal Information Protection Law, private data, such as personal or sensitive information, faces higher privacy protection and security requirements in data processing, data communication, and data interaction. Privacy computing refers to a collection of technologies that implement data analysis and computing while protecting the data itself from external disclosure, achieving the goal of making data "available but invisible." This allows for the transformation and release of data value while fully protecting data and privacy. Anonymous query, also known as private information retrieval (PIR), is a branch of privacy computing. Anonymous query technology generally involves two parties: the party holding sample data is called the data source, and the party executing the query is called the query party. Anonymous query ensures that the data source provides matching query results but cannot determine which query object the query party has queried. The query party only obtains samples of its query object and cannot access other samples of the data source.
[0003] Existing anonymous query solutions require the data source to encrypt all its sample data using cryptographic techniques. Consequently, when the data source has massive amounts of sample data, perhaps hundreds of millions, the anonymous query process becomes inefficient due to the excessive encryption computational overhead. Furthermore, when the querying party needs to perform anonymous queries on multiple objects, the encryption process must be repeated, and the encrypted sample data must be repeatedly sent to the querying party. This results in unnecessary computational and communication overhead, making anonymous queries less practical in practice. Summary of the Invention
[0004] In order to solve the technical problem that anonymous query becomes very inefficient and has poor practicality under actual needs such as the amount of sample data on the data source is too large or the query party needs to perform multiple queries on multiple query objects, the present invention provides an anonymous query method, storage medium, electronic device and system based on a screening template, which avoids the encryption calculation of all sample data and realizes practical and efficient anonymous query batch processing, that is, multiple query objects can be efficiently batch processed in one anonymous query process.
[0005] In a first aspect, a screening template-based anonymous query method is provided for privacy computing, privacy data, and federated learning, and is applied to a data source. The anonymous query method comprises: the data source, through a blind signature algorithm protocol with a querying party, enables the querying party to obtain a signed set of IDs to be queried; and the data source signs its data source ID set to obtain a signed set of IDs; the data source receives an ID screening template sent by the querying party; wherein the ID screening template is constructed by the querying party by comparing each ID in the signed set of IDs to be queried; the data source obtains a signed set of IDs based on the ID screening template; and the data source obtains a signed set of IDs based on the ID screening template. The ID screening template screens the signed data source ID set to obtain a signed data source ID screening set that matches the ID screening template, and sends the signed data source ID screening set to the querying party, so that the querying party performs an intersection task based on the signed ID set to be queried and the signed data source ID screening set to confirm whether there is an ID intersection; when the querying party confirms the existence of the ID intersection, the data source party jointly executes the PIR protocol with the querying party on the ID intersection, so that the querying party can obtain sample data corresponding to each ID in the ID intersection in batches.
[0006] In the technical solution described in the first aspect, the data source pre-filters its signed data source ID set based on the ID filtering template constructed by the querying party to obtain a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then jointly execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0007] According to the technical solution described in the first aspect, in a possible embodiment, the blind signature algorithm protocol is an RSA blind signature algorithm protocol, and the data source party cooperates with the query party based on the blind signature algorithm protocol so that the query party obtains the signed ID set to be queried, including: the data source party receives the blinded and RSA public key encrypted ID set to be queried sent by the query party, and signs the blinded and RSA public key encrypted ID set to be queried according to the RSA private key of the data source party to obtain the signed and blinded ID set to be queried; the data source party sends the signed and blinded ID set to be queried to the query party, so that the query party de-blinds the signed and blinded ID set to be queried to obtain the signed ID set to be queried.
[0008] According to the technical solution described in the first aspect, in a possible embodiment, the ID screening template includes an ID matching template M and an ID comparison template N, wherein the ID matching template M is obtained by the querying party determining all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, recording all or part of the positions with the same value as the original value, and recording the remaining positions as 0; the ID comparison template N is obtained by the querying party determining all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, recording all or part of the positions with the same value as 1, and recording the remaining positions as 0.
[0009] According to the technical solution described in the first aspect, in a possible embodiment, the data source party filters the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template, including: performing an XOR operation on the hash binary string A corresponding to each ID in the signed data source ID set and the ID matching template M to obtain corresponding character strings A1, and performing an inversion operation on each character string A1 to obtain corresponding character strings A2, and then performing an AND operation on each character string A2 and an ID comparison template N to obtain each character string A3, and then comparing each character string A3 with the ID comparison template N respectively; and collecting the IDs in the signed data source ID set corresponding to the character strings A3 that are the same as the ID comparison template N, thereby obtaining the signed data source ID screening set.
[0010] According to the technical solution described in the first aspect, in a possible embodiment, the anonymous query method also includes: the data source party imports the sample data filter set into the PIR protocol in advance, and the sample data filter set is the sample data corresponding to each ID in the signed data source ID filter set.
[0011] According to the technical solution described in the first aspect, in a possible embodiment, the data source party jointly executes the PIR protocol with the query party for the ID intersection, so that the query party can obtain the sample data corresponding to each ID in the ID intersection in batches, including: after the data source party receives the PIR batch query request sent by the query party based on the ID intersection, it generates a PIR batch query reply according to the PIR batch query request and the sample data filter set, and sends the PIR batch query reply to the query party so that the query party can obtain the sample data in the sample data filter set corresponding to each ID in the ID intersection in batches from the PIR batch query reply.
[0012] According to the technical solution described in the first aspect, in a possible embodiment, the PIR protocol is implemented based on the XPIR technical framework.
[0013] In a second aspect, a screening template-based anonymous query method is provided for use in privacy-preserving computing, privacy-preserving data, and federated learning. The method is applied to a querying party, the method comprising: obtaining a signed ID set to be queried by the querying party through a blind signature algorithm protocol with a data source; comparing each ID in the signed ID set to be queried to construct an ID screening template, and sending the ID screening template to the data source so that the data source filters the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template; wherein the signed data source ID set is obtained by the data source signing its data source ID set; after receiving the signed data source ID screening set from the data source, the querying party performs an intersection task on the signed ID set to be queried and the signed data source ID screening set to confirm whether there is an ID intersection; if the querying party confirms the existence of the ID intersection, the querying party and the data source jointly execute a PIR protocol on the ID intersection to batch obtain sample data corresponding to each ID in the ID intersection.
[0014] In the technical solution described in the second aspect, the data source pre-filters its signed data source ID set based on the ID filtering template constructed by the querying party to obtain a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then jointly execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0015] According to the technical solution described in the second aspect, in a possible embodiment, the blind signature algorithm protocol is an RSA blind signature algorithm protocol, and the querying party obtains a signed ID set to be queried based on the blind signature algorithm protocol with the data source, including: the querying party sends the ID set to be queried that has been blinded and RSA public key encrypted to the data source, so that the data source signs the ID set to be queried that has been blinded and RSA public key encrypted according to the RSA private key of the data source, thereby obtaining a signed and blinded ID set to be queried; after the querying party receives the signed and blinded ID set to be queried sent by the data source, it de-blinds the signed and blinded ID set to be queried, thereby obtaining a signed ID set to be queried.
[0016] According to the technical solution described in the second aspect, in a possible embodiment, the ID screening template includes an ID matching template M and an ID comparison template N. The querying party compares the various IDs in the signed ID set to be queried to construct an ID screening template, including: after the querying party determines all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, the querying party records all or part of the positions with the same value as the original value, and records the remaining positions as 0, thereby constructing the ID matching template M; after the querying party determines all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, the querying party records all or part of the positions with the same value as 1, and records the remaining positions as 0, thereby constructing the ID comparison template N.
[0017] According to the technical solution described in the second aspect, in a possible embodiment, the ID screening template is sent to the data source so that the data source filters the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template, including: sending the ID matching template M and the ID comparison template N to the data source so that the data source: performs an XOR operation on the hash binary string A corresponding to each ID in the signed data source ID set and the ID matching template M to obtain each character string A1, and performs an inverse operation on each character string A1 to obtain each character string A2, and then performs an AND operation on each character string A2 with the ID comparison template N to obtain each character string A3, and then compares each character string A3 with the ID comparison template N respectively; and collects the IDs in the signed data source ID set corresponding to the character string A3 that is the same as the ID comparison template N, thereby obtaining the signed data source ID screening set.
[0018] According to the technical solution described in the second aspect, in a possible embodiment, the query party obtains in batches the sample data corresponding to each ID in the ID intersection by jointly executing the PIR protocol with the data source party for the ID intersection, including: the query party constructs a PIR batch query request based on the ID intersection, and sends the PIR batch query request to the data source party, so that the data source party generates a PIR batch query reply based on the PIR batch query request and the sample data filter set; wherein the sample data filter set is pre-imported into the PIR protocol by the data source party, and the sample data filter set is the sample data corresponding to each ID in the signed data source ID filter set; the query party receives the PIR batch query reply sent by the data source party, and obtains in batches the sample data in the sample data filter set corresponding to each ID in the ID intersection according to the PIR batch query reply.
[0019] According to the technical solution described in the second aspect, in a possible embodiment, the PIR protocol is implemented based on the XPIR technical framework.
[0020] In a third aspect, a non-transitory computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the technical solution described in any embodiment of the first aspect or the technical solution described in any embodiment of the second aspect.
[0021] In the technical solution described in the third aspect, the data source pre-filters its signed data source ID set based on the ID filtering template constructed by the querying party to obtain a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then jointly execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0022] In a fourth aspect, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements the technical solution described in any embodiment of the first aspect or the technical solution described in any embodiment of the second aspect by running the executable instructions.
[0023] In the technical solution described in the fourth aspect, the data source pre-filters its signed data source ID set based on the ID filtering template constructed by the querying party to obtain a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then jointly execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0024] In a fifth aspect, a screening template-based anonymous query system is provided for privacy computing, privacy data, and federated learning. The anonymous query system includes a data source and a querying party. After the data source and the querying party interact based on a blind signature algorithm protocol, the querying party obtains a signed set of IDs to be queried; and the data source signs its data source ID set to obtain a signed data source ID set; the querying party compares each ID in the signed set of IDs to be queried to construct an ID screening template, and sends the ID screening template to the data source; after the data source receives the ID screening template, the querying party selects the IDs according to the ID screening template. The signed data source ID set is filtered to obtain a signed data source ID filtering set that matches the ID filtering template, and the signed data source ID filtering set is sent to the querying party; after the querying party receives the signed data source ID filtering set, it performs an intersection task based on the signed ID set to be queried and the signed data source ID filtering set to confirm whether there is an ID intersection; when the querying party confirms the existence of the ID intersection, the querying party and the data source party jointly execute the PIR protocol for the ID intersection, and then the querying party obtains sample data corresponding to each ID in the ID intersection from the data source in batches.
[0025] In the technical solution described in the fifth aspect, the data source pre-filters its signed data source ID set based on the ID filtering template constructed by the querying party to obtain a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and verifies the ID intersection with its own signed ID set to be queried, the querying party can then jointly execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. In the drawings:
[0027] Figure 1This is a flow chart of an anonymous query method based on a screening template applied at a data source, provided in an embodiment of the present invention;
[0028] Figure 2 This is a flow chart of an anonymous query method based on a screening template applied to a querying party, provided by an embodiment of the present invention;
[0029] Figure 3 Schematic diagram of the hardware structure of an electronic device for anonymous query based on a screening template provided by an embodiment of the present invention;
[0030] Figure 4 1 is a flow chart of an anonymous query system method based on a screening template provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to solve the technical problem that anonymous query becomes very inefficient and has poor practicality under actual requirements such as the amount of sample data on the data source is too large or the query party needs to perform multiple queries on multiple query objects, the embodiments of the present application provide an anonymous query method, storage medium, electronic device and system based on screening templates for privacy computing, privacy data and federated learning. The anonymous query method based on screening templates is executed on the data source side, and the data source side obtains a signed ID set to be queried through a blind signature algorithm protocol with the query party; and the data source side signs its data source ID set to obtain a signed data source ID set; the data source side receives the ID screening template sent by the query party; and the ID screening template is the The querying party constructs the ID by comparing the signed IDs in the ID set to be queried; the data source party filters the signed data source ID set according to the ID screening template to obtain the signed data source ID screening set that matches the ID screening template, and sends the signed data source ID screening set to the querying party, so that the querying party performs an intersection task based on the signed ID set to be queried and the signed data source ID screening set to confirm whether there is an ID intersection; if the querying party confirms the existence of the ID intersection, the data source party jointly executes the PIR protocol with the querying party for the ID intersection, so that the querying party obtains the sample data corresponding to each ID in the ID intersection in batches. In this way, the data source pre-filters its signed data source ID set based on the ID filtering template constructed by the querying party, thereby obtaining a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then jointly execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0032] The embodiments of this application can be used in the following application scenarios, including but not limited to multi-party secure computing, federated learning, data security, privacy protection, or other application scenarios that apply privacy computing frameworks or algorithms. The embodiments of this application can be adjusted and improved according to the specific application environment and are not specifically limited here.
[0033] In order to enable people skilled in the art to better understand the present application, the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0034] Figure 1 This is a flow chart of an anonymous query method based on a screening template applied to a data source according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0035] S102. The data source party, through a blind signature algorithm agreement with the querying party, enables the querying party to obtain a signed ID set to be queried; and the data source party signs its data source ID set to obtain a signed data source ID set.
[0036] In an embodiment of the present invention, the to-be-queried ID set includes at least two to-be-queried IDs of the querying party, and the data source ID set is a set of IDs in a database designated by the data source for providing an anonymous query service, wherein the IDs in the to-be-queried ID set and the data source ID set can be represented by information such as the user's mobile phone number or ID card number, and the querying party obtains sample data corresponding to the ID from the data source through the ID based on an anonymous query method, wherein the sample data, for example, in a lending scenario, can refer to the relevant lending data of the user corresponding to the ID in the bank (data source).
[0037] The blind signature algorithm protocol allows the message owner to first blind the message, then send the blinded message to the signer for signature. The message owner then unblinds the signature to obtain the signature of the original message. A blind signature is a special digital signature method used when the recipient prevents the signer from accessing the specific content of the signed message. The signer is invisible to the signed message, meaning that the signer does not know the specific content of the signed message. The signed message is also untraceable, meaning that once the signed message is published, the signer cannot determine which signature was made. In an embodiment of the present invention, the blind signature algorithm protocol can be based on a blind signature algorithm that can be used in a PSI (Private Set Intersection) process. The blind signature result of this blind signature algorithm can be in a one-to-one correspondence with the original ID, and the blind signature result can be hashed. For example, the blind signature algorithm can be based on an RSA-based blind signature algorithm. It should be understood that any suitable blind signature algorithm that meets the above conditions can be used in embodiments of the present invention, and the present invention is not specifically limited to this.
[0038] The following is an example of the RSA blind signature algorithm to illustrate the detailed process of the query party obtaining the signed ID set to be queried. The data source generates the RSA public key (e, n) and RSA private key (d, n) based on the RSA algorithm in advance, and sends the RSA public key (e, n) to the query party. The query party uses the RSA public key (e, n) to perform a complex operation on its own ID set {hc1, hc2, ..., hc v} is encrypted and combined with the blinding factor R c:i Perform blind signing to obtain the ID set {y1, y2, ..., y v}, where y i =hc i ·(R c:i ) e modn,hc1=H(c i ), H() is the hash function, c i The querying party then converts the ID set {y1, y2, ..., y v} is sent to the data source, and the data source pairs {y1, y2, ..., y v} Perform preliminary signature calculation to obtain the signed and blinded ID set to be queried {y′1, y′2, ..., y′ v}, where y′ i =(y i ) d mod n. Then, the data source sends the signed and blinded ID set {y′1, y′2, ..., y′ v} is sent to the querying party, and the querying party receives the signed and blinded ID set {y′1, y′2, ..., y′ v}, then perform deblinding according to its own blinding factor Rc:i to obtain the signed ID set to be queried {K c:1 , K c:2 , ..., K c:v}, where K c:i =y′ i / R c:i In the above process, the querying party does not send the ID set {hc1, hc2, ..., hc v} is not sent directly to the data source for signature, but is first blinded by the querying party and then sent to the data source. The data source then signs and returns it to the querying party, and the querying party then performs a deblinding operation to obtain the signed ID set to be queried. In this way, the querying party obtains the ID set to be queried signed by the data source without revealing any query intention to the data source. Accordingly, when the data source performs a blinding operation on its data source ID set {hs1, hs2, ..., hs w} Perform RSA private key (d, n) signature to obtain the signed data source ID set {K s:1 , K s:2 , ..., K s:w}, where K s:j =(hs j ) d mod n,hs j =H(s j ), H() is the hash function, s j It is the ID plain text data of the data source, such as the data source ID set {K s:1 , K s:2 , ..., K s:w} and the ID set to be queried {K c:1 , K c:2 , ..., K c:v}, both implement signatures based on the same key, such as RSA private key, so that the sample ID sets of the two parties are aligned in encryption format to facilitate the subsequent intersection task.
[0039] In some embodiments, the querying party further queries the signed ID set {K c:1 , K c:2 , ..., K c:v} is hashed so that the signed ID set to be queried is processed into a hash string in the form of {t'1, t'2, ..., t' v}, where t' i =H′(K c:i ), H′() is a hash function. Correspondingly, the data source also performs a signature on the data source ID set {K s:1 , K s:2 , ..., K s:w} is hashed so that the signed data source ID set is processed into a hash string {t1, t2, ..., t w}, where t j =H′(K c:j ), H′() is the hash function.
[0040] In some embodiments, the data source party may first execute a process in which the querying party obtains a signed ID set to be queried through a blind signature algorithm agreement with the querying party, or the data source party may first execute a process in which the data source party signs its data source ID set to obtain a signed data source ID set, or these two processes may be executed simultaneously. The embodiment of the present invention does not specifically limit the execution order of the above two processes.
[0041] S104. The data source receives the ID screening template sent by the querying party. The ID screening template is constructed by the querying party by comparing the signed IDs in the ID set to be queried.
[0042] S106. The data source party filters the signed data source ID set according to the ID screening template, obtains the signed data source ID screening set that matches the ID screening template, and sends the signed data source ID screening set to the query party, so that the query party performs an intersection task based on the signed ID set to be queried and the signed data source ID screening set to confirm whether there is an ID intersection.
[0043] In an embodiment of the present invention, the querying party compares the individual IDs in the signed ID set to be queried and determines the common or shared characteristics of the individual IDs. This is used to construct an ID screening template based on the common or shared characteristics, and the template is sent to the data source. After receiving the ID screening template sent by the querying party, the data source can filter the signed data source ID set based on the template, thereby filtering out IDs with the common or shared characteristics from the signed data source ID set and filtering out IDs that do not have the common or shared characteristics, thereby obtaining a signed data source ID screening set that matches the ID screening template. Through this ID filtering operation, the data source can filter out a large part of the IDs that do not need to participate in the subsequent intersection task and PIR protocol process. Therefore, in the subsequent intersection task process, the query party only needs to perform the intersection task with the signed data source ID filtering set, and does not need to perform the intersection task with the entire signed data source ID set, saving a lot of computing overhead and speeding up the intersection calculation speed; and in the process of the data source and the query party jointly executing the PIR protocol, the data source only needs to import the sample data corresponding to the signed data source ID filtering set into the PIR protocol, avoiding encryption calculation of all sample data, saving a lot of computing overhead, and speeding up the execution of the PIR protocol by the query party and the data source.
[0044] In some embodiments, the querying party can obtain the same or common features of each ID by comparing whether the characters at the same position of each ID in the signed ID set to be queried are the same. For example, after each ID in the signed ID set to be queried is converted into a hash binary string, the binary values at a certain position or several positions are all the same value, so as to construct the ID screening template based on the same values at these same positions.
[0045] In some specific implementations, the querying party can perform a hashing process on each ID string in its signed ID set to be queried and convert it into a binary string, thereby converting each ID string in the signed ID set to be queried into a hashed binary string format; correspondingly, the data source can perform the same hashing process on each ID string in its signed data source ID set and convert it into a binary string, thereby converting each ID string in the signed data source ID set into a hashed binary string format. Through this format conversion, each ID in the ID set of the querying party and the data source is based on the same hashed binary string format and has the same length, for example, both are 256 bits. To facilitate the screening operation, the ID screening template constructed by the querying party is also based on the binary string format and maintains the same length as the hashed binary strings in the ID set of the querying party and the data source, for example, both are 256 bits. In some embodiments, the ID screening template constructed by the querying party includes an ID matching template M and an ID comparison template N, wherein the ID matching template M is obtained by the querying party determining all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, recording all or part of the positions with the same value as the original value, and recording the remaining positions as 0; the ID comparison template N is obtained by the querying party determining all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, recording all or part of the positions with the same value as 1, and recording the remaining positions as 0. After the querying party sends the ID matching template M and the ID comparison template N to the data source, the data source performs an XOR operation on the hash binary string A corresponding to each ID in the signed data source ID set with the ID matching template M to obtain corresponding character strings A1, and performs an inverse operation on each character string A1 to obtain corresponding character strings A2. Then, the character strings A2 are ANDed with the ID comparison template N to obtain corresponding character strings A3, and then the character strings A3 are respectively compared with the ID comparison template N; and the IDs in the signed data source ID set corresponding to the character strings A3 identical to the ID comparison template N are collected to obtain the signed data source ID filter set.
[0046] The above binary string-based screening process is illustrated below using a specific example. For ease of explanation, it is assumed that each ID in the query ID set and the data source ID set is hashed and converted into a binary string based on an 8-bit hash binary string, as shown in Table 1 below.
[0047] Table 1
[0048]
[0049]
[0050] In the example of Table 1, there are three IDs in the signed ID set to be queried by the querying party, and the hash binary strings corresponding to these three IDs are {01101110, 11101110, 00110010}. After the querying party determines the positions with identical values in the hash binary strings corresponding to the IDs in the signed ID set to be queried, it records the positions with identical values as the original values and records the remaining positions as 0 to obtain the ID matching template M. Here, the ID matching template M obtained based on the hash strings {01101110, 11101110, 00110010} corresponding to the above ID set to be queried is 00100010. After the querying party determines the positions with the same value in the hash binary strings corresponding to the various IDs in the signed ID set to be queried, it records the positions with the same value as 1 and the remaining positions as 0 to obtain the ID comparison template N. Here, the ID comparison template N obtained based on the hash strings {01101110, 11101110, 00110010} corresponding to the above-mentioned ID set to be queried is 00100011. After the querying party sends the above-mentioned ID matching template M: 00100010 and ID comparison template N: 00100011 to the data source, the data source performs an exclusive OR operation on the hash binary strings X: {01101110, 00010001, 11101110, 00110010, 11111111, 10111011} corresponding to the various IDs in its own signed data source ID set with the ID comparison template M: 00100010, i.e. Thus, the string A1 set {01001100, 00110011, 11001100, 00010000, 11011101, 10011001} is obtained, and the string A1 set is then inverted, that is, A2 = ~A1, thereby obtaining the string A2 set {10110011, 11001100, 00110011, 11101111, 00100010, 01100110}, and then the string A2 set is respectively ANDed with the ID comparison template N: 00100011, that is, A3 = A2&, thereby obtaining the string A3 set {00100011, 00000000, 00100011, 00100011, 00100010, 00100 010}, and finally compare the string A3 set {00100011, 00000000, 00100011, 00100011, 00100010, 00100010} with the ID comparison template N: 00100011 respectively. It is found that the first, third, and fourth strings {00100011, 00100011, 00100011} are the same as the ID comparison template N: 00100011. Accordingly, the data source will filter out the first, third, and fourth hash binary strings {01101110, 11101110, 00110010} in the signed ID set to be queried, thereby forming the signed data source ID filtering set {01101110, 11101110, 00110010}. It should be understood that the above example is only used to help understand the screening process of the data source based on the ID matching template M and the ID comparison template N in the embodiment of the present invention. For the convenience of explanation, the hash binary string is simplified to 8-bit binary for description. Due to the short binary bit number, the signed data source ID screening set obtained by screening in the above example is the same as the individual IDs in the signed ID set to be queried. However, in actual applications, the SHA256 algorithm will be used for processing and conversion to a binary string. The resulting binary string is 256 bits, and the number of IDs in the signed data source ID set will be much larger than the above example, for example, in the tens of millions or even hundreds of millions. Therefore, in actual applications, the number of IDs in the signed data source ID screening set obtained by screening based on the ID matching template M and the ID comparison template N will be greater than, or even much greater than, the number of IDs in the above signed ID set to be queried.
[0051] In some embodiments, in the process of constructing the ID matching template M and the ID comparison template N, the querying party determines S positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, where the value of S affects the screening accuracy of the signed data source ID screening set. The larger the value of S, the higher the screening accuracy, and the number of IDs in the screened data source ID screening set is relatively reduced; the smaller the value of S, the lower the screening accuracy, and the number of IDs in the screened data source ID screening set is relatively increased. The querying party may determine the value of S based on the computing resources and / or network resources of the data source. For example, when the computing resources and / or network resources of the data source are relatively small, the querying party may set the value of S to be larger, so that the number of IDs in the signed data source ID filter set filtered by the querying party is relatively reduced, thereby reducing the computing resources and / or network resource consumption of the data source in the subsequent execution of the PIR protocol process. When the computing resources and / or network resources of the data source are relatively large, the querying party may set the value of S to be smaller, so that the number of IDs in the signed data source ID filter set filtered by the querying party is relatively increased. Therefore, although more computing resources and / or network resources are consumed in the subsequent execution of the PIR protocol by the data source, the security of the anonymous query is improved. In other embodiments, the querying party may also set the value of S based on the security protection level of the signed ID set to be queried. For example, the higher the security protection level of the signed ID set to be queried, the smaller the value of S set by the querying party should be, so that the ID matching template M and the ID comparison template N sent by the querying party to the data source will reveal fewer common or identical features of the ID; on the contrary, the lower the security protection level of the signed ID set to be queried, the larger the value of S set by the querying party should be, so that the ID matching template M and the ID comparison template N sent by the querying party to the data source will reveal more common or identical features of the ID, but the accuracy of the screening will be higher. In short, the value of S can be set based on the various flexible and variable needs of the querying party or the data source.
[0052] In some embodiments, the data source sends a signed data source ID filter set in a hash binary string format to the querying party. After receiving the signed data source ID filter set in a hash binary string format, the querying party performs an intersection task based on its own signed ID set to be queried in a hash binary string format and the signed data source ID filter set in a hash binary string format to confirm whether there is an ID intersection. In this way, the querying party does not need to intersect the signed ID set to be queried with the data source's entire signed data source ID set. Instead, the querying party intersects the signed ID set to be queried with the pre-screened signed data source ID filter set, thereby greatly reducing the computational overhead of the querying party's intersection task.
[0053] S108. When the querying party confirms that there is an ID intersection, the data source executes the PIR protocol with the querying party for the ID intersection, thereby allowing the querying party to obtain sample data corresponding to each ID in the ID intersection in batches.
[0054] In some embodiments, when the querying party confirms the existence of an ID intersection, the data source party pre-imports a sample data filter set into the PIR protocol, where the sample data filter set is the sample data corresponding to each ID in the signed data source ID filter set. The pre-import of the sample data filter set into the PIR protocol by the data source party specifically involves the data source party importing the sample data source filter set into the PIR protocol. The PIR protocol can be based on homomorphic encryption or OT obfuscation.
[0055] In some embodiments, after the querying party constructs a PIR batch query request based on the ID intersection, it sends the PIR batch query request to the data source. After the data source receives the PIR batch query request constructed based on the ID intersection sent by the querying party, it generates a PIR batch query reply based on the PIR batch query request and the sample data filter set. After the querying party receives the PIR batch query reply, the querying party obtains the sample data in the sample data filter set corresponding to each ID in the ID intersection in batches from the PIR batch query reply. Wherein the sample data filter set is encrypted or obfuscated, during the execution of the PIR protocol, the querying party will only be able to decrypt the sample data it expects but cannot decrypt other sample data, that is, the querying party can only decrypt the sample data in the sample data filter set corresponding to the ID intersection but cannot decrypt other sample data in the sample data filter set. The PIR protocol can be based on homomorphic encryption or OT obfuscation-based underlying encryption technology.
[0056] In some specific implementations, the PIR protocol is implemented based on the XPIR technical framework, which is a specific technical framework for implementing the PIR protocol.
[0057] In an embodiment of the present invention, the data source pre-filters its signed data source ID set based on an ID filtering template constructed by the querying party, thereby obtaining a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0058] Figure 2 This is a flow chart of an anonymous query method based on a screening template applied to a querying party provided by an embodiment of the present invention. Figure 2 As shown, the method includes:
[0059] S202: The querying party obtains the signed ID set to be queried through a blind signature algorithm protocol with the data source.
[0060] The blind signature algorithm protocol allows the message owner to first blind the message, then send the blinded message to the signer for signature. The message owner then unblinds the signature to obtain the signature of the original message. A blind signature is a special digital signature method used when the recipient prevents the signer from accessing the specific content of the signed message. The signer is invisible to the signed message, meaning they do not know the specific content of the signed message. The signed message is also untraceable, meaning that once the signed message is published, the signer cannot determine which signature was made. In an embodiment of the present invention, the blind signature algorithm protocol can be based on a blind signature algorithm that can be used in a PSI (Private Set Intersection) process. The blind signature result of this blind signature algorithm can be in a one-to-one correspondence with the original ID, and the blind signature result can be hashed. For example, this blind signature algorithm can be based on an RSA-based blind signature algorithm. It should be understood that any suitable blind signature algorithm that meets the above conditions can be used in embodiments of the present invention, and this is not specifically limited in this regard.
[0061] In some embodiments, the blind signature algorithm protocol is an RSA blind signature algorithm protocol, and the querying party obtains the signed ID set to be queried based on the blind signature algorithm protocol with the data source party, specifically: the querying party sends the ID set to be queried that has been blinded and RSA public key encrypted to the data source party, so that the data source party signs the ID set to be queried that has been blinded and RSA public key encrypted according to the RSA private key of the data source party, thereby obtaining the signed and blinded ID set to be queried; after the querying party receives the signed and blinded ID set to be queried sent by the data source party, it deblinds the signed and blinded ID set to be queried, thereby obtaining the signed ID set to be queried. The detailed process of the querying party obtaining the signed ID set to be queried based on the RSA blind signature algorithm can be referred to the above Figure 1 For the sake of brevity, the relevant description of the method embodiment will not be repeated here.
[0062] In some embodiments, the querying party may first execute a process of obtaining a signed ID set to be queried through a blind signature algorithm protocol with the data source party, or the data source party may first execute a process of signing its data source ID set to obtain a signed data source ID set, or these two processes may be executed simultaneously. The embodiment of the present invention does not specifically limit the execution order of the above two processes.
[0063] S204. The querying party compares the signed IDs in the ID set to be queried to construct an ID screening template, and sends the ID screening template to the data source so that the data source can screen the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template.
[0064] In an embodiment of the present invention, the querying party compares the individual IDs in the signed ID set to be queried and determines the common or shared characteristics of the individual IDs. This is used to construct an ID screening template based on the common or shared characteristics, and the template is sent to the data source. After receiving the ID screening template sent by the querying party, the data source can filter the signed data source ID set based on the template, thereby filtering out IDs with the common or shared characteristics from the signed data source ID set and filtering out IDs that do not have the common or shared characteristics, thereby obtaining a signed data source ID screening set that matches the ID screening template. Through this ID filtering operation, the data source can filter out a large portion of IDs that do not need to participate in the subsequent anonymous query process. Therefore, in the subsequent intersection task of the query party, the query party only needs to perform the intersection task with the signed data source ID filtering set, and does not need to perform the intersection task with the entire signed data source ID set, saving a lot of computing overhead and speeding up the intersection calculation speed; and in the process of the data source and the query party jointly executing the PIR protocol, the data source only needs to encrypt the sample data corresponding to the signed data source ID filtering set and import it into the PIR protocol, avoiding encryption calculation of all sample data, saving a lot of computing overhead, and speeding up the execution of the PIR protocol by the query party and the data source.
[0065] In some embodiments, the querying party can obtain the same or common features of each ID by comparing whether the characters at the same position of each ID in the signed ID set to be queried are the same. For example, the binary values of each ID in the ID set to be queried at a certain position or several positions are the same, so as to construct the ID screening template based on the same values at these same positions.
[0066] In some specific implementations, the querying party can perform a hashing process on each ID string in its signed ID set to be queried and convert it into a binary string, thereby converting each ID string in the signed ID set to be queried into a hashed binary string format; correspondingly, the data source can perform the same hashing process on each ID string in its signed data source ID set and convert it into a binary string, thereby converting each ID string in the signed data source ID set into a hashed binary string format. Through this format conversion, each ID in the ID set of the querying party and the data source is based on the same hashed binary string format and has the same length, for example, both are 256 bits. To facilitate the screening operation, the ID screening template constructed by the querying party is also based on the binary string format and maintains the same length as the hashed binary strings in the ID set of the querying party and the data source, for example, both are 256 bits. In some embodiments, the ID screening template constructed by the querying party includes an ID matching template M and an ID comparison template N, wherein the querying party determines all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, and records all or part of the positions with the same value as the original value, and records the remaining positions as 0, thereby constructing the ID matching template M; after the querying party determines all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, the querying party records all or part of the positions with the same value as 1, and records the remaining positions as 0, thereby constructing the ID comparison template N. After completing the construction of the ID matching template M and the ID comparison template N, the querying party will send the ID matching template M and the ID comparison template N to the data source party, so that the data source party will perform an XOR operation on the hash binary string A corresponding to each ID in the signed data source ID set with the ID matching template M to obtain each character string A1, and perform an inverse operation on each character string A1 to obtain each character string A2, and then perform an AND operation on each character string A2 with the ID comparison template N to obtain each character string A3, and then compare each character string A3 with the ID comparison template N respectively, and collect the IDs in the signed data source ID set corresponding to the character string A3 identical to the ID comparison template N, so as to obtain the signed data source ID filtering set.
[0067] The operation and screening process of the above binary string can be referred to the example in Table 1, and for the sake of brevity, it will not be repeated here.
[0068] S206: After receiving the signed data source ID filter set sent by the data source, the querying party performs an intersection task based on the signed ID set to be queried and the signed data source ID filter set to confirm whether there is an ID intersection.
[0069] In some embodiments, in the process of constructing the ID matching template M and the ID comparison template N, the querying party determines S positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, where the value of S affects the screening accuracy of the signed data source ID screening set. The larger the value of S, the higher the screening accuracy, and the number of IDs in the screened data source ID screening set is relatively reduced; the smaller the value of S, the lower the screening accuracy, and the number of IDs in the screened data source ID screening set is relatively increased. The querying party may determine the value of S based on the computing resources and / or network resources of the data source. For example, when the computing resources and / or network resources of the data source are relatively small, the querying party may set the value of S to be larger, so that the number of IDs in the signed data source ID filter set filtered by the querying party is relatively reduced, thereby reducing the computing resources and / or network resource consumption of the data source in the subsequent execution of the PIR protocol process. When the computing resources and / or network resources of the data source are relatively large, the querying party may set the value of S to be smaller, so that the number of IDs in the signed data source ID filter set filtered by the querying party is relatively increased. Therefore, although more computing resources and / or network resources are consumed in the subsequent execution of the PIR protocol by the data source, the security of the anonymous query is improved. In other embodiments, the querying party may also set the value of S based on the security protection level of the signed ID set to be queried. For example, the higher the security protection level of the signed ID set to be queried, the smaller the value of S set by the querying party should be, so that the ID matching template M and the ID comparison template N sent by the querying party to the data source will reveal fewer common or identical features of the ID; on the contrary, the lower the security protection level of the signed ID set to be queried, the larger the value of S set by the querying party should be, so that the ID matching template M and the ID comparison template N sent by the querying party to the data source will reveal more common or identical features of the ID, but the accuracy of the screening will be higher. In short, the value of S can be set based on the various flexible and variable needs of the querying party or the data source.
[0070] S208. When the querying party confirms that there is an ID intersection, the querying party executes the PIR protocol with the data source for the ID intersection, thereby obtaining sample data corresponding to each ID in the ID intersection in batches.
[0071] In some embodiments, the querying party constructs a PIR batch query request based on the ID intersection and sends the PIR batch query request to the data source, so that the data source generates a PIR batch query reply based on the PIR batch query request and the sample data filter set. The sample data filter set is pre-imported into the PIR protocol by the data source, and the sample data filter set is the sample data corresponding to each ID in the signed data source ID filter set. The querying party receives the PIR batch query reply sent by the data source and, based on the PIR batch query reply, batch obtains the sample data in the sample data filter set corresponding to each ID in the ID intersection. The sample data filter set is encrypted or obfuscated, and during the execution of the PIR protocol, the querying party can only decrypt the desired sample data and cannot decrypt other sample data. That is, the querying party can only decrypt the sample data in the sample data filter set corresponding to the ID intersection and cannot decrypt other sample data in the sample data filter set. The PIR protocol can be based on homomorphic encryption or OT obfuscation-based underlying encryption technology.
[0072] In some specific implementations, the PIR protocol is implemented based on the XPIR technical framework, which is a specific technical framework for implementing the PIR protocol.
[0073] In an embodiment of the present invention, the data source pre-filters its signed data source ID set based on an ID filtering template constructed by the querying party, thereby obtaining a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0074] Figure 3 Schematic diagram of the hardware structure of the electronic device for anonymous query provided by the embodiment of the present invention. Figure 3As shown, the electronic device 300 includes a main processor 302, an internal bus 304, a network interface 306, a main memory 308, an auxiliary processor 310 and an auxiliary memory 312, and an auxiliary processor 320 and an auxiliary memory 322. The main processor 302 is connected to the main memory 308, and the main memory 308 can be used to store computer instructions to be executed by the main processor 302, so as to achieve the following Figure 1 or Figure 2 The illustrated anonymous query method based on a screening template includes some or all of the steps, as well as any possible combination or conjunction, replacement, or variation of the steps. Network interface 306 is used to provide network connectivity and transmit and receive data over the network. Internal bus 304 is used to facilitate internal data exchange between main processor 302, network interface 306, auxiliary processor 310, and auxiliary processor 320. Auxiliary processor 310 is connected to auxiliary memory 312 and together provides auxiliary computing capabilities, while auxiliary processor 320 is connected to auxiliary memory 322 and together provides auxiliary computing capabilities. Auxiliary processor 310 and auxiliary processor 320 can provide the same or different auxiliary computing capabilities, including, but not limited to, computing capabilities optimized for specific computing requirements, such as parallel processing capabilities or tensor computing capabilities, and computing capabilities optimized for specific algorithms or logical structures, such as iterative computing capabilities or graph computing capabilities. Auxiliary processor 310 and auxiliary processor 320 can include one or more processors of a specific type, such as a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), etc., to provide customized functions and structures. In some exemplary embodiments, the electronic device 300 may not include an auxiliary processor, may include only one auxiliary processor, or may include any number of auxiliary processors each having corresponding customized functions and structures, which are not specifically limited herein. Figure 3 The architecture of the two auxiliary processors shown in is illustrative only and should not be construed as limiting. In addition, the main processor 302 may include a single-core or multi-core computing unit for providing the functions and operations necessary for the embodiments of the present application. In addition, the main processor 302 and the auxiliary processor (such as Figure 3 The auxiliary processor 310 and the auxiliary processor 320 in the electronic device 300 may have different architectures, that is, the electronic device 300 may be a system based on a heterogeneous architecture. For example, the main processor 302 may be a general-purpose processor such as a CPU based on an instruction set operating system, while the auxiliary processor may be a graphics processor GPU suitable for parallel computing or a dedicated accelerator suitable for neural network model related operations. Auxiliary memory (e.g. Figure 3The auxiliary memory 312 and auxiliary memory 322 shown can be used to cooperate with their respective auxiliary processors to implement customized functions and structures. The main memory 308 is used to store necessary instructions, software, configurations, data, etc. so as to cooperate with the main processor 302 to provide the functions and operations required by the embodiments of the present application. In some exemplary embodiments, the electronic device 300 may not include auxiliary memory, may include only one auxiliary memory, or may include any number of auxiliary memories, without specific limitation herein. Figure 3 The architecture of the two secondary memories shown in is illustrative only and should not be construed as limiting. The main memory 308, and possibly the secondary memory, may include one or more of the following characteristics: volatile, non-volatile, dynamic, static, readable / writable, read-only, random access, sequential access, location addressable, file addressable, and content addressable, and may include random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, a hard disk, a removable disk, a recordable and / or rewritable compact disk (CD), a digital versatile disk (DVD), a mass storage media device, or any other form of suitable storage medium. The internal bus 304 may include any one or a combination of different bus structures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus utilizing any one of a variety of bus architectures. It should be understood that Figure 3 The structure of the electronic device 300 shown does not constitute a specific limitation on the relevant device or system. In some exemplary embodiments, the electronic device 300 may include more or fewer components than the specific embodiments and drawings, or combine certain components, or split certain components, or have a different component arrangement.
[0075] Figure 4This is a flowchart of a method for an anonymous query system based on a screening template, provided by an embodiment of the present invention. The system is used for privacy-preserving computing, private data, and federated learning, and includes a data source and a querying party. After the data source and the querying party interact based on the blind signature algorithm protocol, the querying party obtains a signed ID set to be queried; and the data source signs its data source ID set to obtain a signed data source ID set; the querying party compares each ID in the signed ID set to be queried to construct an ID screening template, and sends the ID screening template to the data source; after receiving the ID screening template, the data source filters the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template, and sends the signed data source ID screening set to the querying party; after receiving the signed data source ID screening set, the querying party performs an intersection task based on the signed ID set to be queried and the signed data source ID screening set to confirm whether there is an ID intersection; if the querying party confirms that there is an ID intersection, the querying party and the data source jointly execute the PIR protocol on the ID intersection, and the querying party obtains sample data corresponding to each ID in the ID intersection from the data source in batches.
[0076] Specifically, in this system:
[0077] S401. The querying party encrypts and blinds the ID set to be queried according to the RSA public key and the blinding factor.
[0078] S402. The querying party sends the ID set to be queried after being blinded and encrypted with the RSA public key to the data source.
[0079] S501. The data source signs a set of IDs to be queried that have been blinded and encrypted with the RSA public key using the RSA private key to obtain a signed and blinded set of IDs to be queried.
[0080] S502. The data source sends a signed and blinded ID set to be queried to the querying party.
[0081] S403. The querying party unblinds the signed and blinded ID set to be queried to obtain the signed ID set to be queried.
[0082] S404. The querying party performs hash processing on the signed ID set to be queried and converts it into a binary string.
[0083] S503. The data source signs the data source ID set to obtain a signed data source ID set.
[0084] S504. The data source performs hash processing on the signed data source ID set and converts it into a binary string
[0085] S405. The querying party constructs an ID screening template, including an ID matching template and an ID comparison template.
[0086] S406. The querying party sends the ID matching template and the ID screening template to the data source.
[0087] S505. The data source performs screening according to the ID matching template and the ID comparison template to obtain a signed data source ID screening set.
[0088] S506. The data source sends the signed data source ID filter set to the querying party.
[0089] S407. The querying party performs an intersection task based on the signed ID set to be queried and the data source ID screening set to obtain an ID intersection.
[0090] S408. The querying party constructs a PIR batch query request based on the ID intersection set.
[0091] S507. The data source encrypts the sample data (sample data filter set) corresponding to the data source ID filter set and then imports it into the PIR protocol.
[0092] S409. The querying party sends a PIR batch query request to the data source.
[0093] S508. The data source generates a PIR batch query response based on the PIR batch query request and the sample data screening set.
[0094] S509. The data source sends a PIR batch query reply to the querying party.
[0095] S410. The querying party obtains, in batches, from the PIR batch query reply, sample data in the sample data screening set corresponding to each ID in the ID intersection.
[0096] In some embodiments, the detailed description of the above steps can be referred to Figure 1 and Figure 2 For the sake of brevity, the relevant description of the method embodiment will not be repeated here.
[0097] In an embodiment of the present invention, the data source pre-filters its signed data source ID set based on an ID filtering template constructed by the querying party, thereby obtaining a signed data source ID filtering set. Through this ID filtering operation, the data source can pre-filter the signed data source ID filtering set. Therefore, in the subsequent execution of the PIR protocol with the querying party, the data source only needs to perform encryption calculations on the sample data corresponding to the signed data source ID filtering set, avoiding the need to perform encryption calculations on all sample data. Furthermore, after the querying party receives the signed data source ID filtering set and intersects it with its own signed ID set to be queried to confirm the ID intersection, the querying party can then execute the PIR protocol with the data source based on this ID intersection, allowing the querying party to batch-collect the sample data corresponding to each ID in the ID intersection during a single anonymous query, thereby achieving practical and efficient batch anonymous queries.
[0098] The specific embodiments provided in this application may include or be combined with a computer-readable storage medium, such as one or more storage devices capable of providing non-transitory data storage. The computer-readable storage medium / storage device may be configured to store data, programmers and / or instructions that, when executed by a processor of the device or apparatus provided in the specific embodiments of this application, enable these devices or apparatuses to perform relevant operations. The computer-readable storage medium / storage device may include one or more of the following features: volatility, non-volatility, dynamic, static, readable / writable, read-only, random access, sequential access, location addressability, file addressability, and content addressability. In one or more exemplary embodiments, the computer-readable storage medium / storage device may be integrated into the device or apparatus provided in the specific embodiments of this application or belong to a common system. Computer-readable storage media / storage devices may include optical storage devices, semiconductor storage devices and / or magnetic storage devices, etc., and may also include random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable disks, recordable and / or rewritable compact disks (CDs), digital versatile disks (DVDs), mass storage media devices or any other form of suitable storage media.
[0099] The above is an implementation method of the embodiment of the present application. It should be noted that the steps in the method described in the specific embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. It is understandable that the structures shown in the embodiments of the present application and the drawings do not constitute specific limitations on the relevant devices or systems. In other embodiments of the present application, the relevant devices or systems may include more or fewer components than the specific embodiments and drawings, or combine certain components, or split certain components, or have different component arrangements. Those skilled in the art will understand that, without departing from the spirit and scope of the specific embodiments of the present application, various modifications or changes can be made to the arrangement, operation and details of the methods and equipment recorded in the specific embodiments; without departing from the principles of the embodiments of the present application, several improvements and modifications can be made, and these improvements and modifications are also considered to be within the scope of protection of the present application.
Claims
1. A template-based anonymous query method for privacy-preserving computing, privacy-preserving data, and federated learning, characterized by: Applied to the data source, the anonymous query method includes: The data source party, through a blind signature algorithm agreement with the querying party, enables the querying party to obtain a signed ID set to be queried; and the data source party signs its data source ID set to obtain a signed data source ID set; The data source receives the ID screening template sent by the querying party; wherein the ID screening template is constructed by the querying party by comparing all or part of the positions having the same value in the hash binary strings corresponding to the respective IDs in the signed ID set to be queried; The data source filters the hash binary strings corresponding to the respective IDs in the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template, and sends the signed data source ID screening set to the querying party, so that the querying party performs an intersection task based on the signed ID set to be queried and the signed data source ID screening set to confirm whether there is an ID intersection; When the querying party confirms the existence of the ID intersection, the data source executes the PIR protocol together with the querying party for the ID intersection, thereby allowing the querying party to obtain sample data corresponding to each ID in the ID intersection in batches.
2. The anonymous query method according to claim 1, characterized in that: The blind signature algorithm protocol is an RSA blind signature algorithm protocol. The data source and the querying party obtain the signed ID set to be queried based on the blind signature algorithm protocol, including: The data source receives the blinded and RSA public key encrypted ID set to be queried sent by the querying party, and signs the blinded and RSA public key encrypted ID set to be queried according to the RSA private key of the data source to obtain a signed and blinded ID set to be queried; The data source sends the signed and blinded ID set to be queried to the querying party, so that the querying party deblinds the signed and blinded ID set to be queried to obtain a signed ID set to be queried.
3. The anonymous query method according to claim 2, characterized in that: The ID screening template includes an ID matching template M and an ID comparison template N, wherein: The ID matching template M is obtained by the querying party determining all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, recording all or part of the positions with the same value as the original value and recording the remaining positions as 0; The ID comparison template N is obtained by the querying party determining all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, recording all or part of the positions with the same value as 1 and the remaining positions as 0.
4. The anonymous query method according to claim 3, characterized in that: The data source party filters the hash binary strings corresponding to the respective IDs in the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template, including: The data source party performs an XOR operation on the hash binary string A corresponding to each ID in the signed data source ID set and the ID matching template M to obtain corresponding character strings A1, and performs an inversion operation on each character string A1 to obtain corresponding character strings A2. Then, the each character string A2 is subjected to an AND operation with the ID comparison template N to obtain each character string A3, and then the each character string A3 is respectively compared with the ID comparison template N; and the IDs in the signed data source ID set corresponding to the character string A3 identical to the ID comparison template N are collected to obtain the signed data source ID filtering set.
5. The anonymous query method according to claim 1, characterized in that: The anonymous query method further includes: The data source party imports the sample data filter set into the PIR protocol in advance, and the sample data filter set is the sample data corresponding to each ID in the signed data source ID filter set.
6. The anonymous query method according to claim 5, characterized in that: The data source and the querying party jointly execute the PIR protocol on the ID intersection, so that the querying party can batch obtain sample data corresponding to each ID in the ID intersection, including: After the data source receives the PIR batch query request sent by the querying party and constructed based on the ID intersection, it generates a PIR batch query reply based on the PIR batch query request and the sample data filter set, and sends the PIR batch query reply to the querying party so that the querying party can batch obtain the sample data in the sample data filter set corresponding to each ID in the ID intersection from the PIR batch query reply.
7. The anonymous query method according to claim 1, characterized in that: The PIR protocol is implemented based on the XPIR technology framework.
8. A template-based anonymous query method for privacy-preserving computing, privacy-preserving data, and federated learning, characterized in that: Applied to the querying party, the anonymous query method includes: The querying party obtains the signed ID set to be queried through a blind signature algorithm protocol with the data source party; The querying party compares all or part of the positions with the same value in the hash binary strings corresponding to the respective IDs in the signed ID set to be queried, thereby constructing an ID screening template, and sends the ID screening template to the data source party so that the data source party screens the hash binary strings corresponding to the respective IDs in the signed data source ID set according to the ID screening template, thereby obtaining a signed data source ID screening set that matches the ID screening template; wherein the signed data source ID set is obtained by the data source party signing its data source ID set; After receiving the signed data source ID filter set sent by the data source, the querying party performs an intersection task based on the signed ID set to be queried and the signed data source ID filter set, thereby confirming whether there is an ID intersection; When the querying party confirms the existence of the ID intersection, the querying party executes the PIR protocol with the data source for the ID intersection, thereby obtaining sample data corresponding to each ID in the ID intersection in batches.
9. The anonymous query method according to claim 8, characterized in that: The blind signature algorithm protocol is an RSA blind signature algorithm protocol. The querying party obtains the signed ID set to be queried through the blind signature algorithm protocol with the data source, including: The querying party sends the blinded and RSA public key encrypted ID set to be queried to the data source, so that the data source signs the blinded and RSA public key encrypted ID set to be queried using the RSA private key of the data source, thereby obtaining a signed and blinded ID set to be queried; After receiving the signed and blinded ID set to be queried sent by the data source, the querying party performs unblinding processing on the signed and blinded ID set to be queried, thereby obtaining a signed ID set to be queried.
10. The anonymous query method according to claim 9, characterized in that: The ID screening template includes an ID matching template M and an ID comparison template N. The querying party compares each ID in the signed ID set to be queried to construct the ID screening template, including: After the querying party determines all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, all or part of the positions with the same value are recorded as the original value, and the remaining positions are recorded as 0, thereby constructing the ID matching template M; After the querying party determines all or part of the positions with the same value in the hash binary string corresponding to each ID in the signed ID set to be queried, all or part of the positions with the same value are recorded as 1, and the remaining positions are recorded as 0, thereby constructing the ID comparison template N.
11. The anonymous query method according to claim 10, characterized in that: Sending the ID screening template to the data source so that the data source filters the hash binary strings corresponding to the respective IDs in the signed data source ID set according to the ID screening template to obtain a signed data source ID screening set that matches the ID screening template, including: The ID matching template M and the ID comparison template N are sent to the data source, so that the data source: performs an XOR operation on the hash binary string A corresponding to each ID in the signed data source ID set and the ID matching template M to obtain corresponding character strings A1, and performs an inversion operation on each character string A1 to obtain corresponding character strings A2, and then performs an AND operation on each character string A2 and the ID comparison template N to obtain each character string A3, and then compares each character string A3 with the ID comparison template N respectively; and collects the IDs in the signed data source ID set corresponding to the character string A3 identical to the ID comparison template N, thereby obtaining the signed data source ID filter set.
12. The anonymous query method according to claim 8, characterized in that: The querying party executes the PIR protocol with the data source for the ID intersection, thereby batch obtaining sample data corresponding to each ID in the ID intersection, including: The querying party constructs a PIR batch query request based on the ID intersection, and sends the PIR batch query request to the data source, so that the data source generates a PIR batch query reply based on the PIR batch query request and the sample data filter set; wherein the sample data filter set is pre-imported into the PIR protocol by the data source, and the sample data filter set is the sample data corresponding to each ID in the signed data source ID filter set; The querying party receives the PIR batch query reply sent by the data source party, and obtains in batches the sample data in the sample data screening set corresponding to each ID in the ID intersection set according to the PIR batch query reply.
13. The anonymous query method according to claim 8, characterized in that: The PIR protocol is implemented based on the XPIR technology framework.
14. A non-transitory computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 13.
15. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 13 by running the executable instructions.
16. A screening template-based anonymous query system for privacy computing, privacy data, and federated learning, characterized by: The anonymous query system includes a data source and a querying party. After the data source and the querying party interact based on the blind signature algorithm protocol, the querying party obtains a signed ID set to be queried; and the data source signs its data source ID set to obtain a signed data source ID set; The querying party compares all or part of the positions with the same value in the hash binary strings corresponding to the IDs in the signed ID set to be queried, constructs an ID screening template, and sends the ID screening template to the data source; After receiving the ID screening template, the data source party screens the hash binary strings corresponding to the respective IDs in the signed data source ID set according to the ID screening template, obtains a signed data source ID screening set that matches the ID screening template, and sends the signed data source ID screening set to the query party; After receiving the signed data source ID filter set, the querying party performs an intersection task based on the signed ID set to be queried and the signed data source ID filter set to confirm whether there is an ID intersection; When the querying party confirms the existence of the ID intersection, the querying party and the data source jointly execute the PIR protocol for the ID intersection, and then the querying party obtains sample data corresponding to each ID in the ID intersection in batches from the data source.
Citation Information
Patent Citations
Data joint query method, device and equipment and computer readable storage medium
CN114328504A
Conditional hiding trace query method, system and device based on privacy calculation
CN114637746A