Index-based single-server hidden query method

By combining the Chinese remainder theorem to preprocess data in a single-server environment and the oblivious transfer protocol, the problems of high computing resource consumption and high communication overhead of existing hidden query technologies are solved, and efficient data hidden query and strong privacy protection are achieved.

CN120670470AActive Publication Date: 2025-09-19HANGZHOU INNOVATION RES INST OF BEIJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510773809.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-19
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

Existing hidden query technologies rely on public key encryption systems, which consume a lot of computing resources. The system is not lightweight enough, and the multi-server model is not practical in actual deployment. The communication overhead is high and it is difficult to apply in resource-constrained environments.

Method used

An index-based single-server hidden query method is adopted. The Chinese remainder theorem is used to preprocess the stored data, construct a packing vector, and obtain the decryption parameters through the oblivious transfer protocol to achieve efficient hidden query of data.

Benefits of technology

Achieve efficient data anonymity in a single-server architecture, improve query efficiency and system privacy protection capabilities, reduce network load and system response delay, support multiple queries to reuse the same data packet, and improve system query throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670470A_ABST
    Figure CN120670470A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information security, in particular to an index-based single-server hidden query method, which is applied to an index-based single-server hidden query system, and the system comprises a database server and at least one user terminal in communication connection with the database server, the method comprises the following steps of: S1, receiving a query index input by a user for the first time by a pre-constructed casual transmission protocol between a user terminal and a database server, and returning a decryption parameter corresponding to the query index to the user terminal; s2, the user terminal obtains a query result corresponding to the query index according to the decryption parameter and a grouped data packet sent to the user terminal by the database server; the grouped data packet is obtained by preprocessing n pieces of storage data pre-stored by the database server by adopting the Chinese remainder theorem; each piece of storage data comprises data information and a query index corresponding to the data information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to an index-based single-server hidden query method. Background Art

[0002] Private Information Retrieval (PIR) is a technology used to protect the privacy of user queries. The basic idea is to allow users to retrieve required data from remote databases without revealing the query content, preventing data holders from inferring the user's search criteria, thereby effectively protecting the user's query privacy.

[0003] Existing PIR techniques can be broadly categorized into two types: homomorphic encryption-based PIR and oblivious transfer (OT)-based PIR. Homomorphic encryption-based PIR methods leverage homomorphic encryption to allow users to perform queries directly on encrypted data while preserving its encryption state. This technology allows users to perform computations on encrypted data, obtain encrypted query results, and then retrieve the target data after decryption locally. This approach is suitable for complex query scenarios, such as aggregation queries and range queries, and provides strong privacy protection. However, since encryption operations must be performed on all data items in the database, the server-side computational burden is heavy. Furthermore, the length of the encrypted vectors and results is significantly longer than the plaintext data, resulting in high communication overhead and hindering lightweight system deployment. To improve efficiency, some research has turned to single-server or multi-server PIR schemes based on oblivious transfer protocols. These methods allow users to select a target item from multiple possible data items without revealing the query content and obtain the query results through OT protocols. In terms of implementation, OT protocols can reduce the risk of query content leakage, and their computational and communication overhead is lower than that of homomorphic encryption schemes. However, existing OT protocols are typically based on a multi-server model, requiring the queryer to interact with multiple database replicas. This makes the protocol implementation complex, consumes large communication bandwidth, and the multi-server setup is not universally applicable in practical applications.

[0004] Through the research and analysis of the above technologies, it can be seen that the existing hidden query solutions have the following main problems: 1) They are highly dependent on public key encryption systems and consume a lot of computing resources; 2) The overall system is not lightweight and efficient enough, 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 hidden query solution based on an index mechanism that is lightweight, single-server deployed, and has efficient communication to overcome the above-mentioned shortcomings in the existing technology. Summary of the Invention

