An efficient fuzzy searchable encryption method based on Word2vec and ASPE

The integration of Word2vec and ASPE algorithms addresses the inefficiencies in existing searchable encryption by enhancing search accuracy and reducing costs through semantic fuzzy searches on encrypted documents.

CN114398660BActive Publication Date: 2024-12-31BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111432262.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2024-12-31
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

Existing searchable encryption technologies fail to provide efficient and secure methods for fuzzy keyword searches on encrypted documents, leading to personal information leakage and inefficient storage and search operations.

Method used

A method combining Word2vec and ASPE algorithms for training, indexing, and encryption phases to enable semantic fuzzy searches by calculating spatial distances between word vectors and expanding ASPE to multi-dimensional operations for secure and efficient keyword-based retrieval.

Benefits of technology

The method achieves high accuracy and reduced search time and storage costs while maintaining security, enabling efficient fuzzy searches on encrypted documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398660B_ABST
    Figure CN114398660B_ABST
Patent Text Reader

Abstract

The present invention proposes an efficient fuzzy searchable encryption method based on Word2vec and ASPE, which is mainly used in the field of fuzzy search of secret information. The algorithm first generates synonym correlation coefficients with the help of Word2vec, then combines the coefficients with the keyword matrix, and uses the extended ASPE algorithm to obtain the user's trapdoor matrix. The file index matrix generated by the extended ASPE algorithm is subjected to Hadamard product operation with the trapdoor matrix to obtain the file correlation ranking, and finally the user decrypts the file through the key to obtain the final plaintext. Experimental simulation shows that the algorithm can not only effectively hide plaintext information and protect the user's forward privacy and backward privacy, but also greatly improve the defects of traditional algorithms that are large in calculation amount and occupy a large amount of storage space, and greatly improve the efficiency of fuzzy search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning and searchable encryption, and in particular to a search encryption method. Background Art

[0002] With the rapid development of big data and cloud computing, more and more users choose to outsource large amounts of electronic document data to the cloud for secure storage and processing. Privacy protection of electronic documents is a key issue in outsourced cloud services. A simple way to address this potential threat is to upload electronic documents after encryption, and download and decrypt them as needed by users. But when documents are converted into a ciphertext-based form, they do not retain their original features. Neither users nor cloud servers can quickly distinguish which documents are in the ciphertext form that users need. Searchable encryption can provide an effective solution for file search while ensuring the privacy and security of documents.

[0003] Traditional search technologies are all based on plaintext search technologies, that is, whether it is the keyword information provided by the search website user or the data in the server database system, it is all in the form of a plaintext structure. This has led to very serious personal information leakage, because any malicious website server can steal the query user's search keywords, search results and other information, which seriously endangers the individual's information security and privacy. In order to overcome this difficulty, searchable encryption technology proposes a basic method for realizing search query information based on ciphertext. Under this model, basic cryptographic techniques can be used to ensure the privacy and life safety of information users.

[0004] Searchable encryption is to implement query and search functions under encryption. Currently, many documents are stored on remote servers, and when there is a need, it is necessary to be able to search the documents to add, delete, and modify files. But sometimes some document information content does not want to be known by the server, so the file must be encrypted. How to save encrypted documents on remote server devices while being able to query, search, and edit documents in a confidential manner is the research content of searchable encryption. Summary of the invention

[0005] The purpose of the present invention is to provide an efficient fuzzy searchable encryption method based on Word2vec and ASPE.

[0006] In order to achieve the above purpose, the following technical solutions are adopted:

[0007] An efficient fuzzy searchable encryption method based on Word2vec and ASPE includes a training phase, an indexing phase, a trapdoor phase, an encryption phase and a matching phase. In the training phase, the semantic similarity between words is represented by calculating the spatial distance between word vectors.

[0008] In the training phase, the corresponding keyword element position in the search trap is set to 1, and the rest are set to 0. In addition, if a word w′ appears in the data user's application that is not in the data owner's keyword list, the trained keyword model is used, and the data owner finds a keyword w′ that is most similar to w′ in the trained keyword model. i , w i is the ith keyword in the keyword model; keywords w′ to w i The similarity score sc i , that is, the spatial distance between word vectors, is calculated as follows:

