Fuzzy Searchable Encryption Method, Device and Electronic Equipment

By building a search tree based on Bloom filter on a private cloud server and uploading it to a public cloud server, the existing fuzzy searchable encryption methods in terms of storage space occupation and retrieval efficiency are solved, and the search result sorting is achieved that is more in line with user expectations.

CN115757676BActive Publication Date: 2025-07-01INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211262289.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-14
Publication Date
2025-07-01
Estimated Expiration
2042-10-14

AI Technical Summary

Technical Problem

The existing fuzzy searchable encryption methods have problems with storage space occupancy and retrieval efficiency, and the search results sorting does not meet user expectations.

Method used

Through a private cloud server, a search tree based on Bloom filter grouping is constructed and a public cloud server is uploaded, the index key and search keywords of the data user are received, the search fuzzy word set is constructed and the trap value is calculated. The public cloud server retrieves the trap set based on the search tree and obtains the search document identification, calculates the sorting score and returns it to the private cloud server for sorting.

Benefits of technology

Improve search efficiency and accuracy, making the search results more in line with users' expected needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757676B_ABST
    Figure CN115757676B_ABST
Patent Text Reader

Abstract

The present invention provides a fuzzy searchable encryption method, apparatus and electronic device. The method includes: a private cloud server receives an index key and a query request including a retrieval keyword sent by a data user; constructs a retrieval fuzzy word set according to the retrieval keyword and calculates a corresponding trapdoor set according to the index key; sends a search request including the trapdoor set to a public cloud server; receives multiple retrieved document identifiers and their corresponding sorting scores returned by the public cloud server; the multiple retrieved document identifiers are obtained by the public cloud server retrieving and matching the trapdoor set according to a search tree grouped based on a Bloom filter constructed and uploaded by the private cloud server, and the sorting scores are calculated by the public cloud server according to the encryption relevance score and the encrypted query value sent by the private cloud server; sorts the multiple retrieved document identifiers according to the sorting scores to form a search result and returns it to the data user. Thereby, the retrieval efficiency is improved, and the search result better meets the needs of the data user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular, to a fuzzy searchable encryption method, apparatus, and electronic device. Background Art

[0002] It is necessary to support fuzzy search under the condition of ciphertext storage. Currently, there are various methods to implement fuzzy searchable encryption. For example, first construct a fuzzy word set by direct construction, wildcard construction, or N-gram construction, and then construct a tree-shaped trie; there is also a semantic extension algorithm that can not only return exactly matched data but also return content semantically related to the query keyword; there is also a method to establish a Chinese fuzzy keyword set based on wildcard construction, pinyin construction, and improved pinyin construction, and design a Chinese fuzzy searchable encryption scheme that supports sorting through the improved Term Frequency-Inverse Document Frequency (TF-IDF) criterion.

[0003] However, the practical effects of these fuzzy searchable encryption methods are not ideal, and there are problems such as the large storage space occupied by the fuzzy word set, low retrieval efficiency, and the sorting result of the search results not meeting the user's expectations. Summary of the Invention

[0004] In view of the problems existing in the prior art, the present invention provides a fuzzy searchable encryption method, apparatus, and electronic device.

[0005] In a first aspect, the present invention provides a fuzzy searchable encryption method applied to a private cloud server, including:

[0006] Receiving an index key and a query request sent by a data user, where the query request includes a retrieval keyword;

[0007] Constructing a retrieval fuzzy word set according to the retrieval keyword, and calculating a trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key to obtain a trapdoor set corresponding to the retrieval fuzzy word set;

[0008] Sending a search request to a public cloud server, where the search request includes the trapdoor set;

[0009] Receive multiple retrieved document identifiers returned by the public cloud server, and the sorting scores corresponding to each retrieved document identifier; wherein, the multiple retrieved document identifiers are obtained by the public cloud server retrieving the trapdoor set and matching based on the search tree grouped by Bloom filters constructed and uploaded by the private cloud server, and the sorting score corresponding to each retrieved document identifier is calculated by the public cloud server according to the encrypted relevance score and the encrypted query value corresponding to each retrieved document identifier sent by the private cloud server, the encrypted relevance score is obtained by encrypting the relevance score between the retrieval keyword and the retrieved document, and the encrypted query value is obtained by encrypting the query value of the retrieved document;

[0010] Sort the multiple retrieved document identifiers according to the sorting scores, and form a search result to be returned to the data user.

[0011] Optionally, the construction method of the search tree grouped by Bloom filters includes:

[0012] Calculate the corresponding index value for each fuzzy word in the fuzzy word set of the uploaded document;

[0013] Add multiple index values belonging to the same uploaded document to the Bloom filter corresponding to the same uploaded document, and use the Bloom filter as a leaf node;

[0014] Perform an OR operation on adjacent Bloom filters to generate a new Bloom filter as the parent node of the adjacent Bloom filters;

[0015] Repeat the process of generating the parent node until the root node is generated.

[0016] Optionally, the method further includes:

[0017] Calculate the similarity between different Bloom filters, and arrange and divide the Bloom filters according to the similarity.