[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides an index-based single-server hidden query method.

[0007] In order to achieve the above objectives, the main technical solutions adopted by the present invention include: An embodiment of the present invention provides an index-based single-server hidden query method, which is applied to an index-based single-server hidden query system. The system includes a database server and at least one user terminal communicatively connected thereto. The method includes: S1. The pre-built oblivious transfer protocol between the user terminal and the database server receives the query index input by the user for the first time and returns the decryption parameter corresponding to the query index to the user terminal; S2. The user terminal obtains a query result corresponding to the query index according to the decryption parameter and the packet data sent to the user terminal by the database server; The grouped data packets are obtained by pre-processing the n pre-stored data by the database server using the Chinese remainder theorem; Each stored data includes data information and a query index corresponding to the data information.

[0008] Preferably, before step S1, the method further includes: S0, the database server pre-processes the n pre-stored data using the Chinese remainder theorem to obtain a packet data packet; The bit length of each stored data is L.

[0009] Preferably, the S0 specifically includes: S01. The database server obtains a packing vector according to n pre-stored storage data; S02. The database server obtains a packet data packet according to the packing vector, and sends the packet data packet to the user terminal.

[0010] Preferably, the S01 specifically includes: S011. The database server divides each stored data into t data blocks and forms a first matrix D; wherein each data block has a length of b, and the value represented by each data block is smaller than each of n mutually prime modular parameters selected by the database server according to a preset security parameter k; wherein the n modular parameters correspond one-to-one to the n stored data; The first matrix D is: ; t=L / (k1-1); D it The data information D in the i-th storage data in the database server i The tth data block divided; Wherein, k1 is the bit length of each of the n mutually prime modular parameters selected by the database server according to the preset security parameter k; S012. The database server packs the data block of the jth column 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=m1×...×m i ×...×m n ; m i is the i-th modular parameter among n mutually prime modular parameters.

[0011] Preferably, the S02 specifically includes: The database server will pack the vector [P1, ..., P j ,...,P t ] are divided into s packets, each component in the packet vector is obtained, and E packets are sent to the user terminal; Among them, each packet contains d bits of data; Where E=s×t.

[0012] Preferably, The oblivious transfer protocol is constructed by the database server based on the inverse elements corresponding to the n module parameters and the user terminal; Modulus parameter m i The inverse element is M i -1 ; The oblivious transfer protocol is an n-choose-1 oblivious transfer protocol.

[0013] Preferably, The decryption parameters corresponding to the query index include a modulus parameter corresponding to the query index and an inverse element of the modulus parameter.

[0014] Preferably, the S2 specifically includes: S21, the user terminal uses formula (1) to parse each packet received in real time, obtains a corresponding parsing result, and stores it in 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 the modulus parameter corresponding to the query index input for the first time; M q(1) -1 is the inverse element of the module parameter corresponding to the query index input for the first time; P uv For a packed vector [P1, ..., P j ,...,P t ] the uth component P u The vth packet among the s packets divided; 1≤u≤t, 1≤v≤s; result uv For P uv The corresponding analysis results; S22, based on the parsing results corresponding to all the grouped data packets, use formula (2) to calculate and obtain the query result data block; The formula (2) is: D q(1),u =result u1 +...+result us mod m q(1) ; D q(1),u is the packed vector [P1, ..., P j ,...,P t ] the uth component P u The query result data block; S23, based on the query result data block corresponding to the query index input for the first time, use formula (3) to calculate and obtain the query result corresponding to the query index input for the first time; The formula (3) is: D q(1) =D q(1),t ||...||D q(1),u ||...||D q(1),1; D q(1) The query result corresponding to the query index entered for the first time.

[0015] Preferably, the method further comprises: S3. The pre-built oblivious transfer protocol between the user terminal and the database server receives the query index input by the user for the Nth time, and returns the decryption parameter corresponding to the query index input by the user terminal for the Nth time; wherein N ≥ 2; S4. The user terminal obtains a query result corresponding to the query index input by the user for the Nth time based on the decryption parameter corresponding to the query index input for the Nth time and the E group data packets stored in the user terminal.

[0016] Preferably, the S4 specifically includes: S41, the user terminal calculates the query result data block of each component in the packing vector corresponding to the query index input for the Nth time using formula (3) based on the decryption parameter corresponding to the query index input for the Nth time and the E group data packets stored in the user terminal; 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) ; m q(N) is the modulus parameter corresponding to the query index input for the Nth time; M q(N) -1 is the inverse element of the modulus parameter corresponding to the query index input for the Nth time; D q(N),u The packed vector [P1, ..., P j ,...,P t ] the uth component P u The query result data block; S42, based on each component P in the packed vector corresponding to the query index input for the Nth time u The query result data block is calculated using formula (4) to obtain the query result corresponding to the query index input for the Nth time; The formula (4) is: D q(N) =D q(N),t||...||D q(N),u ||...||D q(N),1 ; D q(N) The query result corresponding to the query index input for the Nth time.