[0009] sc i =sim(w′,w i )

[0010] Then, the data user uses w i ·sc i Instead of w′, we construct the search trapdoor matrix Q = [q ij ] m×n , m×n is the dimension of the matrix, that is, m rows and n columns, q ij is the element in the i-th row and j-th column of the matrix Q.

[0011] In the indexing phase, the data owner’s key is set to sk = (S, M1, M2), and an m × n random matrix S = [s ij ] m×n and two n×n random matrices M1, M2 are used to encrypt files, s ij ∈{0,1},s ij is the element in the i-th row and j-th column of the matrix S, where m×n is the number of all keywords, and n is much larger than m. The data owner uses the extracted keywords to construct the keyword matrix W, that is, W = [w ij ] m×n , w ij is a single file keyword vector, the element in the i-th row and j-th column of the matrix W;

[0012] The data owner uses the matrix S to transform the keyword matrix w of the file v v Divide into matrix I a =[a ij ] m×n and matrix I b =[b ij ] m×n , based on each S in the key S ij Make the following division: If s ij =1, let r be a random number, If s ij =0, let a ij =b ij=w ij .

[0013] In the trapdoor phase, the data user uses the matrix S to partition the search matrix Q = [q ij ] m×n To the matrix Q a =[x ij ] m×n and the matrix Q b =[y ij ] m×n ,q ij For a single query keyword vector, based on each of the keys S ij Make the following division: If s ij =1, let a ij =b ij =q ij ; if s ij =0, let r be a random number, If s ij =0, let a ij =b ij =q ij .

[0014] In the encryption stage, the Hadamard product is used to extend the ASPE scheme from one-dimensional to multi-dimensional operations.

[0015] In the encryption phase, the process of using Hadamard product to expand the ASPE scheme from one-dimensional to multi-dimensional operations is as follows:

[0016] The formula is constructed using the Hadamard product and the ASPE scheme as follows:

[0017] For the key The index of file v is Index encryption algorithm E I as follows:

[0018]

[0019] For keys Trapdoor Trapdoor encryption algorithm E Q as follows:

[0020]

[0021] The algorithm of the matching process is as follows:

[0022]

[0023] Therefore, the matrix (I v M)*(M -1 Q T ) T The sum of all elements of is calculated as

[0024] The data owner uses the key S and the extended ASPE encryption scheme E I The index matrix {I a ,I b}Encrypted as Index v = {I′ a ,I′ b}, where I′ a =E I (I a ,M1)=I a M1, I′ b =E I (I b ,M2)=I b M2;

[0025] The data user uses the key S and uses the extended ASPE encryption scheme E Q The trapdoor matrix {Q a ,Q b}Encrypted as TD Q = {Q′ a ,Q′ b},in

[0026] In the matching phase, the cloud server obtains matching files through the extended ASPE matching algorithm:

[0027]

[0028] Let the elements of w*Q be [w ij q ij ] m×n , the cloud server calculates the sum of all elements of the matrix w*Q as follows:

[0029]

[0030] Calculate the Tanimoto coefficient between the index and the search trapdoor:

[0031]

[0032] Finally, the cloud server sorts the files from large to small according to the Tanimoto coefficient values ​​and selects the files with the highest relevance to the data user.

[0033] The advantages of the present invention are:

[0034] 1. The semantic fuzzy search function of searchable encryption is realized by using Word2vec machine learning technology. The semantic similarity between words is expressed by calculating the spatial distance between word vectors, so the searchable encryption scheme can have good semantic characteristics.

[0035] 2. Expanding ASPE in multiple dimensions can ensure security while reducing unnecessary storage space, thereby improving search efficiency and further gaining wider application. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The search accuracy of the two schemes with different numbers of keywords;

[0037] Figure 2 This is a comparison chart of the search time of the two solutions;

[0038] Figure 3 Comparison of search time costs for two solutions with high document counts;