[0018] Optionally, the generation method of the fuzzy word set of the uploaded document includes:

[0019] Receive the keyword set of the uploaded document, and the keyword set of the uploaded document is sent to the private cloud server by the data owner after being extracted using the Word word segmentation tool;

[0020] Based on the thesaurus, construct the fuzzy word set corresponding to the keyword set of the uploaded document.

[0021] Optionally, the sorting score is determined by the following formula:

[0022] Quality=Dec sim *weight sim +Decq *weight q

[0023] where Quality represents the sorting score, and Dec sim represents the encryption relevance score, and Dec q represents the encrypted query value, and weight sim and weight q represent the weight of the encryption relevance score and the weight of the encrypted query value respectively.

[0024] Optionally, the method for determining the query value of the retrieved document includes:

[0025] Initialize the query values of all retrieved documents to 1;

[0026] Update the query value according to the query value update rule;

[0027] The query value update rule includes:

[0028] If it is determined that the target retrieved document is downloaded, add 1 to the query value of the target retrieved document;

[0029] If it is determined that the target retrieved document is not downloaded within a preset time period, subtract 1 from the query value of the target retrieved document.

[0030] In a second aspect, the present invention further provides a fuzzy searchable encryption device, which is applied to a private cloud server and includes:

[0031] A first receiving module, configured to receive an index key and a query request sent by a data user, where the query request includes a retrieval keyword;

[0032] A trapdoor module, configured to construct a retrieval fuzzy word set according to the retrieval keyword, and calculate a trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key, to obtain a trapdoor set corresponding to the retrieval fuzzy word set;

[0033] A sending module, configured to send a search request to a public cloud server, where the search request includes the trapdoor set;

[0034] A second receiving module, configured to receive a plurality of retrieved document identifiers returned by the public cloud server, and a sorting score corresponding to each retrieved document identifier; wherein, the plurality of retrieved document identifiers are obtained by the public cloud server retrieving the trapdoor set based on the search tree grouped by the Bloom filter constructed and uploaded by the private cloud server and matching, and the sorting score corresponding to each retrieved document identifier is calculated by the public cloud server according to the encrypted relevance score and the encrypted query value corresponding to each retrieved document identifier sent by the private cloud server, the encrypted relevance score is obtained by encrypting the relevance score between the retrieved keyword and the retrieved document, and the encrypted query value is obtained by encrypting the query value of the retrieved document;

[0035] A sorting module, configured to sort the plurality of retrieved document identifiers according to the sorting score, and form a search result to be returned to the data user.

[0036] In a third aspect, the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the fuzzy searchable encryption method described in the first aspect above is implemented.

[0037] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the fuzzy searchable encryption method described in the first aspect above is implemented.

[0038] In a fifth aspect, the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the fuzzy searchable encryption method described in any one of the above is implemented.

[0039] The fuzzy searchable encryption method, device and electronic device provided by the present invention, by constructing a search tree grouped by the Bloom filter on the private cloud server and uploading it to the public cloud server, receiving the index key and the retrieved keyword of the data user, constructing a retrieved fuzzy word set according to the retrieved keyword, calculating the trapdoor value corresponding to each retrieved fuzzy word in the retrieved fuzzy word set according to the index key, obtaining the trapdoor set corresponding to the retrieved fuzzy word set, the public cloud server retrieves the trapdoor set based on the search tree grouped by the Bloom filter and matches to obtain a plurality of retrieved document identifiers, and calculates the sorting scores of these retrieved documents according to the encrypted relevance score and the encrypted query value, and then the private cloud server sorts the plurality of retrieved document identifiers according to the sorting scores to form a search result to be returned to the data user, thereby improving the retrieval efficiency and making the search result more in line with the needs of the data user. Description of the Drawings

[0040] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0041] Figure 1 is a schematic flowchart of the fuzzy searchable encryption method provided by the present invention;

[0042] Figure 2 is a schematic diagram of the search tree based on the Bloom filter grouping provided by the present invention;

[0043] Figure 3 is a schematic framework diagram of the fuzzy searchable encryption system provided by the present invention;

[0044] Figure 4 is a schematic structural diagram of the fuzzy searchable encryption device provided by the present invention;

[0045] Figure 5 is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners

[0046] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.

[0047] With the development of cloud service technology, the convenience of users for data storage and access has been greatly improved, and a large number of users have started to upload personal data to the cloud. However, while users enjoy the convenience brought by the "cloud", they also face the problem of privacy data leakage. To avoid data leakage, users generally choose to encrypt and upload the data, but this also makes some functions of the cloud service that are only available in plain text unavailable.

[0048] To solve the usability problem after data is encrypted and uploaded, the concept of searchable encryption is proposed. The core idea is to generate a secure index from the keywords extracted from the data and obtain relevant results by using the corresponding relationship between the index and the data during retrieval. However, most of the current searchable encryption schemes only support exact search and cannot handle the situation where the user enters a spelling mistake or the retrieval keyword is not clear, and the returned result is quite different from the user's expected result. Therefore, it is very necessary to support fuzzy search under the condition of ciphertext storage.

