Summary of the invention
Embodiment of the invention technical matters to be solved is, a kind of searching method based on search engine and search server are provided, can identify judgement to user's search intention, and corresponding Search Results is provided, improve search efficiency, improve the user for the experience degree of search engine.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of searching method based on search engine, comprising:
When receiving the searching key word of user's input that client sends, search server is determined the search category that described searching key word is corresponding according to default keyword and the corresponding relation of search category;
Described search server is searched for described searching key word based on the search category of determining, and returns Search Results to described client.
Wherein, search server receives before the searching request of client transmission, also comprises:
Search server sets in advance the corresponding relation of various searching key words and search category, and described corresponding relation is: any searching key word is corresponding to a kind of search category;
Described search category comprises: Webpage search and special search;
Described special search comprises: video, music, picture, forum, search, in news and the microblogging any one or more.
Wherein, described search server sets in advance the corresponding relation of various searching key words and search category, comprising:
Search server is added up the access history record of various searching key words, determines the highest search category of same searching key word visit capacity;
Described search server arranges each searching key word corresponding to the highest search category of described searching key word visit capacity.
Wherein, described search server is determined the search category that described searching key word is corresponding according to default keyword and the corresponding relation of search category, comprising:
Described search server judges that whether described searching key word is complementary with the keyword of presetting, if judged result is yes, then according to default keyword and the corresponding relation of search category, determines the search category that described searching key word is corresponding;
If the determination result is NO, described search server determines that described searching key word is corresponding to Webpage search.
Wherein, if search category corresponding to described searching key word is special search, then described search server is searched for described searching key word based on the search category of determining, and returns Search Results to described client, comprising:
Described search server is inquired about the web page interlinkage that is complementary with described searching key word in the database of Webpage search, and the described web page interlinkage that inquires is sorted, and forms the Webpage searching result page;
Described search server generates Search Hints message according to the special project search of determining;
Described search server returns to described client in the lump with the described Webpage searching result page and described Search Hints message.
Wherein, if search category corresponding to described searching key word is special search, then described search server is searched for described searching key word based on the search category of determining, and returns Search Results to described client, comprising:
Described search server is inquired about the web page interlinkage that is complementary with described searching key word in the database of Webpage search, and the described web page interlinkage that inquires is sorted, and forms the Webpage searching result page;
Described search server is inquired about the special web page interlinkage that is complementary with described searching key word in the database of described special search, and the described special web page interlinkage that inquires is sorted, and forms special result of page searching;
Described search server is inserted into described special result of page searching in the described Webpage searching result page, forms result of page searching and returns to described client.
Wherein, if search category corresponding to described searching key word is special search, then described search server is searched for described searching key word based on the search category of determining, and returns Search Results to described client, comprising:
Described search server is inquired about the special web page interlinkage that is complementary with described searching key word in the database of described special search, and described special web page interlinkage is sorted, and forms special result of page searching and returns to described client.
Correspondingly, the embodiment of the invention also provides a kind of search server, comprising:
The classification determination module is used for according to the keyword of presetting and the corresponding relation of search category, determining the search category that described searching key word is corresponding when receiving the searching key word of user's input that client sends;
Search module is used for based on the search category that described classification determination module is determined described searching key word being searched for, and returns Search Results to described client.
Wherein, described search server also comprises:
Presetting module, for the corresponding relation that sets in advance various searching key words and search category, described corresponding relation is: any searching key word is corresponding to a kind of search category;
Described search category comprises: Webpage search and special search;
Described special search comprises: video, music, picture, forum, search, in news and the microblogging any one or more.
Wherein, described presetting module comprises:
Statistic unit is used for the access history record of various searching key words is added up, and determines the highest search category of same searching key word visit capacity;
Setting unit is used for arranging the highest search category of described searching key word visit capacity that each searching key word obtains corresponding to described statistic unit statistics.
Wherein, described classification determination module comprises:
Judging unit is used for judging whether described searching key word is complementary with the keyword of presetting when receiving the searching key word of user's input that client sends;
Determining unit, be used for when described judgment unit judges result when being, according to the keyword of presetting and the corresponding relation of search category, determine the search category that described searching key word is corresponding; Perhaps, as described judgment unit judges result when being no, determine the corresponding Webpage search of described searching key word.
Wherein, if search category corresponding to described searching key word is special search, then described search module comprises:
The Webpage search unit is used for inquiring about the web page interlinkage that is complementary with described searching key word at the database of Webpage search, and the described web page interlinkage that inquires is sorted, and forms the Webpage searching result page;
Message generation unit is used for generating Search Hints message according to the special project search of determining;
The result returns the unit, is used for the Search Hints message that the Webpage searching result page that described Webpage search unit is obtained and described message generation unit generate and returns in the lump described client.
Wherein, if search category corresponding to described searching key word is special search, then described search module comprises:
The Webpage search unit is used for inquiring about the web page interlinkage that is complementary with described searching key word at the database of Webpage search, and the described web page interlinkage that inquires is sorted, and forms the Webpage searching result page;
Special search unit is used for inquiring about the special web page interlinkage that is complementary with described searching key word at the database of described special search, and the described special web page interlinkage that inquires is sorted, and forms special result of page searching;
The result returns the unit, and the special result of page searching that is used for described special search unit is obtained is inserted into the Webpage searching result page that described Webpage search unit obtains, and forms result of page searching and returns to described client.
Wherein, if search category corresponding to described searching key word is special search, then described search module comprises:
Special search unit is used for inquiring about the special web page interlinkage that is complementary with described searching key word at the database of described special search, and described special web page interlinkage is sorted, and forms special result of page searching;
The result returns the unit, is used for the special result of page searching that described special search unit forms is returned to described client.
Implement the embodiment of the invention, have following beneficial effect:
The embodiment of the invention is to based on default keyword and the corresponding relation of search category, the searching key word of user's input carried out the identification of search category, with definite user's search intention; Search for and return Search Results according to the search category of determining, this Search Results obtains based on the user's who determines search intention search, more can satisfy user's actual demand, improve simultaneously search efficiency, improve the experience degree of user for search engine.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
See also Fig. 3, be the structural representation of the first embodiment of search server of the present invention; Described search server comprises:
Classification determination module 101 is used for according to the keyword of presetting and the corresponding relation of search category, determining the search category that described searching key word is corresponding when receiving the searching key word of user's input that client sends.
Wherein, described default keyword and the corresponding relation of search category are: any keyword is corresponding to a kind of search category.Described search category comprises: Webpage search and special search.Described special search includes but not limited to: video, music, picture, forum, search, in news and the microblogging any one or more.
Search module 102 is used for based on the search category that described classification determination module 101 is determined described searching key word being searched for, and returns Search Results to described client.
The embodiment of the invention is to based on default keyword and the corresponding relation of search category, the searching key word of user's input carried out the identification of search category, with definite user's search intention; Search for and return Search Results according to the search category of determining, this Search Results obtains based on the user's who determines search intention search, more can satisfy user's actual demand, improve simultaneously search efficiency, improve the experience degree of user for search engine.
See also Fig. 4, be the structural representation of the second embodiment of search server of the present invention; Identical with a upper embodiment, described search server comprises: classification determination module 101 and search module 102.In the present embodiment, described search server also comprises:
Presetting module 103 is for the corresponding relation that sets in advance various searching key words and search category.
In the specific implementation, the process that described presetting module 103 records to preset according to user's historical search.Please in the lump referring to Fig. 5, be the structural representation of the embodiment of the presetting module of search server of the present invention; Described presetting module 103 comprises:
Statistic unit 31 is used for the access history record of various searching key words is added up, and determines the highest search category of same searching key word visit capacity.
As aforementioned, the various actions of having recorded the user in the User action log database of search engine, historical search record such as the user, daily record in 31 pairs of User action log databases of described statistic unit is analyzed, and calculates same searching key word (the being same searching request) search category that visit capacity is the highest.Particularly, described statistic unit 31 can carry out statistical computation to described User action log database based on algorithm, and this algorithm is as follows:
Each searching key word of For()
{
Define the classification counter array TypeCounter[of this searching key word]
Search for serch[j the first time of this searching key word of For(])
{
Give serch[j] classification, obtain search category id=a
//a be search category set webpage, video, music, picture, forum, search, news, microblogging
TypeCounter[a]=TypeCounter[a]+1 // add one for this search category
}
Return results: the search category of this searching key word=classification counter array TypeCounter[] maximum search categories
}
Described statistic unit 31 can count every kind of the highest search category of searching key word visit capacity based on above-mentioned algorithm, searching key word such as " mouse is liked rice " always has 100 historical search records, what described statistic unit 31 counted wherein 90 (90%) access is music, wherein 5 (5%) access is video, wherein 5 (5%) access is forum, and then described statistic unit 31 determines that the highest search category of searching key word visit capacity of " mouse is liked rice " is the music class.
Setting unit 32 is used for arranging the highest search category of described searching key word visit capacity that each searching key word obtains corresponding to described statistic unit 31 statistics.
According to above-mentioned example, the searching key word of described setting unit 32 " mouse is liked rice " is set to mutual corresponding with the music class, in the specific implementation, described setting unit 32 can arrange by the searching key word mark music identification with " mouse is liked rice " corresponding relation of the two, described setting unit 32 also can arrange corresponding relation by other means, but similar analysis in other situations is not repeated herein.
Because described statistic unit 31 records the highest search category of statistic of user accessing amount according to the historical search in the User action log database, therefore, described setting unit 32 can reflect most of user's search intention according to search category corresponding to the searching key word of this statistics setting, thereby can be good at providing service for user's searching request, improve the user to the experience of search engine.
The embodiment of the invention can be identified judgement to user's search intention based on the historical search record, and corresponding Search Results is provided, and has improved search efficiency, has improved the experience degree of user for search engine.
In order to be illustrated more clearly in the present invention, the below will describe in detail to each module in the search server of the present invention.
See also Fig. 6, be the structural representation of the embodiment of the classification determination module of search server of the present invention; Described classification determination module 101 comprises:
Judging unit 11 is used for judging whether described searching key word is complementary with the keyword of presetting when receiving the searching key word of user's input that client sends.
In the specific implementation, described judging unit 11 is judged the whether keyword of existing record in the User action log database of this searching key word when receiving the searching key word of user's input that client sends.
Determining unit 12, be used for when described judging unit 11 judged results when being, according to the keyword of presetting and the corresponding relation of search category, determine the search category that described searching key word is corresponding; Perhaps, when described judging unit 11 when the determination result is NO, determine the corresponding Webpage search of described searching key word.
If described judging unit 11 judged results are yes, show that the searching key word that the user inputs has record in the User action log database, described determining unit 12 needs to determine the corresponding search category of this searching key word according to default corresponding relation; If the determination result is NO for described judging unit 11, show that the searching key word that the user inputs does not carry out record in the User action log database, definite foundation without search category, described determining unit 12 determines that described searching key word is the Webpage search of search engine acquiescence, so that follow-up Webpage search process.
See also Fig. 7, be the structural representation of the first embodiment of the search module of search server of the present invention; Set described classification determination module 101 and determine that search category corresponding to described searching key word is special search, then described search module 102 comprises:
Webpage search unit 21 is used for inquiring about the web page interlinkage that is complementary with described searching key word at the database of Webpage search, and the described web page interlinkage that inquires is sorted, and forms the Webpage searching result page.In the specific implementation, described Webpage search unit 21 concrete search procedures are identical with existing Webpage search process, are not repeated herein.
Message generation unit 22 is used for generating Search Hints message according to the special project search of determining.
According to above-mentioned example, the searching key word of user's input is " mouse is liked rice ", and described classification determination module 101 determines that search category corresponding to described searching key word is the music class; 22 of described message generation unit can encapsulate the search category of determining, generate Search Hints message, as: " please arrive the search of the music searching page! ", prompting user is searched in music class searched page.
The result returns unit 23, is used for the Search Hints message that the Webpage searching result page that described Webpage search unit 21 is obtained and described message generation unit 22 generate and returns in the lump described client.
Specifically please in the lump referring to Fig. 8, be the first display effect figure of the Search Results based on search engine of the present invention; After described result returned Search Hints message that the Webpage searching result page that unit 23 obtains described Webpage search unit 21 and described message generation unit 22 generate and returns in the lump described client, described client was showed the described Webpage searching result page and described Search Hints message to the user.
See also Fig. 9, be the structural representation of the second embodiment of the search module of search server of the present invention; Set described classification determination module 101 and determine that search category corresponding to described searching key word is special search, then described search module 102 comprises:
Webpage search unit 24 is used for inquiring about the web page interlinkage that is complementary with described searching key word at the database of Webpage search, and the described web page interlinkage that inquires is sorted, and forms the Webpage searching result page.In the present embodiment, described Webpage search unit 24 is same unit with Webpage search unit 21 embodiment illustrated in fig. 7, and its concrete search procedure is identical with existing Webpage search process, is not repeated herein.
Special search unit 25 is used for inquiring about the special web page interlinkage that is complementary with described searching key word at the database of described special search, and the described special web page interlinkage that inquires is sorted, and forms special result of page searching.
According to above-mentioned example, the searching key word of user's input is " mouse is liked rice ", and described classification determination module 101 determines that search category corresponding to described searching key word is the music class; 25 of described special search units can directly be submitted request to the music searching page, and carry out music searching and obtain the music searching results page.The concrete search procedure of described special search unit 25 is identical with existing music searching process, is not repeated herein.
The result returns unit 26, and the special result of page searching that is used for described special search unit 25 is obtained is inserted into the Webpage searching result page that described Webpage search unit 24 obtains, and forms result of page searching and returns to described client.
Described result returns unit 26 special result of page searching is inserted in the Webpage searching result page, two pages merging are become a page (result of page searching) return to described client, client is showed the described result of page searching that merges formation to described user, and this page separated regions presents special Search Results and Webpage searching result.According to above-mentioned example, please in the lump referring to Figure 10, be the second display effect figure of the Search Results based on search engine of the present invention; Among Figure 10, the music searching results page is inserted into the front position of the Webpage searching result page, be understandable that, this kind inserted mode only is optimal way, the music searching results page can be inserted into any position of the Webpage searching result page, but similar analysis in other situations is not repeated herein.
See also Figure 11, be the structural representation of the 3rd embodiment of the search module of search server of the present invention; Set described classification determination module 101 and determine that search category corresponding to described searching key word is special search, then described search module 102 comprises:
Special search unit 27 is used for inquiring about the special web page interlinkage that is complementary with described searching key word at the database of described special search, and described special web page interlinkage is sorted, and forms special result of page searching.In the present embodiment, described special search unit 27 is same unit with special search unit 25 embodiment illustrated in fig. 9, and its concrete search procedure is not repeated herein.
The result returns unit 28, is used for the special result of page searching that described special search unit 27 forms is returned to described client.
According to above-mentioned example, please in the lump referring to Figure 12, be the 3rd display effect figure of the Search Results based on search engine of the present invention; After described result returned unit 28 and returns described special result of page searching to described client, described client was showed as shown in figure 12 the page to the user.
Need to prove, when Fig. 7-Figure 12 shows search category corresponding to described classification determination module 101 definite described searching key words for special search, the different example structure of described search module 102; When described classification determination module 101 determined that search category corresponding to described searching key word is Webpage search, described search module 102 directly carried out Webpage search, and this process is identical with existing Webpage search process, is not repeated herein.
The embodiment of the invention is to based on default keyword and the corresponding relation of search category, the searching key word of user's input carried out the identification of search category, with definite user's search intention; Search for and return Search Results according to the search category of determining, this Search Results obtains based on the user's who determines search intention search, more can satisfy user's actual demand, improve simultaneously search efficiency, improve the experience degree of user for search engine.
In order to be illustrated more clearly in the present invention, the below will describe in detail to the performed searching method based on search engine of search server of the present invention.
See also Figure 13, be the process flow diagram of the first embodiment of the searching method based on search engine of the present invention; Described method comprises:
S101, when receiving the searching key word of user's input that client sends, search server is determined the search category that described searching key word is corresponding according to default keyword and the corresponding relation of search category.
Wherein, described default keyword and the corresponding relation of search category are: any keyword is corresponding to a kind of search category.Described search category comprises: Webpage search and special search.Described special search includes but not limited to: video, music, picture, forum, search, in news and the microblogging any one or more.
S102, described search server is searched for described searching key word based on the search category of determining, and returns Search Results to described client.
The embodiment of the invention is to based on default keyword and the corresponding relation of search category, the searching key word of user's input carried out the identification of search category, with definite user's search intention; Search for and return Search Results according to the search category of determining, this Search Results obtains based on the user's who determines search intention search, more can satisfy user's actual demand, improve simultaneously search efficiency, improve the experience degree of user for search engine.
See also Figure 14, be the process flow diagram of the second embodiment of the searching method based on search engine of the present invention; Described method comprises:
S201, search server set in advance the corresponding relation of various searching key words and search category.
In the specific implementation, the process that step S201 records to preset according to user's historical search.Please in the lump referring to Figure 15, be the particular flow sheet of the embodiment of step S201 shown in Figure 14; Step S201 comprises:
S11, search server is added up the access history record of various searching key words, determines the highest search category of same searching key word visit capacity.
As aforementioned, the various actions of having recorded the user in the User action log database of search engine, historical search record such as the user, among the step S11, described search server is analyzed the daily record in the User action log database, calculates same searching key word (the being same searching request) search category that visit capacity is the highest.Particularly, can carry out statistical computation to described User action log database based on algorithm during described search server execution in step S11, this algorithm is as follows:
Each searching key word of For()
{
Define the classification counter array TypeCounter[of this searching key word]
Search for serch[j the first time of this searching key word of For(])
{
Give serch[j] classification, obtain search category id=a
//a be search category set webpage, video, music, picture, forum, search, news, microblogging
TypeCounter[a]=TypeCounter[a]+1 // add one for this search category
}
Return results: the search category of this searching key word=classification counter array TypeCounter[] maximum search categories
}
Described search server can count every kind of the highest search category of searching key word visit capacity based on above-mentioned algorithm, searching key word such as " mouse is liked rice " always has 100 historical search records, what count wherein 90 (90%) access among the step S11 is music, wherein 5 (5%) access is video, wherein 5 (5%) access is forum, and then search server described in the step S11 determines that the highest search category of searching key word visit capacity of " mouse is liked rice " is the music class.
S12, described search server arrange each searching key word corresponding to the highest search category of described searching key word visit capacity.
According to above-mentioned example, among the step S12, the searching key word of described search server " mouse is liked rice " is set to mutual corresponding with the music class, in the specific implementation, search server described in the step S12 can arrange by the searching key word mark music identification with " mouse is liked rice " corresponding relation of the two, described search server also can arrange corresponding relation by other means, but other situation similar analysis are not repeated herein.
Because step S11 records the highest search category of statistic of user accessing amount according to the historical search in the User action log database, therefore, step S12 can reflect most of user's search intention according to search category corresponding to the searching key word of this statistics setting, thereby can be good at providing service for user's searching request, improve the user to the experience of search engine.
S202, when receiving the searching key word of user's input that client sends, search server is determined the search category that described searching key word is corresponding according to default keyword and the corresponding relation of search category.
In the present embodiment, step S202 is identical with the step S101 of a upper embodiment.Specifically please in the lump referring to Figure 16, be the particular flow sheet of the embodiment of step S202 shown in Figure 14; Step S202 comprises:
S21, described search server judge that whether described searching key word is complementary with the keyword of presetting, if judged result is yes, changes S22 over to; Otherwise, change S23 over to.
In the specific implementation, search server described in the step S21 is mainly judged the whether keyword of existing record in the User action log database of this searching key word.
S22, described search server is determined the search category that described searching key word is corresponding according to default keyword and the corresponding relation of search category; Afterwards, change step S203 over to.
If step S21 judged result is yes, show that the searching key word that the user inputs has record in the User action log database, step S22 needs to determine the corresponding search category of this searching key word according to default corresponding relation.
S23, described search server determine the corresponding Webpage search of described searching key word; Afterwards, change step S203 over to.
If the determination result is NO for described S21, show that the searching key word that the user inputs does not carry out record in the User action log database, without definite foundation of search category, step S23 determines that then described searching key word is the Webpage search of search engine acquiescence, so that follow-up Webpage search process.
S203, described search server is searched for described searching key word based on the search category of determining, and returns Search Results to described client.
In the present embodiment, step S203 is identical with the step S102 of a upper embodiment, particularly, please in the lump referring to Figure 17, is the particular flow sheet of the first embodiment of step S203 shown in Figure 14; Step S203 comprises:
S31, described search server inquire about the web page interlinkage that is complementary with described searching key word in the database of Webpage search, and the described web page interlinkage that inquires is sorted, and form the Webpage searching result page.In the specific implementation, the concrete search procedure of search server described in the step S31 is identical with existing Webpage search process, is not repeated herein.
S32, described search server generates Search Hints message according to the special project search of determining.
According to above-mentioned example, the searching key word of user's input is " mouse is liked rice ", and step S202 determines that search category corresponding to described searching key word is the music class; Step S32 can encapsulate the search category of determining, generates Search Hints message, as: " please arrive the search of the music searching page! ", prompting user is searched in music class searched page.
S33, described search server returns to described client in the lump with the described Webpage searching result page and described Search Hints message.Specifically please in the lump referring to Fig. 8, after the Search Hints message that described search server execution in step S33 generates the Webpage searching result page that obtains among the step S31 and step S32 returned to described client in the lump, described client was showed the described Webpage searching result page and described Search Hints message to the user.
Another embodiment of step S203 sees also Figure 18, is the particular flow sheet of the second embodiment of step S203 shown in Figure 14; Step S203 comprises:
S34, described search server inquire about the web page interlinkage that is complementary with described searching key word in the database of Webpage search, and the described web page interlinkage that inquires is sorted, and form the Webpage searching result page.This step is identical with step S31 embodiment illustrated in fig. 17, is not repeated herein.
S35, described search server inquire about the special web page interlinkage that is complementary with described searching key word in the database of described special search, and the described special web page interlinkage that inquires is sorted, and form special result of page searching.
According to above-mentioned example, the searching key word of user's input is " mouse is liked rice ", and search category corresponding to described searching key word of determining is the music class; Step S35 then can be directly submits request to the music searching page, and carries out music searching and obtain the music searching results page.The concrete search procedure of step S35 is identical with existing music searching process, is not repeated herein.
S36, described search server is inserted into described special result of page searching in the described Webpage searching result page, forms result of page searching and returns to described client.
Step S36 is inserted into special result of page searching in the Webpage searching result page, two pages merging are become a page (result of page searching) return to described client, client is showed the described result of page searching that merges formation to described user, and this page separated regions presents special Search Results and Webpage searching result.According to above-mentioned example, please in the lump referring to Figure 10, the music searching results page is inserted into the front position of the Webpage searching result page, be understandable that, this kind inserted mode only is optimal way, the music searching results page can be inserted into any position of the Webpage searching result page, but similar analysis in other situations is not repeated herein.
Another embodiment of step S203 sees also Figure 19, is the particular flow sheet of the 3rd embodiment of step S203 shown in Figure 14; Step S203 comprises:
S37, described search server inquire about the special web page interlinkage that is complementary with described searching key word in the database of described special search, and described special web page interlinkage is sorted, and form special result of page searching.This step is identical with step S35 embodiment illustrated in fig. 18, is not repeated herein.
S38, described search server returns to described client with described special result of page searching.
According to above-mentioned example, please in the lump referring to Figure 12, after step S38 returned described special result of page searching to described client, described client was to user's displaying page as shown in figure 12.
The embodiment of the invention is to based on default keyword and the corresponding relation of search category, the searching key word of user's input carried out the identification of search category, with definite user's search intention; Search for and return Search Results according to the search category of determining, this Search Results obtains based on the user's who determines search intention search, more can satisfy user's actual demand, improve simultaneously search efficiency, improve the experience degree of user for search engine.
Above disclosed only is preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, one of ordinary skill in the art will appreciate that all or part of flow process that realizes above-described embodiment, and according to the equivalent variations that claim of the present invention is done, still belong to the scope that invention is contained.