CN106682197A - Search cache updating method and device - Google Patents
Search cache updating method and device Download PDFInfo
- Publication number
- CN106682197A CN106682197A CN201611249997.XA CN201611249997A CN106682197A CN 106682197 A CN106682197 A CN 106682197A CN 201611249997 A CN201611249997 A CN 201611249997A CN 106682197 A CN106682197 A CN 106682197A
- Authority
- CN
- China
- Prior art keywords
- search
- caching
- searching request
- data
- data base
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
- G06F16/24539—Query rewriting; Transformation using cached or materialised query results
Abstract
The embodiment of the invention provides a search cache updating method and device. The search cache updating method and device is applied to the technical field of multimedia. The method includes the steps that when a search request is received, a pre-established first database is inquired according to the search request, and a cache of a first search result is obtained; when it is judged that the cache of the first search result is effective, each code corresponding to each piece of information is extracted according to each piece of information in the cache of the first search result, a pre-established second database is inquired according to each code, and first code data is obtained; whether the first code data is effective or not is judged, and if yes, a first search request result is acquired from the first database according to each code; if not, a second search request result is acquired from a third database according to each code, and the second search request result is updated to the first database. Compared with an existing search cache updating method, the updating speed of hotspot content can be greatly increased.
Description
Technical field
The present invention relates to multimedia technology field, more particularly to a kind of search buffering updating method and device.
Background technology
With the continuous development of search, the continuous upgrading of focus incident with update, and volumes of searches is continued to increase, in order to
The performance and stability of search service are improved, search caching is requisite key factor.Caching is exactly that temporary file is exchanged
Area, can be the memorizer for carrying out high-speed data exchange, and it is exceedingly fast prior to internal memory and CPU exchange datas, therefore speed, in order to add
The response speed of fast user's inquiry, caches almost into the standard configuration of search engine.Search engine can often search for some user Jing
Key word Search Results put into caching in, when the key word is searched again, directly can transfer from internal memory and search
Hitch fruit, without being retrieved again and ranking from index database again.The introducing of caching mechanism, not only accelerates search engine
Response speed to user's search, decreases double counting of the search engine to data.
However, when there is Hot Contents to update, within the effect duration of caching, just can not show in time in search results pages
Newest relevant information.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of search buffering updating method and device, to improve Hot Contents
Renewal speed.Concrete technical scheme is as follows:
The embodiment of the invention discloses a kind of search buffering updating method, including:
Upon receiving a search request, the first data base for being pre-build according to searching request inquiry, obtains first
The caching of Search Results;Wherein, the first database purchase buffered results, the buffered results include:Search Results it is slow
Deposit the caching with information;
It is each in the caching of first Search Results when the caching for judging first Search Results is effective
Individual information, corresponding each coding of described each information of extraction, and pre-build according to described each coded query
Second data base, obtains first coding data, wherein, the second database purchase coding;
Whether effectively the first coding data is judged, if it is, according to described each coding from first data
The first searching request result is obtained in storehouse;If not, second is obtained from the 3rd data base according to described each coding searching for
Request results, and the second searching request result is updated to first data base, wherein, the 3rd database purchase is most
New information.
Optionally, positioned at first data base pre-build according to searching request inquiry, the first search is obtained
As a result caching, before, the search buffering updating method also includes:
The message queue of Hot Contents is received, the second coded data in the message queue is updated to into second number
According to storehouse, by the corresponding information updating of second coded data to first data base.
Optionally, positioned at first data base pre-build according to searching request inquiry, the first search is obtained
As a result caching, afterwards, the search buffering updating method also includes:
When the caching for judging first Search Results is invalid, the searching request is forwarded to into search engine, by institute
State search engine feedback the 3rd searching request result and the search engine feed back the 3rd searching request result timestamp more
New extremely first data base.
Optionally, the search buffering updating method of the embodiment of the present invention, also includes:
When the Hot Contents update, corresponding 3rd coded data of information of the Hot Contents is extracted, and by institute
State the 3rd coded data and be updated to the second data base, by the information updating of the Hot Contents to the first data base.
Optionally, the first searching request knot is obtained from first data base positioned at each coding described in the basis
Really, afterwards, the search buffering updating method also includes:
The first searching request result is returned to searching request client;Or,
The second searching request result is obtained from the 3rd data base positioned at each coding described in the basis, afterwards, institute
Stating search buffering updating method also includes:
The second searching request result is returned to searching request client;Or,
Search positioned at the 3rd searching request result for feeding back the search engine and search engine feedback the 3rd
To first data base, afterwards, the search buffering updating method also includes the update of time stamp of rope request results:
The 3rd searching request result is returned to searching request client.
Optionally, the effective step of the caching for judging first Search Results, including:
It is determined that obtaining the timestamp of the caching of the first Search Results and the write time of the caching of first Search Results
First difference of stamp;
When first difference is less than the first default effect duration, judge that the caching of first Search Results is effective;
The step for judging whether the first coding data is effective, including:
It is determined that the second difference that the write time of the timestamp and the first coding data for obtaining first coding data stabs;
According to second difference whether less than the second default effect duration, judge whether the first coding data is effective.
Optionally, the invalid step of the caching for judging first Search Results, including:
It is determined that obtaining the timestamp of the caching of the first Search Results and the write time of the caching of first Search Results
First difference of stamp;
When first difference is more than or equal to the first default effect duration, the caching nothing of first Search Results is judged
Effect.
Optionally, it is described according to the searching request inquiry pre-build the first data base the step of, including:
According to the required parameter of the searching request, first data base is retrieved.
The embodiment of the invention also discloses a kind of search buffer update device, including:
Caching acquisition module, for upon receiving a search request, the pre-build according to searching request inquiry
One data base, obtains the caching of the first Search Results;Wherein, the first database purchase buffered results, the buffered results
Including:The caching of Search Results and the caching of information;
Coded data acquisition module, for when the caching for judging first Search Results is effective, according to described first
Each information in the caching of Search Results, extracts corresponding each coding of described each information, and according to described every
The second data base that one coded query pre-builds, obtains first coding data, wherein, second database purchase is compiled
Code;
Coded data judge module, for judging whether the first coding data is effective;
First searching request result acquisition module, for the judged result of coded data judge module for be when, according to
Described each coding obtains the first searching request result from first data base;
Second searching request result acquisition module, for the judged result of coded data judge module for it is no when, according to
Described each coding obtains the second searching request result from the 3rd data base, and updates the second searching request result extremely
First data base, wherein, the newest information of the 3rd database purchase.
Optionally, the search buffer update device of the embodiment of the present invention, also includes:
Database module, for receiving the message queue of Hot Contents, second in the message queue is encoded
Data are updated to second data base, by the corresponding information updating of second coded data to first data base.
Optionally, the search buffer update device of the embodiment of the present invention, also includes:
3rd searching request result acquisition module, for when the caching for judging first Search Results is invalid, by institute
State searching request and be forwarded to search engine, the 3rd searching request result and the search engine that the search engine is fed back is anti-
The update of time stamp of the 3rd searching request result is presented to first data base.
Optionally, the search buffer update device of the embodiment of the present invention, also includes:
Database update module, for when the Hot Contents update, the information for extracting the Hot Contents to be corresponding
3rd coded data, and the 3rd coded data is updated to into the second data base, by the information updating of the Hot Contents extremely
First data base.
Optionally, the search buffer update device of the embodiment of the present invention, also includes:
First searching request result returns module, for returning the first searching request result to searching request client
End;Or,
Second searching request result returns module, for returning the second searching request result to searching request client
End;Or,
3rd searching request result returns module, for returning the 3rd searching request result to searching request client
End.
Optionally, the coded data acquisition module, including:
First difference determination sub-module, for determining that the timestamp of the caching for obtaining the first Search Results is searched with described first
First difference of the write time stamp of the caching of hitch fruit;
Caching judges effective submodule, for when first difference presets effect duration less than first, judging described the
The caching of one Search Results is effective;
The coded data judge module, including:
Second difference determination sub-module, for determining the timestamp and the first coding data that obtain first coding data
Write time stamp the second difference;
Whether first coding data judging submodule, less than the second default effect duration, sentence for according to second difference
Whether the first coding data that breaks is effective.
Optionally, the 3rd searching request result acquisition module, including:
First difference determination sub-module, for determining that the timestamp of the caching for obtaining the first Search Results is searched with described first
First difference of the write time stamp of the caching of hitch fruit;
Caching judges invalid submodule, for when first difference is more than or equal to the first default effect duration, judging
The caching of first Search Results is invalid.
Optionally, the caching acquisition module is specifically for according to the required parameter of the searching request, retrieving described the
One data base.
Search buffering updating method and device provided in an embodiment of the present invention, upon receiving a search request, judge from
Each letter when the caching of the first Search Results obtained in the first data base is effective, in the caching of the first Search Results
Breath, extracts corresponding each coding of each information, and inquiry obtains first from the second data base according to each coding
Coded data.Whether effectively first coding data is judged, if it is, obtaining first from the first data base according to each coding
Searching request result;If not, obtain the second searching request result from the 3rd data base according to each coding, and update the
Two searching request results are to the first data base.It can be seen that, search buffering updating method and device provided in an embodiment of the present invention, when connecing
When receiving searching request, the searching request result of the Hot Contents after updating can be quickly obtained and be returned, improve in focus
The renewal speed of appearance.Certainly, implementing arbitrary product or method of the present invention must be not necessarily required to while reaching above-described institute
There is advantage.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart of the search buffering updating method of the embodiment of the present invention;
Fig. 2 is another kind of flow chart of the search buffering updating method of the embodiment of the present invention;
Fig. 3 is a kind of structure chart of the search buffer update device of the embodiment of the present invention;
Fig. 4 is another kind of structure chart of the search buffer update device of the embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
With the development of Internet technology, search technique is more and more paid close attention to by people.Please in the search of user
In asking, minority search word account for the sizeable proportion of searching request, and the number of times of the single appearance of most of search words is considerably less, because
The Search Results of the minority search word that this search engine is often inquired about user Jing are deposited in caching, it is possible to which reply great majority are used
The searching request at family.And for each caching has effect duration, within the effect duration of caching, in search results pages just
Newest relevant information can not in time be shown.Wherein, the effect duration of caching is longer, and the hit rate of caching is higher.If reducing slow
The effect duration deposited, although cache hit rate can be reduced and then renewal speed is improved, but for some non-hot contents, update speed
The too not strong demand of degree.Therefore, in the case where search caching effect duration is not reduced, Hot Contents in prior art
Renewal speed it is slow.
The embodiment of the invention discloses a kind of search buffering updating method, can improve the renewal speed of Hot Contents.Referring to
Fig. 1, Fig. 1 are a kind of flow chart of the search buffering updating method of the embodiment of the present invention, comprise the steps:
S101, upon receiving a search request, according to the first data base that searching request inquiry pre-builds, obtains first
The caching of Search Results;Wherein, the first database purchase buffered results, buffered results include:The caching and information of Search Results
Caching.
It is understood that being to be processed by corresponding server and returned search to ask for the searching request of user
Result is sought to the user's.In the embodiment of the present invention, first two data bases are built on the server for processing searching request, point
Not Wei the first data base and the second data base, wherein, the caching of the first database purchase Search Results and the caching of information.According to
Current searching request, inquires about the first data base, obtains the caching of the first Search Results.Wherein, searching request can be search
Word, search site etc..
For example, when the searching request for receiving is the searching request for video information, deposit in the first data base
Storage is exactly the caching of video search result and the caching of video information.If current searching request is search word, the search
Word is certain hot broadcast TV play, then, the first data base is inquired about according to the hot broadcast TV play and obtains searching with regard to the hot broadcast TV play
The caching of hitch fruit.
S102, judges whether the caching of the first Search Results is effective.
When the caching for judging the first Search Results is effective, S103 is performed, it is every in the caching of the first Search Results
One information, extracts corresponding each coding of each information, and counts according to each coded query pre-builds second
According to storehouse, first coding data is obtained, wherein, the second database purchase coding.
It should be noted that the caching of Search Results and coding are all have certain effect duration, can be a few minutes,
Can be dozens of minutes, be set according to particular content.General, for Hot Contents, the effect duration of caching is shorter, heat
The renewal speed ratio of point content is very fast, and for non-hot content, the effect duration of caching is long, the renewal speed of non-hot content
Degree is slow.For two data bases set up in S101, the caching of the first database purchase Search Results and the caching of information,
The data base includes the caching of the corresponding information of caching and Hot Contents of the Search Results of Hot Contents, certainly, also includes
The caching and the caching of the corresponding information of non-hot content of the Search Results of non-hot content.And in the second data base store be
The coded data stored in coded data, and the second data base is the corresponding coded data of information of Hot Contents, wherein, coding
It is corresponding with specific information content, the form of coding can be coded format of the prior art, for example, if in focus
The information of appearance is pictorial information, then, coded data is exactly coding of graphics, and accordingly, coded data can be base64 codings.
It is each in the caching of first Search Results when the caching of the first Search Results is judged also in effect duration
Corresponding each coding of each information of individual information retrieval, and the second data pre-build according to each coded query
Storehouse, obtains first coding data.It is understood that what is stored in the second data base is the corresponding volume of information of Hot Contents
Code, if get first coding data in the second data base, also indicates that the corresponding information of the first coding data is
The information of Hot Contents.
In the embodiment of the present invention, illustrate by taking the caching of the Search Results of certain hot broadcast TV play as an example, if this first
The caching of Search Results for the Search Results of the hot broadcast TV play caching, then, the Search Results of the hot broadcast TV play it is slow
Depositing includes the video information of a plurality of hot broadcast TV play, one coding of each video information correspondence.According to each coding
The second data base is inquired about, first coding data is obtained, the first coding data is exactly the video information correspondence of the hot broadcast TV play
Coding.If cannot get first coding data, the video information for showing the hot broadcast TV play is not the information of Hot Contents.
S104, judges whether first coding data is effective.If it is, S105 is performed, according to each coding from the first number
According to obtaining the first searching request result in storehouse;If not, performing S106, the is obtained from the 3rd data base according to each coding
Two searching request results, and the second searching request result is updated to the first data base, wherein, the newest letter of the 3rd database purchase
Breath.
Obviously, first coding data is also have effect duration, general, and the effect duration of coding is shorter than the effect duration for caching,
That is encode it is expired in the case of, the caching of the corresponding information of the coding can be also in effect duration, and if volume
Also in the case of effect duration, the caching of the corresponding information of the coding will not have passed through effect duration to code.It is emphasized that the
The caching of Search Results and the caching of information are stored in one data base, is first according to Search Results in the embodiment of the present invention
Caching extracts first coding data, then when the first coding data is effective, according to the first coding data from the slow of information
The specific information of middle acquisition is deposited, using the specific information as the first searching request result.Or, the first coding data without
During effect, the second searching request result is obtained from the 3rd data base.
For example, the first coding data for obtaining in S103 is the corresponding coding of video information of certain hot broadcast TV play,
If the first coding data effectively, according to first coding data the video of the hot broadcast TV play is obtained from the first data base
Information, the video information for obtaining namely the first searching request result.If the first coding data is invalid, according to first volume
Code data directly obtain the video information of the hot broadcast TV play from the 3rd data base, and the video information for obtaining namely second is searched
Rope request results, and the second searching request result is updated in the first data base.
It should be noted that the newest information of the 3rd database purchase, up-to-date information is that span current time stamp is nearest
Information can be within current time stamp half an hour or 1 hour in data, the concrete time period do not limited here.
In addition, the second searching request result is updated in the first data base, refers to and the second searching request result is replaced into first
Specifying information in the caching of the Search Results in data base, so that the caching of Search Results is newest.
It can be seen that, search buffering updating method provided in an embodiment of the present invention, upon receiving a search request, first basis is searched
The data base of rope requesting query first, when the caching of the first Search Results obtained from the first data base is effective, searches according to first
Information retrieval coding in the caching of hitch fruit, obtains first coding data, when first coding data is effective, directly from first
The first searching request result is obtained in data base;When first coding data is invalid, according to the first coding data from storage most
The second searching request result is obtained in 3rd data base of fresh information.The embodiment of the present invention can quickly be obtained and returned after renewal
Hot Contents searching request result, improve the renewal speed of Hot Contents.
Referring to Fig. 2, Fig. 2 is another kind of flow chart of the search buffering updating method of the embodiment of the present invention, real shown in Fig. 1
On the basis of applying example, the search buffering updating method of the embodiment of the present invention also includes:
S201, when the caching for judging the first Search Results is invalid, by searching request search engine is forwarded to, and search is drawn
The 3rd searching request result and search engine for holding up feedback feeds back the update of time stamp of the 3rd searching request result to the first data
Storehouse.
Specifically, if the caching of the first Search Results of searching request acquisition is invalid, the number in the first data base is shown
According to have passed through effect duration, then, the searching request is forwarded to search engine by needs, is obtained the 3rd according to search engine and is searched for
Request results.Wherein, the 3rd searching request result is similar with above-mentioned first searching request result and the second searching request result, and
The processing procedure of search engine belongs to prior art, is not described in detail here.
S202, returns the first searching request result to searching request client;Or, returning the second searching request result to searching
Rope requesting client;Or, returning the 3rd searching request result to searching request client.
In the embodiment of the present invention, after the first searching request result is obtained, the server for processing searching request is searched first
Rope request results return to searching request client;Or, after the second searching request result is obtained, processing the service of searching request
Second searching request result is returned to searching request client by device;Or, after the 3rd request results are obtained, processing searching request
Server the 3rd request results are returned to into searching request client so that user conveniently checks specific searching request knot
Really.
Optionally, positioned at the first data base pre-build according to searching request inquiry, the slow of the first Search Results is obtained
Deposit, before, the search buffering updating method of the embodiment of the present invention also includes:
The message queue of Hot Contents is received, the second coded data in message queue is updated to into the second data base, will
The corresponding information updating of second coded data is to the first data base.
In the embodiment of the present invention, the first data base and the second data base pre-build, the Hot Contents of different times
It is different, processes the server of searching request according to current Hot Contents, receives the message queue of Hot Contents, and should
The second coded data in message queue is updated to the second data base, by the corresponding information updating of the second coded data to the first number
According to storehouse, thus, the first data base and the second data base are formed.If Hot Contents are certain popular pictures, the second coded data
It is exactly coding of graphics data, the corresponding information of the second coded data is exactly the popular picture.
Optionally, the search buffering updating method of the embodiment of the present invention, also includes:
When Hot Contents update, corresponding 3rd coded data of information of Hot Contents is extracted, and by the 3rd coded number
According to the second data base is updated to, by the information updating of Hot Contents to the first data base.
Specifically, after the first data base and the second Database, if Hot Contents have renewal, then, need
Information and corresponding the updating the data of coding are updated to into the first data base and the second data base.If Hot Contents or above-mentioned heat
Door picture, then the 3rd coded data is exactly the coding of new popular picture, needs for the coding of new popular picture to be updated to the
Two data bases, by new popular picture the first data base is updated to.
In a kind of implementation of the embodiment of the present invention, the effective step of the caching of the first Search Results is judged, including:
First, it is determined that obtaining the write time of the timestamp of the caching of the first Search Results and the caching of the first Search Results
First difference of stamp.
Then, when the first difference is less than the first default effect duration, judge that the caching of the first Search Results is effective.
Likewise, the caching of Search Results has a corresponding write time, and obtain the caching of the first Search Results
When timestamp refers to the write of the caching of the current time stamp processed during searching request, current time stamp and the first Search Results
Between the first difference for stabbing, that is, the existence time of the caching of the first Search Results is preset with if there is the time less than first
The effect phase, show the caching of first Search Results also in effect duration, that is, also do not have expired.Wherein, the first default effect duration can
Being 10 minutes, 5 minutes etc..
Judge the whether effective step of first coding data, including:
First, it is determined that the timestamp for obtaining first coding data is poor with the second of the write time of first coding data stamp
Value.
Then, judge whether first coding data is effective whether less than the second default effect duration according to the second difference.
Obtain the timestamp of first coding data similar with the timestamp of the above-mentioned caching for obtaining the first Search Results, be all
Refer to the current time stamp during process searching request, certainly, the two timestamps are different.Likewise, the second difference with
Whether above-mentioned first difference is similar to, and refers to the existence time of first coding data, be less than according to the existence time of the first coding
Second default effect duration, judge whether first coding data is effective.Wherein, the second default effect duration can be 8 minutes, 3 minutes
Deng.It is emphasized that effect duration more default than first the second default effect duration is short, concrete reason is illustrated in S103, here
Repeat no more.
In a kind of implementation of the embodiment of the present invention, the invalid step of the caching of the first Search Results is judged, including:
First, it is determined that obtaining the write time of the timestamp of the caching of the first Search Results and the caching of the first Search Results
First difference of stamp.
Then, when the first difference is more than or equal to the first default effect duration, judge that the caching of the first Search Results is invalid.
Judge that the caching of the first Search Results is invalid similar with the effective method of caching of the Search Results of above-mentioned judgement first,
Here repeat no more.
Optionally, in the search buffering updating method of the embodiment of the present invention, the pre-build according to searching request inquiry
The step of one data base, including:
According to the required parameter of searching request, the first data base is retrieved.
In practical application, the searching request of client includes various ways, for example:Search word, Platform Type, website are limited
Etc., can be the one kind in aforesaid way, or various combinations.Specifically, when searching request is search word, place
The server of the searching request is managed directly according to the search word and search first data base;When searching request is website restriction
When, the server for processing the searching request enters line retrieval according to the website for limiting.
Corresponding to said method embodiment, the embodiment of the invention also discloses a kind of search buffer update device, referring to figure
3, Fig. 3 is a kind of structure chart of the search buffer update device of the embodiment of the present invention, including:
Caching acquisition module 301, for upon receiving a search request, first for pre-building being inquired about according to searching request
Data base, obtains the caching of the first Search Results;Wherein, the first database purchase buffered results, buffered results include:Search knot
The caching of fruit and the caching of information.
Coded data acquisition module 302, for when the caching for judging the first Search Results is effective, according to the first search knot
Each information in the caching of fruit, extracts corresponding each coding of each information, and pre- according to each coded query
The second data base for first setting up, obtains first coding data, wherein, the second database purchase coding.
Coded data judge module 303, for judging whether the first coding data is effective.
First searching request result acquisition module 304, for the judged result of coded data judge module for be when, root
The first searching request result is obtained from first data base according to described each coding.
Second searching request result acquisition module 305, for the judged result of coded data judge module for it is no when, root
The second searching request result is obtained from the 3rd data base according to described each coding, and updates the second searching request result
To first data base, wherein, the newest information of the 3rd database purchase.
It can be seen that, search buffer update device provided in an embodiment of the present invention, upon receiving a search request, first basis is searched
The data base of rope requesting query first, when the caching of the first Search Results obtained from the first data base is effective, searches according to first
Information retrieval coding in the caching of hitch fruit, obtains first coding data, when first coding data is effective, directly from first
The first searching request result is obtained in data base;When first coding data is invalid, according to the first coding data from storage most
The second searching request result is obtained in 3rd data base of fresh information.The embodiment of the present invention can quickly be obtained and returned after renewal
Hot Contents searching request result, improve the renewal speed of Hot Contents.
Referring to Fig. 4, Fig. 4 is another kind of structure chart of the search buffer update device of the embodiment of the present invention, real shown in Fig. 3
On the basis of applying example, the search buffer update device of the embodiment of the present invention also includes:
Database module 401, for receiving the message queue of Hot Contents, by the second coded number in message queue
According to the second data base is updated to, by the corresponding information updating of the second coded data to the first data base.
Database update module 402, the information the corresponding 3rd for when Hot Contents update, extracting Hot Contents is compiled
Code data, and the 3rd coded data is updated to into the second data base, by the information updating of Hot Contents to the first data base.
3rd searching request result acquisition module 403, for when the caching for judging the first Search Results is invalid, will search for
Request is forwarded to search engine, and the 3rd searching request result that search engine is fed back and search engine feed back the 3rd searching request
As a result update of time stamp is to the first data base.
Optionally, the search buffer update device of the embodiment of the present invention, also includes:
First searching request result returns module, for returning the first searching request result to searching request client;Or,
Second searching request result returns module, for returning the second searching request result to searching request client;Or,
3rd searching request result returns module, for returning the 3rd searching request result to searching request client.
Optionally, in the search buffer update device of the embodiment of the present invention, coded data acquisition module includes:
First difference determination sub-module, for determining the timestamp and the first search knot of the caching for obtaining the first Search Results
First difference of the write time stamp of the caching of fruit.
Caching judges effective submodule, for when the first difference is less than the first default effect duration, judging the first search knot
The caching of fruit is effective.
Coded data judge module, including:
Second difference determination sub-module, for determining the timestamp of first coding data and writing for first coding data are obtained
Second difference of angle of incidence stamp.
First coding data judging submodule, for, whether less than the second default effect duration, judging the according to the second difference
Whether one coded data is effective.
Optionally, in the search buffer update device of the embodiment of the present invention, the 3rd searching request result acquisition module, bag
Include:
First difference determination sub-module, for determining the timestamp and the first search knot of the caching for obtaining the first Search Results
First difference of the write time stamp of the caching of fruit.
Caching judges invalid submodule, for when the first difference is more than or equal to the first default effect duration, judging first
The caching of Search Results is invalid.
Optionally, in the search buffer update device of the embodiment of the present invention, caching acquisition module is specifically for according to search
The required parameter of request, retrieves the first data base.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposit between operating
In any this actual relation or order.And, term " including ", "comprising" or its any other variant are intended to
Nonexcludability is included, so that a series of process, method, article or equipment including key elements not only will including those
Element, but also including other key elements being not expressly set out, or also include for this process, method, article or equipment
Intrinsic key element.In the absence of more restrictions, the key element for being limited by sentence "including a ...", it is not excluded that
Also there is other identical element in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of correlation, identical similar portion between each embodiment
Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.Especially for system reality
For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
Presently preferred embodiments of the present invention is the foregoing is only, protection scope of the present invention is not intended to limit.It is all
Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention
It is interior.
Claims (16)
1. it is a kind of to search for buffering updating method, it is characterised in that to include:
Upon receiving a search request, the first data base for being pre-build according to searching request inquiry, obtains the first search
As a result caching;Wherein, the first database purchase buffered results, the buffered results include:The caching of Search Results and
The caching of information;
Each letter when the caching for judging first Search Results is effective, in the caching of first Search Results
Breath, extracts corresponding each coding of described each information, and second pre-build according to described each coded query
Data base, obtains first coding data, wherein, the second database purchase coding;
Whether effectively the first coding data is judged, if it is, according to described each coding from first data base
Obtain the first searching request result;If not, obtaining the second searching request from the 3rd data base according to described each coding
As a result, and the second searching request result is updated to first data base, wherein, the 3rd database purchase is newest
Information.
2. search buffering updating method according to claim 1, it is characterised in that positioned at described according to the searching request
The first data base that inquiry pre-builds, obtains the caching of the first Search Results, and before, methods described also includes:
The message queue of Hot Contents is received, the second coded data in the message queue is updated to into second data
Storehouse, by the corresponding information updating of second coded data to first data base.
3. search buffering updating method according to claim 1, it is characterised in that positioned at described according to the searching request
The first data base that inquiry pre-builds, obtains the caching of the first Search Results, and afterwards, methods described also includes:
When the caching for judging first Search Results is invalid, the searching request is forwarded to into search engine, is searched described
3rd searching request result of rope engine feedback and the search engine feed back the update of time stamp of the 3rd searching request result extremely
First data base.
4. search buffering updating method according to claim 1, it is characterised in that also include:
When the Hot Contents update, corresponding 3rd coded data of information of the Hot Contents is extracted, and by described the
Three coded datas are updated to the second data base, by the information updating of the Hot Contents to the first data base.
5. search buffering updating method according to claim 3, it is characterised in that positioned at each volume described in the basis
Code obtains the first searching request result from first data base, and afterwards, methods described also includes:
The first searching request result is returned to searching request client;Or,
The second searching request result is obtained from the 3rd data base positioned at each coding described in the basis, afterwards, the side
Method also includes:
The second searching request result is returned to searching request client;Or,
Please positioned at the 3rd searching request result for feeding back the search engine and the search of search engine feedback the 3rd
Ask the update of time stamp of result to first data base, afterwards, methods described also includes:
The 3rd searching request result is returned to searching request client.
6. search buffering updating method according to claim 1, it is characterised in that the judgement first Search Results
The effective step of caching, including:
It is determined that what the write time of the timestamp and the caching of first Search Results for obtaining the caching of the first Search Results stabbed
First difference;
When first difference is less than the first default effect duration, judge that the caching of first Search Results is effective;
The step for judging whether the first coding data is effective, including:
It is determined that the second difference that the write time of the timestamp and the first coding data for obtaining first coding data stabs;
According to second difference whether less than the second default effect duration, judge whether the first coding data is effective.
7. search buffering updating method according to claim 3, it is characterised in that the judgement first Search Results
The invalid step of caching, including:
It is determined that what the write time of the timestamp and the caching of first Search Results for obtaining the caching of the first Search Results stabbed
First difference;
When first difference is more than or equal to the first default effect duration, judge that the caching of first Search Results is invalid.
8. search buffering updating method according to claim 1, it is characterised in that described to be inquired about according to the searching request
The step of the first data base for pre-building, including:
According to the required parameter of the searching request, first data base is retrieved.
9. it is a kind of to search for buffer update device, it is characterised in that to include:
Caching acquisition module, for upon receiving a search request, according to the first number that searching request inquiry pre-builds
According to storehouse, the caching of the first Search Results is obtained;Wherein, the first database purchase buffered results, the buffered results include:
The caching of Search Results and the caching of information;
Coded data acquisition module, for when the caching for judging first Search Results is effective, according to the described first search
As a result each information in caching, extracts corresponding each coding of described each information, and according to it is described each
The second data base that coded query pre-builds, obtains first coding data, wherein, the second database purchase coding;
Coded data judge module, for judging whether the first coding data is effective;
First searching request result acquisition module, for when the judged result of coded data judge module is to be, according to described
Each coding obtains the first searching request result from first data base;
Second searching request result acquisition module, for when the judged result of coded data judge module is no, according to described
Each coding obtains the second searching request result from the 3rd data base, and updates the second searching request result to described
First data base, wherein, the newest information of the 3rd database purchase.
10. it is according to claim 9 to search for buffer update device, it is characterised in that also to include:
Database module, for receiving the message queue of Hot Contents, by the second coded data in the message queue
Second data base is updated to, by the corresponding information updating of second coded data to first data base.
11. search buffer update devices according to claim 9, it is characterised in that also include:
3rd searching request result acquisition module, for when the caching for judging first Search Results is invalid, searching described
Rope request is forwarded to search engine, the 3rd searching request result that the search engine is fed back and search engine feedback the
The update of time stamp of three searching request results is to first data base.
12. search buffer update devices according to claim 9, it is characterised in that also include:
Database update module, for when the Hot Contents update, extracting the information the corresponding 3rd of the Hot Contents
Coded data, and the 3rd coded data is updated to into the second data base, by the information updating of the Hot Contents to first
Data base.
13. search buffer update devices according to claim 11, it is characterised in that also include:
First searching request result returns module, for returning the first searching request result to searching request client;Or,
Second searching request result returns module, for returning the second searching request result to searching request client;Or,
3rd searching request result returns module, for returning the 3rd searching request result to searching request client.
14. search buffer update devices according to claim 9, it is characterised in that the coded data acquisition module, bag
Include:
First difference determination sub-module, for determining the timestamp and the described first search knot of the caching for obtaining the first Search Results
First difference of the write time stamp of the caching of fruit;
Caching judges effective submodule, for when first difference is less than the first default effect duration, judging that described first searches
The caching of hitch fruit is effective;
The coded data judge module, including:
Second difference determination sub-module, for determining the timestamp of first coding data and writing for the first coding data are obtained
Second difference of angle of incidence stamp;
First coding data judging submodule, whether less than the second default effect duration, institute is judged for according to second difference
Whether effective state first coding data.
15. search buffer update devices according to claim 11, it is characterised in that the 3rd searching request result is obtained
Delivery block, including:
First difference determination sub-module, for determining the timestamp and the described first search knot of the caching for obtaining the first Search Results
First difference of the write time stamp of the caching of fruit;
Caching judges invalid submodule, for when first difference is more than or equal to the first default effect duration, judging described
The caching of the first Search Results is invalid.
16. search buffer update devices according to claim 9, it is characterised in that the caching acquisition module is specifically used
According to the required parameter of the searching request, retrieval first data base.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611249997.XA CN106682197B (en) | 2016-12-29 | 2016-12-29 | Search cache updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611249997.XA CN106682197B (en) | 2016-12-29 | 2016-12-29 | Search cache updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106682197A true CN106682197A (en) | 2017-05-17 |
CN106682197B CN106682197B (en) | 2020-02-11 |
Family
ID=58872223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611249997.XA Active CN106682197B (en) | 2016-12-29 | 2016-12-29 | Search cache updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106682197B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301215A (en) * | 2017-06-09 | 2017-10-27 | 北京奇艺世纪科技有限公司 | A kind of search result caching method and device, searching method and device |
CN110413679A (en) * | 2019-07-31 | 2019-11-05 | 深圳前海微众银行股份有限公司 | Database information processing method, device, equipment and readable storage medium storing program for executing |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101206665A (en) * | 2007-12-12 | 2008-06-25 | 宁波新然电子信息科技发展有限公司 | Multilingual words information searching method |
US20120179708A1 (en) * | 2011-01-10 | 2012-07-12 | International Business Machines Corporation | Verifying file versions in a networked computing environment |
CN102915380A (en) * | 2012-11-19 | 2013-02-06 | 北京奇虎科技有限公司 | Method and system for carrying out searching on data |
CN102982023A (en) * | 2011-09-02 | 2013-03-20 | 北京百度网讯科技有限公司 | Method and device for providing search suggestion |
CN104021193A (en) * | 2014-06-13 | 2014-09-03 | 北京奇虎科技有限公司 | Search switching method and search switching device |
CN104123356A (en) * | 2014-07-17 | 2014-10-29 | 成都康赛信息技术有限公司 | Method for increasing webpage response speed under large data volume condition |
CN104794228A (en) * | 2015-04-30 | 2015-07-22 | 北京奇艺世纪科技有限公司 | Search result providing method and device |
-
2016
- 2016-12-29 CN CN201611249997.XA patent/CN106682197B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101206665A (en) * | 2007-12-12 | 2008-06-25 | 宁波新然电子信息科技发展有限公司 | Multilingual words information searching method |
US20120179708A1 (en) * | 2011-01-10 | 2012-07-12 | International Business Machines Corporation | Verifying file versions in a networked computing environment |
CN102982023A (en) * | 2011-09-02 | 2013-03-20 | 北京百度网讯科技有限公司 | Method and device for providing search suggestion |
CN102915380A (en) * | 2012-11-19 | 2013-02-06 | 北京奇虎科技有限公司 | Method and system for carrying out searching on data |
CN104021193A (en) * | 2014-06-13 | 2014-09-03 | 北京奇虎科技有限公司 | Search switching method and search switching device |
CN104123356A (en) * | 2014-07-17 | 2014-10-29 | 成都康赛信息技术有限公司 | Method for increasing webpage response speed under large data volume condition |
CN104794228A (en) * | 2015-04-30 | 2015-07-22 | 北京奇艺世纪科技有限公司 | Search result providing method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301215A (en) * | 2017-06-09 | 2017-10-27 | 北京奇艺世纪科技有限公司 | A kind of search result caching method and device, searching method and device |
CN110413679A (en) * | 2019-07-31 | 2019-11-05 | 深圳前海微众银行股份有限公司 | Database information processing method, device, equipment and readable storage medium storing program for executing |
CN110413679B (en) * | 2019-07-31 | 2023-01-24 | 深圳前海微众银行股份有限公司 | Database information processing method, device, equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106682197B (en) | 2020-02-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10248662B2 (en) | Generating descriptive text for images in documents using seed descriptors | |
US9575968B2 (en) | Intelligent data delivery and storage based on data characteristics | |
US8209317B2 (en) | Method and apparatus for reconstructing a search query | |
CN101183364B (en) | Information searching method, searching engine customer terminal/server and system | |
CN106682202A (en) | Search cache updating method and device | |
CN104104717B (en) | Deliver channel data statistical approach and device | |
CN102779308A (en) | Advertisement release method and system | |
US9262511B2 (en) | System and method for indexing streams containing unstructured text data | |
US20110246475A1 (en) | System and method for locating and retrieving private information on a network | |
CN102737133B (en) | A kind of method of real-time search | |
Bota et al. | Composite retrieval of heterogeneous web search | |
CN107451208A (en) | A kind of data search method and device | |
CN105574162B (en) | The method of the automatic hyperlink of keyword | |
CN102682011B (en) | Method, device and system for establishing domain description name information sheet and searching | |
CN109947729A (en) | A kind of real-time data analysis method and device | |
US10491606B2 (en) | Method and apparatus for providing website authentication data for search engine | |
CN106682197A (en) | Search cache updating method and device | |
US9110943B2 (en) | Identifying an image for an entity | |
CN104462390B (en) | A kind of method and system for improving webpage self-adaptive layout efficiency | |
CN108259544A (en) | URL querying methods and URL inquiry servers | |
EP2407900A1 (en) | Batch prospective searching | |
CN104216901B (en) | The method and system of information search | |
CN103902687B (en) | The generation method and device of a kind of Search Results | |
US9405846B2 (en) | Publish-subscribe based methods and apparatuses for associating data files | |
CN103646034A (en) | Web search engine system and search method based content credibility |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |