An efficient privacy preserving semantic search method
By combining the semantic vector generated by the LDA model with the BCI tree index, the problems of low efficiency in searching encrypted data and neglect of semantic associations in cloud computing are solved, efficient and accurate multi-keyword search is achieved, and data privacy is protected.
Patent Information
- Application Number
- CN202411859194.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Existing privacy protection methods make it difficult to achieve efficient encrypted data search in cloud computing. Traditional searchable encryption schemes only support exact keyword matching and ignore the semantic association between keywords and documents, resulting in unsatisfactory search results and high storage space requirements.
The LDA model is used to generate vectors containing semantic information, and the BCI tree index is constructed by combining the divisive hierarchical clustering algorithm. Semantic-aware search is performed through the depth-first recursive search algorithm, and searchable encryption is used to protect data privacy.
It improves the semantic accuracy and efficiency of search results, reduces user search delays, and enables efficient privacy-preserving semantic search.
Smart Images

Figure CN119760774B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information security and privacy protection, and relates to an efficient privacy-preserving semantic search method. Background Art
[0002] Today, cloud computing has become crucial for providing economical alternatives and adaptability to efficient storage environments. By providing dynamic, easily scalable, and virtualized resources (storage, computing, etc.), cloud computing allows data owners to easily outsource their data and deploy it in the cloud without worrying about capacity, maintenance, or storage space, thus saving costs. However, data outsourcing can lead to privacy leaks, as cloud servers may maliciously steal or illegally obtain valuable information from outsourced data. With the widespread adoption of outsourced cloud services, the demand for secure and efficient search of encrypted data continues to increase. Effective search operations for timely retrieval and analysis of information have become crucial. To protect data privacy, a simple and straightforward approach is to encrypt the data before outsourcing it to the cloud. However, encrypted data is difficult to search and use, severely reducing data usability. Providing searchability and privacy protection for outsourced data is a challenge, thus developing a privacy-preserving search solution is crucial.
[0003] To address this issue and enable users to search in encrypted data without decrypting the entire dataset, searchable encryption technology enables users to use indexes under ciphertext to perform keyword searches. Searchable encryption can be divided into symmetric searchable encryption (SSE) and asymmetric searchable encryption (ASE), which performs data matching under ciphertext data by building secure indexes and query trapdoors. However, most searchable encryption schemes only support exact matches in the context of keyword searches. Symmetric searchable encryption (SSE) schemes involve three different entities: the data owner, the data user, and the cloud server, and the data owner and the user share the same key. The data owner encrypts its own document collection and uploads the encrypted collection to a third-party server so that only legitimate users who hold the key can retrieve documents based on a given keyword.
[0004] Many existing privacy protection methods, such as single-keyword search method and multi-keyword search method, mostly use the vector space model based on term frequency-inverse document frequency (TF-IDF) model to generate vectors to represent documents and search keywords, and these vectors are encrypted by a vector encryption method based on a random reversible matrix to protect privacy. But the TF-IDF model uses quantitative frequency statistics to measure the importance of keywords to the document set, but rarely considers the semantic association between keywords and documents, which may lead to unsatisfactory results returned to the user. At the same time, due to the huge number of keywords extracted from the entire document, the vector generated by using the TF-IDF model may have extremely high dimension and sparsity, which will consume a lot of storage space and search time. SUMMARY
[0005] Therefore, the purpose of the present application is to provide an efficient privacy protection semantic search method that protects the privacy of entity data by searchable encryption and fully integrates the advantages of edge and cloud to reduce user search delay. The LDA model is used to generate vectors of documents and query keywords, and the vectors contain semantic information based on topics. Homomorphic encryption of vectors is used to perform privacy-protected semantic relevance score calculation between query keywords and documents. At the same time, a binary clustering tree index is constructed by using a hierarchical clustering algorithm, and a depth-first recursive search algorithm is used to implement efficient search processing by using the BCI tree index. The present application improves the semantic accuracy of search results and search time cost.
[0006] To achieve the above purpose, the present application provides the following technical solutions:
[0007] An efficient privacy protection semantic search method comprises the following steps:
[0008] S1: System initialization is performed, and a user registers with an authorization center, and the authorization center distributes keys to the user;
[0009] S2: A data owner uploads collected data to a local edge server to perform data preprocessing, including LDA model training, threshold reference matrix generation, and data encryption and uploading to cloud storage;
[0010] S3: A maximum vector is used to construct a binary tree as an index structure for efficient search processing by using a hierarchical clustering algorithm;
[0011] S4: During the semantic-aware search process, when a data user starts searching for multiple query keywords, the query request is first uploaded to the local edge server. The edge server generates a trapdoor using the query keywords and then sends the trapdoor as a search request to the cloud server. After receiving the search trapdoor, the cloud server uses the encrypted index to perform a semantic-aware search and returns k encrypted data as the result to the edge server. When the edge server receives the encrypted search results, it decrypts them with the key and returns the plaintext results to the user.
[0012] Furthermore, step S1 includes the following steps:
[0013] S11: System initialization: Take the security parameter k as input and output the key K = {S, M1, M2, K f} and system parameters s, where s∈Z q It is used for user registration authorization, S is an m-bit random vector, M1, M2 are two random m×m reversible matrices, K f is the key used to encrypt the document;
[0014] S12: User registration: The authorization center uses the identity information sent by the user and S to generate the user authorization certificate Ac i =(id ui ,H1(id ui )) and send it to the edge server authorized user list list, thereby adding a new authorized user u i , where H1(id ui )∈Z q , H1:{0,1} * →Z q .
[0015] Furthermore, step S2 includes the following steps:
[0016] S21: LDA model training: The data owner uploads the data to the local edge server for data preprocessing. With F as input, the edge server uses the LDA model for training and processing to generate the document data-topic correlation matrix Γ, the keyword-topic correlation matrix Ψ, and calculate the topic probability vector and keyword probability vector P W =P T ·Ψ T ;
[0017] S22: Threshold reference matrix generation (TR-matrix): Executed by the edge server, the threshold reference matrix is denoted as G, which is an h×l dimensional matrix, where h is the number of keywords in the dictionary, l is the reference depth parameter, and k<l<n; the matrix G[i][j] records the keyword w iThe noise-confused relevance scores between the documents in F; the data stored in each row of G are sorted in descending order, that is:
[0018]
[0019] A search threshold τ is set. During the search process, any subtree whose inner product between the root node vector and the search trapdoor vector is less than τ is directly filtered out and no further search is performed. A threshold reference matrix is introduced to optimize the filter threshold setting in the search process.
[0020] S23: Document encryption: The edge server uses K to generate the key K f , encrypt F's document through AES symmetric encryption; then generate Encrypted documents are transmitted to cloud servers for data outsourcing storage.
[0021] Furthermore, the step S21 specifically includes:
[0022] S211: Taking the document of F as input, the edge server uses the LDA model for training and processing to generate the document-topic correlation matrix Γ and the keyword-topic correlation matrix Ψ:
[0023] S212: Edge server calculates topic probability vector There is a topic t in its i-th dimension storage F i The prior probability of t; assuming that the documents in F have the same importance, then t i The prior probability of F is the average probability that each document in F belongs to t i ;
[0024] S213: The edge server calculates the keyword probability vector P W =P T ·Ψ T , whose i-th dimension stores the keyword w present in F i The prior probability of
[0025] S214: The edge server generates K,Ψ,P T ,P W Share with data users.
[0026] Furthermore, the step S22 specifically includes:
[0027] S221: For each w i ∈W, the edge server calculates a single keyword topic vector in Indicates w i The subject intention belongs to the subject t j The probability of w is calculated by the edge server iThe inner product list of , Recorded w i The semantic relevance score between and each document in F; then, the edge server will Sort in descending order and copy the first l values to row i;
[0028] S222: The edge server copies all items of G to the temporary list L t Then, in descending order, t Sort; the edge server calculates L t The gap between every two adjacent items in the equation is used to obtain the noise parameter σ with the minimum value in the gap, i.e. σ=min{L t [i]-L t [i+1]|i∈{1,2,...,h×l-1}};
[0029] S223: For each item G[i][j]∈G, the edge server sets G[i][j]=G[i][j]-rand(0,σ), where rand(0,σ) is a random value between 0 and σ. At this point, the TR matrix G has been established and sent to the data user to preset the appropriate pruning threshold when starting the search.
[0030] Each value stored in G is the semantic relevance score between the beginning keyword and the document. Each value in G is subtracted from the noise value generated by rand(0,σ). After adding noise, the order of the values in G remains unchanged.
[0031] Furthermore, step S3 specifically includes the following steps:
[0032] S31: Calculate the maximization vector: Let H be a set of m-dimensional vectors. The maximization vector of H is expressed as an m-dimensional vector MaxVec(H). The calculation formula of MaxVec(H) for the i-th dimension is as follows:
[0033] MaxVec(H)[i]=max{V j [i]|V j ∈H}
[0034] Among them, max{*} is the maximum value of the set;
[0035] S32: Construct BCI tree: BCI tree is used as an index for efficient search processing, and is a binary tree constructed by a hierarchical clustering algorithm. BCI tree is used as a search index, denoted as Ι, where each node e=<id,lp,rp,vector> is represented by a four-element tuple, where id represents identity, lp and rp point to the left and right child nodes of e respectively, and vector is an m-dimensional vector. If e is a leaf node, then e represents a document. Assume that the corresponding document is f i , e is set to e.id=i and e.vector=Γ[i], where e.id=i represents f i identity; if e is not a leaf node, then e.lp and e.rp point to the left and right child nodes of e respectively. e.vector is the maximized vector of e.lp and e.rp, where e.vector = MaxVec({e.lp.vector, e.rp.vector}); In step S32, given a BCI tree denoted as I, an m-dimensional vector V, and a parameter τ, if the inner product between V and the root node vector of I is less than τ, then the inner product between V and any node vector I must be less than τ:
[0036]
[0037] The specific steps include:
[0038] S321: C is a document topic vector set representing a group of corresponding documents, and a new BCI tree node u is created;
[0039] S322: If |C|>1, u.vector=MaxVec(C), then run the separable hierarchical clustering algorithm with C as input, and output subclusters C1 and C2, u.lp=GenBCI(C1), u.rp=GenBCI(C2); if |C|=1, that is, the only document topic vector in C is Γ[i], corresponding to document f i , then u.id=i,u.vector=Γ[i],
[0040] S33: Index construction: The edge server takes the document topic vector of Γ={Γ[1],Γ[2],...,Γ[n]} as input, and uses the divisive hierarchical clustering algorithm to build a plaintext BCI tree index I. Then, the index is encrypted with the key K and uploaded to the cloud for storage.
[0041] Furthermore, the step S33 specifically includes the following steps:
[0042] S331: Taking the document topic vector Γ as input, the edge server constructs a plaintext BCI tree index I through step S322;
[0043] S332: For each node in I, the edge server splits the vector V stored in the node into two random vectors V' and V", according to the m-bit random vector S in the key K. The specific splitting rules are as follows:
[0044]
[0045] Then, the random reversible matrices M1 and M2 in the key K are used to encrypt {V', V"} respectively as The encryption process is as follows:
[0046]
[0047] When the vectors of all nodes in I are processed, an encrypted index is generated. It is then transmitted to the cloud server as a privacy-preserving search index.
[0048] Furthermore, step S4 specifically includes the following steps:
[0049] S41: Trapdoor generation: Assume that the search trapdoor is where w ep It is the eth in D p Keywords, the search results are k documents with the highest semantic relevance scores between k trapdoors Q and the index. The data user first sends a query request to the edge server, and the edge server verifies the legitimacy of the user. If the user is authorized, the query request is used to generate a query topic vector V Q , and then use the key K to convert V Q Encryption as a trapdoor Otherwise, reject the user's search request;
[0050] S42: Search threshold preset: At the beginning of the search, the edge server presets the initial value of the search threshold τ. With the TR matrix G, the number of requested documents k, and the search keyword as input, the initial value of τ is calculated as follows:
[0051]
[0052] Subsequently, the edge server transmits the search trapdoor and the preset τ' to the cloud server, and the cloud server uses the preset τ' to perform data search and matching;
[0053] S43: Semantic Search: Cloud Server Receives Search Trapdoor After that, the subtrees that do not meet the requirements are filtered out by the filtering method based on the search threshold; the search threshold τ is used as a parameter to filter out subtrees that do not meet the conditions in the search process of the BCI tree index. Subtrees that do not meet the conditions refer to subtrees that absolutely do not contain any search results in their leaf nodes; in the process of setting the τ value, given a trapdoor For the top-k search keyword set Q, when traversing the leaf nodes, the search threshold τ is set according to the following formula:
[0054]
[0055] Where L is a list of leaf nodes that have been traversed and satisfies:
[0056]
[0057] S44: Finally, the cloud server returns the search result R to the edge server, which decrypts the result with the key and returns it to the user.
[0058] Furthermore, the detailed steps of generating the trapdoor in step S41 are as follows:
[0059] S411: Data user generates query topic vector V Q ,in is the Hadamard product operator; V Q is an m-dimensional vector representing the probability that the topic intent of search Q belongs to the topic of T:
[0060]
[0061] S412: The data user converts the vector V Q Divide into two random vectors {V Q ',V Q ”}, where the n-bit random vector S in K has the following segmentation rules:
[0062]
[0063] S413: The data user uses the random inverse matrices M1 and M2 in K to convert V into Q ={V Q ',V Q ”} encrypted as
[0064]
[0065] Generated encrypted query subject vector That is, the search trap is sent to the cloud server;
[0066] Stored in the BCI tree and trapdoor The vector in the node, whose plaintext vector is V i and V Q ,have That is, the inner product between the vector stored in the node of the BCI tree index and the trapdoor is equal to the inner product between the corresponding plaintext vectors.
[0067] Furthermore, in step S43, if the number of leaf nodes traversed |L| is less than the number of documents requested k, τ is the initial value τ'; otherwise, τ is set to the lower bound or minimum value of the first k inner products between the trapdoor vector and the encrypted document vectors in the traversed leaf nodes; the set C contains the k leaf nodes corresponding to the first k inner products, and the documents in the leaf nodes of C are the candidate search results; through a trapdoor Traversing the BCI tree index When obtaining the search results for node u, if If the condition holds, then the document in the leaf node of the child node with u as the root is not in the search results; in the search process, when traversing and checking a node of the BCI tree index, if the inner product of the trapdoor vector and the vector within the node is less than the search threshold τ, then the node of the subtree with the node as the root of the document corresponding to the leaf is definitely not in the search results. This subtree is called an unqualified subtree and is directly filtered out;
[0068] In step S43, a multi-keyword search is performed by using a recursive depth-first algorithm DepthFirstSearch through the BCI tree index. The search threshold τ is used to filter out subtrees that do not meet the requirements and speed up the search process. It is initially initialized to 0. As more leaf nodes are traversed, τ gradually increases, the pruning effect of subtrees that do not meet the requirements becomes better, and the search process speed is accelerated.
[0069] make is the BCI tree index, is the search trap, k is the number of requests, τ is the search threshold, and the leaf node set Search results Run a recursive depth-first algorithm in express The root node; for each leaf node u∈NS, get the encrypted document according to the identity u.id, and then add it to R. If it satisfies And u is not a leaf node, then execute and If u is a leaf node, add u to NS. If |NS|>k, delete the node from NS. The leaf node with the lowest semantic relevance score, if |NS|=k, then
[0070] The beneficial effects of the present invention are: the efficient privacy-preserving semantic search method proposed in the present invention utilizes searchable encryption to protect the privacy of entity data and fully integrates the advantages of edge and cloud to reduce user search delays. Vectors of documents and query keywords are generated through the LDA model. The vectors contain topic-based semantic information and are used to perform privacy-preserving semantic relevance score calculations between the query keywords and documents. At the same time, a BCI tree index is constructed through a split hierarchical clustering algorithm, and the BCI tree index is used to perform a depth-first recursive search algorithm to achieve efficient search processing. The present invention protects the privacy of outsourced data while improving the semantic accuracy and search time cost of search results by implementing a cloud server to return a list of k documents as search results, where k documents have the highest semantic relevance score with Q, thereby achieving efficient and accurate semantic-aware multi-keyword search.
[0071] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:
[0073] Figure 1 System model diagram for efficient privacy-preserving semantic search method;
[0074] Figure 2 Schematic diagram of the BCI tree index construction method designed for the present invention;
[0075] Figure 3 Flowchart of the efficient privacy-preserving semantic search method designed for the present invention. DETAILED DESCRIPTION
[0076] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0077] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.
[0078] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.
[0079] like Figure 1 The diagram shows a system model for an efficient privacy-preserving semantic search method. The system model consists of five entities: an authorization center, data owners, data users, edge servers, and cloud servers. Search processing is performed through cloud-edge collaboration. Data owners upload data to a local edge server, which encrypts the uploaded data using a symmetric encryption algorithm and outsources it, along with the encrypted index, to a cloud server. The cloud server provides storage for the encrypted documents and indexes outsourced by the data owner. Data users registered with the authorization center send query requests to the edge server, which verifies the user's legitimacy. If the user is registered, the query is processed, a corresponding query trap is generated, and sent to the cloud for search matching. When a data user uses multiple query keywords, the k most semantically relevant encrypted documents are searched by matching against the stored encrypted index. The k encrypted documents are then sent as search results to the edge server, which decrypts the ciphertext data into plaintext and returns the results to the user. Furthermore, the search data returned by the cloud is cached on the local edge server for the next request to improve response efficiency.
[0080] The present invention provides an efficient privacy-preserving semantic search method, comprising the following steps:
[0081] S1: Execute system initialization, the user registers with the authorization center, and the authorization center distributes the key to the user;
[0082] S2: The data owner uploads the collected data to the local edge server for data preprocessing. The main process includes LDA model training, threshold reference matrix generation, and data encryption and upload to cloud storage.
[0083] S3: Using the maximized vector, a binary tree is constructed through a hierarchical clustering algorithm as an index structure for efficient search processing;
[0084] S4: In the semantic-aware search process, when the data user starts searching for multiple query keywords, first upload the query request to the local edge server, and the edge server generates a trapdoor using the query keyword, and then sends the trapdoor to the cloud server as a search request. After the cloud server receives the search trapdoor, it performs semantic-aware search using the encrypted index and returns k encrypted data to the edge server as the result. When the edge server receives the encrypted search result, it decrypts it with the key and returns the plaintext result to the user. Semantic-aware search has two key steps, trapdoor generation algorithm and search algorithm, the former generates the trapdoor corresponding to the search of multiple query keywords, and the latter performs privacy-protected search processing by calling the depth-first search algorithm;
[0085] The step S1 comprises the following steps:
[0086] S11: System initialization: (K, s) <- GenKey(1 k ) algorithm is called by the authorized center. Specifically, the security parameter k is taken as the input, and the key K = {S, M1, M2, K f} and the system parameter s are output, wherein s∈Z q is used for the registration authorization of the user. Wherein S is an m-bit random vector, M1 and M2 are two random m*m invertible matrices, and K f is the key used for encrypting the document.
[0087] S12: User registration: The algorithm is executed by the authorized center to add a new authorized user u i . The authorized center generates the user authorization credential using the identity information sent by the user and S, and sends it to the edge server authorization user list list, wherein H1:{0,1} * →Z q .
[0088] The step S2 comprises the following steps:
[0089] S21: LDA model training: {Γ, Ψ, P T , P W} <- LDA Train(F) algorithm takes F as input, and the edge server uses LDA model for training processing to generate document data-topic correlation matrix Γ, keyword-topic correlation matrix Ψ, and calculate topic probability vector and keyword probability vector P W = P T ·Ψ T .
[0090] (1) Taking the document of F as input, the edge server uses the LDA model for training and processing to generate the document-topic correlation matrix Γ and the keyword-topic correlation matrix Ψ.
[0091] (2) The edge server calculates the topic probability vector There is a topic t in its i-th dimension storage F i Assuming that the documents in F have the same importance, then t i The prior probability of F is the average probability that each document in F belongs to t i .
[0092] (3) The edge server calculates the keyword probability vector P W =P T ·Ψ T , whose i-th dimension stores the keyword w present in F i The prior probability of .
[0093] (4) The edge server generates K,Ψ,P in the above steps. T ,P W Share with data users.
[0094] S22: Threshold reference matrix generation (TR-matrix): G←GenTRM(W,Γ,Ψ,P T ,P W ,L) algorithm is executed by the edge server. The threshold reference matrix is denoted as G, which is an h×l dimensional matrix, where h is the number of keywords in the dictionary, l is the reference depth parameter, and k<l<n. The matrix G[i][j] records the keyword w i The noise-confused relevance scores between the documents in F. The data stored in each row of G are sorted in descending order, i.e.
[0095]
[0096] During the search process, a search threshold τ can improve search efficiency. Any subtree whose inner product between the root node vector and the search trapdoor vector is less than τ is directly filtered out and no longer searched. The introduction of a threshold reference matrix optimizes the filter threshold setting during the search process.
[0097] (1) For each w i ∈W, the edge server calculates a single keyword topic vector in Indicates w i The subject intention belongs to the subject t j The probability of w is calculated by the edge server i The inner product list of , Recorded w iThe semantic relevance score between and each document in F. Then, the edge server will Sort in descending order and copy the first l values to row i.
[0098] (2) The edge server copies all items of G to the temporary list L t Then, in descending order, t Sorting. The edge server calculates L t The gap between every two adjacent items in the equation is used to obtain the noise parameter σ with the minimum value in the gap, i.e. σ=min{L t [i]-L t [i+1]|i∈{1,2,...,h×l-1}}.
[0099] (3) For each item G[i][j]∈G, the edge server sets G[i][j]=G[i][j]-rand(0,σ), where rand(0,σ) is a random value between 0 and σ. At this point, the TR matrix G has been established and sent to the data user to preset the appropriate pruning threshold when starting the search.
[0100] Each value stored in G represents the semantic relevance score between the initial keyword and the document. To hide the plaintext semantic relevance score, a noise value generated by rand(0,σ) is subtracted from each value in G. Because the randomly generated noise is positive and smaller than the minimum gap σ, the order of the values in G remains unchanged after adding the noise.
[0101] S23: Document encryption: The algorithm is generated by the edge server using K's key K f Encrypt F's document using AES symmetric encryption. Then encrypt the generated Encrypted documents are transmitted to cloud servers for data outsourcing storage.
[0102] Figure 2 The diagram shown is a schematic diagram of the construction of the BCI tree index recorded in step S3, which specifically includes:
[0103] S31: Maximizing Vectors: Let H be a set of m-dimensional vectors. The maximizing vector of H is expressed as an m-dimensional vector MaxVec(H). The formula for calculating the i-th dimension of MaxVec(H) is as follows:
[0104] MaxVec(H)[i]=max{V j [i]|V j ∈H}
[0105] Among them, max{*} is the maximum value of the set.
[0106] S32: Constructing BCI tree: BCI tree can be used as an index for efficient search processing. It is a binary tree constructed by a hierarchical clustering algorithm. This tree is used as a search index and is denoted as Ι. Each node e=<id,lp,rp,vector> in Ι is represented by a four-element tuple, where id represents the identity, lp and rp point to the left and right child nodes of e respectively, and vector is an m-dimensional vector. If e is a leaf node, then e represents a document. Assume that the corresponding document is f i .e is set to e.id=i and e.vector=Γ[i], where e.id=i represents f i If e is not a leaf node, then e.lp and e.rp point to the left and right child nodes of e respectively. e.vector is the maximized vector of e.lp and e.rp, where e.vector = MaxVec({e.lp.vector, e.rp.vector}).
[0107] Given a BCI tree denoted by I, an m-dimensional vector V and a parameter τ, if the inner product between V and the root node vector of I is less than τ, then the inner product between V and any node vector I must be less than τ:
[0108]
[0109] S321: C is a document topic vector set representing a group of corresponding documents, and a new BCI tree node u is created;
[0110] S322: If |C|>1, u.vector=MaxVec(C), then run the separable hierarchical clustering algorithm with C as input, and output subclusters C1 and C2, u.lp=GenBCI(C1), u.rp=GenBCI(C2); if |C|=1, that is, the only document topic vector in C is Γ[i], corresponding to document f i , then u.id=i,u.vector=Γ[i],
[0111] S33: Build a BCI tree index: The algorithm uses a key to construct a ciphertext index for storage. The edge server takes the document topic vector Γ = {Γ[1], Γ[2], ..., Γ[n]} as input and uses the divisive hierarchical clustering algorithm to construct a plaintext BCI tree index I. The index is then encrypted using the key K. The specific steps include:
[0112] S331: Taking the document topic vector Γ as input, the edge server constructs the plaintext BCI tree index I through step S22.
[0113] S332: For each node in I, the edge server splits the vector V stored in the node into two random vectors V' and V", according to the m-bit random vector S in the key K. The specific splitting rules are as follows:
[0114]
[0115] Then, the random reversible matrices M1 and M2 in the key K are used to encrypt {V', V"} respectively as The encryption process is as follows:
[0116]
[0117] When the vectors of all nodes in I are processed, an encrypted index is generated. It is then transmitted to the cloud server as a privacy-preserving search index.
[0118] Figure 3 The figure shows the efficient privacy-preserving semantic search method process recorded in step S4, which includes the following steps:
[0119] S41: Execute system initialization. The authorization center authorizes each registered user. The data owner uploads the data to the local edge server for data preprocessing. The edge server encrypts the data using the key, generates an encrypted index, and uploads it to the cloud for storage.
[0120] S42: Trapdoor Generation: The algorithm generates multiple trapdoors corresponding to the query keywords. Assume that the search trapdoor is where w ep It is the eth in D p Keywords, the search results are k documents with the highest semantic relevance scores between k trapdoors Q and the index. The data user first sends a query request to the edge server, and the edge server verifies the legitimacy of the user. If the user is authorized, the query request is used to generate a query topic vector V Q , and then use the key K to convert V Q Encryption as a trapdoor Otherwise, the user's search request is rejected.
[0121] The detailed steps for trapdoor generation are as follows:
[0122] (1) The edge server generates the query subject vector V Q ,in is the Hadamard product operator. V Q is an m-dimensional vector that represents the probability that the topic intent of search Q belongs to the topic of T.
[0123]
[0124] (2) The edge server converts the vector V Q Divide into two random vectors {V Q ',V Q ”}, where n-bit random vector S in K. The segmentation rule is as follows:
[0125]
[0126] (3) The edge server uses the random inverse matrices M1 and M2 in K to convert V into Q ={V Q ',V Q ”} encrypted as
[0127]
[0128] Generated encrypted query subject vector That is, the search trap is sent to the cloud server.
[0129] As known from the above steps of generating BCI tree nodes and trapdoor encryption vectors, the encryption vectors stored in the BCI tree are and trapdoor The vector in the node, whose plaintext vector is V i and V Q ,have That is, the inner product between the vector stored in the node of the BCI tree index and the trapdoor is equal to the inner product between the corresponding plaintext vectors. In this way, the cloud server can perform secure calculations even without knowing the plaintext information of the vector.
[0130] S43: Search threshold preset: τ'←Preset(G,k,Q) algorithm is executed by the edge server, and the initial value of the search threshold τ is preset at the beginning of the search. Taking the TR matrix G, the number of requested documents k, and the search keyword as input, the initial value of τ is calculated as follows:
[0131]
[0132] Subsequently, the edge server transmits the search trapdoor and the preset τ' to the cloud server, and the cloud server uses the preset τ' to perform data search and matching.
[0133] S44: Perform semantic search of data: The algorithm is received by the cloud server to search for traps Then execute to efficiently obtain the search result R.
[0134] The subtrees that do not meet the requirements are filtered out by the filtering method based on the search threshold. The search threshold τ is a parameter used to filter out subtrees that do not meet the conditions in the search process of the BCI tree index. Subtrees that do not meet the conditions refer to subtrees that do not contain any search results in their leaf nodes. In the process of setting the τ value during the search process, given a trapdoor For the top-k search keyword set Q, when traversing the leaf nodes, the search threshold τ is set according to the following formula:
[0135]
[0136] Among them, L is a list of leaf nodes that have been traversed and satisfies
[0137]
[0138] If the number of leaf nodes traversed |L| is less than the number of documents requested k, then τ is the initial value τ'; otherwise, τ should be set to the lower bound (or minimum value) of the first k inner products between the trapdoor vector and the encrypted document vector in the traversed leaf nodes. The set C contains the k leaf nodes corresponding to the first k inner products, and the documents in the leaf nodes of C are the candidate search results. Through a trapdoor Traversing the BCI tree index When obtaining the search results for node u, if If the condition holds true, then the document in the leaf node of the child node, whose tree is rooted at u, is not in the search results. During the search process, when traversing and checking a node in the BCI tree index, if the inner product of the trapdoor vector and the vector within that node is less than the search threshold τ, then the node in the subtree rooted at that node, corresponding to the leaf document, is definitely not in the search results. Therefore, there is no need to check any nodes in the subtree; such subtrees are called ineligible subtrees. These ineligible subtrees can be directly filtered out to accelerate the search process.
[0139] This algorithm uses a recursive depth-first search algorithm (DepthFirstSearch) to perform multi-keyword searches using a BCI tree index. A search threshold, τ, is used to filter out subtrees that do not meet the search requirements, accelerating the search process. Initially, it is initialized to 0. As more leaf nodes are traversed, τ gradually increases, effectively pruning subtrees that do not meet the search requirements, accelerating the search process. Because the search threshold, τ, has a preset value, the subtree filtering mechanism takes effect even at the beginning of the search process, thereby improving search speed.
[0140] The search threshold τ is used to filter out subtrees that do not meet the requirements and speed up the search process. As more leaf nodes are traversed, τ gradually increases, the pruning effect of subtrees that do not meet the requirements is better, and the search processing speed is accelerated. If the number of traversed leaf nodes |L| is less than the number of requested documents k, then τ is the preset initial value τ'; otherwise, τ should be set to the minimum value of the first k inner products between the trapdoor vector and the encrypted document vector in the traversed leaf node. The set C contains the k leaf nodes corresponding to the first k inner products, and the documents in the leaf nodes of C are the candidate search results. Through a trapdoor Traversing the BCI tree index When obtaining the search results for node u, if If the condition holds true, then the document in the leaf node of the child node, whose tree is rooted at u, is not in the search results. During the search process, when traversing and checking a node in the BCI tree index, if the inner product of the trapdoor vector and the vector within that node is less than the search threshold τ, then the node of the subtree rooted at that node corresponding to the leaf document is definitely not in the search results. Therefore, there is no need to check any nodes in the subtree; subtrees that do not meet the conditions can be directly filtered out, accelerating the search process.
[0141] is the BCI tree index, is the search trap, k is the number of requests, τ is the search threshold, and the leaf node set Search results Run the algorithm in express The root node; for each leaf node u∈NS, get the encrypted document according to the identity u.id, and then add it to R. If it satisfies And u is not a leaf node, then execute and If u is a leaf node, add u to NS. If |NS|>k, delete the node from NS. The leaf node with the lowest semantic relevance score, if |NS|=k, then
[0142] S45: Finally, the cloud server returns the search result R to the edge server, which decrypts the result using the key and returns the plaintext result to the user.
[0143] In the above embodiments, references to "this embodiment" in the specification indicate that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least some embodiments, but not necessarily all embodiments. Multiple occurrences of "this embodiment" do not necessarily refer to the same embodiment.
[0144] In the above embodiments, although the invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory structures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed. The embodiments of the present invention are intended to encompass all such alternatives, modifications, and variations that fall within the broad scope of the appended claims.
[0145] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented.
[0146] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0147] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.
[0148] Regarding the computer-readable storage medium in this embodiment, those skilled in the art will appreciate that all or part of the steps in the aforementioned method embodiments can be implemented using hardware associated with the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps in the aforementioned method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0149] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used for communication, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes the various steps of the above method.
[0150] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0151] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0152] The present invention can be used in a wide variety of general-purpose or special-purpose computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above.
[0153] The present invention may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.
Claims
1. An efficient privacy-preserving semantic search method, characterized by: The following steps are involved: S1: Execute system initialization, the user registers with the authorization center, and the authorization center distributes the key to the user; step S1 includes the following steps: S11: System initialization: Set the security parameters As input, output key and system parameters ,in It is used for user registration authorization. yes m bit random vector, Two random Reversible matrix, is the key used to encrypt the document; S12: User registration: The authorization center uses the identity information sent by the user and Generate user authorization credentials , and send it to the edge server authorized user list , thereby adding a new authorized user ,in , ; S2: The data owner uploads the collected data to the local edge server for data preprocessing, including LDA model training, threshold reference matrix generation, and data encryption and upload to cloud storage; S3: Using the maximized vector, a binary tree is constructed through a hierarchical clustering algorithm as an index structure for efficient search processing; S4: In the semantic-aware search process, when a data user starts searching for multiple query keywords, the query request is first uploaded to the local edge server. The edge server generates a trapdoor using the query keywords and then sends the trapdoor as a search request to the cloud server. After receiving the search trap, the cloud server uses the encrypted index to perform semantic-aware search and returns it to the edge server. encrypted data as a result; When the edge server receives the encrypted search results, it decrypts them with the key and returns the plaintext results to the user.
2. The efficient privacy-preserving semantic search method according to claim 1, characterized in that: The step S2 comprises the following steps: S21: LDA model training: The data owner uploads the data to the local edge server for data preprocessing. As input, the edge server uses the LDA model for training and processing to generate the document data-topic correlation matrix , keyword-topic correlation matrix , and calculate the topic probability vector and keyword probability vector ; S22: Threshold reference matrix generation (TR-matrix): performed by the edge server, the threshold reference matrix is recorded as ,yes dimensional matrix, where is the number of keywords in the dictionary, is the reference depth parameter, and ;matrix Recorded keywords and Noise-obfuscated relevance scores between documents in ; The data stored in each row is sorted in descending order, that is: Setting the search threshold , during the search process, the inner product between any root node vector and the search trapdoor vector is less than The subtrees of are directly filtered and no further search is performed; a threshold reference matrix is introduced to optimize the filter threshold setting in the search process; S23: Document encryption: for edge servers Generate a key , encrypted with AES symmetric encryption The document is encrypted; then the generated Encrypted documents are transmitted to cloud servers for data outsourcing storage.
3. The efficient privacy-preserving semantic search method according to claim 2, characterized in that: The step S21 specifically includes: S211: The edge server uses the LDA model for training and processing to generate a document-topic correlation matrix. and keyword-topic relevance matrix : S212: Edge server calculates topic probability vector , the first Dimensional Storage Theme exists in The prior probability of have the same importance, then The prior probability of is the average of the probabilities, Each document belongs to ; S213: The edge server calculates the keyword probability vector , the first Dimensional Storage Keywords that exist in The prior probability of S214: The edge server generates Share with data users.
4. The efficient privacy-preserving semantic search method according to claim 2, characterized in that: The step S22 specifically includes: S221: For each , the edge server calculates a single keyword topic vector ,in express The subject intention belongs to the subject The probability of The inner product list of , , recorded and The semantic relevance score between each document in Sort in descending order and put the first Copy the value to OK; S222: The edge server will Copy all items to a temporary list Then sort by descending order Sorting; edge server computing The gap between every two adjacent items in , to obtain the noise parameter with the minimum value in the gap ,Right now ; S223: For each project , Edge Server Settings ,in Yes Get and Random values between ; at this time, the TR matrix It has been established and sent to data users to preset appropriate pruning thresholds when starting a search; Each value stored in is the semantic relevance score between the beginning keyword and the document. Each value in is subtracted Generated noise value, after adding noise The order of the values in remains unchanged.
5. The efficient privacy-preserving semantic search method according to claim 1, characterized in that: The step S3 specifically includes the following steps: S31: Calculate the maximum vector: Let is a group m dimensional vector, The maximization vector of m dimensional vector ; No. The dimension calculation formula is as follows: in, is the maximum value of the set; S32: Construct BCI tree: BCI tree is used as an index for efficient search processing, and is a binary tree constructed by a hierarchical clustering algorithm; BCI tree is used as a search index, denoted as , Each node Represented by a four-element tuple, where Indicate identity, Point to The left and right child nodes of yes -dimensional vector; if is a leaf node, then Represents a document; assuming the corresponding document is , The setting is and ,in express identity; if It is not a leaf node, then and Pointing to The left and right child nodes of , yes and The maximization vector of ; In step S32, a BCI tree is given as ,one dimensional vector and a parameter ,if and The inner product between the root node vectors is less than ,but The inner product between it and any node vector Must be less than : The specific steps include: S321: Is a document topic vector set representing a set of corresponding documents, creating a new BCI tree node ; S322: If satisfied , , then Run the separable hierarchical clustering algorithm for the input, and the output subclusters are and , If satisfied ,Right now The only document topic vector in , corresponding to the document ,but ; S33: Index building: Edge servers The document topic vector is used as input and the plaintext BCI tree index is constructed using the divisive hierarchical clustering algorithm. , then, using the key The index is encrypted and uploaded to the cloud for storage.
6. The efficient privacy-preserving semantic search method according to claim 5, characterized in that: The step S33 specifically includes the following steps: S331: Document topic vector As input, the edge server constructs the plaintext BCI tree index through step S322 ; S332: Yes For each node in the edge server, the key in Random vector of bits , the vector stored in the node Split into two random vectors and , the specific segmentation rules are as follows: Then use the key Random reversible matrices in and Will Encrypted as , the encryption process is as follows: when After processing the vectors of all nodes in the , an encrypted index is generated , and then transmitted to the cloud server as a privacy-preserving search index.
7. The efficient privacy-preserving semantic search method according to claim 1, characterized in that: The step S4 specifically comprises the following steps: S41: Trapdoor generation: Assume that the search trapdoor is ,in yes The Keywords, search results are Trapdoor The one with the highest semantic relevance score to the index The data user first sends a query request to the edge server, and the edge server verifies the legitimacy of the user. If the user is an authorized user, the query request is used to generate a query subject vector. , then use the key Will Encryption as a trapdoor , otherwise, reject the user's search request; S42: Search threshold preset: The edge server presets the search threshold at the beginning of the search The initial value of the TR matrix , Number of requested documents and search keywords as input, The initial value of is calculated as follows: The edge server will then search for trapdoors and preset Transmitted to the cloud server, the cloud server uses the preset To perform data search and matching; S43: Semantic Search: Cloud Server Receives Search Trapdoor Finally, the subtrees that do not meet the requirements are filtered out by filtering method based on search threshold; search threshold Parameters used to filter out ineligible subtrees in the search process of BCI tree index. ineligible subtrees are subtrees that absolutely do not contain any search results in their leaf nodes. During the value setting process, a trapdoor is given of Search keyword set , when traversing leaf nodes, set the search threshold according to the following formula : in, It is a list that stores the traversed leaf nodes and satisfies: S44: Finally, the cloud server will search the results The data is returned to the edge server, which decrypts it with the key and returns the plaintext result to the user.
8. The efficient privacy-preserving semantic search method according to claim 7, characterized in that: The detailed steps for generating the trapdoor in step S41 are as follows: S411: The edge server generates a query subject vector ,in is the Hadamard product operator; is a dimensional vector, representing the search The subject intent belongs to The probability of the subject: S412: The edge server vectors Split into two random vectors ,in in Random vector of bits , the segmentation rules are as follows: S413: Edge Server Exploitation Random inverse matrix in and , according to the following formula Encrypted to : Generated encrypted query subject vector That is, the search trap is sent to the cloud server; Stored in the BCI tree and trapdoor The vector in the node, its plaintext vector is and ,have , that is, the inner product between the vector stored in the node of the BCI tree index and the trapdoor is equal to the inner product between the corresponding plaintext vectors.
9. The efficient privacy-preserving semantic search method according to claim 7, characterized in that: In step S43, if the number of leaf nodes traversed is Less than the number of documents requested ,but is the initial value ; otherwise, Set to the forward distance between the trapdoor vector and the encrypted document vector in the traversed leaf node The lower bound or minimum value of the inner product of a set Before including The inner product corresponds to leaf nodes, The documents in the leaf nodes are candidate search results; through a trapdoor , traverse the BCI tree index When obtaining search results for nodes in ,if If true, the document in the leaf node of the child node is The root tree is not in the search results; In the search process, when traversing and checking a node of the BCI tree index, if the inner product of the trapdoor vector and the inner vector of the node is less than the search threshold , then the node of the subtree with this node as the root of the document corresponding to the leaf is definitely not in the search results. This subtree is called an unqualified subtree and is directly filtered out; In step S43, the multi-keyword search is realized by using the recursive depth-first algorithm DepthFirstSearch through the BCI tree index; the search threshold Used to filter out subtrees that do not meet the requirements and speed up the search process. Initially initialized to 0; As more leaf nodes are traversed, As the value increases, the pruning effect of subtrees that do not meet the requirements becomes better, and the search processing speed is accelerated; make is the BCI tree index, It is a search trapdoor. is the number of requests, is the search threshold, the leaf node set , search results ; Run recursive depth-first algorithm ,in express The root node; for each leaf node According to identity Get the encrypted document and then add it to If satisfied , ,and If it is not a leaf node, execute and ;if If is a leaf node, Add to ,if , then from Delete the The leaf node with the lowest semantic relevance score is ,but .
Citation Information
Patent Citations
Method and system for semantic expansion search of encrypted outsourcing data in cloud environment
CN108549701A
Semantic-based multi-keyword sorting search privacy protection system and method
CN108647529A