Multi-key fuzzy ciphertext retrieval method and system

By combining Locality Sensitive Hash (LSH) and Bloom filters, keywords are decomposed into adjacent characters and single character sets to generate indexes and query vectors. This solves the problems of false hits and feature degradation in Bloom filters, and achieves high-precision multi-keyword fuzzy retrieval.

CN114610843BActive Publication Date: 2026-01-27BEIHANG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210112307.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-29
Publication Date
2026-01-27
Estimated Expiration
2042-01-29

AI Technical Summary

Technical Problem

Existing multi-keyword fuzzy retrieval schemes cannot effectively eliminate false hits from Bloom filters, resulting in low accuracy. The keyword features have few dimensions, and the features degenerate after dimensionality reduction, leading to low accuracy and usability of fuzzy retrieval.

Method used

We employ Locality Sensitive Hash (LSH) and Bloom filters to build encrypted document indexes and query vectors. We use inner product similarity algorithms to achieve top-k search ranking. We decompose keywords into sets of adjacent characters and single characters. We use the maximum TF and IDF principles to generate indexes and query vectors, reducing the impact of false hits and preserving keyword features.

Benefits of technology

It improves the accuracy and usability of fuzzy search, enables efficient multi-keyword retrieval, reduces the impact of false hits from Bloom filters, and preserves the descriptive dimension of keyword features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610843B_ABST
    Figure CN114610843B_ABST
Patent Text Reader

Abstract

The application discloses a multi-keyword fuzzy ciphertext retrieval method and system, wherein the method comprises the following steps: decomposing a search request to generate a plurality of query keywords, generating a plurality of query vectors and a plurality of keyword trapdoor functions corresponding to the plurality of query keywords according to the plurality of query keywords; traversing the plurality of keyword trapdoor functions through a plurality of document encryption indexes constructed in advance, respectively calculating the sum of inner products of each document encryption index and each keyword trapdoor function, and obtaining a plurality of similarity values between the plurality of query vectors and the document encryption indexes; comparing the plurality of similarity values, and obtaining a document corresponding to the search request according to a comparison result. Thus, the problems that the retrieval scheme of the related art cannot effectively eliminate the false hits of the Bloom filter, the precision is low, the extracted keyword feature dimension is small, and the feature is degraded after dimension reduction of the keyword feature vector, so that the fuzzy keyword retrieval cannot be realized with high precision and the usability is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of document retrieval technology, and in particular to a multi-keyword fuzzy encrypted text retrieval method and system. Background Technology

[0002] For document data, keyword searches can be used to match the document content and obtain the desired document. However, for massive amounts of document data, accurately and quickly retrieving the desired document using keywords poses a huge challenge.

[0003] Top-k retrieval using multiple keywords in related technologies cannot solve fuzzy retrieval problems. Wildcard construction of document indexes and trapdoor sets in related technologies can achieve fuzzy retrieval, but this incurs high storage overhead and high computational time and space complexity.

[0004] While wildcards and trie trees in related technologies enable efficient fuzzy keyword retrieval, they incur significant storage overhead and high computational time and space complexity. Furthermore, trie trees are not highly efficient in high-dimensional spaces. Fuzzy encrypted retrieval schemes based on Bloom filters in related technologies fail to effectively eliminate the impact of false hits from Bloom filters, resulting in low accuracy.

[0005] The related technologies include fuzzy encrypted text retrieval schemes based on Bloom filters, but the index and vector do not insert TF and IDF, resulting in low retrieval accuracy; moreover, the keywords are decomposed into adjacent characters, but lack the letter features of word composition, which will cause keyword feature degradation when mapped to fingerprints.

[0006] Therefore, a method for accurate and fast fuzzy retrieval using keywords is needed. Summary of the Invention

[0007] This application provides a multi-keyword fuzzy encrypted retrieval method and system, which solves the problems of related technologies' retrieval schemes being unable to effectively eliminate false hits of Bloom filters, resulting in low accuracy; the extracted keyword feature dimensions being limited, and the feature vectors degrading after dimensionality reduction, making it impossible to achieve high-precision fuzzy keyword retrieval and resulting in low usability.

[0008] The first aspect of this application provides a multi-keyword fuzzy encrypted text retrieval method, comprising the following steps: decomposing a search request into multiple query keywords; generating multiple query vectors and their corresponding multiple keyword trapdoor functions based on the multiple query keywords; traversing multiple pre-constructed document encryption indexes using the multiple keyword trapdoor functions, calculating the sum of the inner products of each document encryption index and each keyword trapdoor function to obtain multiple similarity values ​​between the multiple query vectors and the document encryption indexes; comparing the multiple similarity values, and obtaining the document corresponding to the search request based on the comparison results.

[0009] Optionally, in one embodiment of this application, before decomposing the search request into multiple query keywords, the method further includes: extracting document keywords from multiple documents, constructing a plaintext index of the document keywords, and encrypting the plaintext index to obtain an encrypted index.

