This application claims priority and benefits of Chinese Patent Application No. 201410228820.6, filed with State Intellectual Property Office on May 27, 2014, the entire content of which is incorporated herein by reference.
Embodiments of the present disclosure generally relate to a searching technology field, and more particularly, to an interactive searching method and apparatus
With a development of the computer technology, internet applications become more and more popular and a user can obtain internet sources that he needs through a search engine. Certainly, in a related searching method, the user inputs a query firstly, and the search engine obtains a search result associated with the query and returns the search result to the client and the user obtains the source that he needs from the returned search result finally.
However, according to the above searching method, an accurate answer cannot be provided by the search engine due to an unclear or incomplete expression of the query input by the user. Even provided with same sources, since the user is not familiar with a field that the query belongs to, it is required for the user to change the query many times to perform a search, and thus a searching cost of the user is dramatically high, but even so the obtained search result still cannot satisfy a requirement of the user.
Embodiments of the present disclosure seek to solve at least one of the problems existing in the related art to at least some extent.
Accordingly, a first objective of the present disclosure is to provide an interactive searching method, which can update a query automatically according to a historical query and a feedback, thus reducing an input operation of a user and decreasing a memory burden of the user.
A second objective of the present disclosure is to provide an interactive searching apparatus.
In order to achieve above objectives, embodiments of a first aspect of the present disclosure provides an interactive searching method, including: receiving a first query; obtaining an intention clarification guidance sentence according to the first query; receiving a feedback corresponding to the intention clarification guidance sentence and generating a second query according to the first query, the intention clarification guidance sentence and the feedback; and providing a search result according to the second query.
Embodiments of a second aspect of the present disclosure provide an interactive searching apparatus, including: a first receiving module configured to receive a first query; a first obtaining module configured to obtain an intention clarification guidance sentence according to the first query; and a second receiving module configured to receive a feedback corresponding to the intention clarification guidance sentence; a generating module configured to generate a second query according to the first query, the intention clarification guidance sentence and the feedback; and a providing module configured to provide a search result according to the second query.
Embodiments of a third aspect of the present disclosure provide an apparatus, including: one or more processors; a memory; and one or more programs stored in the memory and executed by the one or more processors to execute steps of: receiving a first query; obtaining an intention clarification guidance sentence according to the first query; receiving a feedback corresponding to the intention clarification guidance sentence and generating a second query according to the first query, the intention clarification guidance sentence and the feedback; and providing a search result according to the second query.
Embodiments of a fourth aspect of the present disclosure provide a non-transitory computer-readable storage medium, including one or more programs for executing steps of: receiving a first query; obtaining an intention clarification guidance sentence according to the first query; receiving a feedback corresponding to the intention clarification guidance sentence and generating a second query according to the first query, the intention clarification guidance sentence and the feedback; and providing a search result according to the second query.
Additional aspects and advantages of embodiments of present disclosure will be given in part in the following descriptions, become apparent in part from the following descriptions, or be learned from the practice of the embodiments of the present disclosure.
These and other aspects and advantages of embodiments of the present disclosure will become apparent and more readily appreciated from the following descriptions made with reference to the accompanying drawings, in which:
a is a schematic diagram showing an effect of inputting a feedback according to an intention clarification guidance sentence according to an embodiment of the present disclosure;
b is a schematic diagram showing an effect of providing a search result according to a second query according to an embodiment of the present disclosure;
c is a schematic diagram showing an effect of providing a candidate result according to a first query according to an embodiment of the present disclosure;
d is a schematic diagram showing an effect of providing a search result according to a second query according to an embodiment of the present disclosure;
Reference will be made in detail to embodiments of the present disclosure. Embodiments of the present disclosure will be shown in drawings, in which the same or similar elements and the elements having same or similar functions are denoted by like reference numerals throughout the descriptions. The embodiments described herein according to drawings are explanatory and illustrative, not construed to limit the present disclosure.
In the description of the present disclosure, it should be noted that “a plurality of” relates to two or more than two; terms such as “first” and “second” are used herein for purposes of description and are not intended to indicate or imply relative importance or significance.
An interactive searching method and apparatus according to embodiments of the present disclosure will be described in the following with reference to drawings.
In embodiments of the present disclosure, an interactive search is a search in which a search guidance for a user can be performed by providing an interactive information. Specifically, the interactive information (such as an intention clarification guidance sentence) is provided for the user according to a query of the user and the query is updated according to a feedback corresponding to the interactive information, such that another search is performed according to the updated query and another search result is returned.
In order to solve a problem that an accurate answer cannot be provided by a search engine due to an unclear or incomplete expression of the query input by the user, embodiments of the present disclosure provide an interactive searching method, including: receiving a first query; obtaining an intention clarification guidance sentence according to the first query; receiving a feedback corresponding to the intention clarification guidance sentence and generating a second query according to the first query, the intention clarification guidance sentence and the feedback; and providing a search result according to the second query.
At step S101, a first query is received.
In an embodiment of the present disclosure, the first query may be a term or a sentence. The user can input the first query in a search box or other search fields in a search page according to a requirement.
At step S102, an intention clarification guidance sentence is obtained according to the first query.
In embodiments of the present disclosure, before the intention clarification guidance sentence is obtained according to the first query, a sentence library shall be established, such that the search engine can obtain the intention clarification guidance sentence by querying the sentence library. Certainly, if the sentence library has been established, a step of establishing the sentence library can be omitted. It should be understood that the search engine may obtain one or more intention clarification guidance sentences according to the first query so as to guide the user to clarify a search intention of his own. For example, for the first query such as “What universities can a student be admitted to with a score of 610 points?”, two intention clarification guidance sentences such as “Where are you from?” and “are you a liberal art student or a science student?” can be obtained.
At step S103, a feedback corresponding to the intention clarification guidance sentence is received and a second query is generated according to the first query, the intention clarification guidance sentence and the feedback.
In embodiments of the present disclosure, the feedback is an answer term or sentence corresponding to the intention clarification guidance sentence. Specifically, after the intention clarification guidance sentence is obtained, the search engine can receive the feedback corresponding to the intention clarification guidance sentence via a client, in which the feedback is input by the user. In an embodiment of the present disclosure, the search engine can display the intention clarification guidance sentence to the user via the client and provide at least one candidate result corresponding to the intention clarification guidance sentence or an input box, such that the user can select a candidate result that satisfies his search intention from the at least one candidate result or input an answer corresponding to the intention clarification guidance sentence in the input box directly.
Furthermore, the search engine obtains the second query according to the first query, the intention clarification guidance sentence and the feedback. Specifically, the search engine obtains terms indicating the search intention of the user from the first query, the intention clarification guidance sentence and the feedback via a syntax analysis to analyze a structure of a sentence or a word analysis to analyze a meaning of a word, and obtains the second query according to the terms.
In an embodiment of the present disclosure as show in
At step S104, a search result is provided according to the second query.
In embodiments of the present disclosure, after the search result is obtained according to the second query, the search engine returns the search result to the client so as to provide the search result to the user via the client.
In addition, the search engine may determine whether to further guide the user according to the generated second query; if yes, a corresponding intention clarification guidance sentence may be obtained according to the second query to continue to guide the user; if not, the search result may be provided directly. For example, in an embodiment of the present disclosure as shown in
In an embodiment of the present disclosure, after the intention clarification guidance sentence is obtained according to the first query, the search engine provides the at least one candidate result corresponding to the intention clarification guidance sentence, receives a triggering operation for the at least one candidate result and treats a triggered candidate result as the feedback corresponding to the intention clarification guidance sentence, and thus the input operation of the user is reduced. Specifically, in an embodiment of the present disclosure as shown in
In an embodiment of the present disclosure, the second query may be generated by selecting a whole or a part of the first query, the intention clarification guidance sentence and the feedback according to a type of the intention clarification guidance sentence. In embodiments of the present disclosure, the first query is represented as c_query, the intention clarification guidance sentence is represented as qb, the feedback is represented as ans and the second query is represented as n_query. The type of the intention clarification guidance sentence generally includes a general question, a special question and an alternative question. For example, the second queries generated according to the above three types of intention clarification guidance sentences are shown in Table 1.
Specifically,
At step S301, a type of the intention clarification guidance sentence is obtained.
Specifically, the type of the intention clarification guidance sentence may be obtained by performing the syntax analysis thereon.
At step S302, if the intention clarification guidance sentence is a general question or a special question, one or more key-word sets are obtained according to the first query, the intention clarification guidance sentence and the feedback.
In an embodiment of the present disclosure as shown in
At step S401, the first query, the intention clarification guidance sentence and the feedback are segmented into words so as to obtain a first set of words corresponding to the first query, a second set of words corresponding to the intention clarification guidance sentence and a third set of words corresponding to the feedback.
In embodiments of the present disclosure, during segmenting the first query, the intention clarification guidance sentence and the feedback into words, simultaneously the syntax analysis, an entity identification and a word deletion to delete a word which is not allowed to be used are performed on the first query, the intention clarification guidance sentence and the feedback and a part-of-speech tagging to tag a property of a word is performed on each word, such that the first set of words, the second set of words and the third set of words can be obtained.
At step S402, a plurality of features of each word in the first set of words, the second set of words and the third set of words are obtained respectively, and feature values of the plurality of feature of each word are obtained.
In embodiments of the present disclosure, the plurality of features of each word may include a part of speech, a syntactic constituent, a word frequency in a corpus of a large number of sentences, a number of occurrence times, whether being an entity or not, a position in the sentence and features of a hypernym and a hyponym of the each word.
At step S403, a score of each word is obtained according to the feature values of the plurality of features of each word.
In embodiments of the present disclosure, the score of each word may be obtained according to the feature values of the plurality of features of each word by using following formulas:
scorew=exp(Σi-1Nλifi(w)) scorew=exp(ΣiNλifi(w)),
where scorew is a score of wth word, λi is a weight of a ith feature of the wth word, fi(w) is a feature value of the ith feature of the wth word, and N is a total number of the plurality of features of the wth word.
At step S404, a first key-word set is selected from the first set of words, a second key-word set is selected from the second set of words and a third key-word set is selected from the third set of words according to the score of each word.
In embodiments of the present disclosure, the key-word set may be selected from each set of words according to a predetermined selecting rule which is not limited herein. For example, a predetermined number of key words having a high score may be selected from each set of words, or the key words having a score higher than a predetermined threshold may be selected.
At step S303, if the intention clarification guidance sentence is an alternative question, the one or more key-word sets are obtained according to the first query and the feedback.
In an embodiment of the present disclosure as shown in
At step S501, the first query and the feedback are segmented into words so as to obtain a fourth set of words corresponding to the first query and a fifth set of words corresponding to the feedback.
In embodiments of the present disclosure, during segmenting the first query and the feedback into words, simultaneously the syntax analysis, the entity identification and the word deletion are performed on the first query and the feedback and a part-of-speech tagging is performed on each word, such that the fourth set of words and the fifth set of words can be obtained.
At step S502, a plurality of features of each word in the fourth set of words and the fifth set of words are obtained respectively, and feature values of the plurality of features of each word are obtained.
In embodiments of the present disclosure, the plurality of features of each word may include the part of speech, the syntactic constituent, the word frequency in the corpus of the large number of sentences, the number of occurrence times, whether being the entity or not, the position in the sentence and features of the hypernym and the hyponym of the each word.
At step S503, a score of each word is obtained according to the feature values of the plurality of features of each word.
In embodiments of the present disclosure, the score of each word may be obtained according to the feature values of the plurality of features of each word by using following formulas:
scorew=exp(Σi-1Nλifi(w)) scorew=exp(ΣiNλifi(w)),
where scorew is a score of wth word, λi is a weight of a ith feature of the wth word, fi(w) is a feature value of the ith feature of the wth word, and N is a total number of the plurality of features of the wth word.
At step S504, a fourth key-word set is selected from the fourth set of words and a fifth key-word set is selected from the fifth set of words according to the score of each word.
In embodiments of the present disclosure, the key-word set may be selected from each set of words according to the predetermined selecting rule which is not limited herein. For example, the predetermined number of key words having a high score may be selected from each set of words, or the key words having a score higher than the predetermined threshold may be selected.
At step S304, the second query is generated according to the one or more key-word sets.
In an embodiment of the present disclosure as shown in
At step S601, a synonym processing is performed on the one or more key-word sets to obtain one or more key-word sequences.
In embodiments of the present disclosure, a main part of the second query is the first query, and the key words of the intention clarification guidance sentence and the feedback are configured as a supplement part of the second query. In order to ensure that the supplement part is significant and irredundant, in an embodiment of the present disclosure, the synonym processing may be performed on the one or more key-word sets to obtain the one or more key-word sequences. Specifically, if in both the key-word set of ans and the key-word set of qb, same or synonymous words exist, the same or synonymous word in the key-word set of qb is removed; if in the key-word set of ans or qb, same or synonymous words with the key word in the key-word set of c_query exist, the same or synonymous word in the key-word set of ans or qb is removed, and finally the key-word sequences of c_query, ans and qb are obtained.
For example, two key-word sequences shown in Table 3 can be obtained for the c_query, ans and qb shown in Table 2.
At step S602, the key words in each of the one or more key-word sequences are sequenced to obtain a plurality of candidate sequences.
In embodiments of the present disclosure, a complexity of three key-word sequences having x key words, y key words and z key words respectively is x*y*z. Therefore, if there are a large number of key words in the key-word sequence, it is extremely complex to obtain all the possible candidate sequences and a huge calculated amount is needed. Thus, in order to optimize a process of obtaining the plurality of candidate sequences, the plurality of candidate sequences may be searched and enumerated by a pruning algorithm which is not limited herein, for example the pruning algorithm may be Beam-search and A*.
At step 603, a score for each candidate sequence is obtained according to a sequence and features of the key words in each candidate sequence.
In an embodiment of the present disclosure, the score of each of the plurality of candidate sequences may be obtained by a following formula:
scoresen=Πinp(wi|wi-1,wi-2)l(wi)
where scoresen is the score of the candidate sequence sen,
is a ternary language model of the key word wi in the candidate sequence sen, c(wiwi-1wi-2) is a number of times that the key words wi, wi-1, wi-2 appear in the corpus at a same time, c(wi-1wi-2) is a number of times that the key words wi-1, wi-2 appear in the corpus at a same time, l(wi)=α|d| is a sequencing penalty term, α is a constant which is larger than zero and less than one, d=posori
For example, for the candidate sequence “height 175 cm 200 kg lose weight quickly”, if wi is “weight”, the key-word sequence in which wi is is the key-word sequence “height 175 cm weight 110 kg” corresponding to ans, and thus posori
At step S604, the second query is selected from the plurality of candidate sequences according to the score of each of the plurality of candidate sequences.
In an embodiment of the present disclosure, the candidate sequence having a highest score may be selected from the plurality of candidate sequences as the second query.
With the interactive searching method according to embodiments of the present disclosure, the intention clarification guidance sentence provided by the search engine is obtained, and the query is updated according to the intention clarification guidance sentence and the feedback corresponding to the intention clarification guidance sentence and the search result is provided according to the updated query, such that the search intention of the user is clarified, and also the query can be updated automatically according to a historical query and the feedback and it is just required for the user to input the feedback corresponding to the intention clarification guidance sentence, and thus an input operation of the user is reduced and a memory burden of the user is also decreased. Moreover, an accuracy of the search engine to identify the search intention of the user is increased and a requirement of the user is satisfied, and in this way a user experience is improved.
In order to achieve above embodiments, an interactive searching apparatus is provided by embodiments of the present disclosure.
The interactive searching apparatus includes a first receiving module configured to receive a first query; a first obtaining module configured to obtain an intention clarification guidance sentence according to the first query; and a second receiving module configured to receive a feedback corresponding to the intention clarification guidance sentence; a generating module configured to generate a second query according to the first query, the intention clarification guidance sentence and the feedback; and a providing module configured to provide a search result according to the second query.
As shown in
Specifically, the first receiving module 100 is configured to receive a first query. In an embodiment of the present disclosure, the first query may be a term or a sentence. A user can input the first query in a search box or other search fields in a search page according to a requirement.
The first obtaining module 200 is configured to obtain an intention clarification guidance sentence according to the first query. In embodiments of the present disclosure, before the intention clarification guidance sentence is obtained according to the first query, a sentence library shall be established, such that the first obtaining module 200 can obtain the intention clarification guidance sentence by querying the sentence library. Certainly, if the sentence library has been established, a step of establishing the sentence library can be omitted. It should be understood that the first obtaining module 200 may obtain one or more intention clarification guidance sentences according to the first query so as to guide the user to clarify a search intention of his own. For example, for the first query such as “What universities can a student be admitted to with a score of 610 points?”, two intention clarification guidance sentences such as “Where are you from?” and “are you a liberal art student or a science student?” can be obtained by the first obtaining module 200.
The second receiving module 300 is configured to receive a feedback corresponding to the intention clarification guidance sentence. In embodiments of the present disclosure, the feedback is an answer term or sentence corresponding to the intention clarification guidance sentence. Specifically, after the intention clarification guidance sentence is obtained, the second receiving module 300 can receive the feedback corresponding to the intention clarification guidance sentence via a client, in which the feedback is input by the user. In an embodiment of the present disclosure, the intention clarification guidance sentence may be displayed to the user via the client and at least one candidate result corresponding to the intention clarification guidance sentence or an input box may be provided, such that the user can select a candidate result that satisfies his search intention from the at least one candidate result or input an answer corresponding to the intention clarification guidance sentence in the input box directly.
The generating module 400 is configured to generate a second query according to the first query, the intention clarification guidance sentence and the feedback. Specifically, the generating module 400 obtains terms indicating the search intention of the user from the first query, the intention clarification guidance sentence and the feedback via a syntax analysis to analyze a structure of a sentence or a word analysis to analyze a meaning of a word, and obtains the second query according to the terms.
In an embodiment of the present disclosure, the generating module 400 generates the second query by selecting a whole or a part of the first query, the intention clarification guidance sentence and the feedback according to a type of the intention clarification guidance sentence. In embodiments of the present disclosure, the first query is represented as c_query, the intention clarification guidance sentence is represented as qb, the feedback is represented as ans and the second query is represented as n_query. The type of the intention clarification guidance sentence generally includes a general question, a special question and an alternative question. For example, the second queries generated according to the above three types of intention clarification guidance sentences are shown in Table 1.
In an embodiment of the present disclosure as show in
The providing module 500 is configured to provide a search result according to the second query. In embodiments of the present disclosure, after the search result is obtained according to the second query, the search result may be returned to the client so as to be provided to the user via the client.
In addition, it may be determined whether to further guide the user according to the generated second query; if yes, the first obtaining module 200 obtains a corresponding intention clarification guidance sentence according to the second query to continue guiding the user; if not, the search result may be provided directly. For example, in an embodiment of the present disclosure as shown in
With the interactive searching apparatus according to embodiments of the present disclosure, the intention clarification guidance sentence provided by the search engine is obtained, and the query is updated according to the intention clarification guidance sentence and the feedback corresponding to the intention clarification guidance sentence and the search result is provided according to the updated query, such that the search intention of the user is clarified, and also the query can be updated automatically according to a historical query and the feedback and it is just required for the user to input the feedback corresponding to the intention clarification guidance sentence, and thus an input operation of the user is reduced and a memory burden of the user is also decreased. Moreover, an accuracy of the search engine to identify the search intention of the user is increased and a requirement of the user is satisfied, and in this way a user experience is improved.
In an embodiment of the present disclosure as shown in
The first obtaining sub-module 410 is configured to obtain a type of the intention clarification guidance sentence. Specifically, the first obtaining sub-module 410 obtains the type of the intention clarification guidance sentence by performing a syntax analysis thereon.
The second obtaining sub-module 420 is configured to obtain one or more key-word sets according to the first query, the intention clarification guidance sentence and the feedback, if the intention clarification guidance sentence is a general question or a special question. In an embodiment of the present disclosure as shown in
The first segmenting unit 421 is configured to segment the first query, the intention clarification guidance sentence and the feedback into words so as to obtain a first set of words corresponding to the first query, a second set of words corresponding to the intention clarification guidance sentence and a third set of words corresponding to the feedback. In embodiments of the present disclosure, during segmenting the first query, the intention clarification guidance sentence and the feedback into words, simultaneously the syntax analysis, an entity identification and a word deletion to delete a word which is not allowed to be used are performed on the first query, the intention clarification guidance sentence and the feedback and a part-of-speech tagging to tag a property of a word is performed on each word, such that the first set of words, the second set of words and the third set of words can be obtained.
The first obtaining unit 422 is configured to obtain a plurality of features of each word in the first set of words, the second set of words and the third set of words respectively, and to obtain feature values of the plurality of features of each word. In embodiments of the present disclosure, the plurality of features of each word may include a part of speed, a syntactic constituent, a word frequency in a corpus of a large number of sentences, a number of occurrence times, whether being an entity or not, a position in the sentence and features of a hypernym and a hyponym of the each word.
The second obtaining unit 423 is configured to obtain a score of each word according to the feature values of the plurality of features of each word. In embodiments of the present disclosure, the score of each word may be obtained according to the feature values of the plurality of features of each word by using following formulas:
scorew=exp(Σi-1Nλifi(w)) scorew=exp(ΣiNλifi(w)),
where scorew is a score of wth word, λi is a weight of a ith feature of the wth word, fi(w) is a feature value of the ith feature of the wth word, and N is a total number of the plurality of features of the wth word.
The first selecting unit 424 is configured to select a first key-word set from the first set of words, a second key-word set from the second set of words and a third key-word set from the third set of words according to the score of the each word. In embodiments of the present disclosure, the key-word set may be selected from each set of words according to a predetermined selecting rule which is not limited herein. For example, a predetermined number of key words having a high score may be selected from each set of words, or the key words having a score higher than a predetermined threshold may be selected.
The third obtaining sub-module 430 is configured to obtain the one or more key-word sets according to the first query and the feedback, if the intention clarification guidance sentence is an alternative question. In an embodiment of the present disclosure as shown in
The second segmenting unit 431 is configured to segment the first query and the feedback into words so as to obtain a fourth set of words corresponding to the first query and a fifth set of words corresponding to the feedback. In embodiments of the present disclosure, during segmenting the first query and the feedback into words, simultaneously the syntax analysis, the entity identification and the word deletion are perform on the first query and the feedback and the part-of-speech tagging is performed on each word, such that the fourth set of words and the fifth set of words can be obtained.
The third obtaining unit 432 is configured to obtain a plurality of features of each word in the fourth set of words and the fifth set of words respectively, and to obtain feature values of the plurality of features of each word. In embodiments of the present disclosure, the plurality of features of each word may include the part of speed, the syntactic constituent, the word frequency in the corpus of the large number of sentences, the number of occurrence times, whether being the entity or not, the position in the sentence and features of the hypernym and the hyponym of the each word.
The fourth obtaining unit 433 is configured to obtain a score of each word according to the feature values of the plurality of features of each word. In embodiments of the present disclosure, the score of each word may be obtained according to the feature values of the plurality of features of each word by using following formulas:
scorew=exp(Σi-1Nλifi(w)) scorew=exp(ΣiNλifi(w)),
where scorew is a score of wth word, λi is a weight of a ith feature of the wth word, fi(w) is a feature value of the ith feature of the wth word, and N is a total number of the plurality of features of the wth word.
The second selecting unit 434 is configured to select a fourth key-word set from the fourth set of words and a fifth key-word set from the fifth set of words according to the score of each word. In embodiments of the present disclosure, the key-word set may be selected from each set of words according to the predetermined selecting rule which is not limited herein. For example, the predetermined number of key words having a high score may be selected from each set of words, or the key words having a score higher than the predetermined threshold may be selected.
The generating sub-module 440 is configured to generate the second query according to the one or more key-word sets. In an embodiment of the present disclosure as shown in
The synonym processing unit 441 is configured to perform a synonym processing on the one or more key-word sets to obtain one or more key-word sequences. In embodiments of the present disclosure, a main part of the second query is the first query and the key words of the intention clarification guidance sentence and the feedback are configured as a supplement part of the second query. In order to ensure that the supplement part is significant and irredundant, in an embodiment of the present disclosure, the synonym processing may be performed on the one or more key-word sets to obtain the one or more key-word sequences. Specifically, if in both the key-word set of ans and the key-word set of qb, same or synonymous words exist, the same or synonymous word in the key-word set of qb is removed; if in the key-word set of ans or qb, same or synonymous words with the key word in the key-word set of c_query exist, the same or synonymous word in the key-word set of ans or qb is removed, and finally the key-word sequences of c_query, ans and qb are obtained.
For example, two key-word sequences as shown in Table 3 can be obtained for the c_query, ans and qb shown in Table 2.
The fifth obtaining unit 442 is configured to sequence the key words in each of the one or more key-word sequences to obtain a plurality of candidate sequences. In embodiments of the present disclosure, a complexity of three key-word sequences having x key words, y key words and z key words respectively is x*y*z. Therefore, if there are a large number of key words in the key-word sequence, it is extremely complex to obtain all the possible candidate sequences and a huge calculated amount is needed. Thus, in order to optimize a process of obtaining the plurality of candidate sequences, the plurality of candidate sequences may be searched and enumerated by a pruning algorithm which is not limited herein, for example the pruning algorithm may be Beam-search and A*.
The sixth obtaining unit 443 is configured to obtain a score for each candidate sequence according to a sequence and features of the key words in each candidate sequence. In an embodiment of the present disclosure, the score of each of the plurality of candidate sequences may be obtained by a following formula:
scoresen=Πinp(wi|wi-1,wi-2)l(wi)
where scoresen is the score of the candidate sequence sen,
is a ternary language model of the key word wi in the candidate sequence sen, c(wiwi-1wi-2) is a number of times that the key words wi, wi-1, wi-2 appear in the corpus at a same time, c(wi-1wi-2) is a number of times that the key words wi-1, wi-2 appear in the corpus at a same time, l(wi)=α|d| is a sequencing penalty term, α is a constant which is larger than zero and less than one, d=posori
For example, for the candidate sequence “height 175 cm 200 kg lose weight quickly”, if wi is “weight”, the key-word sequence in which wi is is the key-word sequence “height 175 cm weight 110 kg” corresponding to ans, and thus posori
The third selecting unit 444 is configured to select the second query from the plurality of candidate sequences according to the score of the each of the plurality of candidate sequences. In an embodiment of the present disclosure, the candidate sequence having a highest score may be selected from the plurality of candidate sequences as the second query.
As shown in
The second obtaining module 600 is configured to obtain at least one candidate result corresponding to the intention clarification guidance sentence,
For example, in an embodiment of the present disclosure as shown in
With the interactive searching apparatus according to embodiments of the present disclosure, the at least one candidate result corresponding to the intention clarification guidance sentence is provided to the user and the corresponding feedback is obtained according to the triggering operation of the user for the at least one candidate result, such that the second query is obtained and the search result is provided according to the second query. Thus, it is not needed for the user to input the feedback and the input operation of the user is further reduced.
An apparatus 800 is provided according to embodiments of the present disclosure. The apparatus 800 includes: one or more processors 810; a memory 820; and one or more programs stored in the memory 820 and executed by the one or more processors 810 to execute steps of: receiving a first query; obtaining an intention clarification guidance sentence according to the first query; receiving a feedback corresponding to the intention clarification guidance sentence and generating a second query according to the first query, the intention clarification guidance sentence and the feedback; and providing a search result according to the second query. Apparatus is accessible by a user performing the search. Apparatus 800 may be directly accessible, or remotely accessible through a user device remotely connected to apparatus 800 (e.g. via the internet) such that the query is received by apparatus 800 via the user device; the intention clarification guidance sentence is sent to the user device, and the feedback is received by apparatus 800 from the user device.
A non-transitory computer-readable storage medium is provided according to embodiments of the present disclosure. The non-transitory computer-readable storage medium includes one or more programs for executing steps of: receiving a first query; obtaining an intention clarification guidance sentence according to the first query; receiving a feedback corresponding to the intention clarification guidance sentence and generating a second query according to the first query, the intention clarification guidance sentence and the feedback; and providing a search result according to the second query.
Any procedure or method described in the flow charts or described in any other way herein may be understood to include one or more modules, portions or parts for storing executable codes that realize particular logic functions or procedures. Moreover, advantageous embodiments of the present disclosure includes other implementations in which the order of execution is different from that which is depicted or discussed, including executing functions in a substantially simultaneous manner or in an opposite order according to the related functions. This should be understood by those skilled in the art which embodiments of the present disclosure belong to.
The logic and/or step described in other manners herein or shown in the flow chart, for example, a particular sequence table of executable instructions for realizing the logical function, may be specifically achieved in any computer readable medium to be used by the instruction execution system, device or equipment (such as the system based on computers, the system including processors or other systems capable of obtaining the instruction from the instruction execution system, device and equipment and executing the instruction), or to be used in combination with the instruction execution system, device and equipment. As to the specification, “the computer readable medium” may be any device adaptive for including, storing, communicating, propagating or transferring programs to be used by or in combination with the instruction execution system, device or equipment. More specific examples of the computer readable medium include but are not limited to: an electronic connection (an electronic device) with one or more wires, a portable computer enclosure (a magnetic device), a random access memory (RAM), a read only memory (ROM), an erasable programmable read-only memory (EPROM or a flash memory), an optical fiber device and a portable compact disk read-only memory (CDROM). In addition, the computer readable medium may even be a paper or other appropriate medium capable of printing programs thereon, this is because, for example, the paper or other appropriate medium may be optically scanned and then edited, decrypted or processed with other appropriate methods when necessary to obtain the programs in a electric manner, and then the programs may be stored in the computer memories.
It is understood that each part of the present disclosure may be realized by the hardware, software, firmware or their combination. In the above embodiments, a plurality of steps or methods may be realized by the software or firmware stored in the memory and executed by the appropriate instruction execution system. For example, if it is realized by the hardware, likewise in another embodiment, the steps or methods may be realized by one or a combination of the following techniques known in the art: a discrete logic circuit having a logic gate circuit for realizing a logic function of a data signal, an application-specific integrated circuit having an appropriate combination logic gate circuit, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
Those skilled in the art shall understand that all or parts of the steps in the above exemplifying method of the present disclosure may be achieved by commanding the related hardware with programs. The programs may be stored in a computer readable storage medium, and the programs include one or a combination of the steps in the method embodiments of the present disclosure when run on a computer.
In addition, each function cell of the embodiments of the present disclosure may be integrated in a processing module, or these cells may be separate physical existence, or two or more cells are integrated in a processing module. The integrated module may be realized in a form of hardware or in a form of software function modules. When the integrated module is realized in a form of software function module and is sold or used as a standalone product, the integrated module may be stored in a computer readable storage medium.
The storage medium mentioned above may be read-only memories, magnetic disks or CD, etc.
Reference throughout this specification to “an embodiment,” “some embodiments,” “an example,” “a specific example,” or “some examples,” means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. The appearances of the phrases throughout this specification are not necessarily referring to the same embodiment or example of the present disclosure. Furthermore, the particular features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
Although explanatory embodiments have been shown and described, it would be appreciated by those skilled in the art that the above embodiments cannot be construed to limit the present disclosure, and changes, alternatives, and modifications can be made in the embodiments without departing from spirit, principles and scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201410228820.6 | May 2014 | CN | national |