Managing query systems for responding to queries based on attributes associated with a given query

Embodiments of the present invention relate to a method, system, and computer program product for query system management. In a method, a question that is to be processed by a group of query systems is received. A group of answers to the question are received from the group of query systems, wherein the group of answers comprise an answer to the question from each of the query systems associated with the group of query systems. An association relationship is determined between the question and a query system from the group of query systems, wherein the association relationship is determined based on user feedback to the answer that is provided by the query system, and wherein the association relationship includes an association between the query and the query system and is used for selecting the query system for answering the question and further questions that are determined to be similar.

BACKGROUND

The present invention generally relates to query systems. Specifically, the present invention relates to a computer-implemented method, system and computer program product for managing query systems based on machine learning.

With developments of machine learning technology, query systems are provided for answering various types of questions from users. For example, a user may ask information about the weather, map, food, and the like. Currently, query systems provided by different developers may answer questions in almost every field, therefore how to manage these query systems becomes a focus.

SUMMARY

According to one embodiment of the present invention, there is provided a computer-implemented method. In the method, a question that is to be processed by a group of query systems is received. A group of answers to the question are received from the group of query systems, wherein the group of answers comprise an answer to the question from each of the query systems associated with the group of query systems. An association relationship is determined between the question and a query system from the group of query systems, wherein the association relationship is determined based on user feedback to the answer that is provided by the query system, and wherein the association relationship includes an association between the query and the query system and is used for selecting the query system for answering the question and one or more further questions that are determined to be similar the question. With these embodiments, the user's feedback to answers from multiple query systems may be used as a ground for selecting a query system from the group of query systems. Therefore, the user's requirement may be satisfied in a more effective and accurate way.

According to another embodiment of the present invention, there is provided a computer-implemented system. The computer-implemented system comprises one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage devices, and program instructions stored on at least one of the one or more computer-readable tangible storage devices for execution by at least one of the one or more processors via at least one of the one or more computer-readable memories, wherein the computer system is capable of performing the above method.

According to another embodiment of the present invention, there is provided a computer program product. The computer program product comprises one or more computer-readable storage devices and program instructions stored on at least one of the one or more computer-readable storage devices, the program instructions executable by a processor, the program instructions comprising instructions to perform the above method.

It is to be understood that the summary is not intended to identify key or essential features of embodiments of the present invention, nor is it intended to be used to limit the scope of the present embodiment. Other features of the present embodiment will become easily comprehensible through the description below.

DETAILED DESCRIPTION

Characteristics are as follows:

Service Models are as follows:

Deployment Models are as follows;

It should be noted that the processing of query system management96according to embodiments of this invention could be implemented by computer system/server12ofFIG.1Hereinafter, reference will be made toFIG.4toFIG.10to describe details of the query system management96.

Nowadays, various types of query systems may be designed for answering questions from users. For example, a voice assistant application installed in a mobile device may help a user to find a path to reach a destination, obtain restaurant or weather information, and the like Multiple query systems may be installed in the mobile device, and hereinafter reference will be made toFIG.4for more details.FIG.4depicts an example diagram of an environment400in which an embodiment of the present invention may be implemented. There may be a group of query systems, for example, a first query system410, a second query system420, . . . , and query system N430.

In one solution, a user440may submit a question to each of the group of query systems so as to obtain a desired answer. The group of query systems may comprise different knowledge databases in which the question may be searched. Depending on contents of the databases, answers from different query systems may be different. For example, if the user440wants to know a recommended restaurant, the first query system410may return a restaurant A1, and the second query system420may return a different restaurant A2. In this solution, the user440has to submit his/her question to multiple query systems and receives multiple answers, which will cause the user to perform complex operations.

In view of the above, embodiments of the present invention provide an effective solution for managing query systems. In embodiments of the present invention, a query system management96may be provided for managing a group of query systems. The query system management96may act as an interface between the user440and the group of query systems410,420, . . . , and430. The user440may submit his/her question to the query system management96, and then the query system management96may obtain answers from the group of query systems and send them back to the user440. Specifically, an association relationship may be provided for selecting a query system for answering the question. Hereinafter, reference will be made toFIG.5to provide a general description of embodiments of the present invention.

FIG.5depicts an example diagram500for managing the query systems according to an embodiment of the present invention. InFIG.5, the query system management96may be connected to the first query system410, the second query system420, . . . , and the query system N430, here an association relationship520is provided for managing the query systems. AlthoughFIG.5depicts that the association relationship520is comprised in the query system management96, in another embodiment of the present invention, the association relationship520may be provided in another position and connected to the query system management96. Further, althoughFIG.5illustrates more than three query systems, the group of query systems may include less query systems, for example, the group may include only the first query system410and the second query system420. Here, the association relationship520may represent an association between a question and a query system from the group of query systems. For example, the association may indicate a preference in selecting a query system from the first query system410and the second query system420for answering a question.

