A safe and efficient distributed kd-tree construction method

By using the distributed k-d tree construction method in the cloud outsourcing query system and utilizing trusted third parties and cloud servers for collaborative computing, the problem of high communication and computing overhead in vertically distributed data query processing is solved, and efficient and secure query indexing is achieved. The construction reduces the need for assistance in calculations between users and ensures data privacy and security.

CN117579258BActive Publication Date: 2024-09-10XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311437767.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2024-09-10
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

The existing technology has high communication overhead and computing overhead in query processing of vertically distributed data, and cannot effectively establish efficient query indexes, resulting in low query efficiency.

Method used

A safe and efficient distributed k-d tree construction method is adopted, a security key is generated through trusted third party initialization, and the encrypted k-d tree is collaboratively calculated between the first cloud server and the second cloud server. The data owner can verify the data in advance. The data is sorted and encrypted before being outsourced, reducing data comparison and inter-user assistance in calculations.

Benefits of technology

It reduces the computing and communication overhead of the data owner and ensures the privacy and security of distributed data. Even if an attacker breaks into a single cloud server, the privacy and security of the distributed data and the constructed k-d tree cannot be compromised, and the query efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117579258B
    Figure CN117579258B
Patent Text Reader

Abstract

The present invention discloses a safe and efficient distributed k-d tree construction method, comprising: a TTP generates two pairs of security keys {pk, sk} and {pk # ,sk #}, and {pk,pk #} Publicly publish to each data owner, the first cloud server CS1 and the second cloud server CS2, and convert sk, sk # The data owner uses the public key pk to encrypt the data in his own data set, and outsources the encrypted data to CS1; CS1 and CS2 perform collaborative calculations, and build the internal nodes and leaf nodes of the k-d tree one by one based on the outsourced data set to obtain an encrypted k-d tree. The present invention ensures that the attacker cannot endanger the privacy security of distributed data and the k-d tree when only a single cloud server is breached. Since the data owner will sort his own data in advance and outsource the encrypted data together with the sequence to the cloud, this method is more efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data structures, and in particular relates to a safe and efficient distributed kd tree construction method. Background Art

[0002] Cloud outsourcing computing has become a new model for storing and managing data in the era of big data. With the increasing awareness of data privacy protection and the promulgation of privacy protection laws and regulations at home and abroad, data owners have gradually outsourced data to cloud servers in encrypted form to protect sensitive data information from being leaked. As we all know, encryption technology will inevitably affect the availability of outsourced data and reduce the efficiency of data query. Establishing data indexes is an effective way to improve the efficiency of outsourced data queries. When the outsourced data belongs to a data owner, the data owner can establish an index based on the plaintext data and outsource the encrypted index and the data set to the cloud server together. With the help of the index, the cloud server can efficiently process query requests based on confidential data, but the premise of establishing such a query index is that the data must be centrally stored in a data owner.

[0003] When outsourced data is vertically distributed among multiple data owners, different data owners may be unwilling to directly share their data to build indexes in order to protect data privacy. In order to solve the problem of secure query of distributed data, the current mainstream approach is to use secure multi-party computing technology to implement distributed data query. In the prior art, there is a secure top-k data query method for vertically distributed data. This method calculates a radius to separate the k-ranked data and the (k+1)-ranked data, and compares the data score with the radius to obtain the top-k data; at the same time, this method uses secure multi-party computing technology to implement secure data comparison to protect the data security of data owners and minimize information leakage.

[0004] Scholars from Northwestern University in the United States proposed a secure database statement query method for two-party vertical data. This method achieves fine-grained segmentation of database statement query processing operations by introducing a trusted third party, and protects data security based on multi-party data collaborative computing processes through obfuscation circuit technology. Based on the above method, scholars from Imperial College London and Boston University proposed a method to accelerate database statement queries based on a secret sharing query compiler, which can support secure database queries for more than two parties.

[0005] To further improve computing efficiency, scholars from Northwestern University and the University of Illinois used lightweight differential privacy technology and secure computing technology to design a secure approximate query processing algorithm for vertically distributed data. Scholars from the Beijing University of Aeronautics and Astronautics proposed a secure and efficient spatial query solution for vertical data. This method improves query efficiency by decomposing the spatial query processing steps into as many plaintext processing operations as possible and as few ciphertext operations as possible, and designing an efficient security protocol to implement ciphertext operations. Based on similar ideas, scholars from the Beijing University of Aeronautics and Astronautics also designed a secure skyline query solution and proposed a secure privacy set intersection protocol to improve query efficiency.

[0006] Although the above methods can realize secure query of vertical data, they still have the following limitations: (1) Existing methods mostly rely on the design of secure multi-party computing technology, resulting in high communication overhead between data owners; (2) The query processing of existing methods is completed collaboratively by data owners, that is, data owners need to participate in query processing, resulting in large computational overhead for data owners, which is not suitable for scenarios where data owners have limited resources; (3) Since the data set is vertically distributed among multiple data owners, existing methods cannot establish efficient query indexes for the data, resulting in low query efficiency. Summary of the invention

[0007] In order to solve the above problems existing in the prior art, the present invention provides a safe and efficient distributed kd tree construction method. The technical problem to be solved by the present invention is achieved by the following technical solutions:

[0008] The present invention provides a safe and efficient distributed kd-tree construction method, which is applied to a cloud outsourcing query system, wherein the cloud outsourcing query system comprises: a data owner, a trusted third party TTP, a first cloud server CS1 and a second cloud server CS2;

[0009] The method comprises:

[0010] TTP initializes and generates two pairs of security keys {pk, sk} and {pk # ,sk #}, and {pk,pk #}Publish publicly to each data owner DO j , the first cloud server CS1 and the second cloud server CS2, send the sk secret to the second cloud server CS2, and send sk # The secret is sent to the first cloud server CS1; where {pk,pk #} is the public key, {sk,sk #} is the private key, DO j represents the jth data owner among k data owners, 1≤j≤k;

[0011] Data Owner DO j Use the public key pk to perform the self-data set X j Encrypt the data in to get the encrypted data After that, the encrypted data Outsourced to the first cloud server CS1;

[0012] The first cloud server CS1 performs collaborative computing with the second cloud server CS2 based on the received outsourced data set. Construct the internal nodes and leaf nodes of the kd tree one by one to obtain an encrypted kd tree; wherein the external nodes include a data set Includes encrypted data outsourced by various data owners.

[0013] In one embodiment of the present invention, the first cloud server CS1 performs collaborative computing with the second cloud server CS2 based on the received outsourced data set. Before constructing the internal nodes and leaf nodes of the kd tree one by one to obtain the encrypted kd tree, the following steps are also included:

[0014] The first cloud server CS1 determines the outsourced data set contains only one piece of data; if so, the first cloud server CS1 establishes a leaf node containing the data; if not, the first cloud server CS1 and the second cloud server CS2 perform collaborative computing based on the received outsourced data set Construct the internal nodes and leaf nodes of the kd tree one by one to obtain the steps of the encrypted kd tree.

[0015] In one embodiment of the present invention, the data owner DO j Use the public key pk to perform the self-data set X j Encrypt the data in to get the encrypted data After that, the encrypted data The steps of outsourcing to the first cloud server CS1 include:

[0016] Data Owner DO j For its own dataset X j Data in Sort so that each piece of data has a unique sequence value, x i,j Represents the dataset X j The i-th data in the dataset X, n represents j There are n pieces of data in total, 1≤i≤n;

[0017] Data Owner DO j Encrypt data using public key pk Get encrypted data And encrypt the data Outsourcing to the First Cloud Server CS1,s i,j Represents x i,j The order value of .

[0018] In one embodiment of the present invention, the first cloud server CS1 performs collaborative computing with the second cloud server CS2 based on the received outsourced data set. The steps of constructing the internal nodes and leaf nodes of the kd tree one by one to obtain the encrypted kd tree include:

[0019] The first cloud server CS1 obtains the encrypted random dimension vector by collaborative calculation with the second cloud server CS2 in, There exists cd′ that satisfies b′ cd′ =1, and j≠cd′ satisfies b′ j =0, 1≤cd′≤k, 1≤j≤k;

[0020] The second cloud server CS2 and the first cloud server CS1 use the random dimension vector and outsourced datasets Perform collaborative computing to obtain the outsourced data set Data in the cd′th dimension and Among them, α i =x i,cd′ , β i =s i,cd′ , 1≤i≤n;

[0021] based on and The first cloud server CS1 and the second cloud server CS2 perform collaborative computing to obtain encrypted segmented data And according to the encrypted segmentation data The outsourced dataset Divided into sub-dataset C′ l and sub-dataset C′ r ,in, Median means taking the median;

[0022] The first cloud server CS1 establishes the root node Among them, p l and p r Respectively represent pointers to the left subtree and the right subtree, the left subtree and the right subtree are generated by the first cloud server CS1 and the second cloud server CS2 based on C′ l and C′ r , established through recursive operation.

[0023] In one embodiment of the present invention, the first cloud server CS1 obtains the encrypted random dimension vector by collaborative calculation with the second cloud server CS2. The steps include:

[0024] The first cloud server CS1 randomly selects a dimension cd and constructs a k-dimensional binary vector b cd =(b1,b2,…,b k ), where b cd =1, b j =0, 1≤cd≤k, j≠cd;

[0025] The first cloud server CS1 uses the public key pk # b cd Encrypted to ciphertext vector And the ciphertext vector Send to the second cloud server CS2;

[0026] Second cloud server CS2 random replacement The position of the replaced vector

[0027] The second cloud server CS2 constructs a random vector z2=(z 2,1 ,z 2,2 ,…,z 2,k ),in, Randomly selected from M, where M represents the preset plaintext space;

[0028] Second Cloud Server CS2 Computing And use the public key pk to encrypt the random vector z2 into ciphertext After that, send To the first cloud server CS1, wherein, mod means modulus;

[0029] The first cloud server CS1 uses the private key sk # right Decrypt to get z1, and construct the random dimension vector in, N is a preset prime number.

[0030] In one embodiment of the present invention, the second cloud server CS2 and the first cloud server CS1 are connected according to the random dimension vector and outsourced datasets Perform collaborative computing to obtain the outsourced data set Data in the cd′th dimension and The steps include:

[0031] The first cloud server CS1 randomly selects 2*k*n random values M represents the preset plaintext space;

[0032] The first cloud server CS1 is based on x 1,i,j 、x i,j 、s 1,i,j and i,j calculate: and

[0033] First Cloud Server CS1 Computing:

[0034]

[0035]

[0036] The first cloud server CS1 randomly selects a set of random values And calculate and

[0037] The first cloud server CS1 will Send to the second cloud server CS2;

[0038] The second cloud server CS2 uses the private key sk to decrypt and obtain

[0039] First Cloud Server CS1 Computing:

[0040]

[0041]

[0042]

[0043]

[0044] in, Represents the extracted The corresponding sequence value.

[0045] In one embodiment of the present invention, based on and The first cloud server CS1 and the second cloud server CS2 perform collaborative computing to obtain segmented data And split the data according to the The outsourced dataset Divided into sub-dataset C l′ and sub-dataset C r ' steps, including:

[0046] Second Cloud Server CS2 Computing β h =Median{β i |1≤i≤n}, and let the segmentation data

[0047] The second cloud server CS2 and the first cloud server CS1 use the security data comparison algorithm to sequentially test the set Until α is found i Satisfy α i ≠α h , and α i The order is denoted as β h′ ;

[0048] The second cloud server CS2 constructs the data set:

[0049]

[0050]

[0051] in, is a random value, and

[0052] Second Cloud Server CS2 Computing and And the ciphertext Sent to the first cloud server CS1, where r val ∈M is a random value;

[0053] The first cloud server CS1 uses the private key sk # Decrypting ciphertext Get {val′,x′ i,j ,s′ i,j}, and calculate and

[0054] The second cloud server CS2 constructs the sub-dataset C′ l , C′ r :

[0055]

[0056]

[0057] In one embodiment of the present invention, the second cloud server CS2 and the first cloud server CS1 use a security data comparison algorithm to sequentially test the set Until α is found i Satisfy α i ≠α h , and α i The order is denoted as β h′ The steps include:

[0058] Second Cloud Server CS2 Computing and will Sent to the first cloud server CS1, where {r1, r2}∈M is a random value and satisfies r1>r2>0, m1, m2 represent Data in

[0059] First cloud server CS1 uses sk # Decryption Get m'; if m'<0, the first cloud server CS1 returns b m′ =1 to the second cloud server CS2, indicating that m1=m2; otherwise, the first cloud server CS1 returns b m′ =0 to the second cloud server CS2, indicating that m1≠m2.

[0060] In one embodiment of the present invention, the second cloud server CS2 constructs a subset data set C′ l , C′ r After the steps, it also includes:

[0061] The sub-datasets C′ l , C′ r As the outsourced dataset And return to the first cloud server CS1 to determine the outsourced data set Whether there is only one step of data in the step.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] The present invention provides a safe and efficient distributed kd-tree construction method. When establishing a secret kd-tree index for the distributed data and cloud server of the data owner, the problem of calculating intermediate values ​​and the like that may cause the leakage of user privacy is stored in the form of ciphertext or random values, ensuring that the privacy security of the distributed data and the constructed kd-tree cannot be endangered by the attacker when only breaking into a single cloud server.

[0064] In addition, the kd tree construction method provided by the present invention is efficient. Each data owner will sort his or her data in advance and outsource the encrypted data together with the order to the cloud, which helps to reduce a large amount of data comparison in the kd tree construction process. In particular, the present invention does not require user-assisted calculations, and can minimize the calculation and communication overhead of the data owner.

[0065] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a flow chart of a safe and efficient distributed kd tree construction method provided by an embodiment of the present invention;

[0067] Figure 2 It is a schematic diagram of a safe and efficient distributed kd tree construction method provided by an embodiment of the present invention;

[0068] Figure 3 It is another schematic diagram of a safe and efficient distributed kd tree construction method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0070] Figure 1 is a flow chart of a safe and efficient distributed kd tree construction method provided by an embodiment of the present invention. Figure 2-3 FIG. 1 is a schematic diagram of a safe and efficient distributed kd tree construction method provided by an embodiment of the present invention. Figure 1-3 As shown, an embodiment of the present invention provides a safe and efficient distributed kd tree construction method, which is applied to a cloud outsourcing query system, and the cloud outsourcing query system includes: a data owner, a trusted third party TTP, a first cloud server CS1 and a second cloud server CS2;

