METHOD AND APPARATUS FOR UPDATING SEARCH CACHE
First Claim
1. A method for updating search cache, comprising:
- when hot content is updated, extracting a first search term corresponding to information of the hot content, and updating the first search term into a pre-established first database, wherein, the first database stores a search term of hot content;
when a search request is received, querying the first database according to a search term in the search request and determining whether a second search term is obtained;
when the second search term is obtained and determined to be valid, querying a pre-established second database according to the second search term to obtain cache content of a first search result, wherein, the second database stores cache content of a search result; and
determining whether the cache content of the first search result is valid;
if the cache content of the first search result is valid, taking information in the cache content of the first search result as a first search request result;
if the cache content of the first search result is not valid, forwarding the search request to a search engine, obtaining a second search request result and updating the second search request result into the second database.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the present application provide a method and apparatus for updating search cache, which relate to the technical field of multimedia. The method comprises: when hot content is updated, extracting a first search term corresponding to information of the hot content, and updating the first search term to a first database; when a search request is received, querying a pre-established first database according to a search term in the search request and determining whether a second search term is obtained; when the second search term is obtained and determined to be valid, querying a pre-established second database according to the second search term to obtain cache of a first search result; determining whether the cache of the first search result is valid; if yes, taking the information in the cache of the first search result as a first search request result; if no, forwarding the search request to a search engine, obtaining a second search request result and updating the second search request result into the second database. By applying embodiments of the present application, the update speed of hot content can be improved.
4 Citations
28 Claims
-
1. A method for updating search cache, comprising:
-
when hot content is updated, extracting a first search term corresponding to information of the hot content, and updating the first search term into a pre-established first database, wherein, the first database stores a search term of hot content; when a search request is received, querying the first database according to a search term in the search request and determining whether a second search term is obtained; when the second search term is obtained and determined to be valid, querying a pre-established second database according to the second search term to obtain cache content of a first search result, wherein, the second database stores cache content of a search result; and determining whether the cache content of the first search result is valid;
if the cache content of the first search result is valid, taking information in the cache content of the first search result as a first search request result;
if the cache content of the first search result is not valid, forwarding the search request to a search engine, obtaining a second search request result and updating the second search request result into the second database. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8-14. -14. (canceled)
-
15. An electronic device, comprising at least one processor and a memory, wherein,
the memory is used to store an application program; - and
the processor is used to execute the application program stored in the memory, so as to perform a method for updating search cache, comprising; when hot content is updated, extracting a first search term corresponding to information of the hot content, and updating the first search term into a pre-established first database, wherein, the first database stores a search term of hot content; when a search request is received, querying the first database according to a search term in the search request and determining whether a second search term is obtained; when the second search term is obtained and determined to be valid, querying a pre-established second database according to the second search term to obtain cache content of a first search result, wherein, the second database stores cache content of a search result; and determining whether the cache content of the first search result is valid;
if the cache content of the first search result is valid, taking information in the cache content of the first search result as a first search request result;
if the cache content of the first search result is not valid, forwarding the search request to a search engine, obtaining a second search request result and updating the second search request result into the second database. - View Dependent Claims (18, 19, 20, 21, 22, 23)
- and
-
16. (canceled)
-
17. A non-transitory computer readable storage medium for storing an application program, which is used to perform a method for updating search cache when being executed, the method comprising:
-
when hot content is updated, extracting a first search term corresponding to information of the hot content, and updating the first search term into a pre-established first database, wherein, the first database stores a search term of hot content; when a search request is received, querying the first database according to a search term in the search request and determining whether a second search term is obtained; when the second search term is obtained and determined to be valid, querying a pre-established second database according to the second search term to obtain cache content of a first search result, wherein, the second database stores cache content of a search result; and determining whether the cache content of the first search result is valid;
if the cache content of the first search result is valid, taking information in the cache content of the first search result as a first search request result;
if the cache content of the first search result is not valid, forwarding the search request to a search engine, obtaining a second search request result and updating the second search request result into the second database. - View Dependent Claims (24, 25, 26, 27, 28)
-
Specification