Document uploading and storing method, querying and downloading method, device, equipment and medium

By splitting the full-text search engine into client and server sides and encrypting the data on the user terminal, the security issues in cloud data storage and querying are solved, achieving high-level data encryption and functional diversity, and improving the security of cloud data.

CN115269504BActive Publication Date: 2026-02-06CETC CYBERSPACE SECURITY TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210915910.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-01
Publication Date
2026-02-06
Estimated Expiration
2042-08-01

AI Technical Summary

Technical Problem

Existing technologies for cloud data storage and encrypted retrieval, particularly full-text search engines, lack sufficient security, leading to the leakage of plaintext statistical information. They also have limited functionality and cannot effectively protect data security.

Method used

The full-text search engine is divided into a client and a server. The user terminal encrypts the documents and index materials through a secure word segmenter and a cryptographic module to generate encrypted indexes and documents. These are then encrypted using keys from the key management center and uploaded to the cloud server for storage and retrieval.

Benefits of technology

It achieves high-level encryption of data during storage and retrieval, minimizing data leakage and improving the security and functional diversity of cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269504B_ABST
    Figure CN115269504B_ABST
Patent Text Reader

Abstract

The application discloses a document uploading and storing method, a document querying and downloading method, a device, equipment and a medium, and comprises the following steps: obtaining a first key and a second key from a key management center, and obtaining a derivative key based on the first key; processing the to-be-stored document by using a security word segmenter in a full-text search engine client to obtain index materials, encrypting the index materials based on the derivative key to obtain ciphertext index materials, and calling a password module by using the security word segmenter to generate a third key; encrypting the to-be-stored document by using the third key to obtain a ciphertext document, and encrypting the third key by using the second key to obtain an encrypted key; uploading the ciphertext index materials, the ciphertext document and the encrypted key to a cloud server, so that the cloud server updates an index file based on the ciphertext index materials by using a full-text search engine server, and stores the ciphertext document and the encrypted key into a storage system. The security of cloud data storage and query is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of ciphertext retrieval and searchable encryption, and particularly relates to a document uploading and storing method, a document querying and downloading method, a device, equipment and a medium. BACKGROUND

[0002] In the current cloud security storage and search scenarios such as secure cloud disk, power grid application, cloud medical treatment, etc., when storing or performing ciphertext retrieval on cloud data, although the cryptographic technology and full-text search engine technology are combined, the combination only stays at the combination of technical solutions, that is, only the input and output of the full-text search engine are associated with the cryptographic technology. The core of the full-text search engine is still implemented in the manner of searching in the plaintext, which will excessively leak the plaintext statistical information such as word frequency, position and abstract to the cloud, resulting in low security. In addition, the plaintext retrieval or ciphertext retrieval in the traditional full-text search engine directly reuses the full-text search engine capability, and uses the full-text search engine as a server, so that the function of the full-text search engine is single.

[0003] In summary, how to avoid the single function of the full-text search engine and improve the security of cloud data in the storage and query process is a problem to be solved at present. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a document uploading and storing method, a document querying and downloading method, a device, equipment and a medium, which can avoid the single function of the full-text search engine and improve the security of cloud data in the storage and query process. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a document uploading and storing method applied to a user terminal, comprising:

[0006] obtaining a first key and a second key from a key management center, and obtaining a derived key based on the first key;

[0007] processing a to-be-stored document by using a security tokenizer in a full-text search engine client to obtain index materials, encrypting the index materials based on the derived key to obtain ciphertext index materials, and calling a cryptographic module by using the security tokenizer to generate a third key;

[0008] encrypting the to-be-stored document by using the third key to obtain a ciphertext document, and encrypting the third key by using the second key to obtain an encrypted key;

[0009] The ciphertext index material, the ciphertext document and the encrypted key are uploaded to a cloud server, so that the cloud server updates an index file based on the ciphertext index material through a full-text search engine server, and stores the ciphertext document and the encrypted key to a storage system.

[0010] Optionally, the processing of the to-be-stored document by the secure tokenizer in the full-text search engine client to obtain index material and the encryption of the index material based on the derived key to obtain ciphertext index material, comprises:

[0011] processing the to-be-stored document by the secure tokenizer in the full-text search engine client to obtain inverted index material;

[0012] generating the inverted index material based on the document meta-information in the to-be-stored document;

[0013] encrypting the information in the inverted index material based on the derived key to obtain ciphertext inverted index material, and encrypting the information in the forward index material based on the derived key to obtain ciphertext forward index material;

[0014] encapsulating the ciphertext inverted index material and the ciphertext forward index material by the secure tokenizer to obtain ciphertext index material.

[0015] Optionally, the processing of the to-be-stored document by the secure tokenizer in the full-text search engine client to obtain inverted index material, comprises:

[0016] extracting keyword information in the to-be-stored document by the secure tokenizer in the full-text search engine client, and counting the word frequency information of the keyword, and screening abstract information from the to-be-stored document based on the keyword;

[0017] obtaining inverted index material based on the keyword information, the word frequency information and the abstract information.

[0018] Optionally, the generating of the forward index material based on the document meta-information in the to-be-stored document, comprises:

[0019] obtaining domain information based on the document meta-information in the to-be-stored document, and obtaining the forward index material based on the domain information; wherein the domain information comprises any one or several of title, date, author and time.

[0020] Optionally, the obtaining of the derived key based on the first key, comprises:

[0021] obtaining a first derived key, a second derived key and a third derived key from the first key by using a key derivation algorithm;

[0022] Correspondingly, the encryption of information in the inverted index material based on the derived key to obtain ciphertext inverted index material includes:

[0023] Based on a preset hash algorithm, the first derived key is used to encrypt the keyword information to obtain ciphertext keyword information, based on a sequence-preserving encryption algorithm, the second derived key is used to encrypt the term frequency information to obtain ciphertext term frequency information, and the third derived key is used to encrypt the abstract information to obtain ciphertext abstract information;

[0024] Based on the ciphertext keyword, the ciphertext term frequency, and the ciphertext abstract, ciphertext inverted index material is obtained;

[0025] Correspondingly, the encryption of information in the inverted index material based on the derived key to obtain ciphertext inverted index material includes:

