Data processing method, device and equipment and computer readable storage medium
By performing two-dimensional and binning processing on the database, combined with the preprocessing of random number vectors and homomorphic encryption algorithms, the problem of low occult query efficiency in large databases is solved, and the calculation and query efficiency is improved.
Patent Information
- Application Number
- CN202510315427.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-04
AI Technical Summary
The existing hidden query technology has low computing efficiency and query efficiency in large databases, and the calculation and traffic volume are in a multiple growth relationship with the number of database data, resulting in high computational complexity.
By performing two-dimensional processing and binning of the target database, the first and second preprocessing data are generated, and the random number vector and homomorphic encryption algorithm are used for preprocessing, the number of data in the bin to be queried is reduced, and the matrix multiplication calculation is decomposed and pre-calculated.
The number of multiplication tasks for hidden queries is reduced, the calculation and query efficiency is improved, and the password calculation complexity in online processes is reduced.
Smart Images

Figure CN120256482A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular, to a data processing method, apparatus, device, and computer-readable storage medium. Background Art
[0002] Currently, the known technical solutions for implementing private queries include those based on OT (Oblivionis Transfer, oblivious transfer), PHE (Partially Homomorphic Encryption, semi-homomorphic), etc. Among them, in the technical solution based on OT, the client and the server execute a 1-out-of-n oblivious transfer protocol. The technical solution based on PHE is as follows: Assume that the server holds n pieces of data. After the querying party generates a public-private key pair of PHE, it generates n pieces of ciphertext data, where the ciphertext corresponding to the retrieved ID is 1, and the rest are 0 ciphertexts. The n pieces of ciphertexts are sent to the server. The server multiplies and adds the n pieces of ciphertexts with the data it holds, and returns the result to the querying party. The querying party decrypts it to obtain the query result.
[0003] The calculations and communication volume in the above query methods are directly related to the number of data in the database, showing a multiple growth relationship. For a database with a large amount of data, the amount of data to be calculated during the private query is huge, resulting in low calculation efficiency of the private query.
[0004] Therefore, how to improve the calculation efficiency and query efficiency of private queries is an urgent problem to be solved at present. Summary of the Invention
[0005] The main purpose of the present application is to provide a data processing method, apparatus, device, and computer-readable storage medium, aiming to solve the technical problem of how to improve the calculation efficiency and query efficiency of private queries.
[0006] To achieve the above object, the present application provides a data processing method, which is applied to a server and includes:
[0007] Perform two-dimensional processing on each row of data in the target database to obtain a two-dimensional database corresponding to the target database, and perform binning processing on the two-dimensional database to obtain binned data;
[0008] Based on the first random number vector and the two-dimensional database, determine the first preprocessed data, based on the second random number vector and the first preprocessed data, determine the second preprocessed data, and respectively perform binning processing on the first preprocessed data and the second preprocessed data to obtain the first preprocessed binned data and the second preprocessed binned data;
[0009] Send query parameters to the client. Among them, the client feeds back binning information, the first ciphertext query vector, and the second ciphertext query vector based on the data query conditions and the query parameters. The query parameters include a first random number vector, a second random number vector, the row length and column length of the two-dimensionalized database.
[0010] Based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, determine the ciphertext reply information and send the ciphertext reply information to the client. Among them, the client determines the query result based on the ciphertext reply information.
[0011] Further, the step of two-dimensionally processing each row of data in the target database to obtain the two-dimensionalized database corresponding to the target database and performing binning processing on the two-dimensionalized database to obtain binning data includes:
[0012] Based on the number of rows of data in the target database, determine the length information;
[0013] Based on the length information and the row number of each row of data in the target database, respectively determine the row number and column number of each row of data in the two-dimensionalized database to obtain the two-dimensionalized database;
[0014] Based on the number of rows and the indistinguishability, determine the number of bins, and obtain the hash value of each row of data in the two-dimensionalized database;
[0015] Based on the number of bins and the hash value, determine the bin corresponding to each row of data in the two-dimensionalized database to obtain binning data.
[0016] Further, the step of determining the first preprocessed data based on the first random number vector and the two-dimensionalized database, determining the second preprocessed data based on the second random number vector and the first preprocessed data, and respectively performing binning processing on the first preprocessed data and the second preprocessed data to obtain the first preprocessed binning data and the second preprocessed binning data includes:
[0017] Generate a first random number vector, perform cyclic extension on the first random number vector to obtain a first circulant matrix, and determine the first preprocessed data based on the first circulant matrix and the two-dimensionalized database;
[0018] Generate a second random number vector, perform cyclic extension on the second random number vector to obtain a second circulant matrix, and determine the second preprocessed data based on the second circulant matrix and the first preprocessed data;
[0019] Respectively perform binning processing on the first preprocessed data and the second preprocessed data to obtain the first preprocessed binning data and the second preprocessed binning data.
[0020] Further, the step of sending the query parameters to the client, where the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on the data query condition and the query parameters, and the query parameters include a first random number vector, a second random number vector, the row length and column length of the two-dimensional database, includes:
[0021] Send the query parameters to the client, where the client performs two-dimensional processing on the data query condition based on the row length and column length of the two-dimensional database to obtain a query row number and a query column number, determines the binning information corresponding to the data query condition, and respectively encrypts the query row number and the query column number using a homomorphic key based on random noise, the first random number vector, and the second random number vector to obtain a first ciphertext query vector and a second ciphertext query vector.
[0022] Further, the step of determining the ciphertext reply information based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and sending the ciphertext reply information to the client, where the client determines the query result based on the ciphertext reply information, includes:
[0023] Determine the first-layer query result based on the data corresponding to the first ciphertext query vector in the first binning data and the binning information;
[0024] Determine the second-layer query result based on the data corresponding to the second ciphertext query vector in the first preprocessed binning data and the data corresponding to the second ciphertext query vector in the second preprocessed binning data;
[0025] Determine the reply information based on the first query result, the second-layer query result, the first preprocessed data, the second preprocessed data, and the second ciphertext query vector;
[0026] Perform conversion processing on the reply information based on the homomorphic encryption algorithm to obtain the ciphertext reply information, and send the ciphertext reply information to the client, where the client decrypts the ciphertext reply information based on the homomorphic encryption private key to obtain the query result.
[0027] In addition, to achieve the above object, the present application further provides a data processing method, which is applied to the client and includes:
[0028] Feedback binning information, a first ciphertext query vector, and a second ciphertext query vector to the server based on data query conditions and query parameters, where the server performs two-dimensional processing on each row of data in the target database to obtain a two-dimensional database corresponding to the target database, and performs binning processing on the two-dimensional database to obtain binned data; the server determines first preprocessed data based on a first random number vector and the two-dimensional database, and determines second preprocessed data based on a second random number vector and the two-dimensional database, and respectively performs binning processing on the first preprocessed data and the second preprocessed data to obtain first preprocessed binned data and second preprocessed binned data; send the query parameters to the client, where the query parameters include the first random number vector, the second random number vector, the row length and column length of the two-dimensional database;
[0029] Receive the ciphertext reply information sent by the server, where the server determines the ciphertext reply information based on the first preprocessed binned data, the second preprocessed binned data, the binning information, the first ciphertext query vector, and the second ciphertext query vector;
[0030] Determine the query result based on the ciphertext reply information.
[0031] Further, the step of feedback binning information, a first ciphertext query vector, and a second ciphertext query vector to the server based on data query conditions and query parameters includes:
[0032] Perform two-dimensional processing on the data query conditions to obtain query row numbers and query column numbers;
[0033] Determine the binning information corresponding to the data query conditions based on the row length and column length of the two-dimensional database;
[0034] Encrypt the query row numbers and query column numbers respectively using a homomorphic key based on random noise, the first random number vector, and the second random number vector to obtain a first ciphertext query vector and a second ciphertext query vector;
[0035] Send the binning information, the first ciphertext query vector, and the second ciphertext query vector to the server.
[0036] In addition, to achieve the above object, the present application also provides a data processing device, where the data processing device includes:
[0037] A processing module for performing two-dimensional processing on each row of data in the target database to obtain a two-dimensional database corresponding to the target database, and performing binning processing on the two-dimensional database to obtain binned data;
[0038] A first determination module, configured to determine first preprocessed data based on a first random number vector and a two-dimensional database, determine second preprocessed data based on a second random number vector and the first preprocessed data, and perform binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data;
[0039] A sending module, configured to send query parameters to a client, where the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on a data query condition and the query parameters, and the query parameters include a first random number vector, a second random number vector, the row length and the column length of the two-dimensional database;
[0040] A second determination module, configured to determine ciphertext reply information based on the first preprocessed binned data, the second preprocessed binned data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and send the ciphertext reply information to the client, where the client determines a query result based on the ciphertext reply information.
[0041] In addition, to achieve the above object, the present application further provides a data processing device, where the data processing device includes: a memory, a processor, and a data processing program stored on the memory and executable on the processor, and when the data processing program is executed by the processor, the steps of the foregoing data processing method are implemented.
[0042] In addition, to achieve the above object, the present application further provides a computer-readable storage medium, where a data processing program is stored on the computer-readable storage medium, and when the data processing program is executed by a processor, the steps of the foregoing data processing method are implemented.
[0043] In this application, each row of data in the target database is two-dimensionally processed to obtain a two-dimensional database corresponding to the target database, and the two-dimensional database is binned to obtain binned data; then, based on the first random number vector and the two-dimensional database, first preprocessed data is determined, and based on the second random number vector and the two-dimensional database, second preprocessed data is determined, and the first preprocessed data and the second preprocessed data are respectively binned to obtain first preprocessed binned data and second preprocessed binned data; then, query parameters are sent to the client, where the client feeds back binned information, a first ciphertext query vector, and a second ciphertext query vector based on data query conditions and the query parameters, and the query parameters include the first random number vector, the second random number vector, the row length and column length of the two-dimensional database; then, based on the first preprocessed binned data, the second preprocessed binned data, the binned information, the first ciphertext query vector, and the second ciphertext query vector, ciphertext reply information is determined, and the ciphertext reply information is sent to the client, where the client determines the query result based on the ciphertext reply information. Through data binning, the number of data in the specific bin to be queried in the database concealment query can be reduced, thereby reducing the number multiplication task amount of the concealment query. Through the first preprocessed data and the second preprocessed data, homomorphic encryption preprocessing is implemented, the matrix multiplication calculation therein is decomposed, and most of the ciphertext calculation operations are pre-calculated, thereby reducing the password calculation complexity in the online process and improving the calculation efficiency and query efficiency of the concealment query. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0045] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0046] Figure 1 It is a schematic flowchart provided for the first embodiment of the data processing method of the present application;
[0047] Figure 2 It is a schematic flowchart provided for the second embodiment of the data processing method of the present application;
[0048] Figure 3 It is a schematic diagram of the module structure of the data processing device in the embodiment of the present application;
[0049] Figure 4It is a schematic diagram of the module structure of the data processing device according to the embodiment of the present application.
[0050] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0051] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] In order to better understand the technical solution of the present application, the following will be described in detail with reference to the accompanying drawings of the specification and specific implementation manners.
[0053] The main solution of the present application is as follows: perform two-dimensional processing on each row of data in the target database to obtain a two-dimensional database corresponding to the target database, and perform binning processing on the two-dimensional database to obtain binned data; determine first preprocessed data based on the first random number vector and the two-dimensional database, and determine second preprocessed data based on the second random number vector and the two-dimensional database, and perform binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data; send query parameters to the client, where the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on the data query condition and the query parameters, and the query parameters include the first random number vector, the second random number vector, the row length and the column length of the two-dimensional database; determine ciphertext reply information based on the first preprocessed binned data, the second preprocessed binned data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and send the ciphertext reply information to the client, where the client determines the query result based on the ciphertext reply information.
[0054] Currently, the known technical solutions for implementing private queries include those based on OT (Oblivionis Transfer, oblivious transfer), those based on PHE (Partially Homomorphic Encryption, semi-homomorphic encryption), etc. Among them, in the technical solution based on OT, the client and the server execute a 1-out-of-n oblivious transfer protocol. The technical solution based on PHE is as follows: assume that the server holds n pieces of data. After the querying end generates a public-private key pair of PHE, it generates n pieces of ciphertext data, where the ciphertext corresponding to the retrieved ID is 1, and the rest are ciphertexts of 0. The n pieces of ciphertexts are sent to the server. The server multiplies and adds the n pieces of ciphertexts with the data it holds, and returns the result to the querying end. The querying end decrypts it to obtain the query result.
[0055] For example, the keyword-based stealth query process includes: 1) Assume that the server has a plaintext data set ((k1, v1),..., (k t , v t ),..., (k n , v n ))), and use Lagrange polynomial interpolation to generate an nth-degree polynomial H(x) such that H(K n ) = v n , and at the same time generate an identity polynomial F(x) such that F(k n ) = 0; 2) The client generates a homomorphic encryption public-private key pair (h PK , h SK ). Assume that the client's query condition is k t . Use h PK to encrypt the 1st to nth powers of k t respectively to obtain the corresponding ciphertexts; 3) The client sends the ciphertext vector (E(k t ), E(k t 2 ),..., E(k t n )) to the server; 4) The server substitutes the ciphertext vector into the functions F(x) and H(x) to calculate the homomorphic ciphertexts E(F(x t )) and E(H(x t )) respectively, and sends the calculation results to the user; 5) The client decrypts the two ciphertexts. If F(x t ) = 0, then H(x t ) is the retrieval result, otherwise the retrieval result is empty.
[0056] In this stealth query scheme, it is assumed that the number of database entries to be queried by the server is n. In terms of computational complexity, 5n semi-homomorphic encryptions are required, and x n high-order operations are required. When n is large, the computational complexity is high; in terms of communication complexity, n + 2 semi-homomorphic encrypted ciphertexts need to be transmitted.
[0057] The computation and communication volume in the above query method are directly related to the data quantity of the database, showing a multiple growth relationship, resulting in low computational efficiency of the stealth query. Therefore, how to improve the computational efficiency and query efficiency of the stealth query is an urgent problem to be solved at present.
[0058] Through data binning in this application, the number of data in the specific bin to be queried in the database hiding query can be reduced, thereby reducing the multiplication task volume of the hiding query. By using the first preprocessed data and the second preprocessed data to implement the homomorphic encryption preprocessing, the matrix multiplication calculation therein is decomposed, and most of the ciphertext calculation operations are precomputed, thereby reducing the password calculation complexity in the online process and improving the calculation efficiency and query efficiency of the hiding query.
[0059] It should be noted that the execution subject of this embodiment can be a data processing device, or a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a data processing device capable of implementing the above functions. This embodiment does not make specific limitations on this. Hereinafter, taking the data processing device as the execution subject as an example, this embodiment and the following embodiments will be described.
[0060] Based on this, the present application proposes a data processing method for the first embodiment. Please refer to Figure 1 , the data processing method is applied to the server, and includes steps S101 to S104:
[0061] Step S101, perform two-dimensional processing on each row of data in the target database to obtain the two-dimensional database corresponding to the target database, and perform binning processing on the two-dimensional database to obtain binned data;
[0062] In this embodiment, the server first performs two-dimensional processing on each row of data in the target database to obtain a two-dimensional database, that is, determines the row number and column number of each row of data in the target database in the two-dimensional database, and performs binning processing on the two-dimensional database based on the number of rows of the target database and the indistinguishability to obtain binned data. Specifically, in a feasible implementation manner, step S101 may include steps S1011 to S1014:
[0063] Step S1011, determine the length information based on the number of rows of data in the target database;
[0064] Step S1012, based on the length information and the row number of each row of data in the target database, respectively determine the row number and column number of each row of data in the two-dimensional database to obtain the two-dimensional database;
[0065] Step S1013, determine the number of bins based on the number of rows and the indistinguishability, and obtain the hash value of each row of data in the two-dimensional database;
[0066] Step S1014, based on the number of bins and the hash value, determine the bin corresponding to each row of data in the two-dimensional database to obtain binned data.
[0067] In this embodiment, the server obtains the number of rows of data in the target database, arranges the target database, numbers each row of data in the target database to obtain the row numbers of each row of data in the target database, and determines the length information based on the number of rows of data in the target database. The specific formula is: L = Ceil(√N), where L is the length information, N is the number of rows, √ is the square root calculation, and Ceil is the ceiling function.
[0068] The server determines the row numbers and column numbers of each row of data in the two-dimensional database based on the length information and the row numbers of each row of data in the target database, and obtains the two-dimensional database. The specific formula is: C = Floor(M / L), R = M % L, where M is the row number, L is the length information, C is the row number, R is the column number, " / " is the division calculation, Floor is the floor function, and "%" is the remainder operation.
[0069] Next, the server determines the number of bins based on the number of rows and the indistinguishability. The specific formula is: Bnum = Ceil(N / D), where Bnum is the number of bins, D is the indistinguishability, N is the number of rows, and Ceil is the ceiling function. And obtain the hash value of each row of data in the two-dimensional database. Specifically, for each row of data in the two-dimensional data, for example, the data value is Key, calculate the hash value of Key to get Hash_B = hash(Key). The hash algorithm can be algorithms such as SHA-256 and SM3.
[0070] After obtaining the hash value, the server determines the bin corresponding to each row of data in the two-dimensional database based on the number of bins and the hash value, and obtains the binned data D_B. For example, for the hash value of each row of data in the two-dimensional database, the bin it belongs to is bucket = Hash_B % Bnum.
[0071] Step S102: Determine the first preprocessed data based on the first random number vector and the two-dimensional database, determine the second preprocessed data based on the second random number vector and the first preprocessed data, and perform binning processing on the first preprocessed data and the second preprocessed data respectively to obtain the first preprocessed binned data and the second preprocessed binned data;
[0072] In this embodiment, the server generates a first random number vector and a second random number vector. First, it determines a first circulant matrix corresponding to the first random number vector and a second circulant matrix corresponding to the second random number vector. Then, based on the first circulant matrix and the two-dimensional database, it determines first preprocessed data, and based on the second circulant matrix and the first preprocessed data, it determines second preprocessed data. Then, it performs binning processing on the first preprocessed data and the second preprocessed data respectively according to the binning method of the two-dimensional database to obtain first preprocessed binned data and second preprocessed binned data. Specifically, in a feasible implementation manner, step S101 may include steps S1021 to S1023:
[0073] Step S1021: Generate a first random number vector, perform cyclic extension on the first random number vector to obtain a first circulant matrix, and based on the first circulant matrix and the two-dimensional database, determine first preprocessed data;
[0074] Step S1022: Generate a second random number vector, perform cyclic extension on the second random number vector to obtain a second circulant matrix, and based on the second circulant matrix and the first preprocessed data, determine second preprocessed data;
[0075] Step S1023: Perform binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data.
[0076] In this embodiment, the server generates a first random number vector and a second random number vector, performs cyclic extension on the first random number vector to obtain a first circulant matrix, and performs cyclic extension on the second random number vector to obtain a second circulant matrix. Specifically, the first random number vector is extended into a polynomial representation: where a1 is the extended first random number vector, d is reasonably set according to the row length and column length of the two-dimensional database, and the polynomial coefficients are the circulant matrix A1=(a 10 ,a 12 ,...,a 1(d-1) ;-a 1(d-1) ,a 10 ,a 12 ,...,-a 1(d-2) ;-a 1(d-2) ,-a 1(d-1) ,a 10 ,...,-a 1(d-3) ;-a 11 ,-a 12 ,-a 13 ,...,a 10 ); and the second circulant matrix A 2_S is obtained from the second random number vector in the same way as the first circulant matrix.=(a 20 , a 22 ,..., a 2(d-1) ; -a 2(d-1) , a 20 , a 22 ,...,-a 2(d-2) ; -a 2(d-2) , -a 2(d-1) , a 20 ,...,-a 2(d-3) ; -a 21 , -a 22 , -a 23 ,...,-a 20 ).
[0077] After obtaining the first circulant matrix and the second circulant matrix, the server determines the first preprocessed data based on the first circulant matrix and the two-dimensional database, and determines the second preprocessed data based on the second circulant matrix and the first preprocessed data; specifically, H1 = A1 * DB, H2 = A 2_S * H1, where H1 is the first preprocessed data, A1 is the first circulant matrix, DB is the two-dimensional database, H2 is the second preprocessed data, and A 2_S is the second circulant matrix.
[0078] After obtaining the first preprocessed data and the second preprocessed data, the server performs binning processing on the first preprocessed data and the second preprocessed data respectively to obtain the first preprocessed binned data and the second preprocessed binned data, and performs binning processing on the first preprocessed data and the second preprocessed data respectively based on the binning method of the two-dimensional database to obtain the first preprocessed binned data and the second preprocessed binned data. For example, for the first preprocessed data, the number of bins of the first preprocessed data is determined based on the number of rows and the indistinguishability of the first preprocessed data, and the hash value of each row of data in the first preprocessed data is calculated. Based on the hash value of each row of data in the first preprocessed data and the number of bins of the first preprocessed data, the bin where each row of data in the first preprocessed data is located is determined to obtain the first preprocessed binned data. The processing process of the second preprocessed binned data is similar to that of the first preprocessed binned data and will not be elaborated here.
[0079] Step S103, send the query parameters to the client, where the client feeds back bin information, the first ciphertext query vector, and the second ciphertext query vector based on the data query condition and the query parameters, and the query parameters include the first random number vector, the second random number vector, the row length and the column length of the two-dimensional database;
[0080] In this embodiment, the server sends query parameters including a first random number vector, a second random number vector, the row length and column length of the two-dimensional database to the client. The row length and column length of the two-dimensional database are the number of rows and columns of the two-dimensional database respectively. After receiving the query parameters, the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on the data query condition and the query parameters. Specifically, in a feasible implementation manner, step S103 may include step S1031:
[0081] Step S1031: Send the query parameters to the client. Among them, the client performs two-dimensional processing on the data query condition based on the row length and column length of the two-dimensional database to obtain a query row number and a query column number, determines the binning information corresponding to the data query condition, and respectively encrypts the query row number and query column number using a homomorphic key based on random noise, the first random number vector, and the second random number vector to obtain a first ciphertext query vector and a second ciphertext query vector.
[0082] In this embodiment, after receiving the query parameters, the client performs two-dimensional processing on the data query condition based on the row length and column length of the two-dimensional database to obtain a query row number u1 and a query column number u2. The two-dimensional processing process is the same as the processing process of the row number and column number of the two-dimensional database, which will not be elaborated here, and obtains the corresponding binning information q_B based on the data query condition.
[0083] Next, the client generates RLWE (Ring Learning With Errors) noise e i , and respectively encrypts the query row number and query column number using a homomorphic key based on random noise, the first random number vector, and the second random number vector to obtain a first ciphertext query vector and a second ciphertext query vector. The specific formula is b i =s i *a i +e i , where s i is the random number in the homomorphic key, a i is the preprocessed data, e i is the randomly generated noise. After obtaining b i , convert b i into polynomial coefficient form to obtain a coefficient matrix. If a i is the first random number vector, the first ciphertext query vector is obtained. If a i is the second random number vector, the second ciphertext query vector is obtained.
[0084] After obtaining the first ciphertext query vector and the second ciphertext query vector, the client sends the first ciphertext query vector and the second ciphertext query vector to the server.
[0085] Step S104: Based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, determine the ciphertext reply information, and send the ciphertext reply information to the client, where the client determines the query result based on the ciphertext reply information.
[0086] In this embodiment, after receiving the first ciphertext query vector and the second ciphertext query vector, the server determines the ciphertext reply information based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector. Specifically, in a feasible implementation manner, step S104 may include steps S1041 to S1044:
[0087] Step S1041: Based on the data corresponding to the first ciphertext query vector in the first binning data and the binning information, determine the first-layer query result.
[0088] Step S1042: Based on the data corresponding to the second ciphertext query vector in the first preprocessed binning data and the data corresponding to the second ciphertext query vector in the second preprocessed binning data, determine the second-layer query result.
[0089] Step S1043: Based on the first query result, the second-layer query result, the first preprocessed data, the second preprocessed data, and the second ciphertext query vector, determine the reply information.
[0090] Step S1044: Based on the homomorphic encryption algorithm, perform conversion processing on the reply information to obtain the ciphertext reply information, and send the ciphertext reply information to the client, where the client decrypts the ciphertext reply information based on the homomorphic encryption private key to obtain the query result.
[0091] In this embodiment, the server determines the first-layer query result based on the data corresponding to the first ciphertext query vector in the first binning data and the binning information. Specifically, answer1 = q_B * D_Bx, where answer1 is the first-layer query result, q_B is the binning information, and D_Bx is the data corresponding to the first ciphertext query vector in the first binning data.
[0092] Next, based on the data corresponding to the second ciphertext query vector in the first preprocessed binning data and the data corresponding to the second ciphertext query vector in the second preprocessed binning data, determine the second-layer query result. Specifically, answer2 = answer1 * H_B1 * H_B2, where answer2 is the second-layer query result, answer1 is the first-layer query result, H_B1 is the data corresponding to the second ciphertext query vector in the first preprocessed binning data, and H_B2 is the data corresponding to the second ciphertext query vector in the second preprocessed binning data.
[0093] After obtaining the first query result and the second-layer query result, based on the first query result, the second-layer query result, the first preprocessed data, the second preprocessed data, and the second ciphertext query vector, determine the reply information, C = (D mod q) * (H2, A2 T * answer1; c2 T * H1 T , c2 T * answer2), where C is the reply information, D is the data volume of the two-dimensional database, q is the data volume of the data query condition, H1 is the first preprocessed data, H2 is the second preprocessed data, A2 is the second circulant matrix, c2 is the second ciphertext query vector, answer1 is the first query result, and answer2 is the second-layer query result.
[0094] After obtaining the reply information, perform a conversion process on the reply information based on the homomorphic encryption algorithm to obtain the ciphertext reply information. Specifically, according to the basic conversion of the RLWE-based homomorphic encryption algorithm, pack (Pack encodings) and perform modulus length conversion on the reply information C to obtain the queried ciphertext reply information ((c 11 , c 12 ),...,(c p1 , c p2 )) and send the ciphertext reply information to the client.
[0095] Among them, the client decrypts the ciphertext reply information based on the homomorphic encryption private key to obtain the query result, that is, the client decrypts the ciphertext reply information ((c 11 , c 12 ),...,(c p1 , c p2 )) based on the homomorphic encryption private key, completes the RLWE decryption operation, and obtains the query result.
[0096] The data processing method proposed in this embodiment obtains a two-dimensionalized database corresponding to the target database by two-dimensionally processing each row of data in the target database, and performs binning processing on the two-dimensionalized database to obtain binned data; then, based on the first random number vector and the two-dimensionalized database, the first preprocessed data is determined, and based on the second random number vector and the two-dimensionalized database, the second preprocessed data is determined, and binning processing is respectively performed on the first preprocessed data and the second preprocessed data to obtain the first preprocessed binned data and the second preprocessed binned data; then the query parameter is sent to the client, where the client feeds back binned information, a first ciphertext query vector, and a second ciphertext query vector based on the data query condition and the query parameter, and the query parameter includes the first random number vector, the second random number vector, the row length and the column length of the two-dimensionalized database; then, based on the first preprocessed binned data, the second preprocessed binned data, the binned information, the first ciphertext query vector, and the second ciphertext query vector, the ciphertext reply information is determined, and the ciphertext reply information is sent to the client, where the client determines the query result based on the ciphertext reply information. By data binning, the number of data in the specific bin to be queried in the database hiding query can be reduced, thereby reducing the number multiplication task amount of the hiding query. Through the first preprocessed data and the second preprocessed data, homomorphic encryption preprocessing is realized, the matrix multiplication calculation therein is decomposed, and most of the ciphertext calculation operations are pre-calculated, thereby reducing the password calculation complexity in the online process and improving the calculation efficiency and query efficiency of the hiding query.
[0097] The second embodiment of the data processing method proposed in this application is as follows. Please refer to Figure 2 , the data processing method is applied to the client and includes steps S201 to S203:
[0098] Step S201, feed back binned information, a first ciphertext query vector, and a second ciphertext query vector to the server based on the data query condition and the query parameter, where the server two-dimensionally processes each row of data in the target database to obtain a two-dimensionalized database corresponding to the target database, and performs binning processing on the two-dimensionalized database to obtain binned data; the server determines the first preprocessed data based on the first random number vector and the two-dimensionalized database, and determines the second preprocessed data based on the second random number vector and the two-dimensionalized database, and respectively performs binning processing on the first preprocessed data and the second preprocessed data to obtain the first preprocessed binned data and the second preprocessed binned data; send the query parameter to the client, and the query parameter includes the first random number vector, the second random number vector, the row length and the column length of the two-dimensionalized database;
[0099] Step S202: Receive the ciphertext reply information sent by the server. Among them, the server determines the ciphertext reply information based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector.
[0100] Step S203: Determine the query result based on the ciphertext reply information.
[0101] In this embodiment, the server performs two-dimensional processing on each row of data in the target database to obtain the two-dimensional database corresponding to the target database, and performs binning processing on the two-dimensional database to obtain binning data. The server determines the first preprocessed data based on the first random number vector and the two-dimensional database, and determines the second preprocessed data based on the second random number vector and the two-dimensional database, and respectively performs binning processing on the first preprocessed data and the second preprocessed data to obtain the first preprocessed binning data and the second preprocessed binning data. The query parameters are sent to the client. Among them, the query parameters include the first random number vector, the second random number vector, the row length and column length of the two-dimensional database. The processing process refers to the first embodiment and will not be elaborated here.
[0102] After receiving the query parameters, the server feeds back the binning information, the first ciphertext query vector, and the second ciphertext query vector to the server based on the data query conditions and the query parameters. Specifically, the client performs two-dimensional processing on the data query conditions based on the row length and column length of the two-dimensional database to obtain the query row number u1 and the query column number u2. The two-dimensional processing process is the same as the processing process of the row number and column number of the two-dimensional database and will not be elaborated here, and obtains the corresponding binning information q_B based on the data query conditions.
[0103] Next, the client generates the RLWE noise e i , and respectively encrypts the query row number and the query column number using the homomorphic key based on the random noise, the first random number vector, and the second random number vector to obtain the first ciphertext query vector and the second ciphertext query vector. The specific formula is, b i =s i *a i +e i , where, s i is the random number in the homomorphic key, a i is the preprocessed data, e i is the randomly generated noise, and after obtaining b i , convert b i into the polynomial coefficient form to obtain the coefficient matrix. If a i is the first random number vector, the first ciphertext query vector is obtained. If a iIf it is the second random number vector, a second ciphertext query vector is obtained.
[0104] After obtaining the first ciphertext query vector and the second ciphertext query vector, the client sends the first ciphertext query vector and the second ciphertext query vector to the server. Based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, the server determines the ciphertext reply information. The process of the server determining the ciphertext reply information refers to the first embodiment and will not be elaborated here.
[0105] Receiving the ciphertext reply information sent by the server, the client determines the query result based on the ciphertext reply information. Specifically, the client decrypts the ciphertext reply information ((c 11 , c 12 ),...,(c p1 , c p2 )) using the homomorphic encryption private key, completes the decryption operation of RLWE, and obtains the query result.
[0106] The data processing method proposed in this embodiment feeds the binning information, the first ciphertext query vector, and the second ciphertext query vector to the server based on the data query conditions and query parameters. Among them, the server performs two-dimensional processing on each row of data in the target database to obtain the two-dimensional database corresponding to the target database, and performs binning processing on the two-dimensional database to obtain binning data; the server determines the first preprocessed data based on the first random number vector and the two-dimensional database, and determines the second preprocessed data based on the second random number vector and the two-dimensional database, and respectively performs binning processing on the first preprocessed data and the second preprocessed data to obtain the first preprocessed binning data and the second preprocessed binning data; sends the query parameters to the client, and the query parameters include the first random number vector, the second random number vector, the row length and column length of the two-dimensional database; then receives the ciphertext reply information sent by the server, where the server determines the ciphertext reply information based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector; and then determines the query result based on the ciphertext reply information. Through data binning, the number of data in the specific bin to be queried in the database hiding query can be reduced, thereby reducing the number multiplication task volume of the hiding query. Through the first preprocessed data and the second preprocessed data, homomorphic encryption preprocessing is realized, the matrix multiplication calculation in it is decomposed, and most of the ciphertext calculation operations are pre-calculated, thereby reducing the password calculation complexity in the online process and improving the calculation efficiency and query efficiency of the hiding query.
[0107] The embodiment of the present application also provides a data processing device. Please refer to Figure 3, the data processing device includes:
[0108] A processing module 10, configured to perform two-dimensional processing on each row of data in a target database to obtain a two-dimensional database corresponding to the target database, and perform binning processing on the two-dimensional database to obtain binned data;
[0109] A first determination module 20, configured to determine first preprocessed data based on a first random number vector and the two-dimensional database, determine second preprocessed data based on a second random number vector and the first preprocessed data, and perform binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data;
[0110] A sending module 30, configured to send query parameters to a client, where the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on a data query condition and the query parameters, and the query parameters include a first random number vector, a second random number vector, the row length and column length of the two-dimensional database;
[0111] A second determination module 40, configured to determine ciphertext reply information based on the first preprocessed binned data, the second preprocessed binned data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and send the ciphertext reply information to the client, where the client determines a query result based on the ciphertext reply information.
[0112] The data processing device provided in the embodiment of the present application adopts the data processing method in the above embodiment, and can solve the technical problem of how to improve the calculation efficiency and query efficiency of the concealed query. Compared with the prior art, the beneficial effects of the data processing device provided in the embodiment of the present application are the same as those of the data processing method provided in the above embodiment, and other technical features in the data processing device are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0113] The present application provides a data processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data processing method in the first embodiment above.
[0114] Next, refer to Figure 4, which shows a schematic structural diagram of a data processing device suitable for implementing the embodiments of the present application. The data processing device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The data processing device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0115] As Figure 4 shown, the data processing device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the data processing device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data processing device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a data processing device with various systems, it should be understood that it is not required to implement or have all the systems shown. Instead, more or fewer systems may be implemented or had.
[0116] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0117] The data processing device provided by the present application adopts the data processing method in the above embodiments, and can solve the technical problems of how to improve the computing efficiency and query efficiency of the stealth query. Compared with the prior art, the beneficial effects of the data processing device provided by the present application are the same as those of the data processing method provided by the above embodiments, and other technical features in the data processing device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0118] It should be understood that the various parts disclosed in the present application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0119] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0120] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the data processing method in the above embodiments.
[0121] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0122] The above computer-readable storage medium can be included in a data processing device; it can also exist independently without being assembled into the data processing device.
[0123] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by a data processing device, the data processing device: performs two-dimensional processing on each row of data in the target database to obtain a two-dimensional database corresponding to the target database, and performs binning processing on the two-dimensional database to obtain binned data; determines first preprocessed data based on a first random number vector and the two-dimensional database, determines second preprocessed data based on a second random number vector and the first preprocessed data, and performs binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data; sends query parameters to the client, where the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on a data query condition and the query parameters, and the query parameters include the first random number vector, the second random number vector, the row length and column length of the two-dimensional database; determines ciphertext reply information based on the first preprocessed binned data, the second preprocessed binned data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and sends the ciphertext reply information to the client, where the client determines a query result based on the ciphertext reply information.
[0124] Computer program code for performing the operations of the present application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0125] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0126] The modules described in the embodiments of the present application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0127] The readable storage medium provided by the present application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned data processing method, and can solve the technical problem of how to improve the computational efficiency and query efficiency of the concealed query. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the data processing method provided by the above embodiments, and will not be elaborated here.
[0128] An embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the data processing method as described above.
[0129] The computer program product provided by the present application can solve the technical problem of how to improve the computing efficiency and query efficiency of the stealth query. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the data processing method provided by the above embodiment, and will not be elaborated here.
[0130] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A data processing method, characterized in that, The described data processing method is applied to a server, and includes: Perform two-dimensional processing on each row of data in the target database to obtain a two-dimensional database corresponding to the target database, and perform binning processing on the two-dimensional database to obtain binned data; Determine first preprocessed data based on a first random number vector and the two-dimensional database, determine second preprocessed data based on a second random number vector and the first preprocessed data, and perform binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data; Send query parameters to the client, where the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on a data query condition and the query parameters, and the query parameters include the first random number vector, the second random number vector, the row length and the column length of the two-dimensional database; Determine ciphertext reply information based on the first preprocessed binned data, the second preprocessed binned data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and send the ciphertext reply information to the client, where the client determines a query result based on the ciphertext reply information.
2. The data processing method according to claim 1, wherein The step of performing two-dimensional processing on each row of data in the target database to obtain a two-dimensional database corresponding to the target database, and performing binning processing on the two-dimensional database to obtain binned data includes: Determine length information based on the number of rows of data in the target database; Based on the length information and the row number of each row of data in the target database, respectively determine the row number and the column number of each row of data in the two-dimensional database to obtain the two-dimensional database; Determine the number of bins based on the number of rows and the indistinguishability, and obtain the hash value of each row of data in the two-dimensional database; Based on the number of bins and the hash value, determine the bin corresponding to each row of data in the two-dimensional database to obtain binned data.
3. The data processing method according to claim 1, characterized in that The step of determining first preprocessed data based on a first random number vector and the two-dimensional database, determining second preprocessed data based on a second random number vector and the first preprocessed data, and performing binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data includes: Generate a first random number vector, perform cyclic extension on the first random number vector to obtain a first circulant matrix, and determine first preprocessed data based on the first circulant matrix and the two-dimensional database; Generate a second random number vector, perform cyclic extension on the second random number vector to obtain a second circulant matrix, and determine second preprocessed data based on the second circulant matrix and the first preprocessed data; Perform binning processing on the first preprocessed data and the second preprocessed data respectively to obtain first preprocessed binned data and second preprocessed binned data.
4. The data processing method according to claim 1, wherein Sending the query parameters to the client, wherein the client feeds back binning information, a first ciphertext query vector, and a second ciphertext query vector based on the data query conditions and the query parameters. The steps of the query parameters including a first random number vector, a second random number vector, the row length and column length of the two-dimensionalized database are as follows: Sending the query parameters to the client, wherein the client performs two-dimensional processing on the data query conditions based on the row length and column length of the two-dimensionalized database to obtain query row numbers and query column numbers, determines the binning information corresponding to the data query conditions, and respectively encrypts the query row numbers and query column numbers using a homomorphic key based on random noise, the first random number vector, and the second random number vector to obtain a first ciphertext query vector and a second ciphertext query vector.
5. The data processing method according to any one of claims 1 to 4, characterized in that Determining the ciphertext reply information based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and sending the ciphertext reply information to the client. The steps of the client determining the query result based on the ciphertext reply information are as follows: Determining a first-layer query result based on the data corresponding to the first ciphertext query vector in the first binning data and the binning information; Determining a second-layer query result based on the data corresponding to the second ciphertext query vector in the first preprocessed binning data and the data corresponding to the second ciphertext query vector in the second preprocessed binning data; Determining the reply information based on the first query result, the second-layer query result, the first preprocessed data, the second preprocessed data, and the second ciphertext query vector; Performing transformation processing on the reply information based on the homomorphic encryption algorithm to obtain the ciphertext reply information, and sending the ciphertext reply information to the client, wherein the client decrypts the ciphertext reply information based on the homomorphic encryption private key to obtain the query result.
6. A data processing method, characterized in that, The data processing method is applied to the client and includes: Feeding back binning information, a first ciphertext query vector, and a second ciphertext query vector to the server based on the data query conditions and the query parameters. The server performs two-dimensional processing on each row of data in the target database to obtain the two-dimensionalized database corresponding to the target database, and performs binning processing on the two-dimensionalized database to obtain binning data; the server determines first preprocessed data based on the first random number vector and the two-dimensionalized database, determines second preprocessed data based on the second random number vector and the two-dimensionalized database, and respectively performs binning processing on the first preprocessed data and the second preprocessed data to obtain first preprocessed binning data and second preprocessed binning data; sending the query parameters to the client, where the query parameters include the first random number vector, the second random number vector, the row length and column length of the two-dimensionalized database; Receiving the ciphertext reply information sent by the server, wherein the server determines the ciphertext reply information based on the first preprocessed binning data, the second preprocessed binning data, the binning information, the first ciphertext query vector, and the second ciphertext query vector; Determining the query result based on the ciphertext reply information.
7. The data processing method according to claim 6, wherein The steps of feedbacking binning information, the first ciphertext query vector, and the second ciphertext query vector to the server based on the data query conditions and query parameters include: Perform two-dimensional processing on the data query conditions to obtain the query row number and the query column number; Determine the binning information corresponding to the data query conditions based on the row length and column length of the two-dimensional database; Based on random noise, the first random number vector, and the second random number vector, use the homomorphic key to encrypt the query row number and the query column number respectively to obtain the first ciphertext query vector and the second ciphertext query vector; Send the binning information, the first ciphertext query vector, and the second ciphertext query vector to the server.
8. A data processing device, characterized in that, The data processing device includes: A processing module, configured to perform two-dimensional processing on each row of data in the target database to obtain the two-dimensional database corresponding to the target database, and perform binning processing on the two-dimensional database to obtain binned data; A first determination module, configured to determine first preprocessing data based on the first random number vector and the two-dimensional database, determine second preprocessing data based on the second random number vector and the first preprocessing data, and perform binning processing on the first preprocessing data and the second preprocessing data respectively to obtain first preprocessing binned data and second preprocessing binned data; A sending module, configured to send query parameters to the client, where the client feedbacks binning information, the first ciphertext query vector, and the second ciphertext query vector based on the data query conditions and the query parameters, and the query parameters include the first random number vector, the second random number vector, the row length of the two-dimensional database, and the column length; A second determination module, configured to determine ciphertext reply information based on the first preprocessing binned data, the second preprocessing binned data, the binning information, the first ciphertext query vector, and the second ciphertext query vector, and send the ciphertext reply information to the client, where the client determines the query result based on the ciphertext reply information.
9. A data processing device, characterized in that, The data processing device includes: a memory, a processor, and a data processing program stored on the memory and executable on the processor. When the data processing program is executed by the processor, the steps of the data processing method according to any one of claims 1 to 5 or 6 to 7 are implemented.
10. A computer-readable storage medium, characterized in that, A data processing program is stored on the computer-readable storage medium. When the data processing program is executed by the processor, the steps of the data processing method according to any one of claims 1 to 5 or 6 to 7 are implemented.