[0010] Optionally, in one embodiment of this application, the step of extracting document keywords from multiple documents, constructing a plaintext index of the document keywords, and encrypting the plaintext index to obtain an encrypted index includes: decomposing each keyword in the document into a first character set consisting of adjacent characters and single characters; generating a first one-hot encoded vector of the first character set using the one-hot encoding principle; mapping the first one-hot encoded vector to a first keyword fingerprint using a locality-sensitive hash function; mapping the first keyword fingerprint to the index using a Bloom filter to generate a first mapping vector; replacing a first preset position in the first mapping vector according to the maximum TF principle to generate the plaintext index; and encrypting the plaintext index to generate the encrypted index.

[0011] Optionally, in one embodiment of this application, the step of decomposing the search request into multiple query keywords and generating multiple query vectors and their corresponding keyword trapdoor functions based on the multiple query keywords includes: decomposing the search request into the multiple query keywords; decomposing each query keyword into a second character set consisting of adjacent characters and single characters, and generating a second one-hot encoded vector of the second character set using the one-hot encoding principle; mapping the second one-hot encoded vector to a second keyword fingerprint using a locality-sensitive hash function; mapping the second keyword fingerprint to an index using a Bloom filter to generate a second mapping vector; replacing a second preset position in the second mapping vector according to the IDF principle to generate query vectors for the multiple query keywords corresponding to the search request; and generating the multiple keyword trapdoor functions based on the multiple query vectors.

[0012] Optionally, in one embodiment of this application, comparing the plurality of similarity values ​​and determining the document corresponding to the search request based on the comparison results includes: selecting a target number of similarity values ​​from the plurality of similarity values ​​in descending order, and using the document corresponding to the target number of similarity values ​​as the document corresponding to the search request.

[0013] Optionally, in one embodiment of this application, the document is a document decrypted using an encryption key. After obtaining the document corresponding to the search request, the method further includes: decrypting the document corresponding to the search request using a decryption key.

[0014] A second aspect of this application provides a multi-keyword fuzzy encrypted text retrieval system, comprising: a key generation module for generating, distributing, and updating encryption and decoding keys; a keyword decomposition module for decomposing a search request into multiple query keywords, and generating multiple query vectors and their corresponding keyword trapdoor functions based on the multiple query keywords; a similarity calculation module for iterating through multiple pre-constructed document encryption indexes using the multiple keyword trapdoor functions, calculating the sum of the inner products of each document encryption index and each keyword trapdoor function, and obtaining multiple similarity values ​​between the multiple query vectors and the document encryption indexes; a keyword retrieval module for selecting a target number of similarity values ​​from the multiple similarity values ​​in descending order, and using the documents corresponding to the target number of similarity values ​​as the documents corresponding to the search request; and a document decryption module for decrypting documents encrypted with the encryption key using the decryption key.

[0015] Optionally, in one embodiment of this application, it further includes: a construction module, used to extract document keywords from multiple documents, construct a plaintext index of the document keywords, and encrypt the plaintext index to obtain an encrypted index.

[0016] Optionally, in one embodiment of this application, the construction module is specifically used to: decompose each keyword in the document into a first character set consisting of adjacent characters and single characters; generate a first one-hot encoded vector for the first character set using the one-hot encoding principle; map the first one-hot encoded vector to a first keyword fingerprint using a locality-sensitive hash function; map the first keyword fingerprint to an index using a Bloom filter to generate a first mapping vector; replace a first preset position in the first mapping vector according to the maximum TF principle to generate the plaintext index of the document; and encrypt the plaintext index of the document to generate the encrypted index of the document.

[0017] Optionally, in one embodiment of this application, the keyword decomposition module is specifically used to: decompose the search request to generate the plurality of query keywords; decompose each query keyword into a second character set consisting of adjacent characters and single characters, and generate a second one-hot encoded vector of the second character set using the one-hot encoding principle; map the second one-hot encoded vector to a second keyword fingerprint using a locality-sensitive hash function; map the second keyword fingerprint to an index using a Bloom filter to generate a second mapping vector; replace a second preset position in the second mapping vector according to the IDF principle to generate query vectors for the plurality of query keywords corresponding to the search request; and generate the plurality of keyword trapdoor functions based on the plurality of query vectors.

[0018] The multi-keyword fuzzy encrypted text retrieval method and system of this application have the following beneficial effects:

[0019] 1) Constructing indexes or query vectors based on Bloom filters decomposes query keyword trapdoors into multiple trapdoor sets, eliminating the impact of "false hits" and greatly improving accuracy.

[0020] 2) A keyword decomposition method is proposed, which decomposes keywords into adjacent characters and single character sets. This method not only represents the difference between words but also retains as many keyword features as possible, reducing the impact of feature degradation after keyword vector dimensionality reduction.

[0021] 3) Based on the p-stable method, a Locality Sensitive Hashing (LSH) algorithm is generated. A method is proposed to map the keyword feature vector into a fingerprint, which realizes the mapping of similar words into the same fingerprint, and thus achieves fuzzy mapping.

[0022] 4) A novel document indexing method based on the maximum TF principle is proposed; a query vector generation method based on the decomposition principle is proposed; and high-precision document retrieval is achieved based on TFxIDF.

[0023] 5) Based on BF mapping, multiple keywords are mapped to the same index to achieve fast multi-keyword retrieval.

[0024] 6) A method for generating encrypted document index vectors based on BF and LSH is proposed, which does not require a predefined dictionary. A method for generating trapdoor functions for query keywords based on BF and LSH is also proposed.