[0049] There are various methods to implement fuzzy searchable encryption at present. For example, first construct a fuzzy word set by direct construction, wildcard construction or N-gram construction, and then construct a tree-shaped trie; a semantic extension algorithm that can not only return exactly matched data, but also return content semantically related to the query keyword; three methods to establish a Chinese fuzzy keyword set based on wildcard construction, pinyin construction and improved pinyin construction, and design a Chinese fuzzy searchable encryption scheme supporting sorting through an improved TF-IDF criterion.

[0050] However, among the numerous proposed implementation methods, the practical effect is not ideal. The fuzzy word set occupies a large amount of storage space and has low efficiency during retrieval. And almost all fuzzy search schemes have a single factor when sorting the results, and the sorting results are not good. In extreme cases, if the text collection is of the same type of text (such as a document set formed entirely by documents containing the keyword "history"), the statistical effect of text features will deteriorate, resulting in a large gap between the sorting results and the user's psychological expectations.

[0051] To address these problems, the present invention proposes a fuzzy searchable encryption method, device and electronic device, which can sort the results from multiple dimensions while ensuring privacy, improve the retrieval efficiency and accuracy, and make the sorting results more in line with user expectations.

[0052] Figure 1 It is a schematic flow diagram of the fuzzy searchable encryption method provided by the present invention. As Figure 1 shown, this method is applied to a private cloud server and includes the following steps:

[0053] Step 100: Receive the index key and query request sent by the data user, and the query request includes the retrieval keyword.

[0054] Specifically, in the case where the data owner needs to upload the uploaded document to the public cloud server, the data owner can first generate a document key, a hash function key and an index key through a key generation function. For example, by inputting the security parameter λ, calculate to generate the document key k1, the hash function key k2, and the index key sk.

[0055] Among them, the document key is used to encrypt and decrypt the uploaded document, the hash function key is used to authenticate the hash function used in the Bloom filter, such as the Message Authentication Code (MAC), and the index key is used to calculate the index value and the trapdoor value respectively for the fuzzy words of the uploaded document and the fuzzy words of the retrieval keyword.

[0056] After obtaining the document key, the hash function key, and the index key, the data owner encrypts the uploaded document and uploads it to the public cloud server, and extracts the keywords of the uploaded document to obtain the keyword set of the uploaded document.

[0057] The data owner can send the hash function key, the index key, and the keyword set of the uploaded document to the private cloud server through a secure channel, and share the document key and the index key with the data user.

[0058] In the case where the data user needs to retrieve and download the document uploaded by the data owner to the public cloud server, the data user can send the index key and the query request to the private cloud server. Among them, the query request includes the retrieval keyword, and the retrieval keyword is the keyword input by the data user when retrieving the document that the data user wants to use.

[0059] Step 101: Construct a retrieval fuzzy word set according to the retrieval keyword, and calculate the trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key to obtain the trapdoor set corresponding to the retrieval fuzzy word set.

[0060] Specifically, after the private cloud server receives the index key and the query request sent by the data user, it can construct a retrieval fuzzy word set according to the retrieval keyword in the query request. The method of constructing the retrieval fuzzy word set is not limited. For example, it can be constructed according to a thesaurus.

[0061] After obtaining the retrieval fuzzy word set, the private cloud server can calculate the trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key, so as to obtain the trapdoor set corresponding to the retrieval fuzzy word set. The method of calculating the trapdoor value is not limited. For example, it can be calculated by a one-way irreversible pseudo-random function.

[0062] Previously, after the private cloud server receives the keyword set of the uploaded document sent by the data owner, it can construct a fuzzy word set of the uploaded document according to the keyword set of the uploaded document. The method of constructing the fuzzy word set of the uploaded document is not limited. For example, it can be constructed according to a thesaurus.

[0063] After obtaining the fuzzy word set of the uploaded document, the private cloud server can calculate the index value corresponding to each fuzzy word in the fuzzy word set of the uploaded document according to the index key, so as to obtain the index set corresponding to the fuzzy word set of the uploaded document. The method of calculating the index value is not limited. For example, it can be calculated by a one-way irreversible pseudo-random function.

[0064] It can be understood that the method of constructing the retrieval fuzzy word set by the private cloud server and the method of constructing the fuzzy word set of the uploaded document should be the same; and the calculation methods used to calculate the trapdoor value and the index value according to the same index key should also be the same.

[0065] Step 102: Send a search request to the public cloud server. The search request includes a trapdoor set.

[0066] Specifically, after obtaining the trapdoor set, the private cloud server can send a search request to the public cloud server. The search request includes the trapdoor set, enabling the public cloud server to retrieve the trapdoor set according to the search tree grouped by Bloom filters and match multiple retrieved documents after receiving the search request containing the trapdoor set.