[0039] Figure 4 The word vector generated by Word2vec in the traditional sense. DETAILED DESCRIPTION

[0040] The embodiments of the present invention are described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0041] This paper proposes an efficient fuzzy searchable encryption method based on Word2vec and ASPE, which is mainly used in cloud server electronic document encryption scenarios. The main contents of the algorithm are as follows: In order to realize the fuzzy search function, the data owner uses all files as input of Word2vec to train the semantic correlation model and generate keyword vectors for index keywords. Then the data owner uses the asymmetric vector product preserving encryption algorithm (ASPE) to encrypt the file index.

[0042] In the present invention, a system model is designed for multi-keyword based fuzzy searchable encryption, which mainly involves three roles: data owner, cloud server and data user.

[0043] Data owner: This entity owns the plaintext of all files. To ensure security and reduce storage costs, the data owner encrypts all files and stores them in the cloud server. To achieve fuzzy search of encrypted files, the data owner extracts keywords and generates documents as input to the Word2vec algorithm, and then creates keyword vectors.

[0044] Cloud Server: As an outsourced server, the cloud server is responsible for storing a large amount of encrypted file data from all data owners and performing encrypted searches. In the system model, the cloud server is honest and curious, that is, semi-honest. It will perform search operations and return results honestly, while it will snoop on the information stored internally and the query vectors from data users.

[0045] Data user: The data user sends a query request to the cloud server, decrypts the matching ciphertext, and obtains the actual searched plaintext data.

[0046] The Word2vec model is a typical example of the application of neural networks in the field of NLP. This model is a language model that learns low-dimensional word vectors rich in semantic information from massive text corpora in an unsupervised manner. By mapping words from the original data space to a new space, from high dimensions to low dimensions, synonyms are close in distance in the new space, so that semantic similarity can be expressed by calculating spatial distance. In the Word2vec model, each word can be abstractly represented by the distribution weight in the neural network.

[0047] exist Figure 4 In , Word2vec uses words in the vocabulary to represent three-dimensional data, namely, Royalty, Masculinity, and Ability. For example, the word vector of king is set to (0.99, 0.94, 0.78). It can be obtained that the relationship between the word vectors is evaluated as

[0048] Specifically, Word2vec usually uses a Huffman tree, where a Huffman tree is defined as a binary tree constructed by weights. Each leaf node at the bottom of the Huffman tree represents a word, and there is only one unique path from the root node to the leaf node. The root node is the word vector of the word after summing and averaging. The mathematical method of logistic regression is used in the Word2vec model. The edge of the left child is encoded as 1, and the edge of the right child is encoded as 0. The Sigmoid function is used to determine whether the forward direction in the path should be left or right.

[0049] The second technology used is the Asymmetric Scalar-Product-Preserving Encryption (ASPE) algorithm. In recent years, with the rapid development of data mining, classifiers are a very important method for classifying samples. However, during the experiment, a certain feature of the test object may not necessarily find a training object that exactly matches it. It is also possible that a feature of a test object corresponds to multiple training objects at the same time, resulting in being classified into different classes. In order to solve the above problems, the K-NearestNeighbor (kNN) algorithm was born.

[0050] One method to support kNN is to use a distance-preserving transformation to encrypt data points so that the distance between any two encrypted points is the same as the distance between the corresponding original points after encryption. However, this transformation is not safe in practice. If an attacker has access to a database encrypted with a distance-preserving transformation and knows a few points in a normal database, he can completely recover the original data. Therefore, the present invention chooses to extend the Asymmetric Scalar-Product-Preserving Encryption (ASPE) algorithm and support secure and accurate kNN query calculations to achieve keyword-based ciphertext retrieval.

[0051] ASPE is a vector encryption mechanism. Let E Q is the encryption algorithm of the query vector, E I is the encryption algorithm of the index vector. The ciphertext of the index vector I′ i The ciphertext Q′ of the query vector is created as follows:

[0052] I′ i =E I (I i ,M)=I i M