[0025] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0026] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0027] Figure 1 This is a flowchart of a multi-keyword fuzzy encrypted text retrieval method provided according to an embodiment of this application;

[0028] Figure 2 This is a diagram illustrating the implementation architecture of a multi-keyword fuzzy encrypted text retrieval method according to an embodiment of this application.

[0029] Figure 3 This is a schematic diagram illustrating the principle of a Bloom filter according to an embodiment of this application;

[0030] Figure 4 This is a schematic diagram illustrating a method for generating an index vector and a query vector according to an embodiment of this application;

[0031] Figure 5 This is a schematic diagram illustrating a keyword retrieval method according to an embodiment of this application.

[0032] Figure 6 This is a flowchart illustrating the workflow of a multi-keyword fuzzy encrypted text retrieval method provided according to an embodiment of this application.

[0033] Figure 7 This is an example diagram of a multi-keyword fuzzy encrypted text retrieval system according to an embodiment of this application. Detailed Implementation

[0034] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0035] The following describes a multi-keyword fuzzy encrypted text retrieval method and system according to embodiments of this application, with reference to the accompanying drawings. Addressing the problems mentioned in the background section regarding the inability of related technologies to effectively eliminate false hits from Bloom filters, resulting in low accuracy; the limited dimensions of extracted keyword features; and the feature degradation after dimensionality reduction of the keyword feature vectors, leading to low usability and inability to achieve high-precision fuzzy keyword retrieval, this application provides a multi-keyword fuzzy encrypted text retrieval method. In this method, edit distance is used as a difference measure between keywords. A document encryption index vector and a query vector for retrieval keywords are established based on the Locality Sensitive Hash algorithm and a Bloom filter. Top-k retrieval ranking is achieved through an inner product similarity algorithm. This solves the problems of related technologies' retrieval schemes failing to effectively eliminate false hits from Bloom filters, resulting in low accuracy; the limited dimensions of extracted keyword features; and the feature degradation after dimensionality reduction of the keyword feature vectors, leading to low usability and inability to achieve high-precision fuzzy keyword retrieval.

[0036] It should be noted that the symbols and their meanings used in the embodiments of this application are as follows:

[0037] 1) F: Set of plaintext documents F = {F1, F2, ..., F...} f} contains f documents; for the i-th document (i = 1, 2, ..., f), its index keyword set is... Contains the keyword η, where the keyword express The j-th keyword in the text.

[0038] 2) C: The set of encrypted documents C = {C1, C2, ..., C...} f} contains f documents.

[0039] 3) W: Dictionary W = {W1, W2, ..., W...} r} contains r keywords, representing the set of all keywords.

[0040] 4) I: Plaintext index set I = {I1, I2, ..., I...} f For a document set F = {F1, F2, ..., F}, ... f Each document is indexed separately. i (i = 1, 2, ..., f) is the i-th document F i Plaintext Index I i An m-dimensional vector generated based on a Bloom filter.

[0041] 5) Extended Index byI i Extended to form, it is an m+2 dimensional vector.

[0042] 6) Encrypted Index in It is by It is encrypted.

[0043] 7)W q :W q This indicates the query keywords contained in the input search request q; It contains t keywords.

[0044] 8) W q The corresponding trapdoor function is of the form: It includes a total of t sub-trapdoors.

[0045] 9)E k The search operation returns the top-k encrypted documents. k .

[0046] 10)D k Decrypting Ek yields the top-k plaintext documents D. k .

[0047] Specifically, Figure 1 This is a flowchart illustrating a multi-keyword fuzzy encrypted text retrieval method provided in an embodiment of this application.

[0048] like Figure 1 As shown, this multi-keyword fuzzy encrypted retrieval method includes the following steps:

[0049] In step S101, the search request is decomposed to generate multiple query keywords, and multiple query vectors and their corresponding keyword trapdoor functions are generated based on the multiple query keywords.

[0050] First, the architecture of the application is introduced. The searchable encryption system in this application mainly involves five entities: a private key generator (KGC), a cloud service processor (CSP), a middleware IoT node set (TNs), data owners (DOs), and data users (EUs, also known as end users). The model is as follows: Figure 2 As shown, the actual interactions between entities are represented by solid lines. DOs, EUs, and CSPs exchange data through intermediate nodes TNs, employing network coding and a distributed transport model for data transmission.

[0051] (1) Key Generation Organization (KGC): KGC is a fully trusted organization entity that realizes the generation of system parameters, key generation and distribution of various entities such as Dos, EUs, and TNs, and the updating, upgrading and management of parameters and keys of the entire system.

[0052] (2) Data Owners (DOs): Implement document encryption, keyword definition and index construction, and send the encrypted ciphertext of the document and index data to the CSP; at the same time, provide the trapdoor generation mechanism and document decryption key to the authorized Eus.

[0053] (3) Eus (EUs): Authorized users can retrieve and download data stored in the CSP. EUs perform encrypted retrieval operations, download the result document from the CSP, and then decrypt the encrypted text using the document's decryption key.

[0054] (4) Cloud Server (CSP): CSP provides massive storage and efficient computing. During the retrieval phase, CSP performs the retrieval based on the received trapdoors and sends the sorted retrieval results to EUs.

