Index constructing method, search method, device and system
First Claim
1. An index constructing method comprising:
- constructing data obtained in each preset time period into a primary index segment, respectively, and merging the constructed primary index segment into a primary index segment set after each preset time period is over;
copying each primary index segment in the primary index segment set and merging the copied primary index segments into a corresponding large index segment, to obtain a large index segment set; and
sending the primary index segments in the primary index segment set or the large index segments in the large index segment set to a search device to provide search service;
wherein the copying each primary index segment in the primary index segment set and merging the copied primary index segments into a corresponding large index segment specifically includescopying each primary index segment in the primary index segment set in turn according to time sequence, and merging the copied primary index segments into the corresponding large index segment;
wherein the corresponding large index segment is a large index segment which is in the large index segment set and neighbors a free memory.
1 Assignment
0 Petitions
Accused Products
Abstract
The present disclosure discloses an index constructing method, search method, device and system. The index constructing method includes: constructing data obtained in each preset time period into a primary index segment, respectively, and merging the constructed primary index segments into a primary index segment set after each preset time period is over; copying and merging each primary index segment in the primary index segment set into a corresponding large index segment, to obtain a large index segment set; and sending the primary index segments in the primary index segment set or the large index segments in the large index segment set to a search device to provide a search service. The present disclosure constructs the primary index segments on the basis of time, merges the constructed primary index segments into the large index segment, and provides the search service simultaneously with the primary index segments or the large index segments, thus, improving search speed.
-
Citations
14 Claims
-
1. An index constructing method comprising:
-
constructing data obtained in each preset time period into a primary index segment, respectively, and merging the constructed primary index segment into a primary index segment set after each preset time period is over; copying each primary index segment in the primary index segment set and merging the copied primary index segments into a corresponding large index segment, to obtain a large index segment set; and sending the primary index segments in the primary index segment set or the large index segments in the large index segment set to a search device to provide search service; wherein the copying each primary index segment in the primary index segment set and merging the copied primary index segments into a corresponding large index segment specifically includes copying each primary index segment in the primary index segment set in turn according to time sequence, and merging the copied primary index segments into the corresponding large index segment;
wherein the corresponding large index segment is a large index segment which is in the large index segment set and neighbors a free memory. - View Dependent Claims (2, 3, 4, 5)
-
-
6. An index constructing device comprising:
-
a processor and a non-transitory storage medium storing machine readable instructions that are executable by the processor to; construct data obtained in each preset time period into a primary index segment, respectively, and merge the constructed primary index segment into a primary index segment set after each preset time period is over; copy each primary index segment in the primary index segment set obtained and merge the copied primary index segments into a corresponding large index segment to obtain a large index segment set; and send the primary index segments in the primary index segment set obtained by the constructing module or the large index segments in the large index segment set obtained to a search device to provide search service; wherein when the processor performs the process of copying each primary index segment in the primary index segment set obtained and merge the copied primary index segments into a corresponding large index segment to obtain a large index segment set, the machine readable instructions are executable by the processor to copy, in turn according to time sequence, each primary index segment in the primary index segment set obtained by the constructing module through merging, and merge the copied primary index segments into a corresponding large index segment which is a large index segment in the large index segment set and neighbors a free memory. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A search method comprising:
-
every each preset period, obtaining a first-level index segment from an index constructing device, and merging the obtained first-level index segment into a first-level index segment set; copying each first-level index segment in the first-level index segment set and merging the copied first-level index segments into a corresponding second-level index segment to obtain a second-level index segment set; providing search service according to the first-level index segments in the first-level index segment set and the second-level index segments in the second-level index segment set; wherein each of the first-level index segment and the second-level index segment includes a sequence number value and a sign of whether being complete; every each preset period, obtaining a first-level index segment from an index constructing device, specifically includes every each preset period, sending an index segment application to the index constructing device, the application carrying a sequence number value and a sign of whether being complete;
the sequence number value being the largest sequence number value of those of already existed index segments or null;receiving the index segment sent by the index constructing device according to the sequence number value and sign of whether being complete, and taking the received index segment as a first-level index segment; when copying each first-level index segment in the first-level index segment set and merging the copied first-level index segments into a corresponding second-level index segment, a sequence number value of the second-level index segment after merged is the larger sequence number value of a sequence number value of the first-level index segment and a sequence number value of the second-level index segment when merging. - View Dependent Claims (12)
-
-
13. A search device comprising:
-
a processor and a non-transitory storage medium storing machine readable instructions that are executable by the processor to; every each preset period, obtain a first-level index segment from an index constructing device, and merge the obtained first-level index segment into a first-level index segment set; copy each first-level index segment in the first-level index segment set obtained by the obtaining module, and merge the copied first-level index segments into a corresponding second-level index segment to obtain a second-level index segment set; provide search service according to the first-level index segments in the first-level index segment set obtained by the obtaining module and the second-level index segments in the second-level index segment set obtained by the second merging module; wherein when the processor performs the process of copying each first-level index segment in the first-level index segment set obtained by the obtaining module, and merge the copied first-level index segments into a corresponding second-level index segment to obtain a second-level index segment set, wherein the machine readable instructions are further executable by the processor to copy each first-level index segment in the first-level index segment set in turn according to time sequence, and merge the copied first-level index segments into a corresponding second-level index segment;
the corresponding second-level index segment is a second-level index segment which is in the second-level index segment set and neighbors a free memory. - View Dependent Claims (14)
-
Specification