[0067] Step 103: Receive multiple retrieved document identifiers returned by the public cloud server, and the sorting score corresponding to each retrieved document identifier; among them, the multiple retrieved document identifiers are obtained by the public cloud server retrieving and matching the trapdoor set according to the search tree grouped by Bloom filters constructed and uploaded by the private cloud server, and the sorting score corresponding to each retrieved document identifier is calculated by the public cloud server according to the encrypted relevance score and encrypted query value corresponding to each retrieved document identifier sent by the private cloud server. The encrypted relevance score is obtained by encrypting the relevance score between the retrieval keyword and the retrieved document, and the encrypted query value is obtained by encrypting the query value of the retrieved document.

[0068] Specifically, after the public cloud server retrieves and matches the trapdoor set according to the search tree grouped by Bloom filters to obtain multiple retrieved documents, it can return the identifiers of these multiple retrieved documents to the private cloud server. After receiving the identifiers of these multiple retrieved documents, the private cloud server can calculate the relevance score between the retrieval keyword and the document keywords of these multiple retrieved documents and obtain the query values of these multiple retrieved documents.

[0069] Calculating the relevance score between the retrieval keyword and the document keywords of these multiple retrieved documents can be calculated according to the TF-IDF algorithm, and its formula is as follows:

[0070] Sim = (1 + ln N f ) * ln(1 + n / n w )

[0071] Where Sim represents the relevance score; N f represents the frequency of the retrieval keyword appearing in the retrieved document, which is the ratio of the number of times the retrieval keyword appears in the document to the total number of keywords; n is the total number of retrieved documents, and n w is the number of retrieved documents containing the retrieval keyword w.

[0072] Then the private cloud server can encrypt the relevance score and the query value.

[0073] The method of encrypting the relevance score and the query value can be homomorphic encryption, and its formula is as follows:

[0074] cipher = gm ·r n mod n 2

[0075] Among them, cipher is the value obtained after encryption, n and g are public parameters, m is the original text (i.e., the relevance score or query value), r is a random number, and m and r are less than n.

[0076] After encrypting the relevance score and query value, the private cloud server sends the encrypted relevance score and encrypted query value to the public cloud server. The public cloud server calculates the sorting score corresponding to each retrieved document identifier based on the encrypted relevance score and encrypted query value sent by the private cloud server, and then returns it to the private cloud server.

[0077] In one implementation, the sorting score corresponding to each retrieved document identifier can be determined by the following formula:

[0078] Quality = Dec sim *weight sim +Dec q *weight q

[0079] Among them, Quality represents the sorting score, Dec sim represents the encrypted relevance score, Dec q represents the encrypted query value, weight sim 、weight q respectively represent the weight of the encrypted relevance score and the weight of the encrypted query value. The weight of the encrypted relevance score and the weight of the encrypted query value can be preset.

[0080] Step 104: Sort the multiple retrieved document identifiers according to the sorting score, and form a search result to return to the data user.

[0081] Specifically, after the private cloud server receives the sorting score corresponding to each retrieved document identifier, it can decrypt the sorting score.

[0082] When the method of encrypting the relevance score and query value is homomorphic encryption, the method of decrypting the sorting score is homomorphic decryption, and its formula is as follows:

[0083]

[0084] Among them, plain is the value obtained after decryption, λ and n are public parameters, c is the ciphertext (i.e., the sorting score calculated according to the encrypted relevance score and encrypted query value sorting score), and c is less than n 2, L is a functional function, i.e., L(u) = (u - 1) / u.

[0085] After obtaining the decrypted sorting scores, the private cloud server can sort these multiple retrieved document identifiers according to the decrypted sorting scores (for example, in descending order of the sorting scores), so as to form a search result and return it to the data user.

[0086] The fuzzy searchable encryption method provided by the present invention constructs a search tree based on Bloom filter grouping by the private cloud server and uploads it to the public cloud server, receives the index key and retrieval keyword of the data user, constructs a retrieval fuzzy word set according to the retrieval keyword, calculates the trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key, obtains the trapdoor set corresponding to the retrieval fuzzy word set, the public cloud server retrieves the trapdoor set according to the search tree based on Bloom filter grouping and matches to obtain multiple retrieved document identifiers, calculates the sorting scores of these multiple retrieved documents according to the encryption relevance score and the encrypted query value, and then the private cloud server sorts the multiple retrieved document identifiers according to the sorting scores to form a search result and return it to the data user, thereby improving the retrieval efficiency and making the search result more in line with the needs of the data user.

[0087] Optionally, the construction method of the search tree based on Bloom filter grouping includes:

[0088] Calculate the corresponding index value for each fuzzy word in the fuzzy word set of the uploaded document;

[0089] Add multiple index values belonging to the same uploaded document to the Bloom filter corresponding to the same uploaded document, and use the Bloom filter as a leaf node;

[0090] Perform an OR operation on adjacent Bloom filters to generate a new Bloom filter as the parent node of the adjacent Bloom filters;

[0091] Repeat the process of generating the parent node until the root node is generated.

[0092] Specifically, after the private cloud server receives the keyword set of the uploaded document sent by the data owner, it can construct the fuzzy word set of the uploaded document according to the keyword set of the uploaded document, and calculate the corresponding index value for each fuzzy word in the fuzzy word set of the uploaded document according to the index key, so as to obtain the index set corresponding to the fuzzy word set of the uploaded document.