[0026] The third derived key is used to encrypt the domain information to obtain ciphertext domain information, and based on the ciphertext domain information, ciphertext inverted index material is obtained.

[0027] Optionally, the ciphertext index material, the ciphertext document, and the encrypted key are transmitted to a cloud server, so that the cloud server updates an index file based on the ciphertext index material through a full-text search engine server, including:

[0028] The ciphertext index material, the ciphertext document, and the encrypted key are transmitted to a cloud server, so that the cloud server updates an index file based on the ciphertext index material through a full-text search engine server, including:

[0029] The ciphertext keyword and the ciphertext domain information are stored in the corresponding index file according to a preset storage rule through the full-text search engine server, and an inverted term frequency file is constructed based on the ciphertext term frequency and the ciphertext abstract, and the inverted term frequency file is stored in the order of the ciphertext term frequency from large to small.

[0030] In a second aspect, the application discloses a document query downloading method applied to a user terminal, including:

[0031] Obtain the query content of the ciphertext document to be downloaded, and process the query content by using a secure tokenizer in a full-text search engine client to obtain an encrypted keyword; wherein the ciphertext document to be downloaded is a ciphertext document stored by using the document uploading and storing method disclosed above;

[0032] transmit the encrypted keyword to a cloud server, so that the cloud server matches a target ciphertext document set based on the encrypted keyword through a full-text search engine service end, filters a preset number of ciphertext documents from the target ciphertext document set by using a pre-defined order-preserving encryption scoring mechanism, and completes ranking of the preset number of ciphertext documents to obtain a ciphertext document ranking result, and then obtains corresponding ciphertext display information based on the preset number of ciphertext documents;

[0033] obtain the ciphertext document ranking result and the ciphertext display information sent by the cloud server, and obtain a first key and a second key from a key management center, and obtain a derived key based on the first key;

[0034] decrypt the ciphertext display information based on the derived key to obtain decrypted information, and download corresponding ciphertext documents and encrypted keys corresponding to the ciphertext documents from the cloud server based on the decrypted information and the ciphertext document ranking result, so as to decrypt the encrypted keys by using the second key to obtain a third key, and decrypt the ciphertext documents by using the third key.

[0035] In a third aspect, the present application discloses a document uploading and storing device applied to a user terminal, comprising:

[0036] a key obtaining module configured to obtain a first key and a second key from a key management center, and obtain a derived key based on the first key;

[0037] a material obtaining module configured to process a to-be-stored document by using a secure tokenizer in a full-text search engine client to obtain index materials, and perform corresponding encryption processing on the index materials based on the derived key to obtain ciphertext index materials;

[0038] a key generating module configured to generate a third key by using the secure tokenizer to call a password module;

[0039] an encryption module configured to encrypt the to-be-stored document by using the third key to obtain ciphertext documents, and encrypt the third key by using the second key to obtain an encrypted key;

[0040] an uploading and storing module configured to upload the ciphertext index materials, the ciphertext documents and the encrypted key to a cloud server, so that the cloud server updates an index file based on the ciphertext index materials through a full-text search engine service end, and stores the ciphertext documents and the encrypted key to a storage system.

[0041] In a fourth aspect, the present application discloses an electronic device, comprising:

[0042] a memory for storing the computer program;

[0043] a processor for executing the computer program to implement the steps of the document uploading and storing method disclosed above.

[0044] In a fifth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the steps of the document uploading and storing method disclosed above.

[0045] It can be seen that the first key and the second key are obtained from the key management center, and a derivative key is obtained based on the first key; the to-be-stored document is processed by using the secure tokenizer in the full-text search engine client to obtain index materials, and the index materials are encrypted based on the derivative key to obtain ciphertext index materials, and the third key is generated by calling the cryptographic module by using the secure tokenizer; the to-be-stored document is encrypted by using the third key to obtain a ciphertext document, and the third key is encrypted by using the second key to obtain an encrypted key; the ciphertext index materials, the ciphertext document, and the encrypted key are uploaded to the cloud server, so that the cloud server updates the index file based on the ciphertext index materials by using the full-text search engine server, and stores the ciphertext document and the encrypted key to the storage system. It can be seen that the full-text search engine is divided into a client and a server, the user terminal obtains the first key and the second key from the key management center, and the index materials are obtained by processing the to-be-stored document by using the full-text search engine client, then the index materials are encrypted by using the derivative key of the first key, the to-be-stored document is encrypted by using the third key generated by the cryptographic module, and the third key is encrypted by using the second key, and the corresponding information obtained after encryption is uploaded to the cloud server, and the storage work is completed by calling the full-text search engine server by using the cloud server. By splitting the full-text search engine client and server, and integrating the cryptographic technology, the security functions such as document encryption, index encryption, and key encryption are realized, the minimization of information is achieved, the data leakage is prevented to the greatest extent, and the security of the data storage process is improved. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on the provided drawings.

[0047] Figure 1 The system framework schematic diagram applicable to the document uploading and storing scheme and the document query and downloading scheme disclosed by the present application;

[0048] Figure 2 A document uploading and storing method flow chart disclosed by the present application;

[0049] Figure 3 A specific document uploading and storing method flow chart disclosed by the present application;

[0050] Figure 4 A specific index file updating schematic diagram disclosed by the present application;

[0051] Figure 5 A document query and download method flow chart disclosed by the present application;

[0052] Figure 6 A document uploading and storing device structure schematic diagram disclosed by the present application;

[0053] Figure 7 An electronic device structure diagram disclosed by the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0055] Currently, when storing or searching encrypted data in the cloud, although the cryptographic technology and the full-text search engine technology are combined, the combination only stays in the combination of technical solutions, that is, only the input and output of the full-text search engine are associated with the cryptographic technology. The core of the full-text search engine is still implemented in the manner of searching in the plaintext, which will excessively leak the plaintext statistical information such as word frequency, position, and abstract to the cloud, resulting in low security. In addition, the plaintext search or encrypted search in the traditional full-text search engine directly reuses the full-text search engine capability, and uses the full-text search engine as a server, so that the function of the full-text search engine is single. Therefore, the embodiments of the present application disclose a document uploading and storing method, a document query and download method, a device, an equipment, and a medium, which can avoid the single function of the full-text search engine and improve the security of the cloud data in the storage and query process.