[0017] The beneficial effects of the present invention are: The index-based single-server hidden query method of the present invention uses the Chinese remainder theorem to preprocess pre-stored data and construct a packing vector, and then obtains specific decryption parameters and parses the packet data through the oblivious transfer protocol. Compared with the existing technology, it can realize efficient data hidden query in a single-server architecture without exposing the user's query intention, while improving data processing efficiency and system privacy protection capabilities, achieving the technical effect of improving query efficiency and system responsiveness while protecting user query privacy.

[0018] Furthermore, the index-based single-server hidden query method of the present invention uses the Chinese remainder theorem to pre-process and package the stored data. Compared with the existing technology, it can improve query efficiency and data transmission security without exposing the original data content, thereby achieving the purpose of strong concealment and low data transmission overhead.

[0019] Furthermore, the present invention supports users to reuse the same packaged data packet when querying different indexes multiple times. Compared with the method of re-acquiring the data packet for each query, it can significantly improve the system query throughput and achieve the purpose of reducing network load and system response delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a flow chart of an index-based single-server hidden query method of the present invention; Figure 2 This is a flow chart of an index-based single-server hidden query method in embodiment 1 of the present invention. DETAILED DESCRIPTION

[0021] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.

[0022] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0023] Example 1

[0024] See also Figure 1 This embodiment provides an index-based single-server hidden query method, which is applied to an index-based single-server hidden query system. The system includes a database server and at least one user terminal communicatively connected thereto. The method includes: S1. The pre-built oblivious transfer protocol between the user terminal and the database server receives the query index input by the user for the first time and returns the decryption parameter corresponding to the query index to the user terminal; For example, the user terminal transmits the "query index" to the database server through a pre-built Oblivious Transfer (OT) protocol. The database server returns only the decryption parameters related to the "query index" through this protocol.

[0025] S2. The user terminal obtains a query result corresponding to the query index according to the decryption parameter and the packet data sent to the user terminal by the database server; Among them, the grouped data packet is obtained by the database server pre-processing the n pre-stored storage data using the Chinese remainder theorem; in this embodiment, the use of the Chinese remainder theorem can reduce the server preprocessing time and at the same time achieve more lightweight and efficient recovery of query results.

[0026] Each stored data includes data information and a query index corresponding to the data information.

[0027] For example, the database server pre-stores n storage data (i, D i ), i is the data information D i The ID of the corresponding query index, assuming that the data information D1, ..., D n The bit length is L. The user terminal needs to obtain data information corresponding to the query index when the database server does not know the specific query index of the user.

[0028] The index-based single-server hidden query method in this embodiment can obtain the required data from the database server without exposing the query target, effectively protecting the query privacy and preventing the database server from recording or inferring the query behavior.

[0029] In practical applications of this embodiment, before step S1, the following steps are further included: S0, the database server pre-processes the n pre-stored data using the Chinese remainder theorem to obtain a packet data packet; The bit length of each stored data is L.

[0030] In this embodiment, the S0 specifically includes: S01. The database server obtains a packing vector according to n pre-stored storage data. S01 specifically includes: S011. The database server divides each stored data into t data blocks and forms a first matrix D; For example, assume that there are four stored data in advance, namely D1, D2, D3, and D4; the database server divides each stored data into t data blocks and uses four mutually prime modular parameters m1, m2, m3, and m4 to perform modular operations.

[0031] Wherein, the length of each data block is b, and the value represented by each data block is smaller than each of the n mutually prime modular parameters selected by the database server according to the preset security parameter k; wherein the n modular parameters correspond one-to-one to the n stored data; in this embodiment, the length of each data block is b, which means: D i =D i1 +D i2 ×2 b ...+D it ×2 b(t-1) ; The first matrix D is: ; t=L / (k1-1); D it The data information D in the i-th storage data in the database server i The tth data block divided; Wherein, k1 is the bit length of each of the n mutually prime modular parameters selected by the database server according to the preset security parameter k; S012. The database server packs the data block of the jth column 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=m1×...×m i×...×m n ; m i is the i-th modular parameter among n mutually prime modular parameters.