[0093] One uploaded document corresponds to one keyword set, so one uploaded document corresponds to one index set. Set one uploaded document to correspond to one Bloom filter.

[0094] Figure 2 is a schematic diagram of the search tree based on Bloom filter grouping provided by the present invention, as Figure 2As shown, add the multiple index values included in the index set of each uploaded document to the Bloom filter corresponding to the uploaded document, and use each Bloom filter corresponding to the uploaded document as a leaf node. Then perform an OR operation on adjacent Bloom filters to generate a new Bloom filter as the parent node of the adjacent Bloom filters. For example, if f1 is 101100 and f2 is 111100, then r1 = f1 | f2, which is 111100.

[0095] Then process other Bloom filters in the same way until the root node is generated, and a search tree grouped based on Bloom filters is constructed.

[0096] After receiving a search request including a trapdoor set, the public cloud server can retrieve the trapdoor set according to the search tree grouped based on Bloom filters to match multiple retrieved documents. As Figure 2 shown, the process of retrieving the trapdoor set can be: when the trapdoor value of a certain retrieved fuzzy word is mapped to position 5 (i.e., the 5th bit) in the Bloom filter, and the position 5 of node r is 1, then continue to check the child nodes. The position 5 of node r1 is not 1, so it will not continue to retrieve downward; the position 5 of node r2 is 1, so continue to retrieve downward. Finally, node f4 is found, and the uploaded document corresponding to the Bloom filter corresponding to node f4 is the retrieved document.

[0097] Optionally, the method further includes:

[0098] Calculate the similarity between different Bloom filters, and arrange and divide the Bloom filters according to the similarity.

[0099] Specifically, during the process of constructing the search tree, the similarity between different Bloom filters can be calculated, and according to the similarity, make the Bloom filters with higher similarity be on the same side of the search tree as much as possible.

[0100] In one implementation, the cosine similarity can be used to calculate the similarity between different Bloom filters.

[0101] By grouping the Bloom filters through similarity calculation, Bloom filters with similar forms can be mostly located on the same side of the search tree, and the search tree can be pruned during retrieval to improve the efficiency during actual retrieval.

[0102] Optionally, the generation method of the fuzzy word set of the uploaded document includes:

[0103] Receive the keyword set of the uploaded document. The keyword set of the uploaded document is extracted by the data owner using a Word segmentation tool and sent to the private cloud server;

[0104] Based on the thesaurus, construct the fuzzy word set corresponding to the keyword set of the uploaded document.

[0105] Specifically, the data owner can send the keyword set of the uploaded document to the private cloud server. When generating the keyword set of the uploaded document, a Word segmentation tool can be used to complete the keyword extraction of the Chinese document. Among them, the Word segmentation tool is a distributed Chinese word segmentation component implemented in Java.

[0106] Then, the private cloud server can construct a fuzzy word set corresponding to the keyword set of the uploaded document based on the synonym dictionary established in advance using the corpus.

[0107] By establishing a word segmentation dictionary and a synonym dictionary through the collected corpus, then using the Word segmentation tool to complete the keyword extraction and fuzzy word set construction of the Chinese document, and then mapping it to the Bloom filter. The fuzzy word set construction time and storage space of this method are much smaller than those of constructing a fuzzy word set based on pinyin. At the same time, compared with constructing a fuzzy word set based on wildcards, the greater the edit distance, the better the improvement of this method in terms of construction time and storage space.

[0108] Optionally, the determination method of the query value of the retrieved document includes:

[0109] Initialize the query value of all retrieved documents to 1;

[0110] Update the query value according to the query value update rule;

[0111] The query value update rule includes:

[0112] If it is determined that the target retrieved document is downloaded, add 1 to the query value of the target retrieved document;

[0113] If it is determined that the target retrieved document is not downloaded within the preset duration, subtract 1 from the query value of the target retrieved document.

[0114] Specifically, the private cloud server can set the query value of the retrieved document. First, initialize the query value of all retrieved documents to 1, and then update the query value according to the query value update rule: when the target retrieved document is downloaded by the data user, add 1 to the query value of the target retrieved document; regularly check the download status of each retrieved document, if the target retrieved document is not downloaded within the preset duration, subtract 1 from the query value of the target retrieved document; the minimum value of the query value of the target document is 1.

[0115] Figure 3 It is a framework schematic diagram of the fuzzy searchable encryption system provided by the present invention. As Figure 3 shown, the system includes four entities: a data owner, a data user, a public cloud server, and a private cloud server. The following introduces the specific implementation process of the fuzzy searchable encryption method provided by the present invention based on this system, including:

[0116] Step S1: Initialize and generate keys, including the following steps:

[0117] Step S1-1: Generate keys. The data owner inputs the security parameter λ and calculates to generate the document key k1, the hash function key k2, and the index key sk.

[0118] Step S1-2: Segment the document. Using the Word segmentation tool, according to the dictionary established in advance with the corpus, extract the keyword set W = {W1, W2, …, W n} from the document D.

[0119] Step S1-3: Send {k1, k2, sk, W} to the private cloud server through a secure channel, and share {k1, sk} with the data user at the same time.