[0056] Among numerous full-text search engines, Lucene is a high-performance, easy-to-expand full-text information retrieval toolkit based on Java technology, which can very conveniently add full-text indexing and search functions to various application programs. Embodiments of the present application take Lucene as an example to make a detailed description of the technical solutions of the present application. By splitting the Lucene function into two parts of client and server, an end-to-end secure search solution is realized. Among them, the client is located in the terminal, and focuses on solving functions such as secure segmentation, encryption and decryption; the server is located in the cloud server, and focuses on solving the index file reconstruction and search logic. In the document uploading, storing and document query downloading solution of the present application, the system framework used can be seen from Figure 1 As shown, it can specifically include a user terminal 01, a cloud server 02 and a key management center 03. Among them, the user terminal 01 further includes an application program 010, a secure segmenter 011, a lucene client 012 and a password module 013; the cloud server 02 further includes a business system 020, a storage system 021, a lucene server 022 and a password module 023.

[0057] In the user terminal 01, the lucene client 012 is an optimized and simplified lucene, mainly including a secure segmenter 011 combined with password technology; the password module 013 is responsible for password operation and key management, and there is a password operation calling relationship between the secure segmenter 011 and the password module 013; there is a business calling relationship between the application program 010 and the lucene client 012. In addition, the key management center 03 and the lucene client 012 realize the distribution and management of the key. In the cloud server, the lucene server 022 is responsible for the server logic of the ciphertext retrieval; the password module 023 is responsible for the password operation on the cloud; the storage system 021 is used to store the ciphertext document and the encrypted key, and there is a storage calling relationship between the storage system 021 and the business system 020; there is a business calling relationship between the lucene server 022 and the business system 020, and a password operation calling relationship between the lucene server 022 and the password module 023.

[0058] In the present application, the user terminal 01 is used to perform the steps of the document uploading and storing method and the document query and downloading method. The document query and downloading method comprises: obtaining a first key and a second key from a key management center, and obtaining a derived key based on the first key; processing a to-be-stored document by using a secure tokenizer in a full-text search engine client to obtain index materials, and encrypting the index materials based on the derived key to obtain ciphertext index materials, and calling a password module by using the secure tokenizer to generate a third key; encrypting the to-be-stored document by using the third key to obtain a ciphertext document, and encrypting the third key by using the second key to obtain an encrypted key; uploading the ciphertext index materials, the ciphertext document, and the encrypted key to a cloud server, so that the cloud server updates an index file based on the ciphertext index materials by using a full-text search engine server, and stores the ciphertext document and the encrypted key to a storage system.

[0059] The document query and downloading method comprises: obtaining query content of a to-be-downloaded ciphertext document, and processing the query content by using a secure tokenizer in a full-text search engine client to obtain an encrypted keyword; wherein the to-be-downloaded ciphertext document is a ciphertext document stored by using the aforementioned disclosed document uploading and storing method; transmitting the encrypted keyword to a cloud server, so that the cloud server matches a target ciphertext document set based on the encrypted keyword by using a full-text search engine server, and filters a preset number of ciphertext documents from the target ciphertext document set by using a pre-defined order-preserving encryption scoring mechanism, and completes the sorting of the preset number of ciphertext documents to obtain a ciphertext document sorting result, and then obtains corresponding ciphertext display information based on the preset number of ciphertext documents; obtaining the ciphertext document sorting result and the ciphertext display information sent by the cloud server, and obtaining a first key and a second key from a key management center, and obtaining a derived key based on the first key; decrypting the ciphertext display information based on the derived key to obtain decrypted information, and downloading corresponding ciphertext documents and encrypted keys corresponding to the ciphertext documents from the cloud server based on the decrypted information and the ciphertext document sorting result, so as to decrypt the encrypted keys by using the second key to obtain a third key, and decrypt the ciphertext documents by using the third key.

[0060] Referring to Figure 2 The embodiment of the present application discloses a document uploading and storing method, applied to a user terminal, comprising:

[0061] Step S11: obtaining a first key and a second key from a key management center, and obtaining a derived key based on the first key.

[0062] In this embodiment, first, the key management center generates the first key and the second key, and then the key management center sends the first key and the second key to the user terminal through a secure channel. After obtaining the first key, the user terminal needs to obtain the corresponding derivative key based on the first key.

[0063] Step S12: processing the to-be-stored document by using the secure tokenizer in the full-text search engine client to obtain index materials, encrypting the index materials based on the derivative key to obtain ciphertext index materials, and calling the password module by using the secure tokenizer to generate a third key.

[0064] In this embodiment, the user terminal needs to create index materials for the to-be-stored document, mainly by calling the secure tokenizer in the full-text search engine client to process the to-be-stored document to obtain index materials. In order to ensure the security in the uploading process, the derivative key obtained in step S11 is used to perform corresponding encryption processing on the index materials to obtain ciphertext index materials. In addition, the user terminal also needs to generate a third key by calling the password module through the secure tokenizer.

[0065] Step S13: encrypting the to-be-stored document by using the third key to obtain a ciphertext document, and encrypting the third key by using the second key to obtain an encrypted key.

[0066] In this embodiment, the to-be-stored document needs to be encrypted, and the third key is used to encrypt the to-be-stored document to obtain a ciphertext document. In addition, the second key is used to encrypt the third key to obtain an encrypted key. In this way, the leakage of document data in the uploading process can be avoided, and the security is improved.

[0067] Step S14: uploading the ciphertext index materials, the ciphertext document, and the encrypted key to the cloud server, so that the cloud server updates the index file based on the ciphertext index materials by using the full-text search engine server, and stores the ciphertext document and the encrypted key to the storage system.

[0068] In this embodiment, the ciphertext index materials, the ciphertext document, and the encrypted key are uploaded to the cloud server. The cloud server calls the full-text search engine server to update the ciphertext fields in the secure index materials to the corresponding index files, and then stores the ciphertext document and the encrypted key through the storage system of the cloud server.