[0071] The above methods include:

[0072] S1. TTP initializes and generates two pairs of security keys {pk, sk} and {pk # ,sk #}, and {pk,pk #}Publish publicly to each data owner DO j , the first cloud server CS1 and the second cloud server CS2, send the sk secret to the second cloud server CS2, and send sk # The secret is sent to the first cloud server CS1; where {pk,pk #} is the public key, {sk,sk #} is the private key, DO j represents the jth data owner among k data owners, 1≤j≤k;

[0073] S2. Data owner DO j Use the public key k to perform the self-dataset X j Encrypt the data in to get the encrypted data After that, the encrypted data Outsourced to the first cloud server CS1;

[0074] S3: The first cloud server CS1 and the second cloud server CS2 perform collaborative computing based on the received outsourced data set. Construct the internal nodes and leaf nodes of the kd tree one by one to obtain the encrypted kd tree; the external nodes include the data set Includes encrypted data outsourced by various data owners.

[0075] It should be noted that the key generation, encryption, and decryption involved in this embodiment can all be implemented based on the Paillier homomorphic encryption algorithm. Specifically, when generating the key, the security parameter κ is set, and the public key pk = {N, g} and the private key sk = {λ, μ} are output. In order to realize the encryption of negative numbers, this embodiment converts the plaintext space Z N Modify the setting Where N = p*q, p and q are large prime numbers of κ bits, g = N+1, λ is the least common multiple of (p-1) and (q-1), μ = L(g λ modN 2 )modN, function During the encryption process, the plaintext message m∈M is encrypted into ciphertext in, is a random value, Represents Z N The group consisting of all reversible elements modulo N congruence classes in Z N ={0,1,2,…,N-1}. Furthermore, in the decryption process, the private key sk can be used to obtain the ciphertext Recover the plaintext information if Then the plaintext message is set to m=m'. Otherwise, m=m'-N.

[0076] In addition, the above Paillier homomorphic encryption algorithm satisfies the properties of homomorphic addition and multiplication, that is, m1 and m2 represent two plaintext messages in the plaintext space M.

[0077] Optionally, the first cloud server CS1 and the second cloud server CS2 perform collaborative computing based on the received outsourced data set. Before constructing the internal nodes and leaf nodes of the kd tree one by one to obtain the encrypted kd tree, the following steps are also included:

[0078] First Cloud Server CS1 judgment outsourcing data set Does it contain only one piece of data? If so, the first cloud server CS1 establishes a leaf node containing the data, recorded as If not, the first cloud server CS1 and the second cloud server CS2 perform collaborative computing based on the received outsourced data set. Construct the internal nodes and leaf nodes of the kd tree one by one to obtain the steps of the encrypted kd tree.

[0079] In step S2, the data owner DO j Use the public key pk to perform the self-data set X j Encrypt the data in to get the encrypted data After that, the encrypted data The steps of outsourcing to the first cloud server CS1 include:

[0080] S201. Data owner DO j For its own dataset X j Data in Sort so that each piece of data has a unique sequence value, x i,j Represents the dataset X j The i-th data in the dataset X, n represents j There are n pieces of data in total, 1≤i≤n;

[0081] S202. Data owner DO j Encrypt data using public key pk Get encrypted data And encrypt the data Outsourcing to the First Cloud Server CS1,s i,j Represents x i,j The order value of .

[0082] Specifically, the data owner DO j We can use the dataset X j The data in is sorted from small to large, and the order value of each data is unique, that is, even if Their order will be and

[0083] In step S3, the first cloud server CS1 and the second cloud server CS2 perform collaborative computing based on the received outsourced data set. Construct the internal nodes and leaf nodes of the kd tree one by one to obtain the encrypted kd tree. The steps of obtaining the encrypted kd tree include:

[0084] S301, the first cloud server CS1 obtains an encrypted random dimension vector by collaborative calculation with the second cloud server CS2 in, There exists cd′ that satisfies b′ cd′ =1, and j≠cd′ satisfies bj ′=0,1≤cd′≤k,1≤j≤k;

[0085] S302: The second cloud server CS2 and the first cloud server CS1 use a random dimension vector and outsourced datasets Perform collaborative computing and obtain outsourced data sets Data in the cd′th dimension and Among them, α i =x i,cd′ , β i =s o,cd′ , 1≤i≤n;

[0086] S303, based on and The first cloud server CS1 and the second cloud server CS2 perform collaborative computing to obtain encrypted segmented data And according to the encrypted segmentation data Outsourcing Datasets Divided into sub-dataset C′ l and sub-dataset C′ r ,in, Median means taking the median;

[0087] S304: The first cloud server CS1 establishes a root node Among them, p l and p r Respectively represent pointers to the left subtree and the right subtree, which are generated by the first cloud server CS1 and the second cloud server CS2 based on C′ l and C′ r , established through recursive operation.

[0088] Furthermore, in step S301, the first cloud server CS1 obtains the encrypted random dimension vector by collaborative calculation with the second cloud server CS2. The steps include:

[0089] The first cloud server CS1 randomly selects a dimension cd and constructs a k-dimensional binary vector b cd =(b1,b2,…,b k ), where b cd =1, b j =0, 1≤cd≤k, j≠cd;

[0090] The first cloud server CS1 uses the public key pk # b cd Encrypted to ciphertext vector And the ciphertext vector Send to the second cloud server CS2;

[0091] Second cloud server CS2 random replacement The position of the replaced vector

[0092] The second cloud server CS2 constructs a random vector z2=(z 2,1 ,z 2,2 ,…,z 2,k ),in, Randomly selected from M, where M represents the preset plaintext space;

[0093] Second Cloud Server CS2 Computing And use the public key pk to encrypt the random vector z2 into ciphertext After that, send To the first cloud server CS1, where mod means modulus;

[0094] The first cloud server CS1 uses the private key sk # right Decrypt to get z1 and construct a random dimension vector in, N is a preset prime number.

[0095] It should be understood that in the process of selecting the random data segmentation dimension, the first cloud server CS1 obtains At the same time, you get The second cloud server CS2ze obtains z2. Based on these values, the first cloud server CS1 and the second cloud server CS2 extract data of the segmentation dimension.

[0096] Specifically, in step S302, the second cloud server CS2 and the first cloud server CS1 are connected according to the random dimension vector and outsourced datasets Perform collaborative computing and obtain outsourced data sets Data in the cd′th dimension and The steps include:

[0097] The first cloud server CS1 randomly selects 2*k*n random values M represents the preset plaintext space;

[0098] The first cloud server CS1 is based on x 1,i,j 、x i,j 、s 1,i,j and i,j calculate: and

[0099] First Cloud Server CS1 Computing:

[0100]

[0101]

[0102] The first cloud server CS1 randomly selects a set of random values And calculate and

[0103] The first cloud server CS1 will Send to the second cloud server CS2;

[0104] The second cloud server CS2 uses the private key sk to decrypt and obtain

[0105] First Cloud Server CS1 Computing:

[0106]

[0107]

[0108]

[0109]

[0110] in, Represents the extracted The corresponding sequence value.

[0111] In step S303, based on and The first cloud server CS1 and the second cloud server CS2 perform collaborative computing to obtain segmented data And according to the segmentation data Outsourcing Datasets Divided into sub-dataset C′ l and sub-dataset C′ r The steps include:

[0112] Second Cloud Server CS2 Computing β h =Median{β i |1≤i≤n}, and let the segmentation data

[0113] The second cloud server CS2 and the first cloud server CS1 use the security data comparison algorithm to sequentially test the set Until α is found i Satisfy α i ≠α h , and α i The order is denoted as β h′ ;

[0114] The second cloud server CS2 constructs the data set:

[0115]

[0116]

[0117] in, is a random value, and

[0118] Second Cloud Server CS2 Computing and And the ciphertext Sent to the first cloud server CS1, where r val ∈M is a random value;

[0119] The first cloud server CS1 uses the private key sk # Decrypting ciphertext Get {val′,x′ i,j ,s′ i,j}, and calculate and

[0120] The second cloud server CS2 constructs the sub-dataset C′ l , C′ r :

[0121]

[0122]

[0123] In this embodiment, the second cloud server CS2 and the first cloud server CS1 use the security data comparison algorithm to sequentially test the set Until α is found i Satisfy α i ≠α h , and α i The order is denoted as β h′ The steps include:

[0124] Second Cloud Server CS2 Computing and will Sent to the first cloud server CS1, where {r1, r2}∈M is a random value and satisfies r1>r2>0, m1, m2 represent Data in

[0125] First cloud server CS1 uses sk # Decryption Get a′; if m′<0, the first cloud server CS1 returns b m′ =1 to the second cloud server CS2, indicating that m1=m2; otherwise, the first cloud server CS1 returns b m′ =0 to the second cloud server CS2, indicating that m1≠m2.

[0126] It should be noted that the second cloud server CS2 constructs the sub-dataset C′ l , C′ r After the steps, it also includes:

[0127] The dataset C′ l , C′ r As the outsourced dataset And return to the first cloud server CS1 to determine the outsourced data set Whether there is only one step of data in the step.

[0128] It can be seen from the above embodiments that the beneficial effects of the present invention are:

[0129] The present invention provides a safe and efficient distributed kd-tree construction method. When establishing a secret kd-tree index for the distributed data and cloud server of the data owner, the problem of calculating intermediate values ​​and the like that may cause the leakage of user privacy is stored in the form of ciphertext or random values, ensuring that the privacy security of the distributed data and the constructed kd-tree cannot be endangered by the attacker when only breaking into a single cloud server.

[0130] In addition, the kd tree construction method provided by the present invention is efficient. Each data owner will sort his or her data in advance and outsource the encrypted data together with the order to the cloud, which helps to reduce a large amount of data comparison in the kd tree construction process. In particular, the present invention does not require user-assisted calculations, and can minimize the calculation and communication overhead of the data owner.

[0131] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0132] The description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations 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.

