Efficient privacy protection semantic search method

Semantic vectors and homomorphic encryption calculations are generated through the LDA model, combined with binary clustering tree index and depth-first search algorithm, the problem of low semantic search efficiency in encrypted data in the existing technology is solved, and high-precision and efficient semantic search is achieved.

CN119760774AActive Publication Date: 2025-04-04CHONGQING UNIV OF POSTS & TELECOMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411859194.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-04
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

The prior art is difficult to achieve efficient semantic search in encrypted data, and most privacy protection methods do not fully consider the semantic association between keywords and documents, resulting in unsatisfactory search results.

Method used

A vector containing subject semantic information is generated by the LDA model and a semantic correlation score calculation is performed using homomorphic encryption. At the same time, an index based on binary clustering tree is constructed, and a depth-first recursive search algorithm is used to achieve efficient search processing.

Benefits of technology

It improves the semantic accuracy and search time cost of search results, realizes efficient and accurate semantic-aware multi-keyword search, and protects the privacy of outsourcing data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760774A_ABST
    Figure CN119760774A_ABST
Patent Text Reader

Abstract

The invention relates to an efficient privacy protection semantic search method, which belongs to the field of information security and privacy protection, and comprises the following steps: S1, executing system initialization, registering a user to an authorization center, and distributing a key to the user by the authorization center; s2, the data owner uploads the collected data to a local edge server to execute data preprocessing, and then uploads the data to a cloud; s3, constructing a binary tree as an index structure through a hierarchical clustering algorithm by utilizing the maximum vector; s4, when the data user starts to search a plurality of query keywords, firstly uploading a query request to a local edge server, generating a trap door by the edge server by using the query keywords, and then sending the trap door as a search request to the cloud server; after the cloud server receives the search trap door, the encryption index is used for semantic perception search, and k pieces of encryption data are returned to the edge server to serve as results; and the edge server decrypts the key and returns the obtained plaintext result to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of information security and privacy protection, and relates to an efficient privacy protection semantic search method. Background Art

[0002] Nowadays, cloud computing has become crucial to provide economical alternatives and adaptability for efficient storage environments. By providing dynamic, easily scalable and virtualized resources (storage, computing, etc.) through cloud computing, data owners can easily outsource their data and deploy it in the cloud without worrying about capacity, maintenance or storage space to save costs. However, outsourcing of data may lead to privacy leakage issues. Cloud servers may maliciously steal or illegally obtain valuable information of outsourced data. With the widespread application of outsourced cloud services, the demand for secure and efficient search of encrypted data is increasing. Effective search operations to retrieve and analyze information in a timely manner have become crucial. In order to protect data privacy, a simple and direct method is to encrypt the data before outsourcing it to the cloud. However, encrypted data is difficult to search and use, which seriously reduces the availability of data. Providing searchability and privacy protection for outsourced data is a challenge. Therefore, studying a privacy-preserving search solution has become key.

[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. The symmetric searchable encryption (SSE) scheme involves 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 given keywords.

[0004] Many existing privacy protection methods, such as single keyword search methods and multi-keyword search methods, mostly use a vector space model based on the term frequency-inverse document frequency model (TF-IDF) 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. However, the TF-IDF model uses quantitative frequency statistics to measure the importance of keywords to a document collection, but rarely considers the semantic association between keywords and documents, which may result in returning unsatisfactory results to users. At the same time, due to the huge number of keywords extracted from the entire document, the vectors generated using the TF-IDF model may have extremely high dimensions and be sparse, which will take up a lot of storage space and search time. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide an efficient privacy-preserving semantic search method, which uses 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, and the vectors contain topic-based semantic information. Homomorphic encryption of vectors is used to perform privacy-preserving semantic relevance score calculations between query keywords and documents. At the same time, an index based on a binary clustering tree is constructed through a split hierarchical clustering algorithm, and a depth-first recursive search algorithm is executed using the BCI tree index to achieve efficient search processing. The present invention improves the semantic accuracy of search results and the search time cost.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] An efficient privacy-preserving semantic search method includes the following steps:

[0008] S1: Execute system initialization, the user registers with the authorization center, and the authorization center distributes the key to the user;

[0009] 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 uploading to cloud storage;

[0010] S3: Using the maximized vector, a binary tree is constructed through a hierarchical clustering algorithm as an index structure for efficient search processing;

[0011] S4: In the semantic-aware search process, when a data user starts to search for multiple query keywords, the query request is first uploaded to the local edge server. The edge server uses the query keywords to generate a trapdoor, 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 to the edge server as the result. When the edge server receives the encrypted search results, it decrypts them with the key and returns the plaintext results to the user.

[0012] Further, the step S1 comprises the following steps:

[0013] S11: System initialization: Take security parameter k as input and output key K = {S, M1, M2, K f} and system parameters s, where s∈Z q 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 generates a user authorization credential Ac using the identity information sent by the user and S 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] Further, the step S2 comprises 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 by 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 arranged in descending order, that is:

[0018]

[0019] Set the search threshold τ. During the search process, any subtree whose inner product between the root node vector and the search trap vector is less than τ is directly filtered out and no further search is performed. Introduce a threshold reference matrix 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 using AES symmetric encryption; then generate Encrypted documents are transmitted to cloud servers for data outsourcing storage.

[0021] Further, the step S21 specifically includes:

[0022] S211: Taking the document of F as input, the edge server uses the LDA model for training 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 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] Further, the step S22 specifically includes:

[0027] S221: For each w i ∈W, the edge server computes 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 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 interval is used to obtain the noise parameter σ with the minimum value in the interval, that is, σ=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 an 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 minus the noise value generated by rand(0,σ). After adding noise, the order of the values ​​in G remains unchanged.

[0031] Further, the step S3 specifically includes the following steps:

[0032] S31: Calculate the maximization vector: Let H be a set of m-dimensional vectors, and the maximization vector of H is represented 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; assuming 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 Ι, an m-dimensional vector V and a parameter τ, if the inner product between V and the root node vector of Ι is less than τ, then the inner product between V and any node vector Ι must be less than τ:

[0036]

[0037] The specific steps include:

[0038] S321: C is a document topic vector set representing a set of corresponding documents, and a new BCI tree node u is created;

[0039] S322: If |C|>1, u.vector=MaxVec(C), then run the 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 using the key K and uploaded to the cloud for storage.

[0041] Further, 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 Ι through step S322;

[0043] S332: For each node in I, the edge server divides 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 division 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. 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] Further, the step S4 specifically comprises 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 an authorized user, 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;

[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 Trap After that, the subtrees that do not meet the requirements are filtered out by filtering methods based on search thresholds; 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 whose leaf nodes absolutely do not contain any search results; in the process of setting the τ value, given a trapdoor The top-k search keyword set Q, when traversing the leaf nodes, sets the search threshold τ according to the following formula:

[0054]

[0055] Among them, 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 the plain text result to the user.

[0058] Further, 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 ”} is encrypted as

[0064]

[0065] Generated encrypted query topic 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] Further, in step S43, if the number of leaf nodes traversed |L| is less than the number of documents requested k, then τ 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 the nodes in , for node u, if If the condition holds, 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 inside 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 the unqualified subtree is directly filtered out;

[0068] In step S43, a multi-keyword search is implemented by using a recursive depth-first algorithm DepthFirstSearch through a BCI tree index; the search threshold τ is used to filter out subtrees that do not meet the requirements and speed up the search process, and is initialized to 0 at the beginning; as more leaf nodes are traversed, τ gradually increases, the pruning effect of subtrees that do not meet the requirements is 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 with the same name from NS. The leaf node with the lowest semantic relevance score, if |NS|=k, then

[0070] The beneficial effects of the present invention are as follows: 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 a depth-first recursive search algorithm is executed using the BCI tree index 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, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can 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 in conjunction with the accompanying drawings, wherein:

[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 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 only illustrate the basic concept of the present invention in a schematic manner, 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 only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being 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 complicated.

[0078] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0079] like Figure 1 The figure shows a system model diagram of an efficient privacy-preserving semantic search method. There are five entities in the system model, namely, the authorization center, the data owner, the data user, the edge server, and the cloud server. The search process is performed through cloud-edge collaboration. The data owner uploads the data to the local edge server, and the edge server encrypts the uploaded data using a symmetric encryption algorithm and outsources it to the cloud server together with the encrypted index. The cloud server provides storage space for storing the encrypted documents and indexes outsourced by the data owner. The data user who has registered in the authorization center sends the query request to the edge server, and the edge server verifies the legitimacy of the user. If the user is a registered user, the query request is processed to generate the corresponding query trapdoor and sent to the cloud for search matching. When the data user uses multiple query keywords, the k encrypted documents with the highest semantic relevance are searched by matching the stored encrypted index, and finally the k encrypted documents are sent to the edge server as search results. The edge server decrypts the ciphertext data into plaintext results and returns them to the user. At the same time, the search data returned in the cloud is cached in the local edge server so that the same access request can be sent next time to improve the 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, which mainly includes LDA model training, threshold reference matrix generation, and data encryption and uploading 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 a data user starts to search for multiple query keywords, the query request is first uploaded to the local edge server. The edge server uses the query keywords to generate a trapdoor, 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 to the edge server as the result. When the edge server receives the encrypted search results, it decrypts them with a key and returns the plaintext results to the user. Semantic-aware search has two key steps: the trapdoor generation algorithm and the search algorithm. The former is to generate trapdoors corresponding to multiple query keyword searches, and the latter is to perform privacy-preserving 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 authorization center. Specifically, the security parameter k is used as input and the output key K = {S, M1, M2, K f} and system parameters s, where s∈Z q It is used for user registration authorization. Where S is an m-bit random vector, M1 and M2 are two random m×m reversible matrices, and K f is the key used to encrypt the document.

[0087] S12: User Registration: The algorithm is executed by the authorization center to add a new authorized user u i The authorization center uses the identity information sent by the user and S to generate a user authorization certificate. And send to the edge server authorized user list list, where H1:{0,1} * →Z q .

[0088] The step S2 comprises the following steps:

[0089] S21: LDA model training: {Γ,Ψ,P T ,P W}←LDATrain(F) algorithm takes F as input, and 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 .

[0090] (1) Taking the documents 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 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, Ψ, and 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 arranged in descending order, i.e.

[0095]

[0096] In the search process, the search threshold τ can improve the search efficiency. Any subtree whose inner product between the root node vector and the search trap vector is less than τ is directly filtered and no further search is performed. The introduction of the threshold reference matrix can optimize the filter threshold setting in the search process.

[0097] (1) For each w i ∈W, the edge server computes a single keyword topic vector in Indicates w i The subject intention belongs to the subject t j The edge server calculates w i The inner product list of , Recorded w iThe semantic relevance score between and each document in F. Then, the edge server Sort in descending order and copy the first l values ​​to the i-th row.

[0098] (2) The edge server copies all items of G to the temporary list L t Then, in descending order, t The edge server calculates L t The gap between every two adjacent items in the interval is used to obtain the noise parameter σ with the minimum value in the interval, that is, σ=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 at the beginning of the search.

[0100] Each value stored in G is the semantic relevance score between the beginning keyword and the document. In order to hide the plaintext information of the semantic relevance score, each value in G is subtracted from the noise value generated by rand(0,σ). Since the randomly generated noise is positive and less 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 to generate the 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 constructing the BCI tree index recorded in step S3, which specifically includes:

[0103] S31: Maximization vector: Let H be a set of m-dimensional vectors, and the maximization vector of H is represented as an m-dimensional vector MaxVec(H). The calculation formula of MaxVec(H) for the i-th dimension 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: Construct 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 Ι, an m-dimensional vector V and a parameter τ, if the inner product between V and the root node vector of Ι is less than τ, then the inner product between V and any node vector Ι must be less than τ:

[0108]

[0109] S321: C is a document topic vector set representing a set of corresponding documents, and a new BCI tree node u is created;