[0055] (5) Intermediate Node Layer (TNs): These are considered “semi-trusted” entities. All data interactions between CSP and DOs and EUs (including encrypted documents, indexes, trapdoors, and retrieved documents) pass through intermediate nodes. In practice, intermediate nodes may be paralyzed, damaged, or monitored and controlled by attackers. Once compromised, multiple nodes combined have powerful computing capabilities, and distributed data transmission methods can be used to defend against such attacks.

[0056] Optionally, in one embodiment of this application, before decomposing the search request into multiple query keywords, the method further includes: extracting document keywords from multiple documents, constructing a plaintext index of the document keywords, and encrypting the plaintext index to obtain an encrypted index.

[0057] Furthermore, document keywords from multiple documents are extracted, a plaintext index of document keywords is constructed, and the plaintext index is encrypted to obtain an encrypted index. This process includes: decomposing each keyword in the document into a first character set consisting of adjacent characters and single characters; generating a first one-hot encoded vector for the first character set using the one-hot encoding principle; mapping the first one-hot encoded vector to a first keyword fingerprint using a locality-sensitive hash function; mapping the first keyword fingerprint to the index using a Bloom filter to generate a first mapping vector; replacing the first preset position in the first mapping vector according to the maximum TF principle to generate the plaintext index; and encrypting the plaintext index to generate the encrypted index.

[0058] In the embodiments of this application, the maximum TF principle refers to the principle that when multiple keywords are mapped to the same Bloom filter bit, the keyword with the highest TF is selected. The IDF principle, described below, follows the same principle. Here, TF stands for Term Frequency, and IDF stands for Inverse Document Frequency. TF-IDF (termfrequency–inverse document frequency) is a commonly used weighting technique for information retrieval and data mining.

[0059] Specifically, the document encryption index generation includes the following steps:

[0060] BuildIndexVector(F,LSH,BF) → (I). Generates a document encryption index based on BF and LSH. The document index (m-dimensional vector) is generated as follows:

[0061] Step 1: Generate one-hot encoded vectors. For document F i Each keyword in It is decomposed into a set of adjacent binary strings and a set of individual letters, and a vector is generated based on the one-hot encoding principle. For example, the characters of the keyword origin={'or','ri','ig','gi','in','o','r','i','g','i','n'} are mapped to In it, there are 11 '1's.

[0062] Step 2: Generate a Locality Sensitive Hash (LSH). LSHs can be generated using the p-table method and can implement fuzzy keyword search functionality based on relevant techniques. This involves generating a 0-1 vector of a keyword. Based on LSH mapping, words can be mapped to an integer (called the fingerprint of a keyword). According to the properties of LSH, words with similar forms are likely to be mapped to the same fingerprint.

[0063] Step 3: Configure the Bloom Filter. The Bloom Filter predefines a family of hash functions H = {hash...} κ |κ=1,2,...,h}, which satisfies the following properties: First, in the initial state, the index value of the Bloom Filter is set to 0; second, after each execution of the hash function, only one bit of BF is set to "1" (i.e., hash). κ fingerprint → {0, 1} m ,(κ=1,2,...,h)).

[0064] Step 4: Generate a boolean vector. In the i-th document, the keyword W Fi ={W1, W2, ..., W η The corresponding η fingerprint is mapped sequentially by BF to an m-dimensional index, generating an m-dimensional boolean vector {0,1}. m The index bit is marked as "1" a maximum of ηk times.

[0065] Step 5: Generate a plaintext index vector for a single document. This involves assigning the above boolean vector {0,1} to the index. m The bit marked "1" is replaced with the corresponding keyword TF, thus generating the plaintext index vector I. i If a bit in the index vector is mapped to multiple keys simultaneously, then the maximum TF (maximum TF rule) of these keys is used.

[0066] It should be noted that this application uses the maximum TF principle to generate plaintext indexes of documents: 1 in the Boolean vector is replaced with the TF of the corresponding keyword, and when a certain bit in the vector is mapped to 1 by multiple keywords at the same time, the maximum TF of the keywords is used.

[0067] Supplement: When the 1 in the query vector is also replaced with the IDF of the corresponding keyword, a new trapdoor function is generated, which can achieve high-precision retrieval based on the TFxIDF principle by using encrypted index and trapdoor function.

[0068] Step 6: Generate a plaintext index for all documents. All documents F = {F1, F2, ..., F...} fThe plaintext index vectors for all documents are generated using the same method. The final document plaintext index is I = {I1, I2, ..., I...} f}

[0069] In the embodiments of this application, the hash function H a,b (v):R d →N represents a d (d = 26 in this application). 2 +26) A 0-1 dimension vector v is mapped to an integer N in the integer space, in the form of the equation

[0070]

[0071] Here a = (a1, a2, ..., a d ), where a i Independently and identically distributed in N(μ,σ) 2 w is a very important artificial parameter, and b∈[0, w]. Based on the p-stable distribution property, the above function is a locality-sensitive hash function. For different data combinations {a, b}, a family of LSH functions will be generated; specific generation methods can utilize schemes from related technologies.