[0053] Q′=E Q (Q,M)=M -1 Q T

[0054] Where M is the key. The ASPE scheme can maintain the dot product of the I vector and the Q vector as

[0055] I′ i Q′=I i M.M -1 Q T =I i Q T

[0056] The present invention consists of five stages, each of which has a corresponding algorithm, which is described as follows.

[0057] (1) Training: In the training phase, the data owner trains the Word2vec model and creates a keyword vector for each document.

[0058] (2) Indexing: The data owner constructs a keyword matrix and generates a secret file index.

[0059] (3) Trapdoor: The data owner sends the symmetric key to the data user through a secure channel. The data user takes the search request as input to generate a search trapdoor.

[0060] (4) Encryption: The data owner encrypts the index, and the data user encrypts the trapdoor.

[0061] (5) Matching: In the matching search phase, the cloud server calls the algorithm to search for encrypted files and sends the most similar ciphertext to the data user.

[0062] The specific process is as follows:

[0063] (1) Training algorithm process:

[0064] In order to meet users' complex semantic search needs, data owners train file collections through the Word2vec neural network and use the weights of the Huffman tree in the tf×idf replacement algorithm to obtain expression information about the polysemy of a word or the one meaning of multiple words.

[0065] The specific steps of the Word2vec-based training algorithm are as follows. First, based on the input corpus, a Huffman tree is established according to the word frequency, and each tree node parameter is randomly initialized, as well as the word vector. Then, each sample w is trained by gradient ascent. Assuming the context size is 2c and the step size is a, the first step is to solve the context average vector of sample w: By for each x w The Sigmoid product function is optimized by maximum likelihood:

[0066]

[0067]

[0068]

[0069] sum=sum+Grad x

[0070] Finally, for each x in the context, update: i =x i +sum,x iis the context average vector of the i-th sample. If the gradient converges, this vector ends, otherwise iterates repeatedly until convergence.

[0071] Data users apply to data owners through a secure channel based on personal preferences or work needs. The data owner authenticates the user's identity and determines the user's authority. After the data user passes the authentication, the data user generates a search trap. That is, the corresponding keyword element position in the search trap is set to 1, and the rest are set to 0. Secondly, there is a special case. If the data user's application contains a word w′ that is not in the data owner's keyword list, then using the trained keyword model, the data owner can find a keyword w in the trained keyword model that is most similar to w′. i , w i is the ith keyword in the keyword model. i The similarity score sc i The calculation is as follows:

[0072] sc i =sim(w′,w i )=w′·w i

[0073] Then, the data user uses w i ·sc i Instead of w′, we construct the search trapdoor matrix Q = [q ij ] m×n , m×n is the dimension of the matrix, that is, m rows and n columns, q ij is the element in the i-th row and j-th column of the matrix Q.

[0074] (2) Index Algorithm