[0032] mod is the modulo operator.

[0033] In this embodiment, the database server uses the Chinese remainder theorem to pack the data block of the j-th column of the first matrix D. The specific process is: The database server will D 1j ,...,D nj As a solution to the following congruence equation; ; Perform the same deformation calculation as that of the equation group to obtain P j =M1D 1j +...+M i D ij +...+M n D nj mod M, thereby realizing the packing of data blocks, and finally obtaining the packing vector [P1, ..., P j ,...,P t ].

[0034] S02. The database server obtains a packet data packet according to the packing vector, and sends the packet data packet to the user terminal.

[0035] The S02 specifically includes: The database server will pack the vector [P1, ..., P j ,...,P t ] are divided into s packets, each component in the packet vector is obtained, and E packets are sent to the user terminal; Each packet contains d bits of data; where E=s×t.

[0036] For example, assume that each stored data is divided into t data blocks, t is assumed to be 4, and each data block is 32 bits. Then, a 4×4 first matrix D 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 to combine this column of 4 data blocks into an encrypted value, generating packed vectors P1~P4.

[0037] Each packing vector is then split into multiple packet data packets, for example, every 32 bits are split into two 16-bit packet data packets, and finally 8 packet data packets are obtained and sent to the user terminal.

[0038] The oblivious transfer protocol is constructed by the database server based on the inverse elements corresponding to the n module parameters and the user terminal; Modulus parameter m i The inverse element is M i -1 ; The oblivious transfer protocol is a 1-in-n oblivious transfer protocol. In this embodiment, the 1-in-n oblivious transfer 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 oblivious transfer protocol, users can quickly query and obtain the decryption parameters corresponding to the query index without requiring expensive encryption operations on the index, as required by lattice cipher homomorphic encryption, significantly reducing the time it takes for users to perform index queries.

[0039] The decryption parameters corresponding to the query index include a modulus parameter corresponding to the query index and an inverse element of the modulus parameter.

[0040] The S2 specifically includes: S21, the user terminal uses formula (1) to parse each packet received in real time, obtains a corresponding parsing result, and stores it in 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 the modulus parameter corresponding to the query index input for the first time; M q(1) -1 is the inverse element of the module parameter corresponding to the query index input for the first time; P uv For a packed vector [P1, ..., P j ,...,P t ] the uth component P u The vth packet among the s packets divided; 1≤u≤t, 1≤v≤s; result uv For P uv The corresponding analysis results; During the actual processing of this embodiment, the user terminal receives E packets sent out of order from the database server in real time. The user terminal then uses stream processing to rapidly parse and process the packets, obtaining the corresponding parsing results. Based on stream processing technology, this embodiment can rapidly process the packets sent from the database server using a simple modular operation on the processor, obtaining the parsing results almost simultaneously with the transmission of the packets. This eliminates the need for the complex homomorphic encryption and decryption process required after obtaining the ciphertext, as in typical homomorphic encryption hidden query schemes.

[0041] S22, based on the parsing results corresponding to all the grouped data packets, use formula (2) to calculate and obtain the query result data block; The formula (2) is: D q(1),u =result u1 +...+result us mod m q(1) ; D q(1),u is the packed vector [P1, ..., P j ,...,P t ] the uth component P u The query result data block; S23, based on the query result data block corresponding to the query index input for the first time, use formula (3) to calculate and obtain the query result corresponding to the query index input for the first time; The formula (3) is: D q(1) =D q(1),t ||...||D q(1),u ||...||D q(1),1 ; D q(1) The query result corresponding to the query index entered for the first time.

[0042] See also Figure 2 In this embodiment, the method further includes: S3. The pre-built oblivious transfer protocol between the user terminal and the database server receives the query index input by the user for the Nth time, and returns the decryption parameter corresponding to the query index input by the user terminal for the Nth time; wherein N ≥ 2; S4. The user terminal obtains a query result corresponding to the query index input by the user for the Nth time based on the decryption parameter corresponding to the query index input for the Nth time and the E group data packets stored in the user terminal.