[0120] Step S2: Construct the fuzzy word set, including the following steps:

[0121] According to the thesaurus, generate the fuzzy word set W′ i for each keyword W of the document i ={w1, w2, … w f}.

[0122] Step S3: Establish an index, including the following steps:

[0123] Step S3-1: The private cloud server calculates the index value i for each keyword w′ ∈ W′ (1 ≤ i ≤ f) in the fuzzy word set where f() is a one-way irreversible pseudo-random function.

[0124] Step S3-2: Add the calculated index values to the Bloom filter, and construct a search tree I grouped based on the Bloom filter according to the generation steps W . The node f i stores the original document keyword information, r1 = f1|f2, r2 = f3|f4, …, and so on, to obtain the final search tree I grouped based on the Bloom filter W .

[0125] Step S3-3: Upload the search tree I grouped based on the Bloom filter w to the public cloud server.

[0126] Step S4: Encrypt. Encrypt the document D using the symmetric encryption algorithm to generate the ciphertext document C, and upload it to the public cloud server.

[0127] Step S5: Generate a trapdoor, including the following steps:

[0128] Step S5-1: Construct a fuzzy word set of retrieval keywords. The private cloud server receives the key and query request sent by the data user, and first constructs a fuzzy word set W' of the retrieval keywords in the same way. q .

[0129] Step S5-2: Calculate the trapdoor. For each keyword w' q in the fuzzy word set W' j ∈W' q calculate its trapdoor value

[0130] Step S5-3: Send the finally generated trapdoor set T W to the public cloud server and request retrieval.

[0131] Step S6: Retrieval, including the following steps:

[0132] Step S6-1: Trapdoor matching. After receiving the retrieval request sent by the private cloud server, the public cloud server uses the trapdoor value to match in the search tree grouped by Bloom filters. For example, the trapdoor value of the retrieval keyword w' j is mapped to position 5 in the Bloom filter. If the value at position 5 of node r is 1, then continue to check the child nodes; if the value at position 5 of node r1 is not 1, no further retrieval will be continued; if the value at position 5 of node r2 is 1, continue to check downward, and finally find node f4 (the value at position 5 of node f4 is 1), and obtain the document information corresponding to the node. After obtaining the document information corresponding to the node, return it to the private cloud server.

[0133] Step S6-2: Calculate the relevance of the retrieval results. The private cloud server calculates the relevance score Sim between the retrieval keyword and the document keyword according to the TF-IDF rule and homomorphically encrypts it to obtain Dec sim , and then obtains the query value Q of the document and homomorphically encrypts it to obtain Dec q , and sends it to the public cloud server. The public cloud server calculates the sorting value Quality.

[0134] The process uses the following formula:

[0135] Sim = (1 + ln N f ) * ln(1 + n / n w )

[0136] Quality = Dec sim *weight sim +Dec q *weight q

[0137] Homomorphic encryption: cipher = g m ·r n mod n2

[0138] Among them, Sim represents the relevance score; N f represents the frequency of the retrieval keyword appearing in the retrieval document, which is the ratio of the number of times the retrieval keyword appears in the document to the total number of keywords; n is the total number of retrieval documents, n w is the number of retrieval documents containing the retrieval keyword w.

[0139] Quality represents the sorting score, Dec sim represents the encryption relevance score, Dec q represents the encrypted query value, weight sim 、weight q represent the weight of the encryption relevance score and the weight of the encrypted query value respectively. The weights of the encryption relevance score and the encrypted query value can be preset.

[0140] cipher is the value obtained after encryption, n and g are public parameters, m is the original text (i.e., the relevance score or query value), r is a random number, and m and r are less than n.

[0141] After the calculation is completed, the sorting value corresponding to the document identifier is returned to the private cloud server.

[0142] Step S6-3: Sort the retrieval results. The private cloud server homomorphically decrypts the sorting value to complete the sorting, and returns the top k results to the data user.

[0143] The homomorphic decryption formula is as follows:

[0144] Homomorphic decryption:

[0145] Among them, plain is the value obtained after decryption, λ and n are public parameters, c is the ciphertext (i.e., the sorting score calculated according to the encryption relevance score and the encryption query value sorting score), and c is less than n 2 , L is a functional function, that is, L(u)=(u - 1) / u.

[0146] Step S7: Decrypt and download, including the following steps:

[0147] Step S7-1: Download the document. The data user downloads the document from the public cloud server according to the demand, and at the same time feeds back the identifier of the downloaded document to the private cloud server, and adds 1 to the query value of the document downloaded in this query.

[0148] Step S7-2: Decrypt the document. The data user uses the document key k1 to complete the decryption.

[0149] Step S7-3: Maintain the query value. Regularly check the document download situation. If the time since the last query of the document exceeds the threshold T from the current time, then subtract 1 from the query value.