[0075] Run by the data owner. The data owner’s key is set to sk = (S, M1, M2), an m × n random matrix S = [s ij ] m×n (s ij ∈{0, 1},s ij The data owner constructs the keyword matrix W using the extracted keywords, i.e., W = [w ij ] m×n , w ij is a single file keyword vector, the element in the i-th row and j-th column of the matrix W.

[0076] The data owner uses the matrix S to transform the keyword matrix w of the file v v Divide into matrix I a =[a ij] m×n and matrix I b =[b ij ] m×n , based on each S in the key S ij Make the following division: If s ij =1, let r be a random number, If s ij =0, let a ij =b ij =w ij .

[0077] (3) Trapdoor Algorithm

[0078] The data user uses the matrix S to partition the search matrix Q = [q ij ] m×n (q ij for a single query keyword vector) to the matrix Q a =[x ij ] m×n and the matrix Q b =[y ij ] m×n , based on each S in the key S ij Make the following division: If s ij =1, let a ij =b ij =q ij ; if s ij =0, let r be a random number, If s ij =0, let a ij =b ij =q ij .

[0079] (4) Encryption algorithm

[0080] Asymmetric Scalar-Product-Preserving Encryption (ASPE) is a vector encryption mechanism. Let E Q is the encryption algorithm of the query vector, E I is the encryption algorithm of the index vector. The ciphertext of the index vector I′ i The ciphertext Q′ of the query vector is created as follows:

[0081] I′ i =E I (I i ,M)=I i M

[0082] Q′=E Q (Q,M)=M-1 Q T

[0083] Where M is the key. The ASPE scheme can maintain the dot product of the I vector and the Q vector as

[0084] I′ i Q′=I i M.M -1 Q T =I i Q T

[0085] Because ASPE supports safe and accurate kNN query calculations, and if more keywords need to be stored in the data owner's file, the conversion of the index from a one-dimensional vector to a multi-dimensional matrix takes up less space. Therefore, the present invention uses the Hadamard product to expand the ASPE solution from one dimension to multiple dimensions, so that it can support a wider range of applications. The expansion method is as follows.

[0086] In the present invention, the index and query are encoded into two m×n matrices, namely

[0087]

[0088]

[0089] The formula is constructed by using the Hadamard product and the ASPE scheme as follows:

[0090] For the key The index of file v is Index encryption algorithm E I as follows:

[0091]

[0092] For keys Trapdoor Trapdoor encryption algorithm E Q as follows:

[0093]

[0094] The algorithm of the matching process is as follows:

[0095]

[0096] Therefore, the matrix (I v M)*(M -1 Q T ) T The sum of all elements of is calculated as

[0097]

[0098] The algorithm design of the present invention expands the ASPE scheme from one dimension to multiple dimensions on the basis of ensuring the correctness of the combination of the Hadamard product and the ASPE scheme, thereby reducing the storage space occupation cost and the communication cost and significantly improving the calculation efficiency.

[0099] The data owner uses the key S and the extended ASPE encryption scheme E I The index matrix {I a ,I b}Encrypted as Index v = {I′ a ,I′ b}, where I′ a =E I (I a ,M1)=I a M1, I′ b =E I (I b ,M2)=I b M2.

[0100] The data user uses the key S and uses the extended ASPE encryption scheme E Q The trapdoor matrix {Q a ,Q b}Encrypted as TD Q = {Q′ a ,Q′ b},in

[0101] (5) Matching algorithm process

[0102] In order to search for files, the data user first makes a request to the data owner, and then sends a search trap to the cloud server. Since both the file index and the search trap are encrypted, the cloud server will not leak the file and query information during the matching process. The cloud server obtains matching files through the extended ASPE scheme matching algorithm in the present invention:

[0103]

[0104] Let the elements of w*Q be [w ij q ij ] m×n , the cloud server calculates the sum of all elements of the matrix w*Q as follows:

[0105]

[0106] The Tanimoto coefficient is also called the generalized Jaccard correlation coefficient. Let A and B be two sample vectors, and the Tanimoto coefficient expression is:

[0107]

[0108] Each bit in the vector represents a dimension that can measure the sample, but there is no restriction on the value. A·B represents the dot product of the vectors. Represents the magnitude of a vector.

[0109] In the present invention, the Tanimoto coefficient between the index and the search trap is calculated:

[0110]

[0111] Finally, the cloud server sorts the files from large to small according to the Tanimoto coefficient values ​​and selects the files with the highest relevance to the data user.

[0112] The advantages of the present invention are:

[0113] 1) Higher fuzzy search accuracy:

[0114] like Figure 1 As shown in the figure, the searchable encryption scheme based on the Word2vec training algorithm can achieve high accuracy and demonstrate superior performance in semantic fuzzy search.

[0115] 2) Faster search efficiency:

[0116] Considering the original ASPE scheme, assuming the number of keywords is n, this means that the scheme needs to execute O(n 2 ) point multiplication operations and O(n-1) addition operations. In the present invention, the ASPE scheme is improved, such as Figure 2 As shown, the search process only requires O(n) dot multiplication operations and O(n-1) addition operations, which further improves the search efficiency.