[0043] Specifically, the S4 specifically includes: S41, the user terminal calculates the query result data block of each component in the packing vector corresponding to the query index input for the Nth time using formula (3) based on the decryption parameter corresponding to the query index input for the Nth time and the E group data packets stored in the user terminal; 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) ; m q(N) is the modulus parameter corresponding to the query index input for the Nth time; M q(N) -1 is the inverse element of the modulus parameter corresponding to the query index input for the Nth time; D q(N),u The packed vector [P1, ..., P j ,...,P t ] the uth component P u The query result data block; S42, based on each component P in the packed vector corresponding to the query index input for the Nth time u The query result data block is calculated using formula (4) to obtain the query result corresponding to the query index input for the Nth time; The formula (4) is: D q(N) =D q(N),t ||...||D q(N),u ||...||D q(N),1 ; D q(N) The query result corresponding to the query index input for the Nth time.

[0044] That is, this embodiment allows the user to perform multiple subsequent queries without having to re-download the data packet. Instead, the user only needs to re-use the oblivious transfer protocol to interact with the database server to obtain the decryption parameters corresponding to the new query index, and then obtain the corresponding query results by combining the E grouped data packets stored in the user terminal.

[0045] Based on the solution of this embodiment, users only need to use the oblivious transfer protocol to obtain the decryption parameters corresponding to the query index for multiple queries, so that the user terminal can quickly calculate the query results locally without the need for multiple homomorphic encryption to obtain the ciphertext of the query results, thereby achieving lower computing and communication overhead.

[0046] Example 2

[0047] In order to make the technical solution of the present invention clearer, the present invention is further described in detail below in conjunction with Example 2. It should be understood that the following examples are only used to illustrate the present invention and are not used to limit the scope of protection of the present invention.

[0048] This embodiment proposes an index-based single-server hidden query method, which relates to the field of database encryption retrieval and is particularly suitable for scenarios where users have high requirements for data privacy protection in a single-server environment, such as applications in medical databases, financial information systems, intellectual property databases, etc.

[0049] In this embodiment, we assume a database server and several user terminals connected to 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. Initially, the system pre-processes all data in the database based on the Chinese Remainder Theorem (CRT), establishing a data packaging mechanism for subsequent hidden queries.

[0050] Specifically, during system initialization, the database server first segments each piece of stored data. Assuming the bit length of a piece of data is L, the choice of bit length can be determined based on the security parameter settings. For example, if the security parameter is set to k, the server selects n mutually prime moduli (i.e., coprime integers) from the security parameter k and uses these moduli as the basis for data packaging and recovery.

[0051] Each piece of stored data is divided into t data blocks of the same length, and the bit length of each data block is b, thus forming a matrix D with n rows and t columns, which is recorded as the first matrix D. Among them, the i-th row in the first matrix D represents all the data blocks of 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 packs each column of the first matrix D using the Chinese remainder theorem. The packing method is to multiply the n elements of the column by their corresponding M i (M iThe final packed vector is a one-dimensional vector [P1, P2, ..., P] of length t. t ], each component represents an intermediate value packed by CRT.

[0052] After the packing vector is complete, the database server further groups it into a series of fixed-size packets. Each component is divided into s packets of a fixed bit length d, resulting in a total of E = s × t packets. This process is designed to improve transmission efficiency and provide granular control for subsequent data anonymity queries.

[0053] When the user terminal initiates the first query request, it first enters the query index q (1) The query index is sent to the database server through a pre-established n-choose-1 oblivious transfer protocol (OT). The server receives the query index q (1) , returns the modulus parameter m corresponding to the query index q(1) and its corresponding inverse element M q(1) -1 These parameters constitute decryption parameters, which are used to guide the user terminal to perform restoration operations on the received packet data.