[0150] In summary, this embodiment mainly includes functions such as dictionary establishment, construction of a synonymous fuzzy word set, generation of a search tree based on Bloom filter grouping, and fuzzy search under ciphertext. The search tree is generated by extracting keyword information from the document, and then the document is encrypted and uploaded. When retrieving, a trapdoor is generated and matched, and finally the retrieval results are returned sorted by relevance. At the same time, to optimize the subsequent sorting results, the document download situation of data users will be recorded.

[0151] Next, the fuzzy searchable encryption device provided by the present invention will be described. The fuzzy searchable encryption device described below can be correspondingly referred to the fuzzy searchable encryption method described above.

[0152] Figure 4 is a schematic structural diagram of the fuzzy searchable encryption device provided by the present invention, as Figure 4 shown. The device includes:

[0153] A first receiving module 400, configured to receive an index key and a query request sent by a data user, where the query request includes a retrieval keyword;

[0154] A trapdoor module 410, configured to construct a retrieval fuzzy word set according to the retrieval keyword, and calculate a trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key, to obtain a trapdoor set corresponding to the retrieval fuzzy word set;

[0155] A sending module 420, configured to send a search request to a public cloud server, where the search request includes the trapdoor set;

[0156] A second receiving module 430, configured to receive multiple retrieved document identifiers returned by the public cloud server, and a sorting score corresponding to each retrieved document identifier; wherein, the multiple retrieved document identifiers are obtained by the public cloud server retrieving and matching the trapdoor set according to the search tree based on Bloom filter grouping constructed and uploaded by the private cloud server, and the sorting score corresponding to each retrieved document identifier is calculated by the public cloud server according to the encrypted relevance score corresponding to each retrieved document identifier sent by the private cloud server and the encrypted query value. The encrypted relevance score is obtained by encrypting the relevance score between the retrieval keyword and the retrieved document, and the encrypted query value is obtained by encrypting the query value of the retrieved document;

[0157] A sorting module 440, configured to sort the multiple retrieved document identifiers according to the sorting score, and form a search result to be returned to the data user.

[0158] Optionally, the construction method of the search tree based on Bloom filter grouping includes:

[0159] Calculate the corresponding index value for each fuzzy word in the fuzzy word set of the uploaded document;

[0160] Add multiple index values belonging to the same uploaded document to the Bloom filter corresponding to the same uploaded document, and use the Bloom filter as a leaf node;

[0161] Perform an OR operation on adjacent Bloom filters to generate a new Bloom filter as the parent node of the adjacent Bloom filters;

[0162] Repeat the process of generating parent nodes until the root node is generated.

[0163] Optionally, the device further includes a calculation module for:

[0164] Calculate the similarity between different Bloom filters, and arrange and divide the Bloom filters according to the similarity.

[0165] Optionally, the generation method of the fuzzy word set of the uploaded document includes:

[0166] Receive the keyword set of the uploaded document, where the keyword set of the uploaded document is extracted by the data owner using a Word segmentation tool and sent to the private cloud server;

[0167] Based on a thesaurus, construct a fuzzy word set corresponding to the keyword set of the uploaded document.

[0168] Optionally, the sorting score is determined by the following formula:

[0169] Quality = Dec sim *weight sim +Dec q *weight q

[0170] where Quality represents the sorting score, Dec sim represents the encryption relevance score, Dec q represents the encryption query value, weight sim 、weight q represent the weight of the encryption relevance score and the weight of the encryption query value respectively.

[0171] Optionally, the determination method of the query value for retrieving a document includes:

[0172] Initialize the query value of all retrieved documents to 1;

[0173] Update the query value according to the query value update rule;

[0174] The query value update rule includes:

[0175] If it is determined that the target retrieval document is downloaded, increment the query value of the target retrieval document by 1;

[0176] If it is determined that the target retrieval document is not downloaded within the preset duration, decrement the query value of the target retrieval document by 1.

[0177] It should be noted here that the above device provided by the present invention can implement all the method steps implemented by the above method embodiments and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments in this embodiment will not be specifically described herein.

[0178] Figure 5 It is a schematic structural diagram of the electronic device provided by the present invention. As Figure 5 shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communications interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logical instructions in the memory 530 to execute any one of the fuzzy searchable encryption methods provided by the above embodiments.

[0179] In addition, when the logical instructions in the above memory 530 are implemented in the form of a software functional unit and sold or used as an independent product, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.

[0180] It should be noted here that the electronic device provided by the present invention can implement all the method steps implemented by the above method embodiments and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments in this embodiment will not be specifically described herein.

[0181] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute any of the fuzzy searchable encryption methods provided in the above embodiments.

[0182] It should be noted here that the computer program product provided by the present invention can implement all the method steps implemented by the above method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be specifically described in this embodiment.

[0183] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute any of the fuzzy searchable encryption methods provided in the above embodiments.

[0184] It should be noted here that the non-transitory computer-readable storage medium provided by the present invention can implement all the method steps implemented by the above method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be specifically described in this embodiment.