[0069] It can be seen that the first key and the second key are obtained from the key management center, and a derived key is obtained based on the first key; the security tokenizer in the full-text search engine client is used to process the to-be-stored document to obtain index materials, and the index materials are encrypted based on the derived key to obtain ciphertext index materials, and the security tokenizer is used to call the password module to generate a third key; the to-be-stored document is encrypted based on the third key to obtain a ciphertext document, and the third key is encrypted based on the second key to obtain an encrypted key; the ciphertext index materials, the ciphertext document, and the encrypted key are uploaded to the cloud server, so that the cloud server updates the index file based on the ciphertext index materials through the full-text search engine server, and stores the ciphertext document and the encrypted key to the storage system. It can be seen that the full-text search engine is divided into a client and a server, the user terminal obtains the first key and the second key from the key management center, and the index materials are obtained by processing the to-be-stored document through the full-text search engine client, then the index materials are encrypted based on the derived key of the first key, the to-be-stored document is encrypted based on the third key generated by the password module, and the third key is encrypted based on the second key, and the corresponding information obtained after encryption is uploaded to the cloud server, and the storage work is completed by calling the full-text search engine server through the cloud server. Through the splitting of the full-text search engine client and the server, and the integration of the password technology, the security functions such as document encryption, index encryption, and key encryption are realized, the minimization of information is achieved, the data leakage is prevented to the greatest extent, and the security of the data storage process is improved.

[0070] Referring to Figure 3 As shown in the drawings, the embodiment of the application discloses a specific document uploading and storing method, and the technical scheme is further described and optimized compared with the previous embodiment. Specifically, it includes:

[0071] Step S21: obtaining a first key and a second key from a key management center, and obtaining a derived key based on the first key.

[0072] In the embodiment, the above obtaining a derived key based on the first key includes: obtaining a first derived key, a second derived key, and a third derived key from the first key by using a key derivation algorithm. It can be understood that the user terminal obtains the first derived key, the second derived key, and the third derived key by using the key derivation algorithm on the first key.

[0073] Step S22: processing a to-be-stored document by using a security tokenizer in a full-text search engine client to obtain inverted index materials.

[0074] In the embodiment, the above processing of the to-be-stored document by the security word segmenter in the full-text search engine client to obtain the inverted index material includes: extracting keyword information in the to-be-stored document by the security word segmenter in the full-text search engine client, counting the word frequency information of the keyword, and screening the abstract information from the to-be-stored document based on the keyword. It can be understood that the user terminal processes the to-be-stored document by using the word segmentation technology, generates the keyword information of the to-be-stored document through text word segmentation and removal of stop words, counts the word frequency information of the keyword based on the keyword information to obtain the "keyword-word frequency" information, and screens the abstract information from the to-be-stored document based on the keyword to obtain the "keyword-word frequency-abstract" information. In the process of screening the abstract information, for each keyword, all context information of the keyword appearing in the document is recorded, and the most suitable context is found as the abstract of the keyword.

[0075] The above method of screening the abstract information is: assuming that the current keyword is w, and the context containing the keyword w in the to-be-stored document has l contexts, denoted as {c1, c2, c3, …c l}. Assuming that the context c i contains n i keywords w, k i other keywords, and a plurality of stop words, punctuation marks, and the like. Then, the evaluation score of the context c i is calculated according to the following formula:

[0076] ;

[0077] wherein the smaller the value of i is, the earlier the context appears in the to-be-stored document, and a and b are adjustable parameters, and a > 10b in general.

[0078] After obtaining the evaluation score, the context c i with the highest evaluation score is selected as the abstract of the keyword w. Through this method, the context containing more keywords and located earlier will have a higher score, and will be preferentially selected as the abstract of the keyword. In the abstract, the keyword content is highlighted in the form of an html tag.

[0079] Step S23: generating the forward index material according to the document meta information in the to-be-stored document.

[0080] In the embodiment, the generating the positive index material according to the document meta-information in the document to be stored comprises: obtaining domain information according to the document meta-information in the document to be stored, and obtaining the positive index material based on the domain information; wherein the domain information comprises any one or several of title, date, author, and time. It can be understood that the domain information such as title, date, author, and time is generated according to the document meta-information in the document to be stored, and the various domain information is recorded as the positive index material.

[0081] Step S24: encrypting information in the inverted index material based on the derived key to obtain a ciphertext inverted index material, and encrypting information in the positive index material based on the derived key to obtain a ciphertext positive index material.

[0082] In the embodiment, the encrypting information in the inverted index material based on the derived key to obtain a ciphertext inverted index material comprises: encrypting the keyword information based on a preset hash algorithm using the first derived key to obtain a ciphertext keyword, encrypting the term frequency information based on a sorting-preserving encryption algorithm using the second derived key to obtain a ciphertext term frequency, and encrypting the digest information using the third derived key to obtain a ciphertext digest; and obtaining the ciphertext inverted index material based on the ciphertext keyword, the ciphertext term frequency, and the ciphertext digest. It can be understood that when encrypting information in the inverted index material, the first derived key, the second derived key, and the third derived key obtained using the first key are used for encryption respectively, specifically, the first derived key is used, and the keyword information is encrypted using a hash algorithm with a key to obtain a ciphertext keyword, the hash algorithm is a hash digest algorithm, and the hash algorithm can be HMAC (Hash-based Message Authentication Code, message authentication code); the second derived key is used, and the term frequency information is encrypted using a sorting-preserving encryption algorithm to obtain a ciphertext term frequency; and the third derived key is used to encrypt the digest information to obtain a ciphertext digest. The ciphertext keyword, the ciphertext term frequency, and the ciphertext digest are used as the ciphertext inverted index material.

[0083] In the embodiment, the encrypting information in the positive index material based on the derived key to obtain a ciphertext positive index material comprises: encrypting the domain information using the third derived key to obtain a ciphertext domain information, and obtaining the ciphertext positive index material based on the ciphertext domain information. That is, the third derived key is also used for encryption when encrypting the domain information.

[0084] Step S25: encapsulating the ciphertext inverted index material and the ciphertext positive index material using the secure tokenizer to obtain a ciphertext index material.

