A method for constructing and querying dense database index based on five-branch tree
By building a five-branch-based index structure in a dense database, the problem of inefficient connection query in the existing technology is solved, and the effect of rapid query and data privacy protection is achieved.
Patent Information
- Application Number
- CN202111312420.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-11-08
AI Technical Summary
The existing inadvertent random access machine technology is inefficient in the connection query process of dense databases, and may require traversing a large number of database tables, resulting in long query time and inefficient efficiency.
The dense database index construction and query method based on five-branch trees is adopted, and the single-keyword and multi-keyword five-branch trees are constructed to achieve fast connection query. The specific steps include building a five-branch structure, initializing a five-branch tree, and conducting connection query on the five-branch tree.
Through the index structure of the five-branch tree, the connection query efficiency of the dense database can be significantly improved, the query time can be reduced, and keyword information can be effectively encrypted during the query process to protect user data privacy.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security, and in particular to a method for constructing and querying a secret database index based on a five-branch tree. Background Art
[0002] In order to obtain cheap information storage resources, many users outsource their data to cloud computing environments. Since the cloud has a large number of security threats such as hacker attacks, users need to encrypt the entire process of data storage and use, and can usually refer to the Oblivious RAM (ORAM) technology. Oblivious RAM refers to a secure communication protocol between users and the cloud. It assumes that the user is trustworthy and the cloud is untrustworthy and curious. The cloud can execute the user's communication protocol normally but attempts to steal the user's private data from any data access. A secure ORAM can completely hide the data content and the reading and writing rules of the data, so that the cloud can never obtain the actual storage address and content of the data. Commonly used ORAMs include PATH ORAM, which provides a fast and secure read and write interface for private array data.
[0003] Commonly used oblivious random access machines are not fully optimized for secret databases. For example, if a user needs to perform a join query on a secret database table, such as "select * from users where name = 'Tom' and gender = 'male'", the user needs to quickly read the user named Tom and male in the database table users stored in the cloud without leaking private data. If you simply use an oblivious random access machine to store data, the data query process is likely to traverse almost half of the database tables, which is extremely inefficient.
[0004] In order to improve the connection query efficiency of the database, the present invention provides a dense database index construction and query method based on a five-branch tree. Summary of the invention
[0005] In order to achieve the purpose of the present invention, the following technical solutions are adopted:
[0006] A method for constructing and querying a dense database index based on a five-branch tree, comprising: step 1. constructing a five-branch tree structure; step 2. initializing the five-branch tree; step 3. connection query on the five-branch tree; wherein constructing the five-branch tree comprises constructing five-branch tree nodes and branches of nodes, and the five-branch tree comprises a single-keyword five-branch tree and a multi-keyword five-branch tree.
[0007] The method for constructing and querying a dense database index based on a five-branch tree, wherein:
[0008] A single-keyword five-branch tree is a full binary tree, where any non-leaf node has two child nodes. Assuming w is a keyword, a single-keyword five-branch tree of height L containing the keyword is represented by (L, w)-tree, which satisfies the following conditions:
[0009] 1) Each of its tree nodes can hold at most one keyword, called an element;
[0010] 2) Each tree node is either empty or contains the keyword w;
[0011] 3) The elements of any of its non-leaf nodes are equal to the union of the set of elements of the left subtree and the set of nodes of the right subtree;
[0012] 4) Any tree node has five branches, represented by B1, B2, B3, B4, and B5 respectively;
[0013] 5) For any non-leaf node, its B1 and B2 point to the left child node and right child node of the full binary tree of this node respectively; for a leaf node, its B1 and B2 are empty;
[0014] 6) For any non-leaf node, B3 and B4 point to the nearest "connection point" on the left and the nearest "connection point" on the right of the full binary tree below the node, respectively. A connection point refers to a tree node with two non-empty children. If there is no nearest connection point on the left or the nearest connection point on the right, then B3 and B4 point to the non-empty leaf node of the left subtree and the non-empty leaf node of the right subtree, respectively. For any leaf node, B3 and B4 are empty;
[0015] 7) If the left child of a node is empty, then B3 of this node is empty; if the right child of a node is empty, then B4 of this node is empty;
[0016] 8) For any non-leaf node, B5 points to the farthest full layer below the non-leaf node. The definition of a full layer is as follows: in a layer of a single-keyword five-branch tree, if all nodes are non-empty, then this layer is a full layer. For any leaf node, the B5 pointer is empty.
[0017] The method for constructing and querying a dense database index based on a five-branch tree, wherein: a multi-keyword five-branch tree refers to a union of a group of single-keyword five-branch trees with the same height but different keywords.
[0018] The method for constructing and querying a secret database index based on a five-branch tree is described, wherein: in a (L, w)-tree, the B1 and B2 pointers are parts of the B3 and B4 pointers respectively, so a tree node can be represented by three pointers (B3, B4, B5). A five-branch tree B5tree is stored using the following method: for any non-empty five-branch tree (L, w)-tree node, assuming that p is the absolute path of this node, R = (B3, B4, B5), which are the three special pointers of this node, then this node stores all (w, p, R) tuple values.
[0019] The method for constructing and querying a secret database index based on a five-branch tree, wherein initializing the five-branch tree comprises:
[0020] Step A, sorting files: Assuming that a file is a set of keywords, for n files to be stored in the five-branch tree, this step sorts each file from 0 to n-1;
[0021] Step B, putting the file into the leaf node of the five-branch tree: construct a five-branch tree with a leaf number greater than n, and put the file in step A and the keyword identifying the file into the n leaf nodes of the five-branch tree respectively;
[0022] Step C, fill the parent node according to the keywords in the leaf node: According to the definition of the single keyword five-branch tree, the elements in any non-leaf node are equal to the union of the set of elements of the left subtree and the set of nodes of the right subtree;
[0023] Step D, save nodes: after filling all nodes according to the operation of step C, retain the non-empty five-branch tree node information;
[0024] Step E, calculate and save the branches of the node: separate the branches of the multi-keyword five-branch tree into multiple single-keyword five-branch trees according to the keywords, and then calculate and save the three branches (B3, B4, B5) of each single-keyword node respectively. Finally, each node is represented as a triple (w, p, R), in which the leaf node also includes the separated file;
[0025] Step F, encrypt the five-branch tree: use the read and write data interface provided by the oblivious random access machine to encrypt the nodes (w, p) and branch information (R) of the five-branch tree and store them in the cloud.
[0026] The method for constructing and querying a dense database index based on a five-branch tree, wherein a connection query on a five-branch tree refers to a query containing multiple keywords, and a u-dimensional connection query containing u keywords is represented as Φ=(w 1 ∧w 2 ∧…∧w u), let D represent a tree node in a single keyword five-branch tree ((L,w)-tree) T, the join query algorithm Search(T,Φ,D) on the five-branch tree includes:
[0027] Step A. Search for a node. If the node meets the connection query condition, output the node: according to the input multi-keyword five-branch tree T and a connection query Φ, start the connection query from the node D which is the default root node, and judge whether the bottom layer of the single-keyword five-branch tree composed of each keyword in node D is a full layer of the keyword. If the bottom layer is a full layer of the keyword, directly remove the keyword from the connection query Φ to obtain a simplified connection query Φ, and continue to perform the above judgment and removal on the next keyword in the simplified connection query Φ. If all the keywords in the connection query Φ have been removed, directly output the node D as the final result. In the above case, all the keywords in the connection query Φ are removed, so it can be regarded as the connection query condition is empty; if the connection query condition is not empty after traversing all the keywords, continue to judge whether node D is a leaf node. If D is a leaf node and meets the conditions of the current connection query, output the current node D as the result;
[0028] Step B: If step A does not obtain a node D that meets the query condition, then jump to the multi-keyword full layer closest to node D for connection query, and recursively call this connection query algorithm for all nodes in the full layer, including: if node D does not meet the situation in step A and is not output as a result, then determine whether there is a multi-keyword full layer closest to node D. If the above determination is met, jump to the nearest full layer, and recursively call this connection query algorithm to search for all nodes in the full layer, that is, execute Search(T,Φ,d), where d is a node in the nearest full layer, otherwise execute steps C and D;
[0029] Step C: Jump to the node pointed to by the pointer of the long branch B3 on the left farthest from node D in the connection query, and recursively call this connection query algorithm to search, that is, execute Search(T,Φ,D Φ .left);
[0030] Step D: Jump to the node pointed to by the long branch B4 pointer on the farthest right side of node D in the connection query, and recursively call this connection query algorithm to search, that is, execute Search(T,Φ,D Φ .right). BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 An example diagram for constructing a single keyword five-branch tree with a height of 4;
[0032] Figure 2 An example diagram for constructing a single keyword five-branch tree with a height of 5;
[0033] Figure 3 Construct an example graph for a multi-keyword five-branch tree;
[0034] Figure 4 Flowchart for initializing the five-branch tree;
[0035] Figure 5 This is a flowchart of the join query on the five-branch tree. DETAILED DESCRIPTION
[0036] The following is combined with Figure 1-5 , the specific implementation methods of the present invention are described in detail.
[0037] The method for constructing and querying a dense database index based on a five-branch tree includes: step 1. constructing a five-branch tree structure; step 2. initializing the five-branch tree; step 3. connection query on the five-branch tree.
[0038] Step 1. Build a five-branch tree structure
[0039] Constructing a five-branch tree structure includes constructing five-branch tree nodes and node branches, including two new data structures, a single-keyword five-branch tree and a multi-keyword five-branch tree, and a five-branch tree construction method.
[0040] 1. Single keyword five-branch tree structure
[0041] A single keyword five-branch tree is a full binary tree, where any non-leaf node has two child nodes. Assume that w is a keyword, and a single keyword five-branch tree with a height of L containing the keyword is represented by (L, w)-tree, which satisfies the following conditions:
[0042] 1) Each of its tree nodes can hold at most one keyword, called an element;
[0043] 2) Each tree node is either empty or contains the keyword w;
[0044] 3) The elements of any of its non-leaf nodes are equal to the union of the set of elements of the left subtree and the set of nodes of the right subtree;
[0045] 4) Any tree node has five branches (or pointers), represented by B1, B2, B3, B4, and B5, which can be null pointers;
[0046] 5) For any non-leaf node, its B1 and B2 point to the left child node and right child node of the full binary tree of this node respectively; for a leaf node, its B1 and B2 are empty;
[0047] 6) For any non-leaf node, B3 and B4 point to the nearest "connection point" on the left and the nearest "connection point" on the right of the full binary tree below the node, respectively. A connection point refers to a tree node with two non-empty child nodes. If there is no nearest connection point on the left or the nearest connection point on the right, then B3 and B4 point to the non-empty leaf node of the left subtree and the non-empty leaf node of the right subtree, respectively; for any leaf node, B3 and B4 are empty;
[0048] 7) If the left child of a node is empty, then B3 of this node is empty; if the right child of a node is empty, then B4 of this node is empty;
[0049] 8) For any non-leaf node, B5 points to the farthest full layer below the non-leaf node. The definition of a full layer is as follows: in a layer of a single keyword five-branch tree, if all nodes are non-empty, then this layer is a full layer. There may be multiple full layers below a tree node; for any leaf node, the B5 pointer is empty;
[0050] 2. Five-branch tree with multiple keywords
[0051] A multi-keyword five-branch tree refers to a union of a group (number greater than or equal to 2) of single-keyword five-branch trees with the same height but different keywords. For convenience, the present invention will directly refer to the multi-keyword five-branch tree as a five-branch tree (Five-Branch Tree, abbreviated as B5tree) below.
[0052] 3. How to represent the five-branch tree
[0053] In a (L,w)-tree, the B1 and B2 pointers are parts of the B3 and B4 pointers respectively, so a tree node can be represented by three pointers (B3, B4, B5). A five-branch tree B5tree is stored as follows: for any non-empty five-branch tree (L,w)-tree node, assuming that p is the absolute path of this node (referring to the string encoding from the root node to this node, where the root is identified by node N1, the left child node is represented by 0, and the right child node is represented by 1), and R = (B3, B4, B5) are the three special pointers of this node, then this node stores all (w,p,R) tuple values. For any empty five-branch tree (L,w)-tree node, its five pointers do not need to be stored.
[0054] Figure 1 This is an example of constructing a single keyword five-branch tree (4, w)-tree, where each node has five branches. For convenience, only the root node N is shown here. 1 Five branches of N 1There are five branches B1, B2, B3, B4, and B5, where B1 and B2 point to the child node N on the left of the root node respectively. 2 and the right child node N 3 , B3 points to the nearest connection point on the left, which is N 2 , since there is no connection point on the right, B4 points to the non-empty leaf node of the right subtree, i.e. l 5 , Figure 1 In the single keyword five-branch tree shown in , the first and second layers are full layers, and B5 points to the farthest full layer below the root node, that is, to the second layer. Figure 2 This is an example of constructing a single keyword five-branch tree (5,w)-tree. The arrangement and Figure 1 The (4,w)-tree in is different, the root node N 1 B3 and B4 of the tree point to their left and right child nodes respectively, just like branches B1 and B2. That is, the pointers of B1 and B2 are parts of the pointers of B3 and B4 respectively. In this single-keyword five-branch tree, the first four levels are full, N 1 The B5 branch points to the farthest full layer, which is the fourth layer.
[0055] Figure 3 This is an example of constructing a B5Tree with a height of 4. The keywords in each node are the set of keywords in the two (L, w)-tree nodes below. The structure of the (L, w)-tree has been introduced in detail above. Here, the two (L, w)-trees containing keywords w and v respectively omit some branches. For convenience, only N is given. 1 The three pointers (B3, B4, B5) of the node and N 2 ,N 3 The directions of the two branches B3 and B4 of the two nodes.
[0056] Step 2. Initialize the five-branch tree
[0057] Initializing the five-branch tree includes initializing each node and branch in the tree, and then calling the oblivious random access machine to encrypt and store them. Figure 4 As shown, the initialization of the five-branch tree includes 6 steps, which are described in detail as follows.
[0058] Step A: Sort the files. Assuming that a file is a set of keywords, for n files to be stored in the five-branch tree, this step sorts each file from 0 to n-1.
[0059] Step B: Put the file into the leaf node of the five-branch tree. Build a five-branch tree with more than n leaves, and put the file in step A and the keyword identifying the file into the n leaf nodes of the five-branch tree respectively, that is, each leaf node stores a file and a keyword identifying the file.
[0060] Step C: Fill the parent node according to the keywords in the leaf node. According to the definition of the single keyword five-branch tree, the elements in any non-leaf node are equal to the union of the set of elements in the left subtree and the set of nodes in the right subtree. For example Figure 3 Two files in 4 and l 5 , l 4 Contains a keyword {v}, l 5 Contains two keywords {w,v}, puts these two files into two leaf nodes of the five-branch tree, and the parent node of these two leaf nodes is N 3 The keywords in are {w,v}, that is, the union of the keyword sets in the two leaf nodes {v}∪{w,v}.
[0061] Step D, save the node. After all nodes are filled according to the operation of step C, the non-empty five-branch tree node information is retained. There is no keyword information in the empty node, and the empty node is discarded (the empty node has no path value, so if it is an empty node, it will not be accessed, that is, it is directly discarded).
[0062] Step E: Calculate and save the branches of the node. A five-branch tree is a collection of multiple single-keyword five-branch trees. This step calculates the branches of each single-keyword five-branch tree. The node in step D contains multiple keywords. Figure 3 Then, the three branches (B3, B4, B5) of each single keyword node are calculated and saved. Finally, each node can be represented as a triple (w, p, R), in which the leaf node also includes the separated files.
[0063] Step F, encrypt the five-branch tree. In the present invention, the read and write data interface provided by the oblivious random access machine is used to encrypt and store the nodes (w, p) and branch information (R) of the five-branch tree in the cloud. Assuming that ORAM is an oblivious random access machine, it provides an oblivious data read interface ORAM.read(a), which means remote and private reading of the data stored at address a in array A in the cloud, and the value is A[a]; it also provides an oblivious data write interface ORAM.write(a,data), which means remote and private writing of the data stored at address a in array A in the cloud, and the content is data, that is, the triple (w,p,R) in step E. Neither the read nor the write operation generates access pattern privacy leakage. For any (L,w)-tree node, the user calls the oblivious random access machine access interface, and writes the data remotely and privately to the cloud through ORAM.write(w||p,R), where || refers to the connection symbol of the string. For a B5tree, the above method is used to store all (L,w)-trees in the cloud.
[0064] 3. Join query on five-branch tree
[0065] The connection query described in the present invention refers to a query containing multiple keywords. A u-dimensional connection query containing u keywords is represented by Φ=(w 1 ∧w 2 ∧…∧w u ). A node that meets the connection query condition means that the node includes all u keywords in the connection query. The connection query algorithm Search(T,Φ,D) on the five-branch tree proposed in the present invention is specifically described as follows, where D represents a tree node in a single-keyword five-branch tree ((L,w)-tree)T, and the three branches (B3, B4, B5) of the node D of the (L,w)-tree are represented by (D w .left,D w .right,D w .mid) where D w .left represents the B3 pointer of node D of the (L,w)-tree, which points to the nearest connection point or leaf node on the left. w .right represents the B4 pointer of node D of the (L,w)-tree, which points to the nearest connection point or leaf node on the right. w .mid indicates the B5 pointer of node D in the (L,w)-tree of node D, which points to the farthest full level below node D, and D.level indicates the current level of node D. Φ .mid indicates the nearest full layer in the connection query Φ below node D, that is, D Φ .mid=min w∈Φ {D w .mid}, D Φ .left indicates the longest left branch (i.e., B3 pointer) in the inner join query Φ of node D, i.e., D Φ .left=longest w∈Φ {D w .left}, D Φ .right means that the inner join query of node D finds the longest right branch (i.e., pointer B4), i.e., D Φ .right=longest w∈Φ {D w .right}. To read the branch data in any tree node, the random access machine interface is used to protect the user's privacy data. Figure 5 As shown, Search(T,Φ,D) can be described as follows:
[0066] Step A, search for a node, if this node meets the connection query conditions, then output this node. According to the input multi-keyword five-branch tree T and a connection query Φ, start the connection query from node D (default is the root node). Determine whether the bottom layer of the single keyword five-branch tree composed of each keyword in node D is a full layer of the keyword. If the bottom layer is a full layer of the keyword (that is, the height of the tree L), that is, B5 points to the bottom layer, it means that all files contain the keyword. Directly remove the keyword from the connection query Φ to obtain a simplified connection query without continuing to search for the keyword downward. Continue to perform the above judgment and removal on the next keyword in the simplified connection query Φ. If all the keywords in the connection query Φ have been removed (indicating that each file meets the conditions of the connection query), then directly output node D as the final result. In the above case, all the keywords in the connection query Φ are removed, so the connection query condition can be regarded as empty. If the connection query condition is not empty after traversing all the keywords, then continue to judge whether node D is a leaf node. If D is a leaf node and meets the conditions of the current connection query (that is, the leaf node contains all the keywords in the connection query), then output the current node D as the result.
[0067] Step B: If step A does not obtain a node D that meets the query conditions, then jump to the multi-keyword full layer closest to node D for connection query, and recursively call this connection query algorithm for all nodes in the full layer. The details are as follows: If node D does not meet the conditions in step A and is not output as a result, then determine whether there is a multi-keyword full layer closest to node D. If the above determination is met (i.e., D Φ .mid is not empty), jump to the nearest full layer, and recursively call this connection query algorithm to search all nodes in the full layer, that is, execute Search(T,Φ,d), where d is a node in the nearest full layer. Otherwise, execute steps C and D.
[0068] Step C: Jump to the node pointed to by the pointer of the long branch B3 on the farthest left of node D in the connection query, and recursively call this connection query algorithm to search. That is, execute Search(T,Φ,D Φ .left).
[0069] Step D: Jump to the node pointed to by the long branch B4 pointer on the farthest right side of node D in the connection query, and recursively call this connection query algorithm to search. That is, execute Search(T,Φ,D Φ .right).
[0070] by Figure 3 Take the five-branch tree in as an example to perform a connection query Φ=(w∧v), and the specific steps are described as follows.
[0071] Step A: From the root node N1 Start executing the join query algorithm. Determine whether the bottom layer of the (L,w)-tree composed of keyword w is full. Figure 3 It can be seen that the bottom layer does not meet the definition of a full layer, the connection query is not simplified, D is not a leaf node, and step B continues.
[0072] Step B: Find the multi-keyword full layer closest to the root node. The full layers of the two (L, w)-trees are the first and second layers. The full layer closest to the root node is the second layer. Start the connection query from the two nodes in the second layer. 2 Start recursively executing the join query algorithm, that is, executing Search(T,Φ,N 2 ), the conditions of the previous steps are not met, and step C is executed.
[0073] Step C: N 2 Recursively execute the connection query algorithm on the node pointed to by the longest left branch in all (L,w)-trees. Figure 3 Medium 2 The left long branch in the (L,w)-tree formed by keyword w points to the leaf node l 0 , and the left long branch in the (L,w)-tree formed by keyword v is empty, so for leaf node l 0 Execute Search(T,Φ,l 0 ), does not meet the connection query conditions, then continue to 2 The node executes step D.
[0074] Step D: Continue to N 2 Recursively execute the connection query algorithm for the node pointed to by the longest right long branch in all (L, w)-trees, that is, for the leaf node l 2 Execute Search(T,Φ,l 2 ), query to satisfy the condition and set the leaf node l 2 Output as the result. Return and continue to query the second node in the full layer in the same way, and finally query two leaf nodes l 2 and l 5 As the final output.
[0075] The present invention effectively solves the problems of data query redundancy and time-consuming query, which is specifically reflected in the long branches of the five-branch tree, which can support fast jump connection query. In addition, any access path and keyword information are effectively encrypted during the query process, which better protects the privacy of user data.
Claims
1. A method for constructing and querying a dense database index based on a five-branch tree, characterized in that include: Step 1. construct a five-branch tree structure; Step 2. initialize the five-branch tree; Step 3. perform a connection query on the five-branch tree; wherein constructing the five-branch tree includes constructing five-branch tree nodes and branches of the nodes, and the five-branch tree includes a single-keyword five-branch tree and a multi-keyword five-branch tree; A single-keyword five-branch tree is a full binary tree, where any non-leaf node has two child nodes. Assuming w is a keyword, a single-keyword five-branch tree of height L containing the keyword is represented by (L, w)-tree, which satisfies the following conditions: 1) Each of its tree nodes can hold at most one keyword, called an element; 2) Each tree node is either empty or contains the keyword w; 3) The elements of any of its non-leaf nodes are equal to the union of the set of elements of the left subtree and the set of nodes of the right subtree; 4) Any tree node has five branches, represented by B1, B2, B3, B4, and B5 respectively; 5) For any non-leaf node, its B1 and B2 point to the left child node and right child node of the full binary tree of this node respectively; For a leaf node, its B1 and B2 are empty; 6) For any non-leaf node, B3 and B4 point to the nearest "connection point" on the left and the nearest "connection point" on the right of the full binary tree below the node, respectively. A connection point refers to a tree node with two non-empty children. If there is no nearest connection point on the left or the nearest connection point on the right, then B3 and B4 point to the non-empty leaf node of the left subtree and the non-empty leaf node of the right subtree, respectively. For any leaf node, B3 and B4 are empty; 7) If the left child of a node is empty, then B3 of this node is empty; if the right child of a node is empty, then B4 of this node is empty; 8) For any non-leaf node, B5 points to the farthest full layer below the non-leaf node. The definition of a full layer is as follows: in a layer of a single-keyword five-branch tree, if all nodes are non-empty, then this layer is a full layer. For any leaf node, the B5 pointer is empty; Initializing the five-branch tree includes: Step A, sorting files: Assuming that a file is a set of keywords, for n files to be stored in the five-branch tree, this step sorts each file from 0 to n-1; Step B, putting the file into the leaf node of the five-branch tree: construct a five-branch tree with a leaf number greater than n, and put the file in step A and the keyword identifying the file into the n leaf nodes of the five-branch tree respectively; Step C, fill the parent node according to the keywords in the leaf node: According to the definition of the single keyword five-branch tree, the elements in any non-leaf node are equal to the union of the set of elements of the left subtree and the set of nodes of the right subtree; Step D, save nodes: after filling all nodes according to the operation of step C, retain the non-empty five-branch tree node information; Step E, calculate and save the branches of the node: separate the branches of the multi-keyword five-branch tree into multiple single-keyword five-branch trees according to the keywords, and then calculate and save the three branches (B3, B4, B5) of each single-keyword node respectively. Finally, each node is represented as a triple (w, p, R), in which the leaf node also includes the separated file; Step F, encrypting the five-branch tree: using the read-write data interface provided by the oblivious random access machine to encrypt the nodes (w, p) and branch information (R) of the five-branch tree and store them in the cloud; The join query on the five-branch tree refers to a query containing multiple keywords. The u-dimensional join query containing u keywords is represented as Φ = (w1∧w2∧…∧w u ), let D represent a tree node in a single keyword five-branch tree ((L,w)-tree) T, the join query algorithm Search(T,Φ,D) on the five-branch tree includes: Step A. Search for a node. If the node meets the connection query condition, output the node: according to the input multi-keyword five-branch tree T and a connection query Φ, start the connection query from the node D which is the default root node, and judge whether the bottom layer of the single-keyword five-branch tree composed of each keyword in node D is a full layer of the keyword. If the bottom layer is a full layer of the keyword, directly remove the keyword from the connection query Φ to obtain a simplified connection query Φ, and continue to perform the above judgment and removal on the next keyword in the simplified connection query Φ. If all the keywords in the connection query Φ have been removed, directly output the node D as the final result. In the above case, all the keywords in the connection query Φ are removed, so it can be regarded as the connection query condition is empty; if the connection query condition is not empty after traversing all the keywords, continue to judge whether node D is a leaf node. If D is a leaf node and meets the conditions of the current connection query, output the current node D as the result; Step B: If step A does not obtain a node D that meets the query condition, then jump to the multi-keyword full layer closest to node D for connection query, and recursively call this connection query algorithm for all nodes in the full layer, including: if node D does not meet the situation in step A and is not output as a result, then determine whether there is a multi-keyword full layer closest to node D. If the above determination is met, jump to the nearest full layer, and recursively call this connection query algorithm to search for all nodes in the full layer, that is, execute Search(T,Φ,d), where d is a node in the nearest full layer, otherwise execute steps C and D; Step C: Jump to the node pointed to by the pointer of the long branch B3 on the left farthest from node D in the connection query, and recursively call this connection query algorithm to search, that is, execute Search(T,Φ,D Φ .left); Step D: Jump to the node pointed to by the long branch B4 pointer on the farthest right side of node D in the connection query, and recursively call this connection query algorithm to search, that is, execute Search(T,Φ,D Φ .right).
2. The method for constructing and querying a dense database index based on a five-branch tree according to claim 1, characterized in that: A multi-keyword five-branch tree refers to the union of a set of single-keyword five-branch trees with the same height but different keywords.
Citation Information
Patent Citations
Method for constructing encrypted reverse rectangular tree and spatial keyword query method
CN111597582A
Verifiable multi-keyword ciphertext query method and system based on security index
CN112446041A