[0054] Once the user terminal receives the packet, it can parse the data as follows: For each packet P uv , use the following formula to analyze: result uv = P uv ×2 d(v-1) ×M q(1) -1 mod m q(1) ; P uv For a packed vector [P1, ..., P j ,...,P t ] the uth component P u The vth packet among the s packets divided; 1≤u≤t, 1≤v≤s; 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) , get the packed vector [P1, ..., P j ,...,P t ] the uth component P uQuery result data block D q(1),u ,Right now: D q(1),u =result u1 +...+result us mod m q(1) ; Finally, all query result data blocks are spliced ​​together in order to restore the original data content: D q(1) =D q(1),t ||...||D q(1),u ||...||D q(1),1 ; D q(1) The query result corresponding to the query index entered for the first time.

[0055] It is worth mentioning that in this mechanism, the user has completely obtained all the packet data sent by the server after the first query. Therefore, in the subsequent N-th query process (N≥2), the user terminal does not need to receive data from the server again, but only needs to send a new query index q through the OT protocol. (N) The database server will then feedback the module parameter m corresponding to the query index. q(N) and its inverse element M q(N) -1 .

[0056] The user terminal uses the decryption parameter to parse the result directly from the locally cached data packet using the following calculation method: First, perform the following restore operation on each packed vector component: 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 the modulus parameter corresponding to the query index input for the Nth time; M q(N) -1 is the inverse element of the modulus parameter corresponding to the query index input for the Nth time; D q(N),u The packed vector [P1, ..., P j ,...,P t] the uth component P u The query result data block; Then, based on each component P in the packed vector corresponding to the query index input for the Nth time u The query result data block is calculated using the following formula to obtain the query result corresponding to the query index input for the Nth time; D q(N) =D q(N),t ||...||D q(N),u ||...||D q(N),1 ; D q(N) The query result corresponding to the query index input for the Nth time. This approach significantly reduces the amount of data transmitted by the system during multiple rounds of queries, improves performance, and enhances privacy protection capabilities.

[0057] In summary, the embodiments of this invention demonstrate a single-server hidden query mechanism that combines the Chinese Remainder Theorem with the Oblivious Transfer protocol. This mechanism not only protects sensitive index information when users query data, but also effectively reduces communication overhead through data grouping and local resolution strategies. This mechanism is particularly suitable for single-server systems with limited resources or where user privacy is a priority.

[0058] For example, if the user terminal is the query system of a department of a medical institution, the database server stores desensitized medical record data and indexes. Through this solution, the user can only obtain the medical record records he needs, without exposing other patient information, and cannot know whether there are data records of a certain type of specific index in the server, which greatly enhances the confidentiality and security of the system.

[0059] Furthermore, the entire embodiment boasts excellent scalability. By adjusting the number of module parameters n, the security parameter k, and the grouping parameters d and s, it can flexibly adapt to datasets of varying sizes and security requirements. By parallelizing the construction of packet vectors and asynchronously executing packet transmission, the system's responsiveness can be further improved.

[0060] The Chinese remainder theorem used in this embodiment is not only used for encryption packaging of single data, but can also be extended to hidden retrieval of complex structured data such as image blocks and ciphertext document segments, and has broad application prospects.

[0061] In the embodiments of this invention, the application of the Chinese Remainder Theorem (CRT) not only enables encrypted queries and data packet reconstruction, but also significantly improves processing efficiency in practical applications, particularly in database server preprocessing and user terminal query response speed. The CRT enables both the segmented data packaging and restoration processes in this embodiment to be completed with low computational complexity.

[0062] First, when performing preprocessing operations, the database server does not need to build a special data mapping relationship for each query index one by one. In traditional encrypted indexes or full-text encrypted retrieval methods, the server often needs to build an encryption mask or encryption matching table for each possible query request. These operations, on the one hand, take up a lot of storage resources, and on the other hand, reduce the efficiency of data matching in the query response process. The CRT mechanism adopted in this embodiment is completely different. Its core advantage is that each piece of stored data is pre-processed into a group of data blocks with a unique modulus mapping relationship during the initialization phase. The packed vectors formed by these data blocks after matrix packing can be used to reconstruct the target data through the corresponding modulus parameters after the user proposes any query index, without the database server having to perform special calculations for each query. Therefore, the database server only needs to complete the packing vector generation operation once when the system is initialized. The entire preprocessing process has linear complexity, which greatly reduces the load in the initial stage of system deployment.