[0085] In this embodiment, the ciphertext inverted index material and the ciphertext forward index material are encapsulated into ciphertext index material in json format by the secure tokenizer.

[0086] Step S26: a third key is generated by calling a cryptographic module using the secure tokenizer, the to-be-stored document is encrypted using the third key to obtain a ciphertext document, and the third key is encrypted using the second key to obtain an encrypted key.

[0087] Step S27: the ciphertext index material, the ciphertext document, and the encrypted key are uploaded to a cloud server, so that the cloud server updates an index file based on the ciphertext index material through a full-text search engine server, and stores the ciphertext document and the encrypted key to a storage system.

[0088] In this embodiment, the transmission of the ciphertext index material, the ciphertext document, and the encrypted key to the cloud server, so that the cloud server updates the index file based on the ciphertext index material through the full-text search engine server, includes: transmitting the ciphertext index material, the ciphertext document, and the encrypted key to the cloud server, so that the cloud server parses the ciphertext index material through a custom secure tokenizer corresponding to the secure tokenizer in the full-text search engine server, to obtain the ciphertext keyword, the ciphertext word frequency, the ciphertext abstract, and the ciphertext domain information; storing the ciphertext keyword and the ciphertext domain information into corresponding index files according to a preset storage rule through the full-text search engine server, and constructing an inverted word frequency file based on the ciphertext word frequency and the ciphertext abstract, and storing the inverted word frequency file according to the ciphertext word frequency from large to small.

[0089] The specific process of updating the index file by the full-text search engine server using the ciphertext index material is that the entrance of the full-text search engine server is a custom secure tokenizer, the ciphertext index material is parsed through the custom secure tokenizer to obtain the ciphertext keyword, the ciphertext word frequency, the ciphertext abstract, and the ciphertext domain information. Figure 4As shown, taking Lucene as an example, the ciphertext keyword is filled into the.tip,.tim and other dictionary files according to the existing rules of Lucene. The full-text search engine server reconstructs the.doc inverted word frequency file and rewrites the inverted word frequency logic. The inverted word frequency file is formed in the form of a linked list according to the structure of a <document ID, ciphertext word frequency, ciphertext abstract> triplet, so as to form the inverted information corresponding to the keyword. Since the word frequency is order-preserving encryption, the ciphertext has the ability to compare sizes, and the inverted document information of the keyword is recorded in the order from large to small according to the word frequency, and the ciphertext abstract of the keyword in each document is recorded. For example, assuming that the word frequency in the original inverted list is ranked as: ETF1>ETF2>ETF3, and the newly inserted word frequency satisfies ETF2>ETF6>ETF3 at this time, the newly inserted node is after the document ID2 and before the document ID3. In addition, the ciphertext domain information is filled into the.fnm,.fdx,.fdt and other files constituting the forward list file according to the existing rules of Lucene, and the corresponding ciphertext title, ciphertext author, ciphertext time and other information are listed.

[0090] The more specific processing procedure of the above step S26 can refer to the corresponding content disclosed in the foregoing embodiments, and will not be described here in detail.

[0091] It can be seen that, based on the secure word segmentation device, the embodiments of the present application integrate order-preserving encryption, hash digest and other functions, complete the hash digest operation of the keyword information based on the derivative key of the first key, perform the order-preserving encryption operation on the word frequency information, and generate the abstract information of the keyword using the evaluation score scoring mechanism; then, the ciphertext keyword, the ciphertext word frequency, the ciphertext abstract are encapsulated as the ciphertext inverted index material, and the encrypted document title, author, time and other information are formed as the ciphertext forward index material, the ciphertext inverted index material and the ciphertext forward index material are encapsulated as the ciphertext index material. Finally, the third key generated by the key module of the user terminal is used to encrypt the to-be-stored document to obtain the ciphertext document, and the second key and the third key are used to obtain the encrypted key. After the ciphertext index material, the ciphertext document and the encrypted key are uploaded to the cloud server, the cloud server parses the ciphertext index material through the self-defined secure word segmentation device connected with the secure word segmentation device of the user terminal, obtains the ciphertext keyword, the ciphertext word frequency, the ciphertext abstract and the ciphertext domain information, redefines the inverted word frequency file through the full-text search engine server, arranges the document information corresponding to the keyword in the order from large to small according to the ciphertext word frequency based on the order-preserving encryption sorting algorithm, defines the document information as a <document ID, ciphertext word frequency, ciphertext abstract> triplet and stores it, and stores the ciphertext keyword and the ciphertext domain information in the corresponding index file according to the preset storage rule. The above technical solution improves the security in the document storage process.

[0092] Referring to Figure 5As shown, the embodiment of the present application discloses a document query downloading method, applied to a user terminal, comprising:

[0093] Step S31: obtaining the query content of the to-be-downloaded ciphertext document, and processing the query content by using the secure tokenizer in the full-text search engine client to obtain an encrypted keyword; wherein the to-be-downloaded ciphertext document is a ciphertext document stored by using the document uploading and storing method disclosed above.

[0094] In the embodiment, first, the user terminal submits the query content of the to-be-downloaded document, and then the secure tokenizer in the full-text search engine client processes the query content to obtain an encrypted keyword; wherein the to-be-downloaded ciphertext document is a ciphertext document stored by using the document uploading and storing method disclosed above.

[0095] Step S32: transmitting the encrypted keyword to the cloud server, so that the cloud server matches a target ciphertext document set based on the encrypted keyword by using the full-text search engine server, filters a preset number of ciphertext documents from the target ciphertext document set by using a pre-defined order-preserving encryption scoring mechanism, and completes the sorting of the preset number of ciphertext documents to obtain a ciphertext document sorting result, and then obtains corresponding ciphertext display information based on the preset number of ciphertext documents.

[0096] In the embodiment, the user terminal transmits the encrypted keyword to the cloud server, and the cloud server finds out the target ciphertext document set matched with the encrypted keyword by using the full-text search engine server, filters a preset number of ciphertext documents from the target ciphertext document set by using a pre-defined order-preserving encryption scoring mechanism, and completes the sorting of the preset number of ciphertext documents to obtain a ciphertext document sorting result. Wherein, the number of encrypted keywords can be one or more, and the type of keyword can be a Boolean type keyword, that is, the technical solution in the present application can realize various rich search functions such as single-keyword search, multi-keyword search, and Boolean search.