[0072] Edit distance describes the relationship between two strings. After performing a series of basic operations, including inserting, deleting, or replacing a character, one string can be transformed into another string; the minimum number of operations required is called the edit distance. Let D be an example. edit It is an edit distance operation.

[0073] Suppose there is document F. For the i-th document F... i The j-th keyword in Decompose it into a set of adjacent strings plus letters, such as origin={'or','ri','ig','gi','in','o','r','i','g','i','n'}, and generate 26 based on the one-hot encoding principle. 2 +26-dimensional vector Therefore, the number of "1"s in this vector is 1. This method differs from solutions in related technologies, which only consider adjacent strings, i.e., when d=26. 2 In the bool vector, the number of "1"s is only... Many features of the keywords were lost. This application extends the keyword description by adding single characters, thus increasing the descriptive dimension of the keywords. According to the properties of locality-sensitive hash functions, two similar keywords, "origin" and "origim", will be mapped to the same fingerprint 59452349.

[0074] Assume index keyword and query keyword are mapped to vectors v1 and v2 respectively. Obviously, the edit distance between the two keywords Based on the p-stable stable method, points v1 and v2 in the high-dimensional space {0, 1} d are mapped to N1 and N2 in the integer space, satisfying the properties of the locality-sensitive hashing algorithm on (r1, r2, p1, p2):

[0075] (1) At this time, p(hash(v1) = hash(v2)) > p1, where p1 is a very high probability.

[0076] (2) At this time, p(hash(v1) = hash(v2)) < p2, where p2 is a very low probability.

[0077] A Bloom Filter contains a cluster of k hash algorithms and m mapping positions (also known as the m-bit index of the Bloom Filter) to quickly determine whether a certain element belongs to a certain large set.

[0078] Set For a set containing η elements, the Bloom Filter uses k mutually independent hash functions, which map each element in the set to the m index bits of the Bloom Filter respectively. It is stipulated that if a position is set to 1 multiple times, only the first time will take effect, and the subsequent times will have no effect. In Figure 3 , k = 3, and two hash functions select the same position, as Figure 3 shown.

[0079] To determine whether a certain element belongs to the set , only need to use the same method, and the k hash functions map to the m-bit mapping positions.

[0080] If the k mapping values of 1 coincide with the previous 1, it is considered that the element belongs to the set Otherwise, the element does not belong to the set

[0081] Bloom filters can produce "false hits" when determining element affiliation, meaning elements that don't belong in the set are incorrectly identified as belonging (because a 0-1 list is a sparse vector, the probability of this is very low). However, they don't miss any elements, making them suitable for scenarios requiring fast evaluation and where high accuracy isn't critical. The values ​​of k and m affect both the probability of false hits and computational efficiency.

[0082] Similar to the method for generating index vectors in the above embodiments, such as... Figure 4 As shown, embodiments of this application utilize search requests to generate query vectors.

[0083] Optionally, in one embodiment of this application, the search request is decomposed into multiple query keywords, and multiple query vectors and their corresponding keyword trapdoor functions are generated based on the multiple query keywords, including:

[0084] The search request is broken down into multiple query keywords;

[0085] Each query keyword is decomposed into a second character set consisting of adjacent characters and single characters. A second one-hot encoded vector for the second character set is generated using the one-hot encoding principle.

[0086] The second one-hot encoded vector is mapped to the second keyword fingerprint using a locality-sensitive hash function;

[0087] The second keyword fingerprint is mapped to the index using a Bloom filter to generate a second mapping vector.

[0088] The second preset position in the second mapping vector is replaced according to the IDF principle to generate query vectors for multiple query keywords corresponding to the search request;

[0089] Multiple keyword trapdoor functions are generated based on multiple query vectors.

[0090] Specifically, BuildQueryVector(W q The principle of generating multi-keyword query vectors is as follows: (LSH, BF) → (Q). Figure 4 As shown, the generation of multi-keyword query vectors involves two steps: first, generating query vectors for a single keyword. Secondly, generate multiple keywords. The set of query vectors.

[0091] Case 1: Query vector for a single keyword. This is achieved using an index vector generation method to generate the query vector for the keyword. The fingerprint is mapped to the index of the BF, generating an m-dimensional vector {0,1}. mThen, replace the "1"s in the above vector with the IDF of the query keyword to generate the final query vector q1 = {0, IDF}. m The final query vector is Q = q1.

[0092] Case 2: Multi-keyword query vector. t keywords The query vector is a set Q = {q1, q2, ..., q...} t} is composed of multiple single-keyword vectors, and the generation method is as described above for single-keyword query vectors.

[0093] It should be noted that this application generates query keyword trapdoor functions based on the decomposition principle. The reason for "decomposing" multiple keywords to calculate the inner product sum is that Bloom Filter's attribution determination problem can produce "false hits"; in order to reduce the probability of "false hits", for t multiple keywords, t single-keyword query vectors (and trapdoor functions) are generated, and the inner product of the trapdoor function and the encrypted index vector for each single keyword is calculated, and then summed.

[0094] After the above steps, the plaintext index and query vector of the document can be generated.

[0095] In step S102, multiple keyword trapdoor functions are used to traverse multiple pre-built encrypted document indexes, and the sum of the inner products of each encrypted document index and each keyword trapdoor function is calculated to obtain multiple similarity values ​​between multiple query vectors and encrypted document indexes.

