IP Library › Granted Patent US 9,396,229
Granted Patent B2
US 9,396,229 · App. 14/029,445 · Granted Jul 19, 2016

Mail indexing and searching using hierarchical caches

Inventor: Zhiyong She (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F17/30424G06F17/30622G06F17/30631
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,396,229
App. No.
14/029,445
Granted
Jul 19, 2016
Kind
B2
Abstract

Electronic mail message processing includes: obtaining a set of keywords associated with an electronic mail message; updating, based at least in part on the set of keywords, a set of inverted index records stored in a level 1 cache; determining whether size of the set of inverted index records stored in the level 1 cache exceeds a first preset threshold value; in the event that the first preset threshold value is exceeded, transferring the set of inverted index records in the level 1 cache to a level 2 cache; determining whether size of a level 2 cache file exceeds a second preset threshold value; in the event that the second preset threshold value is exceeded, transferring, according to a path file, inverted index records in the level 2 cache file to a level 3 cache storing a set of inverted index files.

Claims (105)

1. A method for electronic mail message processing, comprising:

obtaining a set of keywords associated with an electronic mail message;

updating, using one or more computer processors and based at least in part on the set of keywords, a set of inverted index records stored in a level 1 cache;

determining whether size of the set of inverted index records stored in the level 1 cache exceeds a first preset threshold value;

in the event that the first preset threshold value is exceeded, transferring the set of inverted index records in the level 1 cache to a level 2 cache;

determining whether size of a level 2 cache file exceeds a second preset threshold value;

in the event that the second preset threshold value is exceeded, transferring, according to a path file, inverted index records in the level 2 cache file to a level 3 cache storing a set of inverted index files; wherein

the path file stores mapping relationship information of the keywords and corresponding level 3 inverted index files;

determining whether size of a level 3 inverted index file exceeds a third preset threshold value;

in the event that the size of the level 3 inverted index file exceeds the third preset threshold value, splitting the level 3 inverted index file into two inverted index sub-files; and

updating the path file according to the two split inverted index sub-files.

2. The method of claim 1 , wherein transferring the inverted index records in the level 2 cache file to the level 3 inverted index files comprises:

fetching the level 2 inverted index records in the level 2 cache file into memory;

using the path file as a basis to determine the level 3 inverted index files corresponding to keywords in the level 2 inverted index records; and

transferring the level 2 inverted index records to the determined level 3 inverted index files according to the keywords.

3. The method of claim 2 , wherein transferring the inverted index records in the level 2 cache file to the determined level 3 inverted index files according to the keywords is performed in append mode.

4. The method of claim 2 , wherein a level 3 inverted index file comprises an initial static compressed file and an incremental file.

5. The method of claim 4 , wherein transferring the inverted index records in the level 2 cache file to the level 3 inverted index files according to the keywords includes:

transferring the level 2 inverted index records to the incremental file according to the keywords;

determining whether the incremental file exceeds an incremental threshold value;

in the event that the incremental threshold value is exceeded, decompressing the initial static compressed file to obtain a decompressed initial static file;

merging the decompressed initial static file and the incremental file to obtain a merged file; and

compressing the merged file to generate a current static compressed file.

6. The method of claim 1 , further comprising:

obtaining a set of one or more search keywords submitted by a user;

determining, according to the path file, level 3 inverted index files corresponding to the search keywords submitted by the user;

determining a first mail set that includes the search keywords based on the level 3 inverted index files, a second mail set that includes the search keywords based on the level 1 cache, and a third mail set that includes the search keywords based on the level 2 cache file; and

merging the first mail set, second mail set, and third mail set to obtain search results.

7. A system for processing electronic mail messages, comprising:

one or more processors configured to:

obtain a set of keywords associated with an electronic mail message;

update, based at least in part on the set of keywords, a set of inverted index records stored in a level 1 cache;

determine whether size of the set of inverted index records stored in the level 1 cache exceeds a first preset threshold value;

in the event that the first preset threshold value is exceeded, transfer the set of inverted index records in the level 1 cache to a level 2 cache;

determine whether size of a level 2 cache file exceeds a second preset threshold value;

in the event that the second preset threshold value is exceeded, transfer, according to a path file, inverted index records in the level 2 cache file to a level 3 cache storing a set of inverted index files; wherein

the path file stores mapping relationship information of the keywords and corresponding level 3 inverted index files;

determine whether size of a level 3 inverted index file exceeds a third preset threshold value;

in the event that the size of the level 3 inverted index file exceeds the third preset threshold value, split the level 3 inverted index file into two inverted index sub-files; and

update the path file according to the two split inverted index sub-files; and

one or more memories coupled to the one or more processors, configured to provide the one or more processors with instructions.

8. The system of claim 7 , wherein to transfer the inverted index records in the level 2 cache file to the level 3 inverted index files comprises to:

fetch the level 2 inverted index records in the level 2 cache file into memory;

use the path file as a basis to determine the level 3 inverted index files corresponding to keywords in the level 2 inverted index records; and

transfer the level 2 inverted index records to the determined level 3 inverted index files according to the keywords.

9. The system of claim 8 , wherein to transfer the inverted index records in the level 2 cache file to the determined level 3 inverted index files according to the keywords is performed in append mode.

10. The system of claim 8 , wherein a level 3 inverted index file comprises an initial static compressed file and an incremental file.

11. The system of claim 10 , wherein to transfer the inverted index records in the level 2 cache file to the level 3 inverted index files according to the keywords includes to:

transfer the level 2 inverted index records to the incremental file according to the keywords;

determine whether the incremental file exceeds an incremental threshold value;

in the event that the incremental threshold value is exceeded, decompress the initial static compressed file to obtain a decompressed initial static file;

merge the decompressed initial static file and the incremental file to obtain a merged file; and

compress the merged file to generate a current static compressed file.

12. The system of claim 7 , wherein the one or more processors are further configured to:

obtain a set of one or more search keywords submitted by a user;

determine, according to the path file, level 3 inverted index files corresponding to the search keywords submitted by the user;

determine a first mail set that includes the search keywords based on the level 3 inverted index files, a second mail set that includes the search keywords based on the level 1 cache, and a third mail set that includes the search keywords based on the level 2 cache file; and

merge the first mail set, second mail set, and third mail set to obtain search results.

13. A computer program product for electronic mail message processing, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:

obtaining a set of keywords associated with an electronic mail message;

updating, based at least in part on the set of keywords, a set of inverted index records stored in a level 1 cache;

determining whether size of the set of inverted index records stored in the level 1 cache exceeds a first preset threshold value;

in the event that the first preset threshold value is exceeded, transferring the set of inverted index records in the level 1 cache to a level 2 cache;

determining whether size of a level 2 cache file exceeds a second preset threshold value;

in the event that the second preset threshold value is exceeded, transferring, according to a path file, inverted index records in the level 2 cache file to a level 3 cache storing a set of inverted index files;

wherein the path file stores mapping relationship information of the keywords and corresponding level 3 inverted index files;

determining whether size of a level 3 inverted index file exceeds a third preset threshold value;

in the event that the size of the level 3 inverted index file exceeds the third preset threshold value, splitting the level 3 inverted index file into two inverted index sub-files; and

updating the path file according to the two split inverted index sub-files.

14. A system for processing electronic mail messages, comprising:

one or more processors configured to:

obtain a set of keywords associated with an electronic mail message;

update, based at least in part on the set of keywords, a set of inverted index records stored in a level 1 cache;

determine whether size of the set of inverted index records stored in the level 1 cache exceeds a first preset threshold value;

in the event that the first preset threshold value is exceeded, transfer the set of inverted index records in the level 1 cache to a level 2 cache;

determine whether size of a level 2 cache file exceeds a second preset threshold value;

in the event that the second preset threshold value is exceeded, transfer, according to a path file, inverted index records in the level 2 cache file to a level 3 cache storing a set of inverted index files; wherein

the path file stores mapping relationship information of the keywords and corresponding level 3 inverted index files; and

wherein to transfer the inverted index records in the level 2 cache file to level 3 inverted index files comprises to:

fetch the level 2 inverted index records in the level 2 cache file into memory;

use the path file as a basis to determine the level 3 inverted index files corresponding to keywords in the level 2 inverted index records, wherein a level 3 inverted index file comprises an initial static compressed file and an incremental file; and

transfer the level 2 inverted index records to the determined level 3 inverted index files according to the keywords; and

one or more memories coupled to the one or more processors, configured to provide the one or more processors with instructions.

15. The system of claim 14 , wherein the one or more processors are further configured to:

determine whether size of a level 3 inverted index file exceeds a third preset threshold value;

in the event that the size of the level 3 inverted index file exceeds the third preset threshold value, split the level 3 inverted index file into two inverted index sub-files; and

update the path file according to the two split inverted index sub-files.

16. The system of claim 14 , wherein to transfer the inverted index records in the level 2 cache file to the determined level 3 inverted index files according to the keywords is performed in append mode.

17. The system of claim 14 , wherein to transfer the inverted index records in the level 2 cache file to the level 3 inverted index files according to the keywords includes to:

transfer the level 2 inverted index records to the incremental file according to the keywords;

determine whether the incremental file exceeds an incremental threshold value;

in the event that the incremental threshold value is exceeded, decompress the initial static compressed file to obtain a decompressed initial static file;

merge the decompressed initial static file and the incremental file to obtain a merged file; and

compress the merged file to generate a current static compressed file.

18. The system of claim 14 , wherein to transfer the inverted index records in the level 2 cache file to the level 3 inverted index files according to the keywords includes to:

transfer the level 2 inverted index records to the incremental file according to the keywords;

determine whether the incremental file exceeds an incremental threshold value;

in the event that the incremental threshold value is exceeded, decompress the initial static compressed file to obtain a decompressed initial static file;

merge the decompressed initial static file and the incremental file to obtain a merged file; and

compress the merged file to generate a current static compressed file.

19. The system of claim 14 , wherein the one or more processors are further configured to:

obtain a set of one or more search keywords submitted by a user;

determine, according to the path file, level 3 inverted index files corresponding to the search keywords submitted by the user;

determine a first mail set that includes the search keywords based on the level 3 inverted index files, a second mail set that includes the search keywords based on the level 1 cache, and a third mail set that includes the search keywords based on the level 2 cache file; and

merge the first mail set, second mail set, and third mail set to obtain search results.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 17, 2013
From: SHE, ZHIYONG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 031225/0292 →
Priority Claims (1)
CN 2012 1 0357269 · Sep 21, 2012 · national
Continuity (1)
Related Publication 20140089258A1 · Mar 27, 2014