[0097] In the first specific embodiment, if the number of the current encrypted keyword is one, the encrypted keyword is taken as a sorting keyword, and the first N ciphertext documents corresponding to the sorting keyword are obtained from the inverted word frequency file obtained in step S27, and the corresponding ciphertext sorting result is obtained.

[0098] In a second specific embodiment, if the number of current encryption keywords is multiple, first, the intersection of the target ciphertext documents corresponding to each encryption keyword is selected as the first target ciphertext document set; the first ciphertext document corresponding to each encryption keyword is selected respectively, the size of the ciphertext word frequency is compared, the maximum ciphertext word frequency is selected, the ciphertext keyword corresponding to the ciphertext word frequency is marked as the sorting keyword; then the ciphertext documents of the first target ciphertext document set are sorted according to the order of the sorting keyword, the first N ciphertext documents are taken out, and the corresponding ciphertext sorting result is obtained.

[0099] In a third specific embodiment, if the current encryption keyword is "and", "or", "not", that is, a Boolean query, first, the corresponding target ciphertext document set is selected as the first target ciphertext document set according to the "and", "or", "not" Boolean relationship; the first ciphertext document corresponding to the corresponding keyword under the "and", "or", "not" rule is selected respectively, the size of the ciphertext word frequency is compared, the maximum ciphertext word frequency is selected, the ciphertext keyword corresponding to the ciphertext word frequency is marked as the sorting keyword; then the ciphertext documents of the first target ciphertext document set are sorted according to the order of the sorting keyword, the first N ciphertext documents are taken out, and the corresponding ciphertext sorting result is obtained.

[0100] In the embodiment, the above obtaining of the corresponding ciphertext display information based on the preset number of ciphertext documents includes: extracting the ciphertext abstract, the ciphertext title, the ciphertext author, and the ciphertext time corresponding to each ciphertext document from the preset number of ciphertext documents, and encapsulating the ciphertext abstract, the ciphertext title, the ciphertext author, and the ciphertext time to obtain the ciphertext display information. It can be understood that after obtaining the N ciphertext documents, the corresponding ciphertext abstract is extracted from the N ciphertext documents according to the sorting keyword, and the ciphertext title, the ciphertext author, the ciphertext time, and other ciphertext domain information corresponding to the N ciphertext documents are selected in the forward index file in step S27. Finally, the ciphertext abstract, the ciphertext title, the ciphertext author, the ciphertext time, and other information of the N documents are encapsulated into the ciphertext display information in the json format, and the ciphertext display information is highlighted.

[0101] Step S33: obtaining the ciphertext document sorting result and the ciphertext display information sent by the cloud server, obtaining the first key and the second key from the key management center, and obtaining the derived key based on the first key.

[0102] In the embodiment, the cloud server returns the json format ciphertext display information to the user terminal, and the user terminal calls the security word segmenter to parse the json file. In addition, the user terminal also needs to obtain the first key and the second key from the key management center, and obtain the corresponding third derived key from the first key by using the key derivation algorithm.

[0103] Step S34: decrypt the ciphertext presentation information based on the derived key to obtain decrypted information, and download corresponding ciphertext documents and encrypted keys corresponding to the ciphertext documents from the cloud server based on the decrypted information and the ciphertext document sorting result, so as to decrypt the encrypted keys based on the second key to obtain a third key, and decrypt the ciphertext documents based on the third key.

[0104] In this embodiment, the ciphertext presentation information is decrypted based on the third derived key to obtain information such as abstract, title, author, time, etc. of each document. The third derived key is a symmetric encryption key, which is used when encrypting the information in step S24, and thus is also used when decrypting. The user terminal also needs to download corresponding ciphertext documents and encrypted keys corresponding to the ciphertext documents from the cloud server based on the decrypted information and the ciphertext document sorting result, so as to decrypt the encrypted keys based on the second key to obtain a third key, and decrypt the ciphertext documents based on the third key to obtain plaintext documents, thereby completing the downloading of the documents. The second key and the third key are also symmetric encryption keys.

[0105] As can be seen, the embodiment of the application obtains the query content of the to-be-downloaded ciphertext document, and processes the query content by using a secure tokenizer in a full-text search engine client to obtain an encrypted keyword; wherein the to-be-downloaded ciphertext document is a ciphertext document stored by using the foregoing disclosed document uploading and storing method; the encrypted keyword is transmitted to a cloud server, so that the cloud server matches a target ciphertext document set based on the encrypted keyword by using a full-text search engine server, filters a preset number of ciphertext documents from the target ciphertext document set by using a pre-defined order-preserving encryption scoring mechanism, and completes the sorting of the preset number of ciphertext documents to obtain a ciphertext document sorting result, and then obtains corresponding ciphertext display information based on the preset number of ciphertext documents; the ciphertext document sorting result and the ciphertext display information transmitted by the cloud server are obtained, the first key and the second key are obtained from a key management center, and a derived key is obtained based on the first key; the ciphertext display information is decrypted based on the derived key to obtain decrypted information, and corresponding ciphertext documents and encrypted keys corresponding to the ciphertext documents are downloaded from the cloud server based on the decrypted information and the ciphertext document sorting result, so that the second key is used to decrypt the encrypted keys to obtain a third key, and the third key is used to decrypt the ciphertext documents. The technical scheme of the application can realize various rich search functions such as single-keyword search, multi-keyword search, and Boolean search, avoids the problem of single search function, and by using various symmetric encryption schemes, the encryption overhead is reduced while the security is realized, the balance between security and functionality of ciphertext retrieval is achieved, has high practical value, and is particularly suitable for a low-performance terminal sharing storage scene. As can be seen, when solving the problem of secure storage of data on the cloud, the application provides a secure query function of ciphertext data, does not leak any original information and statistical related information of data on the cloud, achieves the purpose of minimizing data on the cloud, and effectively protects user privacy security.

[0106] Referring to Figure 6 As shown in the figure, the embodiment of the application discloses a document uploading and storing device applied to a user terminal, comprising:

