Disclosure of Invention
In view of this, embodiments of the present invention provide a search method and system, which can provide richer search results for a user, and are simple and convenient to implement.
The technical scheme of the invention is realized as follows:
the invention provides a searching method, which comprises the following steps: identifying the query intention of a user according to a query string input by the user, determining that vertical search is needed according to the identified query intention, simultaneously performing general search and vertical search, and integrating the vertical search result and the general search result to obtain a final search result.
In the above scheme, the method further comprises: and displaying the final search result.
In the above scheme, the query intention identifying the user according to the query string input by the user is as follows: receiving a query string input by a user, and preprocessing the received query string; and identifying the query intention of the user according to the preprocessing result.
In the above scheme, the method further comprises: when the vertical search is determined not to be needed according to the identified query intention, performing general search; and using the generic search result as a final search result.
In the above scheme, the method further comprises: and when the query intention is identified as the need of acquiring the character information and at least one other type of information except the character information, determining that vertical search is needed.
In the above scheme, the method further comprises: and sequencing the final search results according to the click rate condition.
The present invention also provides a search system, comprising: the system comprises a query string processing module, a universal search engine, a vertical search engine and a search result acquisition module; wherein,
the query string processing module is used for identifying the query intention of the user according to the query string input by the user and sending query requests to the general search engine and the vertical search engine when the vertical retrieval is determined to be required according to the identified query intention;
the universal search engine is used for completing universal search and sending a universal search result to the search result acquisition module;
the vertical search engine is used for completing vertical search and sending a vertical search result to the search result acquisition module;
and the search result acquisition module is used for integrating the received general search result and the vertical search result and taking the integrated search result as a final search result.
In the above scheme, the system further comprises a search result display module; the search result acquisition module is also used for sending the final search result to the search result display module; and the search result display module is used for displaying the final search result sent by the search result acquisition module.
In the foregoing solution, the query string processing module further includes: the device comprises a query string receiving unit, a preprocessing unit and an identification and judgment unit; the query string receiving unit is used for receiving a query string input by a user and sending the received query string to the preprocessing unit; the preprocessing unit is used for preprocessing the received query string and sending a preprocessing result to the identification and judgment unit; and the identification and judgment unit is used for identifying the query intention of the user according to the preprocessing result and sending a query request to the general search engine and the vertical search engine when determining that the vertical search is required.
Wherein, the identification and judgment unit is specifically configured to: and when the query intention is identified to be at least one other type of information except the character type information and the character type information according to the preprocessing result, determining that vertical search is required, and sending a query request to a general search engine and a vertical search engine.
According to the searching method and the searching system, the query intention of the user is identified according to the query string input by the user, when the vertical search is determined to be needed according to the identified query intention, the universal search and the vertical search are simultaneously carried out, and the search result of the vertical search and the search result of the universal search are integrated together and provided for the user. Therefore, various search results meeting the requirements of the user can be provided for the user, such as news, videos, pictures, blogs, forums and the like.
The invention identifies the query intention of the user according to the query string input by the user, not only can fully understand the query intention of the user, but also has simple and convenient implementation mode; the invention combines the universal search and the vertical search together, and can provide more professional, higher-precision and richer search results for users.
Detailed Description
In the embodiment of the invention, the query intention of the user is identified according to the query string input by the user, when the vertical search is determined to be needed according to the identified query intention, the general search and the vertical search are simultaneously carried out, the vertical search result and the general search result are integrated, and the integrated search result is used as the final search result.
Here, if there is only a general search result, the general search result is directly used as a final search result; that is, if there are only generic search results, it is sufficient to process as in the prior art implementation.
Further, after the final search result is obtained, the obtained final search result can be displayed to the user.
The following describes the implementation of the present invention in detail with reference to the accompanying drawings.
The searching method of the present invention is shown in fig. 1, and comprises the following steps:
step 101: receiving a query string input by a user, and preprocessing the received query string;
here, the preprocessing mainly refers to performing word segmentation processing on a received query string, where the word segmentation processing is to identify the received query string according to phonetic meanings and segment the query string into a plurality of words, and the words can be used as query words respectively; for example, the query string received is: 26 nd fortune, the query string can be split into: 26. and the current fortune would have three words, and the 26 current fortune would have three query words. How to preprocess the query string belongs to the prior art, and is not detailed here.
Step 102: identifying the query intention of the user according to the preprocessing result;
here, the current query intention of the user can be analyzed according to the query term obtained after preprocessing, for example, if the current query term is mobile communication, the query intention is query text related information including news, noun introduction, related technology introduction, related product introduction, and the like; if the query term is Liu De Hua, the query expected by the user should include news information, video information, picture information, blog information, etc., in various combinations.
Since each user has a history search record as long as the user has searched before, in this step, the query intention of the user can be further identified by combining the preprocessing result and the history search record. Such as: when a user inputs a name for inquiry for the first time, only news information, character introduction information and the like can be provided, but the user acquires video information, blog information and picture information of the character through further searching, so that the news information, the character introduction information, the video information, the blog information and the picture information which need to be acquired after the name is input become history searching records; after the user retrieves the input query string again, if the name is confirmed, various types of information such as news information, text introduction information, video information, blog information, picture information and the like can be provided at the same time so as to meet the requirements of the user.
Step 103-105: determining whether vertical search is needed according to the identified user query intention, if vertical search is needed, performing vertical search by the search engine while completing general search, and then returning general search results and vertical search results by the search engine respectively to execute step 106 b; otherwise, the search engine only completes the general search, returns the general search result, and executes step 106 a;
for example, if it is determined that only the information of the text class needs to be acquired according to the preprocessed query word, it is determined that vertical search is not needed; and if it is confirmed that other types of information such as videos, pictures and/or blogs need to be acquired besides the character information according to the preprocessed query words, determining that vertical search is needed.
In the step, after determining whether the query intention comprises vertical search, sending a query request to a corresponding search engine, specifically, when determining that vertical search is not needed, only sending the query request to a general search engine, wherein the query string is carried in the request; and when the vertical search is determined to be needed, simultaneously sending a query request to the general search engine and the vertical search engine, wherein the query string is carried in the request.
For determining whether to perform vertical search, a query intention recognition model may be preset, and various rules or conditions of query intention are given in the query intention recognition model, so that which search is completed according to the preprocessing result or according to which rule the preprocessing result and the historical search record analysis conforms to, for example: information which only needs general search and conforms to the rule A, C, and information which needs vertical search and conforms to the rule B, D; correspondingly, the preprocessed query words are matched with rules or conditions in the query intention recognition model so as to recognize the current query intention of the user and further determine whether to perform vertical search.
Vertical search is adopted in the application, the data volume is relatively small, and quick updating can be almost achieved, so that the use experience of a user can be directly improved.
Step 106 a: taking the general search result as a final search result, and ending the current processing flow;
step 106 b: integrating the general search result and the vertical search result, and taking the integrated search result as a final search result;
here, for the case of only the general search result, the general search result is directly taken as the final search result; for the case of returning the general search result and the vertical search result at the same time, the two search results need to be integrated, that is, the two sets of search results are merged to obtain a union set, and the integrated search result is used as the final search result.
The final search results can be further sorted according to the click rate in the collected historical data, the search results which are clicked most are arranged at the top, and other search results can be sequentially arranged from the top to the bottom according to the click rate; and, because the click rate condition is changed in real time, the ranking of the search results can be adjusted in real time for the final search result obtained each time. Such as: the obtained final search results comprise seven search results A1-A7, and the seven search results can be arranged into A3, A5, A1, A2, A4, A6 and A7 according to historical click volumes; a3 may be a video search result, A5 may be an audio search result, A1 may be a picture search result, A2 may be a news search result, A4 may be a blog search result, and A6, A7 may be text search results.
Further, the method further comprises: displaying the obtained final search result to a user; wherein the final search result may be an ordered search result.
In order to implement the above method, the present invention further provides a search system, as shown in fig. 2, including: the system comprises a query string processing module, a universal search engine, a vertical search engine and a search result acquisition module; wherein,
the query string processing module is used for identifying the query intention of the user according to the query string input by the user and sending query requests to the general search engine and the vertical search engine when the vertical retrieval is determined to be required according to the identified query intention; the query request carries a query string.
The universal search engine is used for completing universal search and sending a universal search result to the search result acquisition module;
the vertical search engine is used for completing vertical search and sending a vertical search result to the search result acquisition module;
and the search result acquisition module is used for integrating the received general search result and the vertical search result and taking the integrated search result as a final search result.
Further, if the query string processing module determines that vertical retrieval is not required according to the identified query intention, the query string processing module only sends a query request to the general search engine; correspondingly, only the universal search engine sends the universal search result to the search result acquisition module; and the search result acquisition module takes the universal search result as a final search result only when receiving the universal search result.
The query string processing module further includes: the device comprises a query string receiving unit, a preprocessing unit and an identification and judgment unit; wherein,
the query string receiving unit is used for receiving a query string input by a user and sending the received query string to the preprocessing unit; the preprocessing unit is used for preprocessing the received query string and sending a preprocessing result to the identification and judgment unit;
here, the preprocessing unit may be a word segmentation unit, and the word segmentation unit may divide the received query string into one or more words according to the linguistic meaning, and then send the word segmentation result to the recognition and judgment unit;
and the identification and judgment unit is used for identifying the query intention of the user according to the preprocessing result and sending a query request to the general search engine and the vertical search engine when the vertical search is determined to be needed.
The identification and judgment unit is specifically configured to: and when the query intention is identified to be at least one other type of information except the character type information and the character type information according to the preprocessing result, determining that vertical search is required, and sending a query request to a general search engine and a vertical search engine.
In addition, the identifying and judging unit only sends a query request to the general search engine when determining that the vertical search is not required.
The system also includes a search result display module; the search result acquisition module is further configured to send the final search result to the search result display module, and the search result display module is configured to display the final search result sent by the search result acquisition module.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.