[0110] S322: If |C|>1, u.vector=MaxVec(C), then run the 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 of Γ={Γ[1],Γ[2],...,Γ[n]} as input, uses the split hierarchical clustering algorithm to construct a plaintext BCI tree index I, and then encrypts the index using the key K. Specifically, it includes the following steps:

[0112] S331: Taking the document topic vector Γ as input, the edge server constructs the plaintext BCI tree index Ι through step S22.

[0113] S332: For each node in I, the edge server divides 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 division 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. 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, and 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 an authorized user, 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 of 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 representing 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 the 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 ”} is encrypted as

[0127]

[0128] Generated encrypted query topic vector That is, the search trap is sent to the cloud server.

[0129] From the above steps of generating the encryption vector of the BCI tree node and the trapdoor, we know that the encryption vector 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. In this way, the cloud server can perform secure calculations even if it does not know the plaintext information of the vector.

[0130] S43: Search threshold preset: τ'←Preset(G,k,Q) The algorithm is executed by the edge server, and the initial value of the search threshold τ is preset at the beginning of the search. 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:

[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 a 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 The top-k search keyword set Q, when traversing the leaf nodes, sets the search threshold τ 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 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. Traversing the BCI tree index When obtaining the search results for the nodes in , for node u, if If it holds, then the document in the leaf node of the child node with u as 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 vector inside 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. Therefore, there is no need to check any nodes in the subtree, and we call this subtree an unqualified subtree. Unqualified subtrees can be directly filtered out to speed up the search process.

[0139] In this algorithm, multi-keyword search is realized by using the 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 initialized to 0 at the beginning. As more leaf nodes are traversed, τ gradually increases, the pruning effect of subtrees that do not meet the requirements is better, and the search process speed is accelerated. Since the search threshold τ has a preset value, the subtree filtering mechanism works even at the beginning of the search process, thereby improving the 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 process 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 the nodes in , for node u, if If the condition holds, then the document in the leaf node of the child node with u as 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 vector inside 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. Therefore, there is no need to check any nodes in the subtree, that is, the subtree that does not meet the conditions can be directly filtered out to speed up 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 Running 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 with the same name 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 with the key and returns the plain text result to the user.

[0143] In the above embodiments, the description's reference to "this embodiment" indicates 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 all refer to the same embodiment.

[0144] In the above-described embodiments, although the invention has been described in conjunction with specific embodiments of the invention, many substitutions, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other storage structures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed. Embodiments of the invention are intended to encompass all such substitutions, 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] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