[0117] In the original ASPE scheme, the query and matching time are linearly related to the number of documents. In the present invention, by improving the ASPE scheme, the search time cost under a high number of documents is greatly reduced. Figure 3 As shown, the search capability is improved.

[0118] 3) Reduced communication costs:

[0119] The extended ASPE scheme targets more keywords, and the conversion from one-dimensional vectors to multi-dimensional matrices makes the file index occupy less space. Obviously, this method can significantly improve computational efficiency and reduce communication costs.

Claims

1. An efficient fuzzy searchable encryption method based on Word2vec and ASPE, comprising a training phase, an indexing phase, a trapdoor phase, an encryption phase and a matching phase, characterized in that: In the training phase, the semantic similarity between words is represented by calculating the spatial distance between word vectors; In the training phase, the corresponding keyword element position in the search trap is set to 1, and the rest are set to 0. In addition, if a word w′ appears in the data user's application that is not in the data owner's keyword list, the trained keyword model is used, and the data owner finds a keyword w′ that is most similar to w′ in the trained keyword model. i , w i is the ith keyword in the keyword model; keywords w′ to w i The similarity score sc i , that is, the spatial distance between word vectors, is calculated as follows: sc i =sim(w′,w i ) Then, the data user uses w i ·sc i Instead of w′, we construct the search trapdoor matrix Q = [q ij ] m×n , m×n is the dimension of the matrix, that is, m rows and n columns, q ij is the element in the i-th row and j-th column of the matrix Q; In the indexing phase, the data owner’s key is set to sk = (S, M1, M2), and an m × n random matrix S = [s ij ] m×n and two n×n random matrices M1, M2 are used to encrypt files, s ij ∈{0,1},s ij is the element in the i-th row and j-th column of the matrix S, where m×n is the number of all keywords, and n is much larger than m; The data owner uses the extracted keywords to construct a keyword matrix W, that is, W = [w ij ] m×m , w ij is a single file keyword vector, the element in the i-th row and j-th column of the matrix W; The data owner uses the matrix S to transform the keyword matrix w of the file v v Divide into matrix I a =[a ij ] m×n and matrix I b =[b ij ] m×n , based on each S in the key S ij Make the following division: If s ij =1, let r be a random number, If s ij =0, let a ij =b ij =w ij ; In the trapdoor phase, the data user uses the matrix S to partition the search matrix Q = [q ij ] m×n To the matrix Q a =[x ij ] m×n and the matrix Q b =[y ij ] m×n ,q ij For a single query keyword vector, based on each of the keys S ij Make the following division: If s ij =1, let a ij =b ij =q ij ; if s ij =0, let r be a random number, If s ij =0, let a ij =b ij =q ij ; In the encryption phase, the Hadamard product is used to extend the ASPE scheme from one-dimensional to multi-dimensional operations; In the encryption phase, the process of using Hadamard product to expand the ASPE scheme from one-dimensional to multi-dimensional operations is as follows: The formula is constructed using the Hadamard product and the ASPE scheme as follows: For the key The index of file v is Index encryption algorithm E I as follows: For keys Trapdoor Trapdoor encryption algorithm E Q as follows: The algorithm of the matching process is as follows: Therefore, the matrix (I v M)*(M -1 Q T ) T The sum of all elements of is calculated as The data owner uses the key S and the extended ASPE encryption scheme E I The index matrix {I a ,I b }Encrypted as Index v = {I′ a ,I′ b }, where I′ a =E I (I a ,M1)=I a M1, I′ b =E I (I b ,M2)=I b M2; The data user uses the key S and uses the extended ASPE encryption scheme E Q The trapdoor matrix {Q a ,Q b }Encrypted as TD Q = {Q′ a ,Q′ b },in In the matching phase, the cloud server obtains matching files through the extended ASPE matching algorithm: Let the elements of w*Q be [w ij q ij ] m×n , the cloud server calculates the sum of all elements of the matrix w*Q as follows: Calculate the Tanimoto coefficient between the index and the search trapdoor: Finally, the cloud server sorts the files from large to small according to the Tanimoto coefficient values ​​and selects the files with the highest relevance to the data user.