[0185] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0186] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fuzzy searchable encryption method, characterized in that, Applied to a private cloud server, including: Receiving an index key and a query request sent by a data user, where the query request includes a retrieval keyword; Constructing a retrieval fuzzy word set according to the retrieval keyword, and calculating a trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key to obtain a trapdoor set corresponding to the retrieval fuzzy word set; Sending a search request to a public cloud server, where the search request includes the trapdoor set; Receiving multiple retrieved document identifiers returned by the public cloud server, and a sorting score corresponding to each retrieved document identifier; wherein, the multiple retrieved document identifiers are retrieved and matched by the public cloud server according to a search tree grouped based on a Bloom filter constructed and uploaded by the private cloud server, and the sorting score corresponding to each retrieved document identifier is calculated by the public cloud server according to an encrypted relevance score corresponding to each retrieved document identifier sent by the private cloud server and an encrypted query value, the encrypted relevance score is obtained by encrypting the relevance score between the retrieval keyword and the retrieved document, and the encrypted query value is obtained by encrypting the query value of the retrieved document; Sorting the multiple retrieved document identifiers according to the sorting score, and forming a search result to be returned to the data user; The construction method of the search tree grouped based on a Bloom filter includes: Calculating a corresponding index value for each fuzzy word in the fuzzy word set of the uploaded document; Adding multiple index values belonging to the same uploaded document to the Bloom filter corresponding to the same uploaded document, and using the Bloom filter as a leaf node; Performing an OR operation on adjacent Bloom filters to generate a new Bloom filter as the parent node of the adjacent Bloom filters; Repeating the process of generating the parent node until the root node is generated; The sorting score is determined by the following formula: Quality=Dec sim *weight sim +Dec q *weight q Among them, Quality represents the sorting score, Dec sim represents the encryption relevance score, Dec q represents the encrypted query value, weight sim 、weight q respectively represent the weights of the encryption relevance score and the weights of the encrypted query value.

2. The fuzzy searchable encryption method according to claim 1, wherein The method further includes: Calculating the similarity between different Bloom filters, and arranging and dividing the Bloom filters according to the similarity.

3. The fuzzy searchable encryption method according to claim 1, wherein The generation method of the fuzzy word set of the uploaded document includes: Receiving a keyword set of the uploaded document, where the keyword set of the uploaded document is extracted by a data owner using a Word segmentation tool and sent to the private cloud server; Constructing a fuzzy word set corresponding to the keyword set of the uploaded document based on a thesaurus.

4. The fuzzy searchable encryption method according to claim 1, wherein The determination method of the query value of the retrieved document includes: Initializing the query value of all retrieved documents to 1; Updating the query value according to a query value update rule; The query value update rule includes: If it is determined that the target retrieved document is downloaded, adding 1 to the query value of the target retrieved document; If it is determined that the target retrieved document is not downloaded within a preset time period, subtracting 1 from the query value of the target retrieved document.

5. A fuzzy searchable encryption device, characterized in that, Applied to a private cloud server, including: A first receiving module, configured to receive an index key and a query request sent by a data user, where the query request includes a retrieval keyword; A trapdoor module, configured to construct a retrieval fuzzy word set according to the retrieval keyword, and calculate a trapdoor value corresponding to each retrieval fuzzy word in the retrieval fuzzy word set according to the index key, so as to obtain a trapdoor set corresponding to the retrieval fuzzy word set; A sending module, configured to send a search request to a public cloud server, where the search request includes the trapdoor set; A second receiving module, configured to receive multiple retrieved document identifiers returned by the public cloud server, and a sorting score corresponding to each retrieved document identifier; wherein, the multiple retrieved document identifiers are obtained by the public cloud server retrieving and matching the trapdoor set according to a search tree grouped based on a Bloom filter constructed and uploaded by the private cloud server, and the sorting score corresponding to each retrieved document identifier is calculated by the public cloud server according to an encrypted relevance score and an encrypted query value corresponding to each retrieved document identifier sent by the private cloud server, the encrypted relevance score is obtained by encrypting the relevance score between the retrieval keyword and the retrieved document, and the encrypted query value is obtained by encrypting the query value of the retrieved document; A sorting module, configured to sort the multiple retrieved document identifiers according to the sorting score, and form a search result to be returned to the data user; The construction method of the search tree grouped based on a Bloom filter includes: Calculating a corresponding index value for each fuzzy word in the fuzzy word set of the uploaded document; Adding multiple index values belonging to the same uploaded document to a Bloom filter corresponding to the same uploaded document, and using the Bloom filter as a leaf node; Performing an OR operation on adjacent Bloom filters to generate a new Bloom filter as the parent node of the adjacent Bloom filters; Repeating the process of generating the parent node until the root node is generated; The sorting score is determined by the following formula: Quality=Dec sim *weight sim +Dec q *weight q Among them, Quality represents the sorting score, Dec sim represents the encryption relevance score, Dec q represents the encrypted query value, weight sim 、weight q respectively represent the weight of the encryption relevance score and the weight of the encrypted query value.

6. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the fuzzy searchable encryption method according to any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the fuzzy searchable encryption method according to any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the fuzzy searchable encryption method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Searchable encryption method based on semantic sorting of keywords

    CN109063509A

  • Homomorphic encryption-based multi-keyword ciphertext sorting retrieval method in hybrid cloud

    CN111026788A