[0107] The key obtaining module 11 is configured to obtain a first key and a second key from a key management center, and obtain a derived key based on the first key;

[0108] The material obtaining module 12 is configured to process a to-be-stored document by using a secure tokenizer in a full-text search engine client to obtain index materials, and perform corresponding encryption processing on the index materials by using the derived key to obtain ciphertext index materials;

[0109] The key generating module 13 is configured to generate a third key by using the secure tokenizer to call a password module;

[0110] an encryption module configured to encrypt the to-be-stored document by using the third key to obtain a ciphertext document, and encrypt the third key by using the second key to obtain an encrypted key;

[0111] an uploading and storing module 14 configured to upload the ciphertext index material, the ciphertext document, and the encrypted key to a cloud server, so that the cloud server updates an index file based on the ciphertext index material by using a full-text search engine server, and stores the ciphertext document and the encrypted key to a storage system.

[0112] It can be seen that, in the present application, the first key and the second key are obtained from a key management center, and a derived key is obtained based on the first key; the to-be-stored document is processed by using a secure tokenizer in a full-text search engine client to obtain index material, and the index material is encrypted by using the derived key to obtain ciphertext index material, and the third key is generated by using the secure tokenizer to call a password module; the to-be-stored document is encrypted by using the third key to obtain a ciphertext document, and the third key is encrypted by using the second key to obtain an encrypted key; the ciphertext index material, the ciphertext document, and the encrypted key are uploaded to a cloud server, so that the cloud server updates an index file based on the ciphertext index material by using a full-text search engine server, and stores the ciphertext document and the encrypted key to a storage system. It can be seen that, in the present application, the full-text search engine is divided into a client and a server, the first key and the second key are obtained from a key management center by a user terminal, and index material is obtained by processing a to-be-stored document by using a full-text search engine client, then the index material is encrypted by using a derived key of the first key, the to-be-stored document is encrypted by using a third key generated by a password module, and the third key is encrypted by using the second key, and then the corresponding information obtained after encryption is uploaded to a cloud server, and the storage work is completed by calling a full-text search engine server of the cloud server. By splitting the full-text search engine client and server, and integrating the password technology, the security functions such as document encryption, index encryption, and key encryption are realized, the minimization of information is achieved, the data leakage is prevented to the greatest extent, and the security of the data storage process is improved.

[0113] Figure 7 A structural schematic diagram of an electronic device provided by an embodiment of the present application is provided. Specifically, it can include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, the computer program is loaded and executed by the processor 21 to implement the related steps in the document uploading and storing method executed by the computer device disclosed in any of the preceding embodiments.

[0114] In this embodiment, the power supply 23 is configured to provide working voltage for each hardware device on the computer device 20; the communication interface 24 is configured to create a data transmission channel between the computer device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input and output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application requirement, which is not specifically limited herein.

[0115] The processor 21 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 can also include a main processor and a coprocessor. The main processor is a processor for processing data in a wake-up state, also known as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 can also include an AI (Artificial Intelligence) processor configured to process machine learning-related computing operations.

[0116] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223, etc. The storage mode can be temporary storage or permanent storage.

[0117] The operating system 221 is used to manage and control each hardware device on the computer device 20 and the computer program 222, so as to realize the operation and processing of the processor 21 on the mass data 223 in the memory 22, and can be Windows, Unix, Linux, etc. The computer program 222 can further include a computer program capable of completing other specific work in addition to the computer program capable of completing the document uploading and storing method disclosed by any one of the foregoing embodiments and executed by the computer device 20. The data 223 can include data transmitted by an external device and received by the computer device, data collected by the self input and output interface 25, etc.

[0118] Further, the embodiment of the present application further discloses a storage medium, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to realize the method steps executed in the document uploading and storing process disclosed by any one of the foregoing embodiments.

[0119] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0120] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present text can be realized by electronic hardware, computer software or combination of both. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0121] The steps of the method or algorithm described in combination with the embodiments disclosed in the present text can be directly implemented by hardware, software module executed by a processor, or combination of both. The software module can be placed in a random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the technical field.

[0122] Finally, it needs to be pointed out that in this article, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of other identical elements in the process, method, article or equipment including the element.

[0123] The above describes in detail the document uploading and storing method, document querying and downloading method, device, equipment and storage medium provided by the present application. The principles and implementation manners of the present application are described by applying specific examples. The above example is only used to help understand the method of the present application and its core idea. Meanwhile, for the general skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A document upload and storage method, characterized in that, Applied to user terminals, including: Obtain the first key and the second key from the key management center, and derive the derived key based on the first key; The secure word segmenter in the full-text search engine client is used to process the document to be stored to obtain index material, and the index material is encrypted based on the derived key to obtain ciphertext index material, and the secure word segmenter is used to call the cryptographic module to generate a third key; The document to be stored is encrypted using the third key to obtain a ciphertext document, and the third key is then encrypted using the second key to obtain an encrypted key. The encrypted index material, the encrypted document, and the encrypted key are uploaded to the cloud server so that the cloud server can update the index file based on the encrypted index material through the full-text search engine server, and store the encrypted document and the encrypted key in the storage system. The index material includes inverted index material and forward index material, and the encrypted index material includes encrypted inverted index material and encrypted forward index material; the inverted index material contains keyword information, term frequency information and summary information, and the forward index material includes field information; The process of obtaining the derived key based on the first key includes: A first derived key, a second derived key, and a third derived key are obtained from the first key using a key derivation algorithm. Accordingly, the inverted index material is encrypted based on the derived key to obtain ciphertext inverted index material, including: The keyword information is encrypted using the first derived key based on a preset hash algorithm to obtain ciphertext keywords. The word frequency information is encrypted using the second derived key based on an order-preserving encryption algorithm to obtain ciphertext word frequency. The digest information is encrypted using the third derived key to obtain ciphertext digest. Based on the ciphertext keywords, the ciphertext term frequencies, and the ciphertext digest, an inverted index of ciphertext is obtained; Accordingly, the forward index material is encrypted based on the derived key to obtain ciphertext forward index material, including: The domain information is encrypted using the third derived key to obtain ciphertext domain information, and ciphertext forward index material is obtained based on the ciphertext domain information.

