CN103366008A - Resource searching method and device - Google Patents
Resource searching method and device Download PDFInfo
- Publication number
- CN103366008A CN103366008A CN2013103085327A CN201310308532A CN103366008A CN 103366008 A CN103366008 A CN 103366008A CN 2013103085327 A CN2013103085327 A CN 2013103085327A CN 201310308532 A CN201310308532 A CN 201310308532A CN 103366008 A CN103366008 A CN 103366008A
- Authority
- CN
- China
- Prior art keywords
- file
- search key
- level
- searching
- index
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
The invention provides a resource searching method. The method comprises the following steps of: when a file to be stored is received, extracting a searching keyword in the file; encrypting and storing the received file; and when a searching keyword of a file to be searched is received, comparing the searching keyword of the file to be searched with the extracted searching keyword, and searching the file. The invention also provides a device corresponding to the method. According to the embodiment of the invention, during file retrieval, a required file can be found by comparing the searching keyword for searching the file with the extracted searching keyword before the file is stored, and then only the found file is decrypted without decryption of all stored files in the prior art. Therefore, according to the resource searching method provided by the embodiment of the invention, the retrieval time of the file is greatly shortened.
Description
Technical field
The present invention relates to computer realm, relate in particular to a kind of method and apparatus of searching resource.
Background technology
The cloud storage platform refers to by functions such as cluster application, network technology or distributed file systems, a large amount of various dissimilar memory devices in the network are gathered collaborative work by application software, a system of data storage and Operational Visit function externally is provided jointly.
Therefore, after the cloud platform database is stored file, when the user need to search certain resource, need the client to send relevant information to server, server is retrieved according to the information that the client sends.Present existing search method is: file was decrypted after all of storage were encrypted, and the information that then sends according to the user and the information of having deciphered All Files are compared, thereby then the position of locating file sends to the user with the file that finds.
In above-mentioned lookup method, owing to can't search for after file is encrypted, when carrying out file search, server must first the All Files of storing all be decrypted so, and then the information of the information that sends of comparison user and the All Files deciphered, such retrieving is very consuming time, and has taken a large amount of CPU.
Summary of the invention
The technical matters that (one) will solve
The objective of the invention is to propose a kind of method of searching resource, search the time with shortening.
(2) technical scheme
In order to solve the problems of the technologies described above, the present invention proposes a kind of method of searching resource, comprising:
S1, when receiving file to be stored, extract the search key in this document;
The file that S2, encryption and preservation receive;
S3, when receiving the search key of file to be found, the search key of file to be found and the search key of extraction are compared locating file;
The file that S4, deciphering and transmission find.
Among the step S1, the search key in described extraction this document comprises:
Extract in this document corresponding user name, file type, file class and the file name any one or a plurality of combination.
Also comprise before the described step S1:
Establishment has the virtual resource index table of comparisons of M level index, and M is not less than 1 natural number;
Among the step S1, described extraction and the search key of preserving in this document comprise:
Extract the M level search key in the file to be stored, this M level search key is corresponding step by step with M level index in the virtual resource index table of comparisons;
The M level search key that extracts is saved in the M level index of the virtual resource index table of comparisons step by step;
Described step S3 comprises:
When receiving the N level search key of file to be found, the N level search key of file to be found and the N level index of the virtual resource index table of comparisons are compared step by step, locating file, wherein, N is not less than 1 and be not more than the natural number of M.
Wherein, the value of M is 4.
Described 4 grades of index are followed successively by: user name, file type, file class and file name.
The invention allows for a kind of device of searching resource, comprising:
Extraction module is used for extracting search key corresponding to this document from the file to be stored that receives;
Memory module is used for encrypting and preserving the file to be stored that receives;
Search module, be used for when receiving the search key of file to be found, the search key of file to be found and the search key of described extraction module extraction are compared locating file in described memory module;
Deciphering module is used for being decrypted searching the file that module finds, and sends the file of deciphering.
Preferably,
Described extraction module is used for extracting user name, file type, file class and the file name of the file that receives as the search key of correspondence.
Preferably, the described device of searching resource also comprises:
Creation module is used for creating the virtual resource index table of comparisons with M level index, and M is not less than 1 natural number;
Described extraction module is used for extracting the M level search key of file to be stored, and the M level search key that extracts is saved in step by step in the M level index of the virtual resource index table of comparisons that described creation module creates;
The described module of searching, the N level index that is used for the virtual resource index table of comparisons that N level search key and the described creation module of file to be found are preserved is compared step by step, and locating file, N are to be not less than 1 and be not more than the natural number of M.
Preferably, described creation module is used for creating the virtual resource index table of comparisons with 4 grades of index.
(3) beneficial effect
The beneficial effect of the embodiment of the invention is:
In the embodiment of the invention, when carrying out document retrieval, as long as will compare for search key and the front search key that extracts of preservation file of locating file, just can find required file, only a file that finds is decrypted afterwards, rather than the All Files that deciphering has been stored in the prior art; For example, 100 files of having encrypted being arranged in the database, when the some files that will search wherein, is first these 100 files of having encrypted to be decrypted in the prior art, and then locating file; And the method for searching resource that proposes in the embodiments of the invention does not need any one file is decrypted and just can find file; Therefore, the method for searching resource that proposes in the embodiment of the invention has shortened the retrieval time of file greatly.
In addition, in another embodiment of the present invention, carry out grade classification with preserving the search key that extracts before the file, thereby create the virtual resource index table of comparisons, data are retrieved step by step according to index when retrieving, and can avoid like this some unnecessary file is retrieved and wasted retrieval time, thereby the burden of the CPU that greatly alleviates, the service efficiency of the server that improves simultaneously.
Must not necessarily need to reach simultaneously above-described all advantages when certainly, using either method of the present invention to carry out resource lookup.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of searching resource in the embodiment of the invention;
Fig. 2 is that the virtual resource comparison that server is set up in the another embodiment of the present invention represents intention;
Fig. 3 is the device synoptic diagram among the embodiment of apparatus of the present invention;
Fig. 4 is the device synoptic diagram among another embodiment of apparatus of the present invention.
Among the figure, 1 is the one-level index of virtual resource comparison table, and 2 is the secondary index of virtual resource comparison table, and 3 is the three level list of virtual resource comparison table, and 4 is the level Four index of virtual resource comparison table.
Embodiment
Below in conjunction with drawings and Examples embodiments of the present invention are described in further detail.Following examples are used for explanation the present invention, but can not be used for limiting the scope of the invention.
For the file in the cloud platform database is retrieved, embodiments of the invention have proposed a kind of method of searching resource, referring to Fig. 1, comprising:
S1, when receiving file to be stored, extract the search key in this document;
The file that S2, encryption and preservation receive;
S3, when receiving the search key of file to be found, the search key of file to be found and the search key of extraction are compared locating file;
The file that S4, deciphering and transmission find.
In the embodiment of the invention, when carrying out document retrieval, as long as will compare for search key and the front search key that extracts of preservation file of locating file, just can find required file, only a file that finds is decrypted afterwards, rather than the All Files that deciphering has been stored in the prior art; For example, 100 files of having encrypted being arranged in the database, when the some files that will search wherein, is first these 100 files of having encrypted to be decrypted in the prior art, and then locating file; And the method for searching resource that proposes in the embodiments of the invention does not need any one file is decrypted and just can find file; Therefore, the method for searching resource that proposes in the embodiment of the invention has shortened the retrieval time of file greatly.
In the above embodiment of the present invention, the search key in the file can be any unique identifier that can characterize file, for example any one or a plurality of combinations in the user name of file, file type, file class and the file name.
In the above embodiment of the present invention, when quantity of documents is very large, if carry out grade classification to preserving the search key that extracts before the file, can further shorten retrieval time.The method of carrying out grade classification to preserving the search key that extracts before the file comprises:
Also comprise before the described step S1:
Establishment has the virtual resource index table of comparisons of M level index, and M is not less than 1 natural number;
Among the step S1, described extraction and the search key of preserving in this document comprise:
Extract the M level search key in the file to be stored, this M level search key is corresponding step by step with M level index in the virtual resource index table of comparisons;
The M level search key that extracts is saved in the M level index of the virtual resource index table of comparisons step by step;
Described step S3 comprises:
When receiving the N level search key of file to be found, the N level search key of file to be found and the N level index of the virtual resource index table of comparisons are compared step by step, locating file, wherein, N is not less than 1 and be not more than the natural number of M.
In the above embodiment of the present invention, as preferred version, getting M is 4, and described 4 grades of index are followed successively by: user name, file type, file class and file name.
The method that the below searches as example is elaborated take the file of the virtual resource table of comparisons locating file that has 4 grades of index according to establishment " 1.txt " by name, the method comprises:
1, creates the virtual resource index table of comparisons with 4 grades of index, referring to Fig. 2;
4 grades of index are respectively file type, file class, file name and user name, wherein, and 1 grade of index of user's this virtual resource comparison table by name;
File type is 2 grades of index of this virtual resource comparison table, and file type comprises document files, picture file, video file and game etc.;
File class is 3 grades of index of this virtual resource comparison table, every kind of file type has 3 grades of index under 2 grades of index, and for document files, its file class comprises word, txt and pdf etc., for picture file, its file class comprises jpg, bmp and tif etc.;
File name is the level Four index of this virtual resource comparison table, and every kind of file type has 4 grades of index under 3 grades of index, has namely all comprised the All Files title of this document type under every kind of file type.
2, when receiving file to be stored, extract 4 grades of search keys in the file to be stored, these 4 grades of search keys are corresponding step by step with 4 grades of index in the virtual resource index table of comparisons;
After server receives " 1.txt " file that user A sends, can directly obtain user name " A " and file name " 1.txt ", server just can therefrom obtain the 1st grade of search key for " A " so, the 2nd grade of search key is " document files ", the 3rd level search key is " txt ", and the 4th grade of search key is " 1 ".
3, the M level search key that extracts is saved in the M level index;
Server is saved in search key " A " in the 1st grade of index of the virtual resource index table of comparisons, search key " document files " is saved in the 2nd grade of index of the virtual resource index table of comparisons, search key " txt " is saved in the 3rd level index of the virtual resource index table of comparisons, search key " 1 " is saved in the 4th grade of index of the virtual resource index table of comparisons.
4, when receiving search key " A ", " document files ", " txt " and " 1 ", server is at first compared the 1st grade of index of search key " A " and the virtual resource index table of comparisons one by one, finds the index value that is complementary with " A ";
Then, the 2nd grade of index of search key " document files " and the virtual resource index table of comparisons compared one by one, found the index value that is complementary with " document files ";
Then, the 3rd level index of search key " txt " and the virtual resource index table of comparisons is compared one by one, found the index value that is complementary with " txt ";
At last, the 4th grade of index of search key " 1 " and the virtual resource index table of comparisons compared one by one, found the index value that is complementary with " 1 ";
Also proposed a kind of device of searching resource in an alternative embodiment of the invention, referring to Fig. 3, this device comprises:
Extraction module is used for extracting search key corresponding to this document from the file to be stored that receives;
Memory module is used for encrypting and preserving the file to be stored that receives;
Search module, be used for when receiving the search key of file to be found, the search key of file to be found and the search key of described extraction module extraction are compared locating file in described memory module;
Deciphering module is used for being decrypted searching the file that module finds, and sends the file of deciphering.
In an embodiment of apparatus of the present invention, described extraction module is used for extracting user name, file type, file class and the file name of the file that receives as the search key of correspondence.
Referring to Fig. 4, in another embodiment of apparatus of the present invention, for the search key that extracts is carried out grade classification, device further comprises:
Creation module is used for creating the virtual resource index table of comparisons with M level index, and M is not less than 1 natural number;
Described extraction module is used for extracting the M level search key of file to be stored, and the M level search key that extracts is saved in step by step in the M level index of the virtual resource index table of comparisons that described creation module creates;
The described module of searching, the N level index that is used for the virtual resource index table of comparisons that N level search key and the described creation module of file to be found are preserved is compared step by step, and locating file, N are to be not less than 1 and be not more than the natural number of M.
In above-described embodiment of apparatus of the present invention, as preferred version, described creation module is used for creating the virtual resource index table of comparisons with 4 grades of index.
Therefore, the beneficial effect of the embodiment of the invention is:
In the embodiment of the invention, when carrying out document retrieval, as long as will compare for search key and the front search key that extracts of preservation file of locating file, just can find required file, only a file that finds is decrypted afterwards, rather than the All Files that deciphering has been stored in the prior art; For example, 100 files of having encrypted being arranged in the database, when the some files that will search wherein, is first these 100 files of having encrypted to be decrypted in the prior art, and then locating file; And the method for searching resource that proposes in the embodiments of the invention does not need any one file is decrypted and just can find file; Therefore, the method for searching resource that proposes in the embodiment of the invention has shortened the retrieval time of file greatly.
In addition, in another embodiment of the present invention, carry out grade classification with preserving the search key that extracts before the file, thereby create the virtual resource index table of comparisons, data are retrieved step by step according to index when retrieving, and can avoid like this some unnecessary file is retrieved and wasted retrieval time, thereby the burden of the CPU that greatly alleviates, the service efficiency of the server that improves simultaneously.
Embodiments of the invention provide for example with for the purpose of describing, and are not exhaustively or limit the invention to disclosed form.Many modifications and variations are apparent for the ordinary skill in the art.Selecting and describing embodiment is for better explanation principle of the present invention and practical application, thereby and those of ordinary skill in the art can understand the various embodiment with various modifications that the present invention's design is suitable for special-purpose.
Claims (9)
1. a method of searching resource is characterized in that, comprising:
S1, when receiving file to be stored, extract search key corresponding to this document;
S2, encryption are also preserved file to be stored;
S3, when receiving the search key of file to be found, the search key of file to be found and the search key of extraction are compared locating file;
The file that S4, deciphering and transmission find.
2. method of searching resource according to claim 1 is characterized in that, among the step S1, the search key in described extraction this document comprises:
Extract in this document corresponding user name, file type, file class and the file name any one or a plurality of combination.
3. method of searching resource according to claim 1 is characterized in that, also comprises before the described step S1:
Establishment has the virtual resource index table of comparisons of M level index, and M is not less than 1 natural number;
Among the step S1, described extraction and the search key of preserving in this document comprise:
Extract the M level search key in the file to be stored, this M level search key is corresponding step by step with M level index in the virtual resource index table of comparisons;
The M level search key that extracts is saved in the M level index of the virtual resource index table of comparisons step by step;
Described step S3 comprises:
When receiving the N level search key of file to be found, the N level search key of file to be found and the N level index of the virtual resource index table of comparisons are compared step by step, locating file, wherein, N is not less than 1 and be not more than the natural number of M.
4. method of searching resource according to claim 3 is characterized in that, the value of described M is 4.
5. method of searching resource according to claim 4 is characterized in that, described 4 grades of index are followed successively by: user name, file type, file class and file name.
6. a device of searching resource is characterized in that, comprising:
Extraction module is used for extracting search key corresponding to this document from the file to be stored that receives;
Memory module is used for encrypting and preserving the file to be stored that receives;
Search module, be used for when receiving the search key of file to be found, the search key of file to be found and the search key of described extraction module extraction are compared locating file in described memory module;
Deciphering module is used for being decrypted searching the file that module finds, and sends the file of deciphering.
7. the device of searching resource according to claim 6 is characterized in that,
Described extraction module is used for extracting user name, file type, file class and the file name of the file that receives as the search key of correspondence.
8. the device of searching resource according to claim 6 is characterized in that, also comprises:
Creation module is used for creating the virtual resource index table of comparisons with M level index, and M is not less than 1 natural number;
Described extraction module is used for extracting the M level search key of file to be stored, and the M level search key that extracts is saved in step by step in the M level index of the virtual resource index table of comparisons that described creation module creates;
The described module of searching, the N level index that is used for the virtual resource index table of comparisons that N level search key and the described creation module of file to be found are preserved is compared step by step, and locating file, N are to be not less than 1 and be not more than the natural number of M.
9. the device of searching resource according to claim 8 is characterized in that, described creation module is used for creating the virtual resource index table of comparisons with 4 grades of index.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103085327A CN103366008A (en) | 2013-07-22 | 2013-07-22 | Resource searching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103085327A CN103366008A (en) | 2013-07-22 | 2013-07-22 | Resource searching method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103366008A true CN103366008A (en) | 2013-10-23 |
Family
ID=49367349
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013103085327A Pending CN103366008A (en) | 2013-07-22 | 2013-07-22 | Resource searching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103366008A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105354318A (en) * | 2015-11-13 | 2016-02-24 | 北京金山安全软件有限公司 | File searching method and device |
CN105446974A (en) * | 2014-06-20 | 2016-03-30 | 联想(北京)有限公司 | Information processing method and device |
CN105574062A (en) * | 2015-07-01 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | File retrieval method and apparatus and terminal |
CN107978180A (en) * | 2017-12-10 | 2018-05-01 | 吴静 | A kind of intelligent tutoring method and its system based on written trace |
CN109513211A (en) * | 2018-10-15 | 2019-03-26 | 网易(杭州)网络有限公司 | Processing method, device and the game resource display systems of fine arts resource file |
CN109947654A (en) * | 2019-03-28 | 2019-06-28 | 上海连尚网络科技有限公司 | The method and apparatus automatically updated for test case library |
CN113923209A (en) * | 2021-09-29 | 2022-01-11 | 北京轻舟智航科技有限公司 | Processing method for downloading batch data based on levelDB |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090254530A1 (en) * | 2000-07-27 | 2009-10-08 | Jaffe Jonathan E | Indigenous authentication and searching system and method |
CN102024054A (en) * | 2010-12-10 | 2011-04-20 | 中国科学院软件研究所 | Ciphertext cloud-storage oriented document retrieval method and system |
US20120078914A1 (en) * | 2010-09-29 | 2012-03-29 | Microsoft Corporation | Searchable symmetric encryption with dynamic updating |
CN102945356A (en) * | 2012-12-12 | 2013-02-27 | 上海交通大学 | Access control method and system for search engine under cloud environment |
CN103020273A (en) * | 2012-12-27 | 2013-04-03 | 福建榕基软件股份有限公司 | Method and device for tree structure data presentation and relative index table generation |
CN103034646A (en) * | 2011-09-30 | 2013-04-10 | 北大方正集团有限公司 | PDF (Portable Document Format) sample file retrieval method and PDF sample file retrieval device |
-
2013
- 2013-07-22 CN CN2013103085327A patent/CN103366008A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090254530A1 (en) * | 2000-07-27 | 2009-10-08 | Jaffe Jonathan E | Indigenous authentication and searching system and method |
US20120078914A1 (en) * | 2010-09-29 | 2012-03-29 | Microsoft Corporation | Searchable symmetric encryption with dynamic updating |
CN102024054A (en) * | 2010-12-10 | 2011-04-20 | 中国科学院软件研究所 | Ciphertext cloud-storage oriented document retrieval method and system |
CN103034646A (en) * | 2011-09-30 | 2013-04-10 | 北大方正集团有限公司 | PDF (Portable Document Format) sample file retrieval method and PDF sample file retrieval device |
CN102945356A (en) * | 2012-12-12 | 2013-02-27 | 上海交通大学 | Access control method and system for search engine under cloud environment |
CN103020273A (en) * | 2012-12-27 | 2013-04-03 | 福建榕基软件股份有限公司 | Method and device for tree structure data presentation and relative index table generation |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446974A (en) * | 2014-06-20 | 2016-03-30 | 联想(北京)有限公司 | Information processing method and device |
CN105574062A (en) * | 2015-07-01 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | File retrieval method and apparatus and terminal |
CN105354318A (en) * | 2015-11-13 | 2016-02-24 | 北京金山安全软件有限公司 | File searching method and device |
CN107978180A (en) * | 2017-12-10 | 2018-05-01 | 吴静 | A kind of intelligent tutoring method and its system based on written trace |
CN109513211A (en) * | 2018-10-15 | 2019-03-26 | 网易(杭州)网络有限公司 | Processing method, device and the game resource display systems of fine arts resource file |
CN109513211B (en) * | 2018-10-15 | 2022-06-24 | 网易(杭州)网络有限公司 | Art resource file processing method and device and game resource display system |
CN109947654A (en) * | 2019-03-28 | 2019-06-28 | 上海连尚网络科技有限公司 | The method and apparatus automatically updated for test case library |
CN113923209A (en) * | 2021-09-29 | 2022-01-11 | 北京轻舟智航科技有限公司 | Processing method for downloading batch data based on levelDB |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103366008A (en) | Resource searching method and device | |
CN105678189B (en) | Data file encryption storage and retrieval system and method | |
US10013574B2 (en) | Method and apparatus for secure storage and retrieval of encrypted files in public cloud-computing platforms | |
US8819408B2 (en) | Document processing method and system | |
US9197613B2 (en) | Document processing method and system | |
CN105701096A (en) | Index generation method, data inquiry method, index generation device, data inquiry device and system | |
CN107368527B (en) | Multi-attribute index method based on data stream | |
CN104679778A (en) | Search result generating method and device | |
CN104202384A (en) | File uploading and searching method of distributed file system | |
CN109992978B (en) | Information transmission method and device and storage medium | |
CN108764902B (en) | Method, node and blockchain system for storing data | |
CN103970889A (en) | Security cloud disc for Chinese and English keyword fuzzy search | |
CN105808622A (en) | File storage method and device | |
CN107357843A (en) | Mass network data search method based on data flow architecture | |
CN105447166A (en) | Keyword based information search method and system | |
US8543600B2 (en) | Redistribute native XML index key shipping | |
CN104992124A (en) | Document safety access method for cloud storage environment | |
CN105657677A (en) | Short message sending method, short message gateway and service platform | |
CN107885705B (en) | Efficient and extensible safe document similarity calculation method and device | |
CN109255244A (en) | Data ciphering method and its device, data encryption searching system | |
Moh et al. | Efficient semantic search over encrypted data in cloud computing | |
CN103544301A (en) | Efficient and safe multi-keyword-supporting searching method in mobile cloud | |
CN106250453A (en) | The cipher text retrieval method of numeric type data based on cloud storage and device | |
CN110945506B (en) | Searchable encryption supporting hybrid indexes | |
CN109947759A (en) | A kind of data directory method for building up, indexed search method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20131023 |