The user440may submit a question530to the query system management96, and then the query system management96may direct the question530to the group of query systems. Further, the query system management96may obtain answers from the group of query systems. For example, a first answer532obtained from the first query system410and a second answer534obtained from the second query system420may be provided to the user440. The user440may provide a feedback536to the first answer532and the second answer534. At this point, the association relationship520may be determined based on the feedback536.

In embodiments of the present invention, the association relationship520may be implemented based on machine learning technique. During operations of the query system management96, the association relationship520may be trained based on questions and feedbacks to answers from the group of query systems. For example, if the user440always gives positive feedbacks (for example, the user440agrees with the restaurant provided by the first query system410) to answers from the first query system410, then the association relationship520may be determined towards a trend that further similar questions should also be directed to the first query system410. If the user440always gives negative feedbacks (for example, the user440says “I don't like the restaurant.”) to answers from the second query system420, then the association relationship520may be determined towards a trend that further similar questions should not be directed to the second query system420.

With these embodiments, history feedbacks from the user440may be used in updating the association relationship520. As the feedbacks from the user440are provided after the user's careful consideration, the determined association relationship520may reflect the user's preference and experience. Therefore, the association relationship520may be used in selecting a further query system for answering a further question. It is to be understood that the term “feedback” may be interpreted in a broad way. For example, the feedback may be comments of the user440to the answers. In another example, the feedback may be obtained from another application such as a navigation program for finding ways to go to the restaurant. In still another example, the feedback may be payment information showing that the user has paid in the restaurant.

The query system management96may be implemented by a method and reference will be made toFIG.6for details of the method.FIG.6depicts an example flowchart of a method600for managing query systems according to an embodiment of the present invention. At a block610, the question530may be received from the user440, here the question530is to be queried in the group of query systems comprising at least the first query system410and the second query system420. Compared with the solution where the user440to submit the question530to the group of query system one by one, in the embodiments, the user440may submit the question530only once, and then the question530may be directed to multiple query systems for retrieving respective answers.

At a block620, a group of answers may be obtained from the group of query systems, respectively. For example, the first answer532to the question530may be obtained from the first query system410and the second answer534to the question530may be obtained from the second query system420, respectively. At a block630, the association relationship520may be determined based on the feedback536from the user440to an answer of the first answer532and the second answer534. The association relationship520here may include a preference in selecting a query system from the first query system410and the second query system420for answering the question Initially, the association relationship520may be set to default scores such as 0 or other relative low values, and then the association relationship520may be updated based on the user's feedbacks.

According to one embodiment of the present invention, the association relationship520may comprise an association between an attribute of a question and a query system of the first query system410and the second query system420. Here, the attribute may comprise one or more of a field of the question, a location associated with the question, time associated with the question and the like. Further, the attribute may comprise profile information of the user440. The field indicates a domain to which the question belongs. For example, for a question of “Can you tell me a nice restaurant in Beijing?” the field and the location may be determined as “Food” and “Beijing,” respectively. In another example, for a question of “The weather tomorrow in New York?” the field, the location and the time may be determined as “Weather.” “New York,” and “tomorrow,” respectively.

For the purpose of description, the field will be taken as an example of the attribute of the question for providing more details of the embodiments of the present invention. According to one embodiment of the present invention, the field of the question530may be obtained based on a semantic analysis of the question530. The question530may be inputted by the user440via text input, voice input or another input method. The text may be extracted from the question530for the semantic analysis. For example, one example question may be “Can you tell me a nice restaurant nearby?” Through the sematic analysis, a key word such as “restaurant” may be extracted and then “food” may be identified as the field. Further, for questions such as “What's the weather for tomorrow?” and “I want to go to the summer palace.” Key words of “weather” and “the summer palace” may be extracted and then the field of the question may be determined as “weather” and “map,” respectively. It is to be understood that this paragraph only provides example fields for the question, in other embodiments, the fields may be classified in a different manner.

According to embodiments of the present invention, the association between the field of the question and the query system may be represented in various manners. For example, a score may be set for indicating the association. Table 1 illustrates an example data structure that may be used for representing the association relationship520.

In Table 1, the first column indicates a serial number of the association, the second column indicates a field of the question, the third column indicates an identification of the query system, and the fourth column indicates a score between the field indicated in the second column and the query system indicated in the third column. Taking the first entry in Table 1 as an example, the score between the association of “Map” and “First Query System” is 90, which represents that the user like answers provided by the first query system410when the question relates to the map. For the second entry, the score between the association of “Food” and “First Query System” is 10, which represents that the user dislike answers provided by the first query system410when the question relates to the food Initially, a value of the score in each entry may be set for example to 0 or another small value. After several iterations of updating, values of the score may change. It is to be understood that the above Table 1 is only an example including nonzero scores, in another example, zero scores may be included in Table 1.

According to one embodiment of the present invention, the association relationship520may include more information other than the field of the question. For example, the location of the user440may be included for providing more detailed information about the user440. At this point, the association relationship520may be represented by the following Table 2, such that requirements from the user440may be described with more detailed information According to one embodiment of the present invention, the association relationship520may further include but not limited to the location associated with the question, and the like In another example, the attribute may also comprise a location of the user.

According to one embodiment of the present invention, a satisfaction level of the user440may be determined from the feedback, here the satisfaction level may reflect a degree to which the user440is satisfied with the answer, Various data structures may be used for representing the satisfaction level. For example, integers between −3 and +3 may be used A positive integer represents that the user is satisfied with the answer, while a negative integer represents that the user is not satisfied with the answer. The greater the integer is, the more satisfied the user is. In other embodiments of the present invention, the satisfaction level may be represented with another format.

Further, the association in the association relationship may be updated based on the determined satisfaction level, the association is between the attribute of the question and a query system from which the answer is provided. Reference will be made toFIG.7for more details where the field is taken as an example of the attribute.FIG.7depicts an example diagram700of updating an association relationship between a field of a question and a query system according to an embodiment of the present invention. InFIG.7, an interface710illustrates an interaction between the user440and the query system management96. The user440may ask a question720“can you tell me a nice restaurant nearby?” The query system management96may direct the question720to the first query system410, the second query system420, . . . , and the query system N430. Then, a message722including three restaurants A1, A2 and A3 may be provided to the user440. Here, the restaurant A1 is returned from the first query system410, the restaurant A2 is returned from the second query system420, and the restaurant A3 is returned from the query system N430.

The user440may provide a feedback724and says “A2 is good to me Thanks.” At this point, the feedback724may be analyzed based on semantic meaning of the feedback to determine the satisfaction level. For example, as the word “good” shows that the user440agrees with the restaurant A2, therefore the satisfaction level may be determined as for example “1.” According to one embodiment of the present invention, the association may be increased if the satisfaction level is positive. InFIG.7, a reference number730represents an example association relationship including multiple association entries between fields and systems. For the sake of simplicity, the term “query system” is abbreviated as system in the drawings, and thus the first query system410is abbreviated as first system inFIG.7.

As the question720belongs to the field of “food” and the restaurant A2 is recommended by the second query system420, the association may be found as shown by an arrow740. Then, the score732may be updated based on the satisfaction level “1.” Various methods may be used for determining an updating step, in one embodiment of the present invention, the updating step may be set based on the satisfaction level, and thus the score will be updated to 80+1=81.

FIG.8depicts an example diagram800of updating an association relationship between a field of a question and a query system according to an embodiment of the present invention. InFIG.8, an interface810between the user440and the query system management96which is similar to the interface710inFIG.7. InFIG.8, the user440provides another feedback820to the message722. The feedback820recites “I prefer A2. Tell me how to go there” It may be determined that the sentence “Tell me how to go there” shows that the user440really agrees with the restaurant A2 and wants to go Therefore, the satisfaction level may be set to a greater value such as “2.” As the question720belongs to the field of “food” and the restaurant A2 is recommended by the second query system420, the association may be found as shown by an arrow840. The score832may be updated based on the satisfaction level “2,” and thus the score will be updated to 80+2=82.

According to one embodiment of the present invention, the association may be decreased if the satisfaction level is negative, and reference will be made toFIG.9for further details.FIG.9depicts an example diagram900of updating an association relationship between a field of a question and a query system according to an embodiment of the present invention. InFIG.9, an interface910between the user440and the query system management96which is similar to the interface710inFIG.7. InFIG.9, the user440provides another feedback920to the message722. The feedback920recites “I don't like A1.” It may be determined that the user440is not satisfied with the answer provided from the first query system410, and thus the satisfaction level may be set to a negative value such as “−1.” As shown by an arrow940, the association may be found and the score932may be updated to 10−1=9.

With the above embodiments, the association relationship may be updated in an easy and convenient manner. Further, as the association relationship is trained based on the degree of the user's satisfaction to the answers according to historical information, the trained association relationship may accurately reflect the association between an attribute and a query system. Further, the query system having a higher association with an attribute of the question may be selected for providing an answer.

According to one embodiment of the present invention, the method600may be implemented iteratively, such that the association relationship520may be fully trained to reflect users' historical experiences. For example, a further question that is to be queried in the group of query systems may be received from the user440or from another user. If it is desired to obtain the user's own preference, then the association relationship520may be trained by historical experiences from the user440, so as to obtain a fully customized association relationship520. In another example, historical experiences from multiple users may be used for the training.

Then, how to direct a future, or further, question may be determined based on the updated association relationship. According to one embodiment of the present invention, a threshold may be determined for indicating whether the association relationship520includes well trained association(s). Depending on the range of the score, the threshold may be set to a higher value for judging whether an association is well trained. If the range of the score is [0, 100], then the threshold may be set to 90 or another greater value. When a further question is received, an attribute of the further question may be determined first, and then association relationship520may be searched for scores related to the field. If all the scores related to the field is below the threshold, it indicates that none of the associations is well trained. If a score related to the field is above the threshold, it indicates that an association related to the score is well trained.

Referring back toFIG.7, if the further question relates to the field of “Food” and all the scores related to “Food” are below the threshold of “90,” then the further question may be directed to multiple query systems. At this point, the further question may be directed to all of or a portion of the group of query systems. In one example, the further question may be directed to the first query system410and the second query system420. In another example, the further question may be directed to the first query system410, the second query system420, . . . , and the query system N430. In still another example, the further question may be directed to query systems having scores close to threshold.

In the above example where the further question is directed to the first query system410and the second query system420, the answers from the first query system410and the second query system420may be sent to the user. Further, the user may provide a feedback to the answers, based on which the association relationship520will be updated With these embodiments of the present invention, the association relationship520may be updated towards a trend that further questions will be directed to a query system that previous user(s) gives a positive feedback.

In another situation, if the further question relates to the field of “Map” and a score related to “Map” is above the threshold of “90,” then the further question may be directed to a query system with the score. It is to be understood, the term “above” may be explained in a broader way, and it may include the situation of being greater than or equaling to. According to one embodiment of the present invention, a target query system may be selected from the group of query systems based on scores. If an association between the field of the further question and a query system is above the predetermined threshold, then the query system may be selected as the target query system. Referring toFIG.7again, in the association between “Map” and the first query system, the score is 90 which equals to the threshold, and thus the further question will be directed to only the first query system410. Next, an answer may be obtained from the first query system410and provided to the user for consideration.

Hereinafter, reference will be made toFIG.10for details for directing a questionFIG.10depicts an example flowchart of a method1000for directing a question to a query system according to an embodiment of the present invention. At a block1010, once a question is received, a field of the question may be determined. At a block1020, associations related to the determined field may be selected from the association relationship520, if scores of all the selected associations are below the threshold, then the method1000proceeds to a block1030, and the question may be directed to all query systems such as the first query system410and the second query system420. Next, a group of answers may be obtained from the multiple query systems at a block1032. At the block1020, if a score of an association related to the determined field is above the threshold, then the method1000proceeds to a block1040, where the question is directed to only one query system with a higher association. At a block1042, an answer may be obtained from the query system and then sent back to the user.

Usually, scores in the association relationship520may reach the threshold at different time points, sometimes they reach the threshold at the same time In a situation where the first query system410and the second query system420reach the threshold at the same time for a question related to “Food,” one query system may be selected randomly for answering the question. Alternatively, the question may be directed to both of the two query systems until the score of one query system is updated to a score higher than that of the other.

In embodiments of the present invention, Reinforcement Learning (RL) may be adopted to learn the preference of the user. Further, for the sake of simplicity, details of the Reinforcement Learning will be omitted, and the following paragraphs will present a general principle for the training Specifically, the training procedure may be based on a formula as below
Q′[s,α]=(1−α)·Q[s,α]+α(r+λ·G[s,α])  Formula 1

In the above formula, Q′ donates a dataset that is obtained in an iteration during the training, where Q′ is associated with s and α. Here, s donates a field of the question, such as the fields of Food, Map, Weather, and the like. It is to be understood that the above fields are just examples, and the field may include more or less categories in another embodiment. Further, α donates an identification of the query system, such as the first query system410, the second query system420, . . . , and the query system N430. Q donates a dataset that is obtained in a previous iteration during the training, where Q is also associated with s and α.

In Formula 1, α donates the learning rate for representing how quickly the dataset Q will be updated, r donates a reward such as the increasing operation and the decreasing operation described with reference toFIGS.7to9in the training. G donates a dataset obtained from the history experiences of other users, and λ is a parameter for adjusting the importance of the impact of G. For example, if λ is set to 0, then historical experiences from other users will not be considered, and the association relationship520will be trained based on historical experiences of the user440. It is to be understood that the above Formula 1 is just an example formula that may be used in the training In other embodiments of the present invention, other formula may be used in training the association relationship520.

Although the above paragraphs provide detailed implementation by taking the field as an example of the attribute, the attribute may comprise, but not limited to, a field of the question, a location associated with the question, time associated with the question, a profile of the user, and the like. For example, the attribute may comprise both the field and the location, and thus the attribute may be represented by a two-tuples of (field, location).