[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 to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step 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 memory.

[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, discrete hardware components.

[0152] The present invention can be used in many general or special 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 electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.

[0153] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. 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 through a communication network. In a distributed computing environment, program modules may be located in 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 solution of the present invention rather than to limit it. 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 solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should 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; 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 uploading 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, which 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 semantic-aware search and returns k encrypted data as results 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.

2. The efficient privacy-preserving semantic search method according to claim 1, characterized in that: The step S1 comprises the following steps: S11: System initialization: Take security parameter k as input and output key K = {S, M1, M2, K f } and system parameters s, where s∈Z q 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; S12: User registration: The authorization center generates a user authorization certificate using the identity information sent by the user and S And send it to the edge server authorized user list list, so as to add a new authorized user u i ,in H1:{0,1} * →Z q .

3. 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. 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 ; S22: Threshold reference matrix generation (TR-matrix): Executed by the edge server, the threshold reference matrix is ​​denoted by 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 arranged in descending order, that is: Set the search threshold τ. During the search process, any subtree whose inner product between the root node vector and the search trap vector is less than τ is directly filtered out and no further search is performed. Introduce a threshold reference matrix to optimize the filter threshold setting in the search process. S23: Document encryption: The edge server uses K to generate the key K f , encrypt F's document using AES symmetric encryption; then generate Encrypted documents are transmitted to cloud servers for data outsourcing storage.

4. The efficient privacy-preserving semantic search method according to claim 3, characterized in that: The step S21 specifically includes: S211: Taking the document of F as input, the edge server uses the LDA model for training processing to generate the document-topic correlation matrix Γ and the keyword-topic correlation matrix Ψ: 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 is the average probability that each document in F belongs to t i ; 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 S214: The edge server generates K,Ψ,P T ,P W Share with data users.

5. The efficient privacy-preserving semantic search method according to claim 3, characterized in that: The step S22 specifically includes: S221: For each w i ∈W, the edge server computes 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 i The semantic relevance score between and each document in F; then, the edge server Sort in descending order and copy the first l values ​​to row i; 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 interval is used to obtain the noise parameter σ with the minimum value in the interval, that is, σ=min{L t [i]-L t [i+1]|i∈{1,2,...,h×l-1}}; 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 an appropriate pruning threshold when starting the search; Each value stored in G is the semantic relevance score between the beginning keyword and the document. Each value in G is minus the noise value generated by rand(0,σ). After adding noise, the order of the values ​​in G remains unchanged.

6. The efficient privacy-preserving semantic search method according to claim 1, characterized in that: The step S3 specifically comprises the following steps: S31: Calculate the maximization vector: Let H be a set of m-dimensional vectors, and the maximization vector of H is represented as an m-dimensional vector MaxVec(H); the calculation formula of MaxVec(H) for the i-th dimension is as follows: MaxVec(H)[i]=max{V j [i]|V j ∈H} Among them, max{*} 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 Ι, 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; assuming 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 Ι, an m-dimensional vector V and a parameter τ, if the inner product between V and the root node vector of Ι is less than τ, then the inner product between V and any node vector Ι must be less than τ: The specific steps include: S321: C is a document topic vector set representing a set of corresponding documents, and a new BCI tree node u is created; S322: If |C|>1, Then run the hierarchical clustering algorithm with C as input, and the output subclusters are 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], 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 using the key K and uploaded to the cloud for storage.

7. The efficient privacy-preserving semantic search method according to claim 6, characterized in that: The step S33 specifically includes the following steps: S331: Taking the document topic vector Γ as input, the edge server constructs a plaintext BCI tree index Ι through step S322; S332: For each node in I, the edge server divides 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 division rules are as follows: Then, the random reversible matrices M1 and M2 in the key K are used to encrypt {V', V"} respectively. The encryption process is as follows: 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.

8. 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 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 an authorized user, 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; 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: 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; S43: Semantic Search: Cloud Server Receives Search Trap After that, the subtrees that do not meet the requirements are filtered out by filtering methods based on search thresholds; 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 whose leaf nodes absolutely do not contain any search results; in the process of setting the τ value, given a trapdoor The top-k search keyword set Q, when traversing the leaf nodes, sets the search threshold τ according to the following formula: Among them, L is a list of leaf nodes that have been traversed and satisfies: S44: Finally, the cloud server returns the search result R to the edge server, which decrypts the result with the key and returns the plain text result to the user.

9. The efficient privacy-preserving semantic search method according to claim 8, characterized in that: The detailed steps of generating the trapdoor in step S41 are as follows: S411: The edge server generates a query subject 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: S412: The edge server sends 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: S413: The edge server uses the random inverse matrices M1 and M2 in K to convert V Q = {V Q ',V Q ”} is encrypted as Generated encrypted query topic vector That is, the search trap is sent to the cloud server; 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.

10. The efficient privacy-preserving semantic search method according to claim 8, characterized in that: 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 the nodes in , for node u, if If the condition holds, 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 inside 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 the unqualified subtree is directly filtered out; In step S43, a multi-keyword search is implemented 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, and is initialized to 0 at the beginning; 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; 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 with the same name from NS. The leaf node with the lowest semantic relevance score, if |NS|=k, then

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

  • Security semantic perception search method for dynamic spatial data in Internet of Vehicles

    CN113254743A

  • Systems, Methods, and Apparatuses for Implementing a Privacy-Preserving Social Media Data Outsourcing Model

    US20200034566A1

  • Ciphertext search method, system, and device in cloud computing environment

    WO2022099495A1