[0063] Furthermore, the CRT packing solution has a natural structural separation. When constructing the packing vector, the database server processes each column independently, meaning that multiple columns of data can be packed simultaneously through multi-threading or parallel computing. Compared with the serial matching operations required by traditional encrypted indexes, this processing method greatly improves the parallel processing capabilities and throughput of the database server. The database server only needs to build a set of grouped data packets, which are not only applicable to a single query, but can also be cached by the user for multiple data restoration operations with different query indexes. This "one pack, multiple queries" approach significantly reduces network bandwidth consumption and waste of computing resources.

[0064] Secondly, on the user terminal side, in order to further improve the real-time performance of query responses, this embodiment introduces the idea of ​​stream processing, that is, the user terminal can start modular operations and restoration operations while receiving data packets, without having to wait for all data packets to arrive before processing them 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 packet, it can immediately substitute the pre-acquired decryption parameters for modular operation and parse it, and obtain the partial parsing result corresponding to the current packet data (i.e., result uv ), and cached locally in the user terminal. Once all packet data arrives, the user terminal can immediately complete the reconstruction of the entire data.

[0065] It's worth emphasizing that modular operations have extremely low computational complexity, especially when the modulus length is moderate. They typically require only a few bitwise operations and integer multiplications and divisions. Taking a 32-bit integer modulus as an example, a typical embedded terminal or mobile processor can complete a modular multiplication in microseconds. Therefore, while a user terminal is receiving a packet, it can simultaneously parse and restore the received data in real time while completing network packet reception. This simultaneous parse-and-receive approach significantly reduces the total response time from query initiation to query result.

[0066] Furthermore, because each packed vector is parsed and reconstructed independently, the user terminal can leverage a multi-core or multi-threaded architecture to parallelize the processing of each component. For example, when data is divided into t components, the data processing of each component can be assigned to a single thread for independent restoration, and then ultimately reconstructed to produce the target query result. This mechanism not only improves terminal processing capabilities but also demonstrates extremely high performance scalability in scenarios with large data volumes and concurrent queries.

[0067] Through the cooperation of the above mechanisms, the hidden query method based on the combination of the Chinese remainder theorem and stream processing proposed in this embodiment effectively reduces the server processing load while ensuring the privacy and security of user queries, and realizes near real-time query response on the client.

[0068] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0069] In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "connect," "fixed," etc. should be understood broadly. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; and internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0070] In the present invention, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Furthermore, when a first feature is "above," "above," or "above" a second feature, it may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is at a higher level than the second feature. When a first feature is "below," "below," or "below" a second feature, it may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is at a lower level than the second feature.

[0071] In the description of this specification, the terms "one embodiment", "some embodiments", "embodiments", "examples", "specific examples" or "some examples" refer to the specific features, structures, materials or characteristics described in conjunction with the embodiment or example and included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.

[0072] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may alter, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A single-server hidden query method based on index, characterized in that: The index-based single-server hidden query method is applied to an index-based single-server hidden query system, the system comprising a database server and at least one user terminal communicatively connected thereto, the method comprising: S1. The pre-built oblivious transfer protocol between the user terminal and the database server receives the query index input by the user for the first time and returns the decryption parameter corresponding to the query index to the user terminal; S2. The user terminal obtains a query result corresponding to the query index according to the decryption parameter and the packet data sent to the user terminal by the database server; The grouped data packets are obtained by pre-processing the n pre-stored data by the database server using the Chinese remainder theorem; Each stored data includes data information and a query index corresponding to the data information.

2. The index-based single-server hidden query method according to claim 1, characterized in that: Before step S1, the method further includes: S0, the database server pre-processes the n pre-stored data using the Chinese remainder theorem to obtain a packet data packet; The bit length of each stored data is L.

3. The index-based single-server hidden query method according to claim 2, characterized in that: The S0 specifically includes: S01. The database server obtains a packing vector according to n pre-stored storage data; S02. The database server obtains a packet data packet according to the packing vector, and sends the packet data packet to the user terminal.