[0133] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A safe and efficient distributed kd-tree construction method, characterized in that: Applied to a cloud outsourcing query system, the cloud outsourcing query system includes: a data owner, a trusted third party TTP, a first cloud server CS1 and a second cloud server CS2; The method comprises: TTP initializes and generates two pairs of security keys {pk, sk} and {pk # ,sk # }, and {pk,pk # }Publish to each data owner DO j , the first cloud server CS1 and the second cloud server CS2, send the sk secret to the second cloud server CS2, and send sk # The secret is sent to the first cloud server CS1; where {pk,pk # } is the public key, {sk,sk # } is the private key, DO j represents the jth data owner among k data owners, 1≤j≤k; Data Owner DO j Use the public key pk to perform the self-data set X j Encrypt the data in to get the encrypted data After that, the encrypted data Outsourced to the first cloud server CS1; The first cloud server CS1 performs collaborative computing with the second cloud server CS2 based on the received outsourced data set. Construct the internal nodes and leaf nodes of the kd tree one by one to obtain an encrypted kd tree; wherein the outsourced data set Includes encrypted data outsourced by various data owners; among them, The first cloud server CS1 performs collaborative computing with the second cloud server CS2 based on the received outsourced data set. The steps of constructing the internal nodes and leaf nodes of the kd tree one by one to obtain the encrypted kd tree include: The first cloud server CS1 obtains the encrypted random dimension vector by collaborative calculation with the second cloud server CS2 in, There exists cd′ that satisfies b′ cd′ =1, and j≠cd′ satisfies b′ j =0, 1≤cd′≤k, 1≤j≤k; The second cloud server CS2 and the first cloud server CS1 use the random dimension vector and outsourced datasets Perform collaborative computing to obtain the outsourced data set Data in the cd′th dimension and Among them, x i,j Represents its own dataset X j The i-th data in the dataset X, n represents the dataset itself j There are n pieces of data in total, s i,j Represents x i,j The order value, α i =x i,cd′ , β i =s i,cd′ , 1≤i≤n; based on and The first cloud server CS1 and the second cloud server CS2 perform collaborative computing to obtain encrypted segmented data And according to the encrypted segmentation data The outsourced dataset Divided into sub-dataset C′ l and sub-dataset C′ r ,in, Median means taking the median; The first cloud server CS1 establishes the root node Among them, p l and p r Respectively represent pointers to the left subtree and the right subtree, the left subtree and the right subtree are generated by the first cloud server CS1 and the second cloud server CS2 based on C′ l and C′ r , established through recursive operation; among them, The first cloud server CS1 obtains the encrypted random dimension vector by collaborative calculation with the second cloud server CS2 The steps include: The first cloud server CS1 randomly selects a dimension cd and constructs a k-dimensional binary vector b cd =(b1, b2, ..., b k ), where b cd =1, b j =0, 1≤cd≤k, j≠cd; The first cloud server CS1 uses the public key pk # b cd Encrypted to ciphertext vector And the ciphertext vector Send to the second cloud server CS2; Second cloud server CS2 random replacement The position of the replaced vector The second cloud server CS2 constructs a random vector z2=(z 2,1 , z 2,2 , …, z 2,k ),in, Randomly selected from M, where M represents the preset plaintext space; Second Cloud Server CS2 Computing And use the public key pk to encrypt the random vector z2 into ciphertext After that, send To the first cloud server CS1, wherein, mod means modulus; The first cloud server CS1 uses the private key sk # right Decrypt to get z1, and construct the random dimension vector in, N is a preset prime number; The second cloud server CS2 and the first cloud server CS1 use the random dimension vector and outsourced datasets Perform collaborative computing to obtain the outsourced data set Data in the cd′th dimension and The steps include: The first cloud server CS1 randomly selects 2*k*n random values s 1,i,j ∈M,x 1,i,j ∈M, M represents the preset plaintext space; The first cloud server CS1 is based on x 1,i,j 、x i,j 、s 1,i,j and i,j calculate: and First Cloud Server CS1 Computing: The first cloud server CS1 randomly selects a set of random values And calculate and The first cloud server CS1 will Send to the second cloud server CS2; The second cloud server CS2 uses the private key sk to decrypt and obtain First Cloud Server CS1 Computing: in, Represents the extracted The corresponding sequence value; based on and The first cloud server CS1 and the second cloud server CS2 perform collaborative computing to obtain segmented data And split the data according to the The outsourced dataset Divided into sub-dataset C′ l and sub-dataset C′ r The steps include: Second Cloud Server CS2 Computing β h =Median{β i |1≤i≤n}, and let the segmentation data The second cloud server CS2 and the first cloud server CS1 use the security data comparison algorithm to sequentially test the set Until α is found i Satisfy α i ≠α h , and α i The order is denoted as β h′ ; The second cloud server CS2 constructs the data set: in, is a random value, and Second Cloud Server CS2 Computing and And the ciphertext Sent to the first cloud server CS1, where r val ∈M is a random value; The first cloud server CS1 uses the private key sk # Decrypting ciphertext Get {val′, x′ i,j , s′ i,j }, and calculate and The second cloud server CS2 constructs the sub-dataset C′ l , C′ r :

2. The safe and efficient distributed kd-tree construction method according to claim 1, characterized in that: The first cloud server CS1 performs collaborative computing with the second cloud server CS2 based on the received outsourced data set. Before constructing the internal nodes and leaf nodes of the kd tree one by one to obtain the encrypted kd tree, the following steps are also included: The first cloud server CS1 determines the outsourced data set contains only one piece of data; if so, the first cloud server CS1 establishes a leaf node containing the data; if not, the first cloud server CS1 and the second cloud server CS2 perform collaborative computing based on the received outsourced data set Construct the internal nodes and leaf nodes of the kd tree one by one to obtain the steps of the encrypted kd tree.

3. The safe and efficient distributed kd-tree construction method according to claim 2, characterized in that: Data Owner DO j Use the public key pk to perform the self-data set X j Encrypt the data in to get the encrypted data After that, the encrypted data The steps of outsourcing to the first cloud server CS1 include: Data Owner DO j For its own dataset X j Data in Sort so that each piece of data has a unique sequence value, x i,j Represents the dataset X j The i-th data in the dataset X, n represents j There are n pieces of data in total, 1≤i≤n; Data Owner DO j Encrypt data using public key pk Get encrypted data And encrypt the data Outsourcing to the First Cloud Server CS1,s i,j Represents x i,j The order value of .

4. The safe and efficient distributed kd-tree construction method according to claim 1, characterized in that: The second cloud server CS2 and the first cloud server CS1 use the security data comparison algorithm to sequentially test the set Until α is found i Satisfy α i ≠α h , and α i The order is denoted as β h′ The steps include: Second Cloud Server CS2 Computing and will Sent to the first cloud server CS1, where {r1, r2}∈M is a random value and satisfies r1>r2>0, m1, m2 represent Data in First cloud server CS1 uses sk # Decryption Get m'; if m' < 0, the first cloud server CS1 returns b m′ =1 to the second cloud server CS2, indicating that m1=m2; otherwise, the first cloud server CS1 returns b m′ =0 to the second cloud server CS2, indicating that m1≠m2.

5. The safe and efficient distributed kd-tree construction method according to claim 1, characterized in that: The second cloud server CS2 constructs the sub-dataset C′ l , C′ r After the steps, it also includes: The sub-datasets C′ l , C′ r As the outsourced dataset And return to the first cloud server CS1 to determine the outsourced data set Whether there is only one step of data in the step.