[0096] In step S103, multiple similarity values ​​are compared, and the document corresponding to the search request is obtained based on the comparison results.

[0097] Optionally, in one embodiment of this application, comparing multiple similarity values ​​and determining the document corresponding to the search request based on the comparison results includes: selecting a target number of similarity values ​​from the multiple similarity values ​​in descending order, and using the document corresponding to the target number of similarity values ​​as the document corresponding to the search request.

[0098] Specifically, the similarity value between the query vector and the index of the i-th document is the sum of the inner products of the encrypted index of the i-th document and the trapdoor functions of the t keywords. This is achieved by calculating the encrypted index of each document. With the set of trapdoor functions The sum of the inner products can be used to perform a top-k search of the global document, sort it, and return the result document E. k .

[0099] Furthermore, the specific implementation process of multi-keyword fuzzy retrieval in this application is as follows:

[0100] (1)KeyGen(1λ → (sk,k): The system selects a security parameter λ, and then calculates the required key sk = {S,M1,M2}, which contains the key k needed to encrypt and decrypt documents; where the random vector S is {0,1}. m+2 M1 and M2 are two m+2 dimensional invertible matrices.

[0101] (2) The data owner executes the algorithm, inputting the key SK and document F, to obtain an encrypted index. The query vector generation function `BuildIndexVector(F,LSH,BF)` is called to generate a query vector `I = {I1,I2,...,I...}`. f}

[0102] Suppose that the m-dimensional vector of the i-th document is I. i First, for vector I i Perform bit extension, assuming the (m+1)th bit follows a normal distribution N(μ,σ). 2 The random number ε is generated, with the m+2 bits set to 1, and the expanded index is... The tag vector S will index Divided into If s i =0, then the i-th index term satisfies the equation When s i When = 1, the i-th index term satisfies the equation The final encrypted index is

[0103] (3) Enc(D,k)→C, DOs encrypts the plaintext document set F into a ciphertext document set C, which is generally based on the symmetric encryption algorithm k to encrypt the document F.

[0104] For data transmission, DOs encodes the data to be transmitted (encrypted document data) and uploads it to CSP via intermediate nodes TNs. CSP then restores the original encrypted document.

[0105] (4) The algorithm is executed by Eus to calculate the trapdoor information for the search keywords. Multiple input query keywords W q ={w1,w2,...,w t}(t keywords), then call the query vector generation function BuildQueryvector(LSH,BF,W q The function generates a query vector Q = {q1, q2, ..., q}. t}. For q iExpand the vector (i = 1, 2, ..., t), setting the (m+1)th bit to 1; multiply the first (m+1) vectors by r, setting the (m+2)th bit to β, and the expanded query vector is... Based on the segmentation vector S, the search Divide into If s i =0, then the i-th index term satisfies the equation If s i When = 1, the i-th index term satisfies the equation Finally, the single keyword W q The resulting trapdoor function is The trapdoor function for multiple keywords is a set. in The reasons for "decomposing" multiple keywords into single keywords will not be elaborated here.

[0106] (5) The algorithm is executed by CSP, with the trapdoor function T as input. Wq Document Index And requires top-k documents; outputs a ciphertext document E that meets the requirements. k The sum of the inner products of the encrypted index of the i-th document and the trapdoor functions of the t keywords is the similarity value between the query vector and the index of that document. The calculation formula is as follows.

[0107]

[0108] Calculate the encrypted index for each document With the trapdoor set T Wq The inner product sum can be used to perform a top-k search of the global document, sort it, and return the result document E. k .

[0109] Note that, unlike solutions in related technologies, in the solution of this application, when CSP performs multi-keyword retrieval, it decomposes the search into t single-keyword trapdoor functions, and calculates the t single-keyword trapdoor functions T. Wq With encrypted index The sum of inner products; r and t remain constant for multi-keyword searches within each cycle.

[0110] The intermediate layer nodes download the top-k documents Ek of the search results to the end users EUs, such as... Figure 5 As shown.

[0111] (6) Dec(Ek,k)——>Dk, EUs restores the data to the original result document set according to the decoding method. Eus decrypts the result document set based on the symmetric key k.

[0112] It should be noted that in the step of building the document index, the B+ tree of the document index is increased; when performing the search operation, it is not necessary to traverse all f documents in the document collection completely, so as to achieve fast retrieval, and the time complexity can reach o(log(f)) < o(n) (the original time complexity).

[0113] It should be noted that in the link of generating the encrypted document index, the document index method can be generated based on the minimum TF principle.

[0114] As Figure 6 shown, the working process of the multi-keyword fuzzy ciphertext retrieval method of the embodiment of the present application is shown. The data owner builds an encrypted index for all documents (a total of f). The process is to decompose each query keyword of a certain document into a character set, one-hot encoding, generate a Boolean vector in the LSH and BF ways, generate a plaintext index based on the maximum principle TF, and generate an encrypted index for each document. According to the scenario requirements, input a query statement containing t keywords, decompose each query keyword into a character set, one-hot encode, generate a Boolean vector in the LSH and BF ways, replace the 1 in the Boolean vector with the IDF of the corresponding keyword, and generate a set of trapdoor functions for multiple keywords (that is, the method of the embodiment of the present application). The cloud server performs the retrieval operation, traverses the document collection, and can optimize in the step of building the document index, and can build the B+ tree of the document index to achieve fast retrieval, and output the top-k encrypted documents E k , and the data user EUs encrypts them into plaintext documents D k .

