The content of the invention
Technical problem to be solved of the embodiment of the present invention is, there is provided a kind of searching method based on search engine and searches
Rope server, can be identified judgement to the search intention of user, and provide corresponding search result, improve search efficiency, carry
Using experience degree of the high user for search engine.
In order to solve the above-mentioned technical problem, an embodiment of the present invention provides a kind of searching method based on search engine, bag
Include:
When receiving the search key input by user of client transmission, search server is according to default keyword
With the correspondence of search category, the corresponding search category of described search keyword is determined;
Described search server scans for described search keyword based on definite search category, and to the client
End returns to search result.
Wherein, before search server receives the searching request that client is sent, further include:
Search server pre-sets the correspondence of various search keys and search category, and the correspondence is:
Any search key corresponds to a kind of search category;
Described search classification includes:Webpage search and special search;
The special search includes:Video, music, picture, forum, search, any of news and microblogging or a variety of.
Wherein, described search server pre-sets the correspondence of various search keys and search category, including:
Access historical record of the search server to various search keys counts, and determines same search key
The highest search category of visit capacity;
Described search server sets each search key to correspond to, and described search keyword visit capacity is highest to search
Rope classification.
Wherein, described search server determines described search according to default keyword and the correspondence of search category
The corresponding search category of keyword, including:
Described search server judges whether described search keyword matches with default keyword, if judging result is
It is, then according to default keyword and the correspondence of search category, to determine the corresponding search category of described search keyword;
If judging result is no, described search server determines that described search keyword corresponds to Webpage search.
Wherein, if the corresponding search category of described search keyword is searched for be special, described search server is based on true
Fixed search category scans for described search keyword, and returns to search result to the client, including:
Described search server inquires about the webpage chain to match with described search keyword in the database of Webpage search
Connect, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page;
Described search server generates Search Hints message according to the special search determined;
Described search server returns to the Webpage searching result page and described search prompting message described in the lump
Client.
Wherein, if the corresponding search category of described search keyword is searched for be special, described search server is based on true
Fixed search category scans for described search keyword, and returns to search result to the client, including:
Described search server inquires about the webpage chain to match with described search keyword in the database of Webpage search
Connect, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page;
The inquiry in the database of the special search of described search server matches special with described search keyword
Item web page interlinkage, and the special web page interlinkage to inquiring is ranked up, and forms special result of page searching;
The special result of page searching is inserted into the Webpage searching result page by described search server, is formed
Result of page searching returns to the client.
Wherein, if the corresponding search category of described search keyword is searched for be special, described search server is based on true
Fixed search category scans for described search keyword, and returns to search result to the client, including:
The inquiry in the database of the special search of described search server matches special with described search keyword
Item web page interlinkage, and the special web page interlinkage is ranked up, form special result of page searching and return to the client.
Correspondingly, the embodiment of the present invention additionally provides a kind of search server, including:
Category determination module, for when receiving the search key input by user of client transmission, according to default
Keyword and search category correspondence, determine the corresponding search category of described search keyword;
Search module, for being searched based on the search category that the category determination module determines to described search keyword
Rope, and return to search result to the client.
Wherein, described search server further includes:
Presetting module, for pre-setting the correspondence of various search keys and search category, the correspondence
For:Any search key corresponds to a kind of search category;
Described search classification includes:Webpage search and special search;
The special search includes:Video, music, picture, forum, search, any of news and microblogging or a variety of.
Wherein, the presetting module includes:
Statistic unit, counts for the access historical record to various search keys, determines that same search is closed
The highest search category of keyword visit capacity;
Setting unit, for setting each search key to correspond to the described search that the statistic unit counts
The highest search category of keyword visit capacity.
Wherein, the category determination module includes:
Judging unit, for when receiving the search key input by user of client transmission, judging described search
Whether keyword matches with default keyword;
Determination unit, for when the judging unit judging result for be when, according to default keyword and search category
Correspondence, determine the corresponding search category of described search keyword;Alternatively, when the judging unit judging result is no
When, determine that described search keyword corresponds to Webpage search.
Wherein, if the corresponding search category of described search keyword is searched for be special, described search module includes:
Webpage search unit, for the webpage that inquiry matches with described search keyword in the database of Webpage search
Link, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page;
Message generation unit, for according to the special search determined, generating Search Hints message;
As a result returning unit, gives birth to for the Webpage searching result page for obtaining the Webpage search unit and the message
Search Hints message into unit generation returns to the client in the lump.
Wherein, if the corresponding search category of described search keyword is searched for be special, described search module includes:
Webpage search unit, for the webpage that inquiry matches with described search keyword in the database of Webpage search
Link, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page;
Special search unit, for inquiring about what is matched with described search keyword in the database of the special search
Special web page interlinkage, and the special web page interlinkage to inquiring is ranked up, and forms special result of page searching;
As a result returning unit, the special result of page searching for the special search unit to be obtained are inserted into the net
In the Webpage searching result page that page search unit obtains, form result of page searching and return to the client.
Wherein, if the corresponding search category of described search keyword is searched for be special, described search module includes:
Special search unit, for inquiring about what is matched with described search keyword in the database of the special search
Special web page interlinkage, and the special web page interlinkage is ranked up, form special result of page searching;
As a result returning unit, the special result of page searching for the special search unit to be formed return to the visitor
Family end.
Implement the embodiment of the present invention, have the advantages that:
The embodiment of the present invention closes search input by user the correspondence based on default keyword and search category
Keyword scans for the identification of classification, to determine the search intention of user;Scan for and return according to definite search category
Search result, search intention of the search result based on definite user are searched for obtain, and can more meet the actual demand of user, together
When improve search efficiency, improve using experience degree of the user for search engine.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts
Embodiment, belongs to the scope of protection of the invention.
Fig. 3 is referred to, for the structure diagram of the first embodiment of the search server of the present invention;Described search server
Including:
Category determination module 101, for when receive client transmission search key input by user when, according to pre-
If keyword and search category correspondence, determine the corresponding search category of described search keyword.
Wherein, the correspondence of the default keyword and search category is:Any keyword is searched corresponding to one kind
Rope classification.Described search classification includes:Webpage search and special search.The special search includes but not limited to:Video, sound
Pleasure, picture, forum, search, any of news and microblogging or a variety of.
Search module 102, for based on the category determination module 101 determine search category to described search keyword
Scan for, and search result is returned to the client.
The embodiment of the present invention closes search input by user the correspondence based on default keyword and search category
Keyword scans for the identification of classification, to determine the search intention of user;Scan for and return according to definite search category
Search result, search intention of the search result based on definite user are searched for obtain, and can more meet the actual demand of user, together
When improve search efficiency, improve using experience degree of the user for search engine.
Fig. 4 is referred to, for the structure diagram of the second embodiment of the search server of the present invention;With upper embodiment phase
Together, described search server includes:Category determination module 101 and search module 102.In the present embodiment, described search server
Further include:
Presetting module 103, for pre-setting the correspondence of various search keys and search category.
In the specific implementation, the presetting module 103 is recorded according to the historical search of user to carry out default process.Please one
And referring to Fig. 5, for the structure diagram of the embodiment of the presetting module of the search server of the present invention;The presetting module 103
Including:
Statistic unit 31, counts for the access historical record to various search keys, determines same search
The highest search category of keyword visit capacity.
It has been observed that the various actions of user are have recorded in the User action log database of search engine, such as going through for user
History search record, the statistic unit 31 analyze the daily record in User action log database, calculate same search
Keyword(I.e. same searching request)The highest search category of visit capacity.Specifically, the statistic unit 31 can be based on algorithm pair
The User action log database carries out statistics calculating, and the algorithm is as follows:
For(Each search key)
{
Define the classification counter array TypeCounter [] of this search key
For(The first time search serch [j] of this search key)
{
Classify to serch [j], obtain search category id=a
//a for search category set webpage, video, music, picture, forum, search, news, microblogging
TypeCounter [a]=TypeCounter [a]+1 // to this search category adds one
}
Return the result:The search category of this search key=classification counter array TypeCounter [] is most
Search category
}
The statistic unit 31, which is based on above-mentioned algorithm, can count every kind of highest search category of search key visit capacity,
Such as a total of 100 historical searches record of the search key of " mouse likes rice ", the statistic unit 31 counts wherein 90
Bar(90%)What is accessed is music, wherein 5(5%)What is accessed is video, wherein 5(5%)What is accessed is forum, then the system
Count unit 31 and determine that the highest search category of search key visit capacity of " mouse likes rice " is music class.
Setting unit 32, for set each search key correspond to the statistic unit 31 statistics obtain described in
The highest search category of search key visit capacity.
According to above-mentioned example, the search key of " mouse likes rice " is arranged to mutual by the setting unit 32 with music class
It is corresponding, in the specific implementation, the setting unit 32 can by will " mouse likes rice " search key mark music identification come
The correspondence of the two is set, and the setting unit 32 can also set correspondence by other means, can class in the case of other
Like analysis, this will not be repeated here.
Visited since historical search of the statistic unit 31 in User action log database records come counting user
The highest search category of the amount of asking, therefore, the setting unit 32 are searched according to the search key that the statistical result is set is corresponding
Rope classification can reflect the search intention of most of user, provide service so as to the searching request well for user, carry
Usage experience of the high user to search engine.
The embodiment of the present invention can be recorded based on historical search and judgement is identified to the search intention of user, and provide phase
The search result answered, improves search efficiency, improves using experience degree of the user for search engine.
In order to illustrate more clearly of the present invention, will be situated between in detail to each module in the search server of the present invention below
Continue.
Fig. 6 is referred to, for the structure diagram of the embodiment of the category determination module of the search server of the present invention;It is described
Category determination module 101 includes:
Judging unit 11, for when receiving the search key input by user of client transmission, being searched described in judgement
Whether rope keyword matches with default keyword.
In the specific implementation, the judging unit 11 receive client transmission search key input by user when,
Judge whether the search key is the keyword recorded in User action log database.
Determination unit 12, for when 11 judging result of judging unit is to be, according to default keyword and searching for
The correspondence of classification, determines the corresponding search category of described search keyword;Alternatively, work as 11 judging result of judging unit
For it is no when, determine that described search keyword corresponds to Webpage search.
If 11 judging result of judging unit is yes, show search key input by user in User action log
There is record in database, the determination unit 12 needs, according to default correspondence, to determine corresponding to the search key
Search category;If 11 judging result of judging unit is no, show search key input by user not in user behavior day
Recorded in will database, the definite foundation of no search category, the determination unit 12 determines described search keyword to search
Index holds up the Webpage search of acquiescence, in order to follow-up Webpage search process.
Fig. 7 is referred to, for the structure diagram of the first embodiment of the search module of the search server of the present invention;Setting
The category determination module 101 determines that the corresponding search category of described search keyword is searched for be special, then described search module
102 include:
Webpage search unit 21, for the net that inquiry matches with described search keyword in the database of Webpage search
Page link, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page.It is in the specific implementation, described
21 specific search procedure of Webpage search unit is identical with existing Webpage search process, and this will not be repeated here.
Message generation unit 22, for according to the special search determined, generating Search Hints message.
According to above-mentioned example, search key input by user is " mouse likes rice ", and the category determination module 101 determines
The corresponding search category of described search keyword is music class;The message generation unit 22 then can by definite search category into
Row encapsulation, generates Search Hints message, such as:" search of the music searching page please be arrive!", user is prompted into music class searched page
Scan for.
As a result returning unit 23, for the Webpage searching result page that obtains the Webpage search unit 21 and described disappear
The Search Hints message that breath generation unit 22 generates returns to the client in the lump.
Specifically please also refer to Fig. 8, for the first display renderings of the search result based on search engine of the present invention;Institute
State the Webpage searching result page and the message generation unit that result returning unit 23 obtains the Webpage search unit 21
After the Search Hints message of 22 generations returns to the client in the lump, the client shows the Webpage search knot to user
The fruit page and described search prompting message.
Fig. 9 is referred to, for the structure diagram of the second embodiment of the search module of the search server of the present invention;Setting
The category determination module 101 determines that the corresponding search category of described search keyword is searched for be special, then described search module
102 include:
Webpage search unit 24, for the net that inquiry matches with described search keyword in the database of Webpage search
Page link, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page.It is described in the present embodiment
The Webpage search unit 21 of Webpage search unit 24 and embodiment illustrated in fig. 7 is same unit, its specific search procedure with it is existing
Webpage search process is identical, and this will not be repeated here.
Special search unit 25, matches for being inquired about in the database of the special search with described search keyword
Special web page interlinkage, and the special web page interlinkage to inquiring is ranked up, and forms special result of page searching.
According to above-mentioned example, search key input by user is " mouse likes rice ", and the category determination module 101 determines
The corresponding search category of described search keyword is music class;The special project search unit 25 then can be directly to the music searching page
Request is submitted, and carries out music searching and obtains music searching results page.The specific search procedure of the special project search unit 25
Identical with existing music searching process, this will not be repeated here.
As a result returning unit 26, the special result of page searching for the special search unit 25 to be obtained are inserted into institute
State in the Webpage searching result page that Webpage search unit 24 obtains, form result of page searching and return to the client.
Special result of page searching is inserted into the Webpage searching result page by the result returning unit 26, by two pages
Face, which merges, becomes a page(Result of page searching)The client is returned to, client shows to merge to the user and formed
Described search results page, which is presented special search result and Webpage searching result., please according to above-mentioned example
In the lump referring to Figure 10, for the second display renderings of the search result based on search engine of the present invention;In Figure 10, music searching
Results page is inserted into the front position of the Webpage searching result page, it is to be understood that such a inserted mode is only preferred
Mode, music searching results page can be inserted into any position of the Webpage searching result page, can be similar point in the case of other
Analysis, this will not be repeated here.
Figure 11 is referred to, for the structure diagram of the 3rd embodiment of the search module of the search server of the present invention;If
The fixed category determination module 101 determines that the corresponding search category of described search keyword is searched for be special, then described search mould
Block 102 includes:
Special search unit 27, matches for being inquired about in the database of the special search with described search keyword
Special web page interlinkage, and the special web page interlinkage is ranked up, forms special result of page searching.In the present embodiment,
The special project search unit 27 and the special search unit 25 of embodiment illustrated in fig. 9 are same unit, its specific search procedure exists
This is not repeated.
As a result returning unit 28, the special result of page searching for the special search unit 27 to be formed return to institute
State client.
According to above-mentioned example, please also refer to Figure 12, for the 3rd display of the search result based on search engine of the present invention
Design sketch;After the result returning unit 28 returns to the special result of page searching to the client, the client to
User shows the page as shown in figure 12.
It should be noted that Fig. 7-Figure 12 shows that the category determination module 101 determines that described search keyword corresponds to
Search category for special search when, the different example structures of described search module 102;When the category determination module 101
When to determine the corresponding search category of described search keyword be Webpage search, described search module 102 directly carries out Webpage search,
The process is identical with existing Webpage search process, and this will not be repeated here.
The embodiment of the present invention closes search input by user the correspondence based on default keyword and search category
Keyword scans for the identification of classification, to determine the search intention of user;Scan for and return according to definite search category
Search result, search intention of the search result based on definite user are searched for obtain, and can more meet the actual demand of user, together
When improve search efficiency, improve using experience degree of the user for search engine.
In order to illustrate more clearly of the present invention, below by performed by the search server of the present invention based on search engine
Searching method describe in detail.
Figure 13 is referred to, for the flow chart of the first embodiment of the searching method based on search engine of the present invention;It is described
Method includes:
S101, when receiving the search key input by user of client transmission, search server is according to default
The correspondence of keyword and search category, determines the corresponding search category of described search keyword.
Wherein, the correspondence of the default keyword and search category is:Any keyword is searched corresponding to one kind
Rope classification.Described search classification includes:Webpage search and special search.The special search includes but not limited to:Video, sound
Pleasure, picture, forum, search, any of news and microblogging or a variety of.
S102, described search server scan for described search keyword based on definite search category, and to institute
State client and return to search result.
The embodiment of the present invention closes search input by user the correspondence based on default keyword and search category
Keyword scans for the identification of classification, to determine the search intention of user;Scan for and return according to definite search category
Search result, search intention of the search result based on definite user are searched for obtain, and can more meet the actual demand of user, together
When improve search efficiency, improve using experience degree of the user for search engine.
Figure 14 is referred to, for the flow chart of the second embodiment of the searching method based on search engine of the present invention;It is described
Method includes:
S201, search server pre-set the correspondence of various search keys and search category.
In the specific implementation, step S201 is recorded according to the historical search of user to carry out default process.Please also refer to
Figure 15, for the particular flow sheet of the embodiment of the step S201 shown in Figure 14;Step S201 includes:
S11, access historical record of the search server to various search keys count, and determine that same search is closed
The highest search category of keyword visit capacity.
It has been observed that the various actions of user are have recorded in the User action log database of search engine, such as going through for user
History search records, and in step S11, described search server analyzes the daily record in User action log database, calculates
Same search key(I.e. same searching request)The highest search category of visit capacity.Specifically, described search server is held
Statistics calculating can be carried out to the User action log database based on algorithm during row step S11, the algorithm is as follows:
For(Each search key)
{
Define the classification counter array TypeCounter [] of this search key
For(The first time search serch [j] of this search key)
{
Classify to serch [j], obtain search category id=a
//a for search category set webpage, video, music, picture, forum, search, news, microblogging
TypeCounter [a]=TypeCounter [a]+1 // to this search category adds one
}
Return the result:The search category of this search key=classification counter array TypeCounter [] is most
Search category
}
Described search server, which is based on above-mentioned algorithm, can count every kind of highest search category of search key visit capacity,
A total of 100 historical searches of search key such as " mouse likes rice " record, and wherein 90 are counted in step S11
(90%)What is accessed is music, wherein 5(5%)What is accessed is video, wherein 5(5%)What is accessed is forum, then in step S11
Described search server determines that the highest search category of search key visit capacity of " mouse likes rice " is music class.
S12, described search server set each search key to correspond to described search keyword visit capacity highest
Search category.
According to above-mentioned example, in step S12, described search server will " mouse likes rice " search key and music class
It is arranged to correspond, in the specific implementation, search server described in step S12 can be by the way that the search of " mouse likes rice " be closed
Keyword marks music identification to set the correspondence of the two, and described search server can also set corresponding pass by other means
System, other situations can similar analysis, this will not be repeated here.
Since historical searches of the step S11 in User action log database is recorded come statistic of user accessing amount highest
Search category, therefore, step S12 can reflect greatly according to the corresponding search category of search key that the statistical result is set
The search intention of certain customers, provides service so as to the searching request well for user, improves user to search engine
Usage experience.
S202, when receiving the search key input by user of client transmission, search server is according to default
The correspondence of keyword and search category, determines the corresponding search category of described search keyword.
In the present embodiment, step S202 is identical with the step S101 of a upper embodiment.Specifically please also refer to Figure 16, for figure
The particular flow sheet of the embodiment of step S202 shown in 14;Step S202 includes:
S21, described search server judge whether described search keyword matches with default keyword, if judging knot
Fruit is yes, is transferred to S22;Otherwise, it is transferred to S23.
In the specific implementation, search server described in step S21 mainly judges whether the search key is user behavior
The keyword recorded in log database.
S22, described search server determine that described search is closed according to default keyword and the correspondence of search category
The corresponding search category of keyword;Afterwards, it is transferred to step S203.
If step S21 judging results are yes, show search key input by user in User action log database
In have a record, step S22 is needed according to default correspondence, determines the search category corresponding to the search key.
S23, described search server determine that described search keyword corresponds to Webpage search;Afterwards, it is transferred to step S203.
If the S21 judging results are no, show search key input by user not in User action log database
In recorded, the definite foundation of no search category, step S23 then determines the net that described search keyword is search engine acquiescence
Page search, in order to follow-up Webpage search process.
S203, described search server scan for described search keyword based on definite search category, and to institute
State client and return to search result.
In the present embodiment, step S203 is identical with the step S102 of a upper embodiment, specifically, please also refer to Figure 17,
For the particular flow sheet of the first embodiment of the step S203 shown in Figure 14;Step S203 includes:
S31, described search server inquire about the net to match with described search keyword in the database of Webpage search
Page link, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page.In the specific implementation, step
The specific search procedure of search server described in S31 is identical with existing Webpage search process, and this will not be repeated here.
S32, described search server generate Search Hints message according to the special search determined.
According to above-mentioned example, search key input by user is " mouse likes rice ", and step S202 determines that described search is closed
The corresponding search category of keyword is music class;Definite search category can be packaged by step S32, and generation Search Hints disappear
Breath, such as:" search of the music searching page please be arrive!", prompt user to be scanned for into music class searched page.
S33, described search server return to the Webpage searching result page and described search prompting message in the lump
The client.Specifically perform step S33 please also refer to Fig. 8, described search server and search the webpage obtained in step S31
After rope results page and the Search Hints message of step S32 generations return to the client in the lump, the client is to user
Show the Webpage searching result page and described search prompting message.
Another embodiment of step S203 refers to Figure 18, be Figure 14 shown in step S203 second embodiment it is specific
Flow chart;Step S203 includes:
S34, described search server inquire about the net to match with described search keyword in the database of Webpage search
Page link, and the web page interlinkage to inquiring is ranked up, and forms the Webpage searching result page.Shown in this step and Figure 17
The step S31 of embodiment is identical, and this will not be repeated here.
S35, the inquiry in the database of the special search of described search server match with described search keyword
Special web page interlinkage, and the special web page interlinkage to inquiring is ranked up, and forms special result of page searching.
According to above-mentioned example, search key input by user is " mouse like rice ", definite described search keyword pair
The search category answered is music class;Step S35 then can directly be submitted to the music searching page and asked, and carried out music searching and obtained
Music searching results page.The specific search procedure of step S35 is identical with existing music searching process, and this will not be repeated here.
The special result of page searching is inserted into the Webpage searching result page by S36, described search server,
Form result of page searching and return to the client.
Special result of page searching is inserted into the Webpage searching result page by step S36, and two pages, which are merged, to be become
One page(Result of page searching)The client is returned to, client shows the described search for merging and being formed to the user
Special search result and Webpage searching result is presented in results page, the page separated regions.According to above-mentioned example, please also refer to figure
10, music searching results page is inserted into the front position of the Webpage searching result page, it is to be understood that such a insertion side
Formula is only preferred embodiment, and music searching results page can be inserted into any position of the Webpage searching result page, other situations
Under can similar analysis, this will not be repeated here.
Another embodiment of step S203 refers to Figure 19, be Figure 14 shown in step S203 3rd embodiment it is specific
Flow chart;Step S203 includes:
S37, the inquiry in the database of the special search of described search server match with described search keyword
Special web page interlinkage, and the special web page interlinkage is ranked up, forms special result of page searching.This step and Figure 18
The step S35 of illustrated embodiment is identical, and this will not be repeated here.
The special result of page searching is returned to the client by S38, described search server.
According to above-mentioned example, please also refer to Figure 12, step S38 returns to the special result of page searching to the client
Afterwards, the client shows the page as shown in figure 12 to user.
The embodiment of the present invention closes search input by user the correspondence based on default keyword and search category
Keyword scans for the identification of classification, to determine the search intention of user;Scan for and return according to definite search category
Search result, search intention of the search result based on definite user are searched for obtain, and can more meet the actual demand of user, together
When improve search efficiency, improve using experience degree of the user for search engine.
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
Enclose, one of ordinary skill in the art will appreciate that realize all or part of flow of above-described embodiment, and will according to right of the present invention
Made equivalent variations are sought, still falls within and invents covered scope.