4. The index-based single-server hidden query method according to claim 3, characterized in that: The S01 specifically includes: S011. The database server divides each stored data into t data blocks and forms a first matrix D; wherein each data block has a length of b, and the value represented by each data block is smaller than each of n mutually prime modular parameters selected by the database server according to a preset security parameter k; wherein the n modular parameters correspond one-to-one to the n stored data; The first matrix D is: ; t=L / (k1-1); D it The data information D in the i-th storage data in the database server i The tth data block divided; Wherein, k1 is the bit length of each of the n mutually prime modular parameters selected by the database server according to the preset security parameter k; S012. The database server packs the data block of the jth column 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=m1×...×m i ×...×m n ; m i is the i-th modular parameter among n mutually prime modular parameters.

5. The index-based single-server hidden query method according to claim 4 is characterized in that: The S02 specifically includes: The database server will pack the vector [P1, ..., P j ,...,P t ] are divided into s packets, each component in the packet vector is obtained, and E packets are sent to the user terminal; Among them, each packet contains d bits of data; Where E=s×t.

6. The index-based single-server hidden query method according to claim 5, characterized in that: in, The oblivious transfer protocol is constructed by the database server based on the inverse elements corresponding to n module parameters and the user terminal; Modulus parameter m i The inverse element is M i -1 ; The oblivious transfer protocol is an n-choose-1 oblivious transfer protocol.

7. The index-based single-server hidden query method according to claim 6, characterized in that: in, The decryption parameter corresponding to the query index includes a modulus parameter corresponding to the query index and an inverse element of the modulus parameter.

8. The index-based single-server hidden query method according to claim 6, characterized in that: The S2 specifically includes: S21, the user terminal uses formula (1) to parse each packet received in real time, obtains a corresponding parsing result, and stores it in 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 the modulus parameter corresponding to the query index input for the first time; M q(1) -1 is the inverse element of the module parameter corresponding to the query index input for the first time; P uv For a packed vector [P1, ..., P j ,...,P t ] the uth component P u The vth packet among the s packets divided; 1≤u≤t, 1≤v≤s; result uv For P uv The corresponding analysis results; S22, based on the parsing results corresponding to all the grouped data packets, use formula (2) to calculate and obtain the query result data block; The formula (2) is: D q(1),u =result u1 +...+result us mod m q(1) ; D q(1),u is the packed vector [P1, ..., P j ,...,P t ] the uth component P u The query result data block; S23, based on the query result data block corresponding to the query index input for the first time, use formula (3) to calculate and obtain the query result corresponding to the query index input for the first time; The formula (3) is: D q(1) =D q(1),t ||...||D q(1),u ||...||D q(1),1 ; D q(1) The query result corresponding to the query index entered for the first time.

9. The index-based single-server hidden query method according to claim 8, characterized in that: The method further comprises: S3. The pre-built oblivious transfer protocol between the user terminal and the database server receives the query index input by the user for the Nth time, and returns the decryption parameter corresponding to the query index input by the user terminal for the Nth time; wherein N ≥ 2; S4. The user terminal obtains a query result corresponding to the query index input by the user for the Nth time based on the decryption parameter corresponding to the query index input for the Nth time and the E group data packets stored in the user terminal.

10. The index-based single-server hidden query method according to claim 9, characterized in that: The S4 specifically includes: S41, the user terminal calculates the query result data block of each component in the packing vector corresponding to the query index input for the Nth time using formula (3) based on the decryption parameter corresponding to the query index input for the Nth time and the E group data packets stored in the user terminal; 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 the modulus parameter corresponding to the query index input for the Nth time; M q(N) -1 is the inverse element of the modulus parameter corresponding to the query index input for the Nth time; D q(N),u The packed vector [P1, ..., P j ,...,P t ] the uth component P u The query result data block; S42, based on each component P in the packed vector corresponding to the query index input for the Nth time u The query result data block is calculated using formula (4) to obtain the query result corresponding to the query index input for the Nth time; The formula (4) is: D q(N) =D q(N),t ||...||D q(N),u ||...||D q(N),1 ; D q(N) The query result corresponding to the query index input for the Nth time.

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

  • Data hiding query method and device, electronic equipment and storage medium

    CN118626516A

  • Techniques for reducing storage space and detecting corruption in hash-based application

    US20090193224A1