[0115] For the multi-keyword fuzzy ciphertext retrieval method of the embodiment of the present application, the search request is decomposed to generate multiple query keywords, and multiple query vectors and their corresponding multiple keyword trapdoor functions are generated according to the multiple query keywords; the multiple keyword trapdoor functions are traversed through the multiple pre-constructed document encrypted indexes, and the sum of the inner products of each document encrypted index and each keyword trapdoor function is calculated respectively to obtain multiple similarity values between the multiple query vectors and the document encrypted indexes; the multiple similarity values are compared, and the documents corresponding to the search request are obtained according to the comparison results. Thus, the problems in the retrieval scheme of the related technology that the false hits of the Bloom filter cannot be effectively eliminated and the accuracy is low; the extracted keyword feature dimensions are less, and after the keyword feature vector is dimension-reduced, the features degenerate, and the fuzzy keyword retrieval cannot be realized with high precision and the usability is low are solved.

[0116] Next, the multi-keyword fuzzy ciphertext retrieval system will be described with reference to the accompanying drawings.

[0117] Figure 7 It is an example diagram of the multi-keyword fuzzy ciphertext retrieval system according to the embodiment of the present application.

[0118] As Figure 7As shown, the multi-keyword fuzzy encrypted retrieval system 10 includes: a key generation module 100, a keyword decomposition module 200, a similarity calculation module 300, a keyword retrieval module 400, and a document decryption module 500.

[0119] The system includes the following modules: a key generation module 100, used for generating, distributing, and updating encryption and decoding keys; a keyword decomposition module 200, used for decomposing the search request into multiple query keywords, and generating multiple query vectors and their corresponding keyword trapdoor functions based on these keywords; a similarity calculation module 300, used to iterate through multiple pre-built document encryption indexes using the keyword trapdoor functions, calculating the sum of the inner products of each document encryption index and each keyword trapdoor function to obtain multiple similarity values ​​between the query vectors and the document encryption indexes; a keyword retrieval module 400, used to select a target number of similarity values ​​from the multiple similarity values ​​in descending order, and using the documents corresponding to the target number of similarity values ​​as the documents corresponding to the search request; and a document decryption module 500, used to decrypt documents encrypted with the encryption key using the decryption key.

[0120] Optionally, in one embodiment of this application, it further includes: a construction module, configured to extract document keywords of multiple documents before decomposing the search request into multiple query keywords, construct a plaintext index of document keywords, and encrypt the plaintext index to obtain an encrypted index.

[0121] Optionally, in one embodiment of this application, the construction module is specifically used to: decompose each keyword in the document into a first character set consisting of adjacent characters and single characters; generate a first one-hot encoded vector for the first character set using the one-hot encoding principle; map the first one-hot encoded vector to a first keyword fingerprint using a locality-sensitive hash function; map the first keyword fingerprint to an index using a Bloom filter to generate a first mapping vector; replace a first preset position in the first mapping vector according to the maximum TF principle to generate a plaintext index for the document; and encrypt the plaintext index to generate an encrypted index for the document.

[0122] Optionally, in one embodiment of this application, the keyword decomposition module is specifically used to: decompose the search request into multiple query keywords; decompose each query keyword into a second character set consisting of adjacent characters and single characters, and generate a second one-hot encoded vector for the second character set using the one-hot encoding principle; map the second one-hot encoded vector to a second keyword fingerprint using a locality-sensitive hash function; map the second keyword fingerprint to an index using a Bloom filter to generate a second mapping vector; replace the second preset position in the second mapping vector according to the IDF principle to generate query vectors for multiple query keywords corresponding to the search request; and generate multiple keyword trapdoor functions based on the multiple query vectors.

[0123] It should be noted that the foregoing explanation of the multi-keyword fuzzy encrypted text retrieval method embodiment also applies to the multi-keyword fuzzy encrypted text retrieval system of this embodiment, and will not be repeated here.

[0124] The multi-keyword fuzzy encrypted retrieval system of this application decomposes the search request into multiple query keywords, generates multiple query vectors and their corresponding keyword trapdoor functions based on these keywords, and iterates through multiple pre-constructed encrypted document indexes using these keyword trapdoor functions. The sum of the inner products of each encrypted document index and each keyword trapdoor function is calculated to obtain multiple similarity values ​​between the query vectors and the encrypted document indexes. These similarity values ​​are then compared to obtain the document corresponding to the search request based on the comparison results. This solves the problems of related technologies where retrieval schemes cannot effectively eliminate false hits from Bloom filters, resulting in low accuracy; the extracted keyword features have limited dimensions, and feature vectors degenerate after dimensionality reduction, making high-precision fuzzy keyword retrieval impossible and reducing usability.

[0125] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0126] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0127] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0128] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0129] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.

Claims