2. The document upload and storage method according to claim 1, characterized in that, The process of using a secure word segmenter in the full-text search engine client to process the document to be stored to obtain index material, and encrypting the index material based on the derived key to obtain ciphertext index material, includes: The secure word segmenter in the full-text search engine client is used to process the documents to be stored to obtain inverted index materials; Generate forward index material based on the document metadata in the document to be stored; The information in the inverted index material is encrypted using the derived key to obtain the ciphertext inverted index material, and the information in the forward index material is encrypted using the derived key to obtain the ciphertext forward index material. The secure word segmenter is used to encapsulate the ciphertext inverted index material and the ciphertext forward index material to obtain the ciphertext index material.

3. The document upload and storage method according to claim 2, characterized in that, The process of using a secure word segmenter in a full-text search engine client to process the document to be stored to obtain inverted index material includes: The keyword information in the document to be stored is extracted using the secure word segmenter in the full-text search engine client, and the word frequency information of the keywords is counted. Summarization information is then filtered out from the document to be stored based on the keywords. Inverted index materials are obtained based on the keyword information, the word frequency information, and the summary information.

4. The document upload and storage method according to claim 3, characterized in that, The step of generating forward-format information material based on the document metadata in the document to be stored includes: The domain information is obtained from the document metadata in the document to be stored, and the forward layout information material is obtained based on the domain information; wherein, the domain information includes any one or more of the following: title, date, author, and time.

5. The document upload and storage method according to claim 4, characterized in that, The step of transmitting the encrypted index material, the encrypted document, and the encrypted key to the cloud server, so that the cloud server can update the index file based on the encrypted index material through the full-text search engine server, includes: The encrypted index material, the encrypted document, and the encrypted key are transmitted to the cloud server so that the cloud server can parse the encrypted index material through a custom secure word segmenter corresponding to the secure word segmenter in the full-text search engine server to obtain the encrypted keywords, the encrypted word frequency, the encrypted summary, and the encrypted field information. The full-text search engine server stores the encrypted keywords and encrypted field information into the corresponding index files according to preset storage rules, constructs an inverted word frequency file based on the encrypted word frequency and the encrypted summary, and stores the inverted word frequency file in descending order of the encrypted word frequency.

6. A method for querying and downloading documents, characterized in that, Applied to user terminals, including: The query content of the encrypted document to be downloaded is obtained, and the query content is processed by the secure word segmenter in the full-text search engine client to obtain encrypted keywords; wherein, the encrypted document to be downloaded is an encrypted document stored using the document upload and storage method as described in any one of claims 1 to 5; The encrypted keywords are transmitted to the cloud server, so that the cloud server can match the target encrypted document set based on the encrypted keywords through the full-text search engine server, and use a predefined order-preserving encryption scoring mechanism to filter out a preset number of encrypted documents from the target encrypted document set, and complete the sorting of the preset number of encrypted documents to obtain the encrypted document sorting result, and then obtain the corresponding encrypted display information based on the preset number of encrypted documents. Obtain the sorting result of the encrypted document and the encrypted display information sent by the cloud server, obtain the first key and the second key from the key management center, and obtain the derived key based on the first key; The encrypted display information is decrypted based on the derived key to obtain decrypted information. Based on the decrypted information and the sorting result of the encrypted document, the corresponding encrypted document and the encrypted key corresponding to the encrypted document are downloaded from the cloud server. The encrypted key is then decrypted using the second key to obtain a third key, and the encrypted document is decrypted using the third key.

7. The document query and download method according to claim 6, characterized in that, The step of obtaining corresponding ciphertext display information based on a preset number of ciphertext documents includes: Extract the ciphertext digest, ciphertext title, ciphertext author, and ciphertext time from a preset number of ciphertext documents, and encapsulate the ciphertext digest, ciphertext title, ciphertext author, and ciphertext time to obtain ciphertext display information.

8. A document upload and storage device, characterized in that, Applied to user terminals, including: The key acquisition module is used to obtain a first key and a second key from the key management center, and to obtain a derived key based on the first key; The material acquisition module is used to process the document to be stored using the secure word segmenter in the full-text search engine client to obtain index material, and to perform corresponding encryption processing on the index material based on the derived key to obtain ciphertext index material; A key generation module is used to call the cryptographic module using the secure word segmenter to generate a third key; An encryption module is used to encrypt the document to be stored using the third key to obtain a ciphertext document, and to encrypt the third key using the second key to obtain an encrypted key; An upload storage module is used to upload the encrypted index material, the encrypted document, and the encrypted key to a cloud server, so that the cloud server can update the index file based on the encrypted index material through the full-text search engine server, and store the encrypted document and the encrypted key in a storage system; The index material includes inverted index material and forward index material, and the encrypted index material includes encrypted inverted index material and encrypted forward index material; the inverted index material contains keyword information, term frequency information and summary information, and the forward index material includes field information; The key acquisition module is specifically used to obtain a first derived key, a second derived key, and a third derived key from the first key using a key derivation algorithm. The material acquisition module is specifically used for: Based on a preset hash algorithm, the keyword information is encrypted using the first derived key to obtain ciphertext keywords. Based on an order-preserving encryption algorithm, the word frequency information is encrypted using the second derived key to obtain ciphertext word frequencies. The digest information is encrypted using the third derived key to obtain ciphertext digests. Ciphertext inverted index material is obtained based on the ciphertext keywords, the ciphertext word frequencies, and the ciphertext digest. The field information is encrypted using the third derived key to obtain ciphertext field information, and ciphertext forward index material is obtained based on the ciphertext field information.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the document upload and storage method as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, Used for storing computer programs; wherein, when the computer program is executed by a processor, it implements the steps of the document upload and storage method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Ciphertext cloud-storage oriented document retrieval method and system

    CN102024054A

  • Encrypted data search method and data storage system with encrypted search function

    CN108304733A

  • Central keyword ciphertext searching method base on two-level index in cloud environment

    CN108416037A

  • A full-text retrieval method based on encryption and decryption algorithm

    CN109255248A