An index-based single-server anonymous query method
By employing an index-based single-server covert query method, utilizing the Chinese Remainder Theorem for data preprocessing and an unintentional transmission protocol, the high computational resource consumption and communication overhead of existing technologies are addressed. This enables efficient and lightweight covert data querying, improving query efficiency and privacy protection capabilities.
Patent Information
- Application Number
- CN202510773809.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Existing covert query techniques rely on public-key encryption systems, which consume a lot of computing resources, are not lightweight enough, and multi-server models are not practical for actual deployment. They also have high communication overhead and are difficult to apply in resource-constrained environments.
A single-server hidden query method based on index is adopted. The stored data is preprocessed using the Chinese Remainder Theorem to construct a packet vector, and the decryption parameters are obtained through an unintentional transmission protocol to achieve hidden data query.
This system enables efficient data hiding queries in a single-server architecture, improving data processing efficiency and system privacy protection capabilities, reducing network load and system response latency, supporting multiple queries that reuse the same data packets, and enhancing system query throughput.
Smart Images

Figure CN120670470B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information security, and in particular to an index-based single-server private query method. BACKGROUND
[0002] Private information retrieval (PIR) is a technology for protecting user query privacy. The basic idea of this technology is to allow users to retrieve the required data from a remote database without revealing the query content, preventing the data holder from inferring the user's retrieval condition, thereby effectively protecting the user's query privacy.
[0003] Existing PIR technologies can be roughly divided into two categories: PIR based on homomorphic encryption and PIR based on Oblivious Transfer (OT). The PIR method based on homomorphic encryption uses homomorphic encryption technology to allow users to directly perform query operations on encrypted data while maintaining the encrypted state of the data. Through this technology, users can perform calculations on encrypted data, obtain encrypted query results, and obtain target data after local decryption. This method is suitable for query scenarios that support complex calculations, such as aggregation queries, range queries, etc., and can provide strong privacy protection. However, since encryption operations need to be performed on all data items in the database, the server-side computing burden is heavy, and the length of the encrypted vector and the ciphertext of the result is much larger than that of the plaintext data, resulting in high communication overhead, which is not conducive to the lightweight deployment of the system. To improve efficiency, some research has shifted to single-server or multi-server PIR schemes based on the Oblivious Transfer protocol. This type of method allows users to select target items from multiple possible data items without revealing the query content, and obtains the query result through the OT protocol. In implementation, the OT protocol can reduce the risk of query content leakage, and the computing and communication overhead is lower than that of the homomorphic encryption scheme. However, existing OT protocols are usually based on a multi-server model, requiring the query to interact with multiple database replicas, and the protocol implementation is complex, the communication bandwidth is large, and the multi-server setting is not universal in practical applications.
[0004] Through the research and analysis of the above-mentioned technologies, it can be seen that the existing private query scheme mainly has the following problems: 1) highly dependent on public key encryption systems, large consumption of computing resources; 2) the overall system is not lightweight and efficient, making it difficult to apply in resource-constrained environments; 3) the multi-server model is not practical in actual deployment.
[0005] Therefore, there is an urgent need for a private query scheme based on an index mechanism, with lightweight, single-server deployment, and efficient communication, to overcome the above-mentioned deficiencies in the prior art. SUMMARY
[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present application provides an index-based single-server anonymous query method.
[0007] To achieve the above-mentioned purposes, the main technical solutions adopted by the present application include:
[0008] The present application provides an index-based single-server anonymous query method, which is applied to an index-based single-server anonymous query system, the system comprising a database server and at least one user terminal in communication connection with the database server, and the method comprising:
[0009] S1, the pre-constructed inadvertent transmission protocol between the user terminal and the database server receives the first input query index of the user and returns the decryption parameter corresponding to the query index of the user terminal;
[0010] S2, the user terminal acquires the query result corresponding to the query index according to the decryption parameter and the packet data packet sent by the database server to the user terminal;
[0011] Wherein, the packet data packet is obtained by the database server pre-processing the pre-stored n storage data using the Chinese remainder theorem;
[0012] Each storage data comprises data information and a query index corresponding to the data information.
[0013] Preferably, before the step S1, it further comprises:
[0014] S0, the database server pre-processes the pre-stored n storage data using the Chinese remainder theorem to obtain a packet data packet;
[0015] Wherein, the bit length of each storage data is L.
[0016] Preferably, the S0 specifically comprises:
[0017] S01, the database server obtains a packing vector according to the pre-stored n storage data;
[0018] S02, the database server acquires a packet data packet according to the packing vector and sends the packet data packet to the user terminal.
[0019] Preferably, the S01 specifically comprises:
[0020] S011, the database server divides each storage data into t data blocks and forms a first matrix D;
[0021] Each data block has a length of b, and each data block represents a value smaller than each modulus parameter selected by the database server from n pairwise prime modulus parameters according to a preset security parameter k; the n modulus parameters correspond to the n stored data one by one;
[0022] The first matrix D is:
[0023] ;
[0024] t = L / (k1-1);
[0025] D it is the data information D i in the i-th stored data in the database server, divided into the t-th data block;
[0026] Wherein, k1 is the bit length of each modulus parameter in n pairwise prime modulus parameters selected by the database server according to a preset security parameter k;
[0027] S012, the database server uses the Chinese remainder theorem to pack the j-th column data block of the first matrix D, and obtains a packed vector;
[0028] Wherein, the packed vector is [P1,..., P j ,..., P t ];
[0029] P j =M1D 1j +...+M i D ij +...+M n D nj mod M;
[0030] M i =M / m i ;
[0031] M=m1×...×m i ×...×m n ;
[0032] m i is the i-th modulus parameter in n pairwise prime modulus parameters.
[0033] Preferably, the S02 specifically comprises:
[0034] The database server, the packed vector [P1,..., P j ,..., P teach component is divided into s packet data packets respectively, to obtain E packet data packets corresponding to the packing vector, and the E packet data packets are sent to the user terminal;
[0035] wherein each packet data packet contains d bits of data;
[0036] wherein E = sxt.
[0037] Preferably,
[0038] wherein the oblivious transfer protocol is constructed by the database server based on the inverse element of each module parameter corresponding to n module parameters and the user terminal;
[0039] The inverse element of the module parameter m i is M i -1 ;
[0040] The oblivious transfer protocol is an oblivious transfer protocol of n selected 1.
[0041] Preferably,
[0042] wherein the decryption parameter corresponding to the query index includes a module parameter corresponding to the query index and an inverse element of the module parameter.
[0043] Preferably, the S2 specifically includes:
[0044] S21, the user terminal uses formula (1) to analyze each packet data packet received in real time, obtains the corresponding analysis result, and stores it to the user terminal;
[0045] The formula (1) is:
[0046] result uv = P uv ×2 d(v-1) ×M q(1) -1 mod m q(1) ;
[0047] m q(1) is a module parameter corresponding to the first input query index;
[0048] M q(1) -1 is an inverse element of the module parameter corresponding to the first input query index;
[0049] P uv is the u-th component P j of the packing vector [P t 1,..., P uthe vth grouped data packet in the s grouped data packets; 1≤u≤t, 1≤v≤s;
[0050] result uv is the query result data block corresponding to the u th component P uv of the corresponding analysis result;
[0051] S22, based on the corresponding analysis result of all grouped data packets respectively, the query result data block is calculated by formula (2);
[0052] The formula (2) is:
[0053] D q(1),u =result u1 +...+result us mod m q(1) ;
[0054] D q(1),u is the query result data block corresponding to the u th component P j ,..., P t of the first input query index corresponding to the packed vector [P u 1 ,..., P q(1) t ];
[0055] S23, based on the query result data block corresponding to the first input query index, the query result corresponding to the first input query index is calculated by formula (3);
[0056] The formula (3) is:
[0057] D q(1),t =D q(1),u ||...||D q(1),1 ;
[0058] D q(1) is the query result corresponding to the first input query index.
[0059] Preferably, the method further comprises:
[0060] S3, the pre-constructed user terminal and the database server between the inadvertent transmission protocol receives the N th input query index of the user, and returns the decryption parameter corresponding to the N th input query index of the user terminal; Wherein, N≥2;
[0061] S4, the user terminal based on the decryption parameter corresponding to the N th input query index and the E grouped data packets stored in the user terminal, the query result corresponding to the N th input query index of the user is obtained.
[0062] Preferably, the S4 specifically comprises:
[0063] S41, the user terminal calculates the query result data block of each component in the packing vector corresponding to the Nth input query index based on the decryption parameter corresponding to the query index of the Nth input and the E group data packets stored in the user terminal, respectively using formula (3);
[0064] The formula (3) is: D q(N),u =P u1 ×M q(N) -1 +P u2 ×2 d ×M q(N) -1 +...+P us ×2 d(s-1) ×M q(N) -1 modm q(N) ;
[0065] m q(N) is the module parameter corresponding to the Nth input query index;
[0066] M q(N) -1 is the inverse element of the module parameter corresponding to the Nth input query index;
[0067] D q(N),u is the query result data block of the uth component P j in the packing vector [P1,..., P t ] corresponding to the Nth input query index; u
[0068] S42, based on the query result data block of each component P u in the packing vector corresponding to the Nth input query index, formula (4) is used to calculate the query result corresponding to the Nth input query index;
[0069] The formula (4) is:
[0070] D q(N) =D q(N),t ||...||D q(N),u ||...||D q(N),1 ;
[0071] D q(N) is the query result corresponding to the Nth input query index.
[0072] The beneficial effects of the present application are:
[0073] The index-based single-server anonymous query method of the application can realize efficient data anonymous query under a single-server architecture, does not expose the user query intention, improves data processing efficiency and system privacy protection capability, and achieves the technical effects of improving query efficiency and system response capability while guaranteeing user query privacy.
[0074] Further, the index-based single-server anonymous query method of the application can improve query efficiency and data transmission security without exposing original data content, achieves the purposes of strong anonymity and small data transmission overhead.
[0075] Further, the application supports reuse of the same packaged data packet when the user queries different indexes multiple times, which can significantly improve the system query throughput capacity, and achieves the purposes of reducing network load and system response delay. BRIEF DESCRIPTION OF DRAWINGS
[0076] Figure 1 The figure is a flowchart of the index-based single-server anonymous query method of the application.
[0077] Figure 2 The figure is a flowchart of the index-based single-server anonymous query method of the application. DETAILED DESCRIPTION
[0078] In order to better explain the application and facilitate understanding, the application is described in detail below through specific embodiments in combination with the drawings.
[0079] In order to better understand the above technical solutions, the exemplary embodiments of the application will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the application are shown in the drawings, it should be understood that the application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer, more thorough understanding of the application and to fully convey the scope of the application to those skilled in the art.
[0080] Embodiment One
[0081] Reference Figure 1The embodiment provides an index-based single-server anonymous query method, which is applied to an index-based single-server anonymous query system, the system comprising a database server and at least one user terminal in communication connection with the database server, and the method comprises the following steps:
[0082] S1, the pre-constructed oblivious transfer protocol between the user terminal and the database server receives the first query index input by the user, and returns the decryption parameter corresponding to the query index to the user terminal;
[0083] For example, the user terminal transmits the query index to the database server through the pre-constructed oblivious transfer protocol (OT). The database server returns only the decryption parameter related to the query index through the protocol.
[0084] S2, the user terminal obtains the query result corresponding to the query index according to the decryption parameter and the grouping data packet sent by the database server to the user terminal;
[0085] The grouping data packet is obtained by the database server by preprocessing n stored data using the Chinese remainder theorem; in the embodiment, the use of the Chinese remainder theorem can reduce the preprocessing time of the server, and at the same time, realize the recovery of more lightweight and efficient query results.
[0086] Each stored data comprises data information and a query index corresponding to the data information.
[0087] For example, n stored data (i, D i ) are pre-stored on the database server, i is the ID of the data information D i corresponding to the query index, and it is assumed that the data information D1,..., D n have the same bit length L. The user terminal needs to obtain the data information corresponding to the query index without the database server knowing the specific query index of the user.
[0088] The index-based single-server anonymous query method in the embodiment can obtain the required data from the database server without exposing the query target, effectively protect the query privacy, and avoid the recording or inference of the query behavior by the database server.
[0089] In the practical application of the embodiment, the step S1 is further preceded by the following step:
[0090] S0, the database server preprocesses n stored data using the Chinese remainder theorem to obtain a grouping data packet;
[0091] Each of the stored data has a bit length of L.
[0092] In the embodiment, S0 specifically includes:
[0093] S01, the database server obtains a packed vector according to the n stored data stored in advance; S01 specifically includes:
[0094] S011, the database server divides each stored data into t data blocks and forms a first matrix D;
[0095] For example, it is assumed that four stored data D1, D2, D3 and D4 are stored in advance; the database server divides each stored data into t data blocks and performs a modulo operation using four mutually prime modulo parameters m1, m2, m3 and m4.
[0096] Each data block has a length of b, and each data block represents a value smaller than each of the n mutually prime modulo parameters selected by the database server according to the pre-set security parameter k; the n modulo parameters correspond to the n stored data one by one; in the embodiment, each data block has a length of b, which means that D i = D i1 + D i2 × 2 b ... + D it × 2 b(t-1) ;
[0097] The first matrix D is:
[0098] ;
[0099] t = L / (k1-1);
[0100] D it is the tth data block divided from the data information D i in the ith stored data in the database server;
[0101] Wherein, k1 is the bit length of each of the n mutually prime modulo parameters selected by the database server according to the pre-set security parameter k;
[0102] S012, the database server uses the Chinese remainder theorem to pack the jth column data block of the first matrix D to obtain a packed vector;
[0103] Wherein, the packed vector is [P1,..., P j ,..., P t ];
[0104] P j =M1D1j +...+M i D ij +...+M n D nj mod M;
[0105] M i =M / m i ;
[0106] M=m1×...×m i ×...×m n ;
[0107] m i is the i-th modulus parameter in the n pairwise co-prime modulus parameters.
[0108] mod is a modulus operator.
[0109] In this embodiment, the database server packs the data blocks in the j-th column of the first matrix D using the Chinese remainder theorem, and the specific process is as follows:
[0110] The database server takes D 1j ,..., D nj as the solution of the following congruence equations;
[0111] ;
[0112] The solution of the congruence equations is deformed to obtain P j =M1D 1j +...+M i D ij +...+M n D nj mod M, thereby realizing the packing of the data blocks, and finally obtaining the packed vector [P1,..., P j ,..., P t ].
[0113] S02, the database server obtains the grouped data packets according to the packed vector, and sends the grouped data packets to the user terminal.
[0114] The S02 specifically comprises:
[0115] The database server divides each component in the packed vector [P1,..., P j ,..., P t ] into s grouped data packets respectively, obtains E grouped data packets corresponding to the packed vector, and sends the E grouped data packets to the user terminal;
[0116] Each grouped data packet contains d bits of data; E=sxt.
[0117] For example, assuming that each stored data is divided into t data blocks, t is assumed to be 4, each data block is 32 bits, then a first matrix D of 4*4 is constructed, the rows in the first matrix D represent data entries, and the columns represent the positions of the data blocks, then the Chinese remainder theorem is applied to the first matrix D, and the four data blocks in this column are combined into an encrypted value to generate a packing vector P1~P4.
[0118] Then each packing vector is further split into multiple grouped data packets, for example, 32 bits are divided into two 16-bit grouped data packets, and finally eight grouped data packets are obtained and sent to the user terminal.
[0119] The inadvertent transmission protocol is constructed by the database server based on the inverse elements corresponding to the n module parameters and the user terminal.
[0120] The inverse element of the module parameter m i is M i -1 .
[0121] The inadvertent transmission protocol is an n-of-1 inadvertent transmission protocol. In this embodiment, the n-of-1 inadvertent transmission protocol can be used to obtain the decryption parameters corresponding to the query index without exposing the user's query index. In this embodiment, based on the inadvertent transmission protocol, the user can quickly query to obtain the decryption parameters corresponding to the query index, without the high encryption operation on the index as in the homomorphic encryption of lattice cryptography, greatly reducing the time of user index query.
[0122] The decryption parameters corresponding to the query index include the module parameter corresponding to the query index and the inverse element of the module parameter.
[0123] The S2 specifically includes:
[0124] S21, the user terminal analyzes each grouped data packet received in real time using formula (1), obtains the corresponding analysis result, and stores it in the user terminal.
[0125] The formula (1) is:
[0126] result uv = P uv ×2 d(v-1) ×M q(1) -1 mod m q(1) .
[0127] m q(1) is the module parameter corresponding to the first input query index;
[0128] M q(1)-1 It is the inverse of the modulo parameter corresponding to the first input query index;
[0129] P uv For the packed vector [P1, ..., P] j , ..., P t The u-th component P in ] u The v-th packet in the s-th packet group; 1≤u≤t, 1≤v≤s;
[0130] result uv To be with P uv The corresponding parsing results;
[0131] In the actual processing of this embodiment, the user terminal receives E data packets sent out of order by the database server in real time. The user terminal then uses stream processing to quickly parse and obtain the corresponding parsing results. This embodiment, based on stream processing technology, can quickly process the data packets sent by the database server using simple modular arithmetic, obtaining the parsing results almost simultaneously with the transmission of the data packets. Unlike typical homomorphic encryption covert query schemes, which require complex homomorphic encryption and decryption processes after obtaining the ciphertext, this embodiment eliminates the need for complex homomorphic encryption and decryption processes after obtaining the ciphertext.
[0132] S22. Based on the parsing results corresponding to all grouped data packets, the query result data block is calculated using formula (2);
[0133] The formula (2) is:
[0134] D q(1),u =result u1 +...+result us mod m q(1) ;
[0135] D q(1),u It is the packed vector [P1, ..., P] corresponding to the query index entered in the first input. j , ..., P t The u-th component P in ] u The query result data block;
[0136] S23. Based on the query result data block corresponding to the query index entered for the first time, the query result corresponding to the query index entered for the first time is calculated using formula (3);
[0137] The formula (3) is:
[0138] D q(1) =D q(1),t ||...||Dq(1),u ||...||D q(1),1 ;
[0139] D q(1) corresponding to the first input query index.
[0140] Referring to Figure 2 , in the embodiment, the method further comprises:
[0141] S3, the pre-constructed oblivious transfer protocol between the user terminal and the database server receives the Nth input query index of the user, and returns the decryption parameter corresponding to the Nth input query index of the user terminal; wherein N≥2;
[0142] S4, the user terminal obtains the query result corresponding to the Nth input query index based on the decryption parameter corresponding to the Nth input query index and the E group data packets stored in the user terminal.
[0143] Specifically, the S4 specifically comprises:
[0144] S41, the user terminal respectively calculates the query result data block of each component in the packing vector corresponding to the Nth input query index based on the decryption parameter corresponding to the Nth input query index and the E group data packets stored in the user terminal, using formula (3);
[0145] The formula (3) is: D q(N),u =P u1 ×M q(N) -1 +P u2 ×2 d ×M q(N) -1 +...+P us ×2 d(s-1) ×M q(N) -1 modm q(N) ;
[0146] m q(N) is the modulus parameter corresponding to the Nth input query index;
[0147] M q(N) -1 is the inverse element of the modulus parameter corresponding to the Nth input query index;
[0148] D q(N),u is the query result data block of the u-th component P j in the packing vector [P t 1,..., P u ] corresponding to the Nth input query index.
[0149] S42, based on each component P of the packing vector corresponding to the Nth input query index u The query result data block corresponding to the Nth input query index is calculated by formula (4);
[0150] The formula (4) is:
[0151] D q(N) =D q(N),t ||...||D q(N),u ||...||D q(N),1 ;
[0152] D q(N) The query result corresponding to the Nth input query index.
[0153] That is, the embodiment can allow the user to subsequently query multiple times without having to download the data packet again, only to reuse the oblivious transfer protocol to interact with the database server to obtain the decryption parameter corresponding to the new query index, and then the E group data packet stored in the user terminal, so as to obtain the corresponding query result.
[0154] Based on the scheme of the embodiment, the user only needs to obtain the decryption parameter corresponding to the query index by using the oblivious transfer protocol to query, so that the user terminal locally calculates the query result quickly, without needing to obtain the ciphertext of the query result by multiple homomorphic encryption, thereby realizing lower calculation and communication overhead.
[0155] Embodiment two
[0156] In order to make the technical scheme of the present application clearer and more apparent, the present application will be further described in detail below in combination with embodiment two, and it should be understood that the following embodiments are only used to illustrate the present application and are not used to limit the protection scope of the present application.
[0157] The embodiment proposes an index-based single-server anonymous query method, relating to the field of database encryption retrieval, and is particularly suitable for realizing a scene with high user data privacy protection requirement in a single-server environment, such as application in medical databases, financial information systems, intellectual property databases, etc.
[0158] In this embodiment, it is assumed that there is a database server and several user terminals communicating with it. The database server pre-stores several structured data records, each of which includes data content and a query index corresponding to that data content. At the beginning of the system deployment, all data in the database will be preprocessed based on the Chinese Remainder Theorem (CRT), and a data packaging mechanism will be built for subsequent covert queries.
[0159] Specifically, during the system initialization phase, the database server first segments each piece of stored data. Assuming the bit length of a data entry is L, the choice of bit length can be determined based on security parameters. For example, if the security parameter is set to k, the server will select n pairwise coprime modulo parameters (i.e., coprime integers) from security parameter k, and use these modulo values as the basis for data packaging and recovery.
[0160] Each piece of stored data is divided into t data blocks of equal length, each data block having a bit length of b, thus forming an n x t matrix D, denoted as the first matrix D. Here, the i-th row of the first matrix D represents all data blocks containing the i-th stored data, and the j-th column represents the value of all data at the j-th data block position. Subsequently, the database server packages each column of the first matrix D using the Chinese Remainder Theorem. The packaging method involves multiplying each of the n elements of that column by its corresponding M. i (M) i The product of the modulo parameters is divided by the value of the i-th modulo parameter, and the sum of all results is taken modulo M, where M is the product of all modulo parameters. The final packed vector is a one-dimensional vector of length t [P1, P2, ..., P...]. t Each component represents an intermediate value that has been packaged by CRT.
[0161] After the packet vector is packaged, the database server further groups it into a series of fixed-size data packets. Each component is divided into s packets of fixed bit length d, resulting in a total of E = s × t data packets. This process aims to improve transmission efficiency and provide granular control for subsequent data concealment queries.
[0162] When a user terminal initiates its first query request, it first enters the query index q. (1) The query index is sent to the database server via a pre-established n-choose-1 Oblivious Transfer (OT) protocol. The server then uses the received query index q... (1) Returns the modulo parameter m corresponding to the query index. q(1)and its corresponding inverse M q(1) -1 These parameters constitute the decryption parameters, which guide the user terminal in reconstructing the received packet data.
[0163] Once the user terminal receives the packet data, it can parse the data according to the following steps:
[0164] For each packet P uv The following formula is used for analysis:
[0165] result uv = P uv ×2 d(v-1) ×M q(1) -1 mod m q(1) ;
[0166] P uv For the packed vector [P1, ..., P] j , ..., P t The u-th component P in ] u The v-th packet in the s-th packet group; 1≤u≤t, 1≤v≤s;
[0167] After obtaining all the parsing results, the user terminal performs an accumulation operation on each group of s parsing results and modulo m. q(1) This yields the packed vector [P1, ..., P] corresponding to the query index entered in the first input. j , ..., P t The u-th component P in ] u query result data block D q(1),u ,Right now:
[0168] D q(1),u =result u1 +...+result us mod m q(1) ;
[0169] Finally, concatenate all the query result data blocks in order to restore the original data content:
[0170] D q(1) =D q(1),t ||...||D q(1),u ||...||D q(1),1 ;
[0171] D q(1) The query results are the results corresponding to the index entered in the first query.
[0172] It's worth noting that in this mechanism, the user has already received all the data packets sent by the server after the first query. Therefore, in subsequent queries (N≥2), the user terminal does not need to receive data from the server again; it only needs to send a new query index q via the OT protocol. (N) The database server will then return the modulo parameter m corresponding to the query index. q(N) and its inverse M q(N) -1 .
[0173] Using this decryption parameter, the user terminal directly parses the result from the locally cached data packet using the following calculation method:
[0174] First, perform the following restoration operation on each packed vector component:
[0175] D q(N),u =P u1 ×M q(N) -1 +P u2 ×2 d ×M q(N) -1 +...+P us ×2 d(s-1) ×M q(N) -1 mod m q(N) ;
[0176] m q(N) The modulo parameter corresponding to the query index of the Nth input;
[0177] M q(N) -1 It is the inverse of the modulo parameter corresponding to the query index of the Nth input;
[0178] D q(N),u The packed vector [P1, ..., P] corresponding to the query index of the Nth input j , ..., P t The u-th component P in ] u The query result data block;
[0179] Then, based on each component P in the packed vector corresponding to the query index of the Nth input... u The query result data block is used to calculate the query result corresponding to the query index of the Nth input using the following formula;
[0180] D q(N) =D q(N),t ||...||D q(N),u ||...||D q(N),1 ;
[0181] D q(N) The query result corresponding to the query index of the Nth input is obtained.
[0182] In summary, the embodiment of the present application shows a single-server anonymous query mechanism combining the Chinese remainder theorem and the oblivious transfer protocol, which not only ensures the protection of sensitive index information when the user queries data, but also effectively reduces the communication overhead through data grouping and local analysis strategy. This mechanism is particularly suitable for resource-constrained or user privacy-focused single-server systems.
[0183] For example, if the user terminal is a query system of a department of a medical institution, the database server stores desensitized medical record data and indexes, and the user can only obtain the required medical record through this scheme without exposing other patient information or knowing whether there is a specific index data record in the server, greatly enhancing the anonymity and security of the system.
[0184] In addition, the entire embodiment also has good scalability. By adjusting the module parameter number n, the security parameter k, and the grouping parameters d and s, it can be flexibly adapted to different sizes of data sets and different levels of security requirements. By parallelizing the construction of the packed vector and asynchronously executing the grouping transmission, the response speed of the system can be further improved.
[0185] The Chinese remainder theorem used in this embodiment is not only used for encrypting and packaging single data, but also can be extended to the anonymous retrieval of complex structured data such as image blocks and ciphertext document segments, and has a wide application prospect.
[0186] In the embodiment of the present application, the application of the Chinese remainder theorem (CRT) not only realizes encrypted query and data packet reconstruction, but also brings significant processing efficiency improvement in practical applications, especially in the preprocessing link of the database server and the query response speed of the user terminal. The Chinese remainder theorem enables the segmentation and packaging of data in this embodiment and the restoration process to be completed with low computational complexity.
[0187] Firstly, the database server does not need to construct a special data mapping relationship for each query index when performing preprocessing operations. In the traditional encryption index or full-text encryption retrieval method, the server often needs to construct an encryption mask or an encryption matching table for each possible query request, which on the one hand occupies a large amount of storage resources, and on the other hand reduces the data matching efficiency in the query response process. The CRT mechanism adopted in the embodiment is completely different, and its core advantage lies in that each piece of stored data is pre-processed into a group of data blocks with a unique modulus mapping relationship in the initialization stage. These data blocks form a packed vector after matrix packing, and the target data can be reconstructed through the corresponding modulus parameter after the user proposes an arbitrary query index, without the need for the database server to make special calculations for each query. Therefore, the database server only needs to complete the generation of the packed vector once during system initialization, and the entire preprocessing process has a linear complexity, greatly reducing the load in the initial deployment of the system.
[0188] Furthermore, the CRT packing scheme has natural structural separation. In the process of constructing the packed vector, the database server processes each column independently, that is, it can simultaneously pack multiple columns of data through multi-threading or parallel computing. Compared with the serial matching operation required by the traditional encryption index, this processing method greatly improves the parallel processing capability and throughput of the database server. The database server only needs to construct a group of grouped data packets, which are not only suitable for one query, but also can be cached by the user for data reconstruction operations of multiple different query indexes. This "one packing, multiple queries" method significantly reduces network bandwidth consumption and waste of computing resources.
[0189] Secondly, on the user terminal side, in order to further improve the real-time performance of query response, the embodiment introduces the stream processing idea, that is, the user terminal can start the modulo operation and reconstruction operation as soon as it receives the data packet, without waiting for all data packets to arrive before processing as a whole. This stream processing mode is particularly suitable for scenarios with limited bandwidth or low device computing power. Whenever the user terminal receives a grouped data packet, it can immediately substitute it into the decryption parameters obtained in advance to perform modulo operation and analysis, obtain the partial analysis result (i.e., result uv ) corresponding to the current grouped data, and cache it locally. When all grouped data packets arrive, the user terminal can immediately complete the reconstruction of the entire data.
[0190] It is worth emphasizing that the calculation complexity of the modulo operation is extremely low, especially when the length of the modulus is moderate, which can be usually completed by several bit operations and integer multiplication and division. Taking a 32-bit integer modulus as an example, a common embedded terminal or mobile processor can complete a modulo multiplication operation in microseconds. Therefore, in the process of receiving a packet data packet by the user terminal, the terminal can complete the network packet receiving operation while performing real-time analysis and restoration on the received data. This way of receiving and analyzing at the same time greatly compresses the total response time from initiating the query to obtaining the result.
[0191] In addition, since the analysis and reconstruction of each packed vector are completely independent, the user terminal can utilize a multi-core or multi-thread architecture to parallelize the processing tasks of each component during implementation. For example, when the data is divided into t components, the data processing task of each component can be assigned to a thread for independent restoration, and finally the target query result can be obtained by unified splicing. This mechanism not only improves the terminal processing capability, but also can show high performance scalability in large data volume and concurrent query scenarios.
[0192] Through the cooperation of the above mechanisms, the anonymous query method based on the Chinese remainder theorem and stream processing combined by the embodiment can effectively reduce the server processing load while ensuring the privacy and security of user queries, and realize nearly real-time query response on the client side.
[0193] In the description of the present application, it should be understood that the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features limited by "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0194] In the present application, unless otherwise specifically defined and limited, the terms "mounting", "connection", "connection", "fixing" and the like should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integrated; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0195] In the present application, unless otherwise explicitly specified and limited, a first feature is "on" or "under" a second feature can mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature is "over", "above" and "on top of" a second feature can mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is horizontally higher than the second feature. A first feature is "under", "below" and "underneath" a second feature can mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is horizontally lower than the second feature.
[0196] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "an embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are contained in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.
[0197] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and are not to be construed as limiting the present application, and the person skilled in the art can make changes, modifications, replacements and variations to the above-described embodiments within the scope of the present application.
Claims
1. An index-based single-server private query method, characterized in that, The index-based single-server anonymous query method is applied to an index-based single-server anonymous query system, the system comprising a database server and at least one user terminal in communication connection with the database server, and the method comprising: S1, an inadvertent transmission protocol pre-established between the user terminal and the database server receiving a first query index input by a user and returning a decryption parameter corresponding to the query index to the user terminal; S2, the user terminal obtaining a query result corresponding to the query index according to the decryption parameter and a grouping data packet sent by the database server to the user terminal; wherein the grouping data packet is obtained by the database server from n stored data by using the Chinese remainder theorem for preprocessing; each stored data comprising data information and a query index corresponding to the data information.
2. The index-based single-server private query method of claim 1, wherein, Before the step S1, the method further comprises: S0, the database server obtaining a grouping data packet by using the Chinese remainder theorem for preprocessing from n stored data; wherein the bit length of each stored data is L.
3. The index-based single-server private query method of claim 2, wherein, The S0 specifically comprises: S01, the database server obtaining a packing vector from the n stored data; S02, the database server obtaining the grouping data packet according to the packing vector and sending the grouping data packet to the user terminal.
4. The index-based single-server private query method of claim 3, wherein, The S01 specifically comprises: S011, the database server dividing each stored data into t data blocks and forming a first matrix D; wherein the length of each data block is b, and the value represented by each data block is smaller than each modulus parameter of n two-by-two prime modulus parameters selected by the database server according to a pre-established security parameter k; wherein the n modulus parameters correspond to the n stored data one by one; the first matrix D is: ; t = L / (k1-1); D it For the data information D in the i-th stored data in the database server i The t-th data block; wherein k1 is the bit length of each modulus parameter of the n two-by-two prime modulus parameters selected by the database server according to the pre-established security parameter k; S012, the database server packing the jth column data block of the first matrix D using the Chinese remainder theorem to obtain a packing vector; Wherein, the packing vector is [P1,..., P j ,..., P t ]; P j =M1D 1j +...+M i D ij +...+M n D nj mod M; M i =M / m i ; M = m1x...xm i x...xm n ; m i is the i-th modulus parameter among the n pairwise coprime modulus parameters.
5. The index-based single-server private query method of claim 4, wherein, The S02 specifically comprises: a database server, which divides each component of a packing vector [P1,..., P j ,..., P t ] into s packet data respectively, obtains E packet data corresponding to the packing vector, and sends the E packet data to the user terminal; wherein each grouping data packet contains d bits of data; wherein E = sxt.
6. The index-based single-server anonymous query method according to claim 5, wherein wherein the inadvertent transmission protocol is constructed by the database server based on inverse elements corresponding to the n modulus parameters and the user terminal; Modulus m i The inverse of M i -1 ; the inadvertent transmission protocol is an inadvertent transmission protocol of n choices 1.
7. The index-based single-server anonymous query method according to claim 6, wherein wherein, the decryption parameter corresponding to the query index comprises a modulus parameter corresponding to the query index and an inverse element of the modulus parameter.
8. The index-based single-server private query method of claim 6, wherein, The S2 specifically comprises: S21, the user terminal using formula (1) to analyze each grouping data packet received in real time to obtain a corresponding analysis result and store the analysis result to the user terminal; the formula (1) is: result uv = P uv ×2 d(v-1) ×M q(1) -1 mod m q(1) ; m q(1) is a module parameter corresponding to the first input query index; M q(1) -1 inverse of the modulus parameter corresponding to the first input query index; P uv For the packed vector [P1, ..., P] j , ..., P t The u-th component P in ] u The v-th packet in the s-th packet group; 1≤u≤t, 1≤v≤s; result uv to p uv corresponding analysis result; S22, based on the analysis results corresponding to all the packet data respectively, the query result data block is calculated by using formula (2); The formula (2) is: D q(1),u = result u1 +...+result us mod m q(1) ; D q(1),u It is the packed vector [P1, ..., P] corresponding to the query index entered in the first input. j , ..., P t The u-th component P in ] u The query result data block; S23, based on the query result data block corresponding to the first input query index, the query result corresponding to the first input query index is calculated by using formula (3); The formula (3) is: D q(1) =D q(1),t ||...||D q(1),u ||...||D q(1),1 ; D q(1) corresponding to the query index inputted for the first time.
9. The index-based single-server private query method of claim 8, wherein, The method further comprises: S3, the pre-constructed user terminal and the database server between the inadvertent transmission protocol receives the Nth input query index of the user, and returns the decryption parameter corresponding to the Nth input query index of the user terminal; Wherein, N≥2; S4, the user terminal based on the decryption parameter corresponding to the Nth input query index and the E packet data stored in the user terminal, the query result corresponding to the Nth input query index of the user is obtained.
10. The index-based single-server private query method of claim 9, wherein, The S4 specifically comprises: S41, the user terminal based on the decryption parameter corresponding to the Nth input query index and the E packet data stored in the user terminal, respectively, the query result data block of each component in the packing vector corresponding to the Nth input query index is calculated by using formula (3); The formula (3) is: D q(N),u = P u1 × M q(N) -1 + P u2 × 2 d × M q(N) -1 +... + P us × 2 d(s-1) × M q(N) -1 mod m q(N) ; m q(N) is a module parameter corresponding to the Nth input query index; M q(N) -1 inverse of the module parameter corresponding to the Nth input query index; D q(N),u The packed vector [P1, ..., P] corresponding to the query index of the Nth input j , ..., P t The u-th component P in ] u The query result data block; S42、based on each component P of the packing vector corresponding to the query index inputted for the Nth time u the query result data block corresponding to the query index inputted for the Nth time is calculated by using formula (4). The formula (4) is: D q(N) =D q(N),t ||...||D q(N),u ||...||D q(N),1 ; D q(N) is the query result corresponding to the Nth input query index.
Citation Information
Patent Citations
Privacy information retrieval protocol making method, storage medium and device
CN115378573A
Hidden query method and device, electronic equipment and storage medium
CN115905238A