1. A multi-keyword fuzzy encrypted text retrieval method, characterized in that, Includes the following steps: The search request is decomposed to generate multiple query keywords, and multiple query vectors and their corresponding keyword trapdoor functions are generated based on the multiple query keywords. The multiple keyword trapdoor functions are used to traverse the pre-constructed multiple document encryption indexes, and the sum of the inner products of each document encryption index and each keyword trapdoor function is calculated to obtain multiple similarity values ​​between the multiple query vectors and the document encryption indexes. The multiple similarity values ​​are compared, and the document corresponding to the search request is obtained based on the comparison results; The step of decomposing the search request into multiple query keywords, and generating multiple query vectors and their corresponding keyword trapdoor functions based on the multiple query keywords, includes: The search request is decomposed to generate the multiple query keywords; Each query keyword is decomposed into a second character set consisting of adjacent characters and single characters. Then, a 26-character set of the second character set is generated using the one-hot encoding principle. 2 +26-dimensional second one-hot encoded vector; The second one-hot encoded vector is mapped to the second keyword fingerprint using a locality-sensitive hash function; The second keyword fingerprint is mapped to the index using a Bloom filter to generate a second mapping vector. The second preset position in the second mapping vector is replaced according to the IDF principle to generate a query vector for multiple query keywords corresponding to the search request; The multiple keyword trapdoor functions are generated based on the multiple query vectors.

2. The method according to claim 1, characterized in that, Before breaking down the search request into multiple query keywords, the process also includes: Extract document keywords from multiple documents, construct a plaintext index of the document keywords, and encrypt the plaintext index to obtain an encrypted document index.

3. The method according to claim 2, characterized in that, The process of extracting document keywords from multiple documents, constructing a plaintext index of the document keywords, and encrypting the plaintext index to obtain an encrypted index includes: Each keyword in the document is decomposed into a first character set consisting of adjacent characters and single characters, and a first one-hot encoded vector of the first character set is generated using the one-hot encoding principle. The first one-hot encoded vector is mapped to the first keyword fingerprint using a locality-sensitive hash function. The first keyword fingerprint is mapped to the index using a Bloom filter to generate a first mapping vector. The first preset position in the first mapping vector is replaced according to the maximum TF principle to generate the plaintext index of the document, and the plaintext index of the document is encrypted to generate the encrypted index of the document.

4. The method according to claim 1, characterized in that, The step of comparing the multiple similarity values ​​and determining the document corresponding to the search request based on the comparison results includes: Select a target number of similarity values ​​from the plurality of similarity values ​​in descending order, and use the documents corresponding to the target number of similarity values ​​as the documents corresponding to the search request.

5. The method according to any one of claims 1-4, characterized in that, The document is a document decrypted using an encryption key. After obtaining the document corresponding to the search request, the document further includes: The document corresponding to the search request is decrypted using the decryption key.

6. A multi-keyword fuzzy encrypted retrieval system, characterized in that, include: The key generation module is used to generate, distribute, and update encryption and decoding keys. The keyword decomposition module is used to decompose the search request into multiple query keywords, and generate multiple query vectors and their corresponding keyword trapdoor functions based on the multiple query keywords. The similarity calculation module is used to traverse the multiple pre-built encrypted document indexes by the multiple keyword trapdoor functions, calculate the sum of the inner products of each encrypted document index and each keyword trapdoor function, and obtain multiple similarity values ​​between the multiple query vectors and the encrypted document indexes. The keyword retrieval module is used to select a target number of similarity values ​​from the plurality of similarity values ​​in descending order, and to use the documents corresponding to the target number of similarity values ​​as the documents corresponding to the search request; The document decryption module is used to decrypt documents encrypted with the encryption key using the decryption key; The keyword decomposition module is specifically used to decompose the search request into multiple query keywords; decompose each query keyword into a second character set consisting of adjacent characters and single characters, and generate 26 characters from the second character set using the one-hot encoding principle. 2 +26-dimensional second one-hot encoded vector; map the second one-hot encoded vector to a second keyword fingerprint using a locality-sensitive hash function; map the second keyword fingerprint to the index using a Bloom filter to generate a second mapping vector; replace the second preset position in the second mapping vector according to the IDF principle to generate query vectors for multiple query keywords corresponding to the search request; generate multiple keyword trapdoor functions based on the multiple query vectors.

7. The system according to claim 6, characterized in that, Also includes: A construction module is used to extract document keywords from multiple documents, construct a plaintext index of the document keywords, and encrypt the plaintext index to obtain an encrypted index.

8. The system according to claim 7, characterized in that, The construction module is specifically used to: decompose each keyword in the document into a first character set consisting of adjacent characters and single characters; generate a first one-hot encoded vector for the first character set using the one-hot encoding principle; map the first one-hot encoded vector to a first keyword fingerprint using a locality-sensitive hash function; map the first keyword fingerprint to an index using a Bloom filter to generate a first mapping vector; replace a first preset position in the first mapping vector according to the maximum TF principle to generate the plaintext index of the document; and encrypt the plaintext index of the document to generate the encrypted index of the document.

Citation Information

Patent Citations

  • Searchable encryption method and system for supporting fuzzy retrieval of word morphology and word meaning in cloud environments

    CN108712366A