Electronic apparatus and control method thereof
An electronic apparatus includes a memory, and a processor connected to the memory and configured to control the electronic apparatus, where the processor is configured to identify a plurality of counseling end histories among a plurality of counseling histories stored in the memory, each of the plurality of counselling end histories indicating that a counselling has failed to answer a user query, based on a ratio of the plurality of counseling end histories to the plurality of counseling histories being equal to or greater than a threshold ratio, identify a first user query based on the plurality of counseling end histories, and based on a number of second user queries having a similarity to the identified first user query being equal to or greater than a first threshold number, acquire an answer to the first user query.
1 . An electronic apparatus comprising:
a memory;
a microphone; and
a processor connected to the memory and configured to control the electronic apparatus,
wherein the processor is further configured to:
identify a plurality of counseling end histories among a plurality of counseling histories stored in the memory, each of the plurality of counseling end histories indicating that a counseling has failed to answer a user query;
based on a ratio of the plurality of counseling end histories to the plurality of counseling histories being equal to or greater than a threshold ratio, identify a first user query based on the plurality of counseling end histories;
based on a number of second user queries having a similarity to the identified first user query being equal to or greater than a first threshold number, acquire an answer to the first user query by searching in the plurality of counseling histories for a keyword included in the first user query;
acquire a dialogue-type scenario with respect to the first user query based on the acquired answer to the first user query;
store the acquired dialogue-type scenario in the memory;
receive a third user query having a similarity to the first user query equal to or greater than a threshold value through the microphone; and
perform a counseling including the third user query based on the acquired dialogue-type scenario.
2 . The apparatus of claim 1 , wherein the processor is further configured to:
identify a plurality of counseling histories for a predetermined previous time period among the plurality of counseling histories stored in the memory and a plurality of counseling end histories for the predetermined previous time period, and
identify whether a ratio of the plurality of counseling end histories identified for the predetermined previous time period to the plurality of counseling histories identified for the predetermined previous time period are equal to or greater than the threshold ratio.
3 . The apparatus of claim 1 , wherein the processor is further configured to:
identify a plurality of keywords in user queries included in the plurality of counseling end histories,
identify a predetermined number of keywords based on a number of each of the plurality of keywords, and
based on the number of each of the identified keywords being equal to or greater than a second threshold number, identify, as the first user query, a user query included in a history including a most identified keywords among the plurality of counseling end histories.
4 . The apparatus of claim 1 , wherein the processor is further configured to acquire the answer by further searching for the keyword included in the first user query in at least one of a counseling manual and an external search engine.
5 . The apparatus of claim 4 , wherein the processor is further configured to:
based on the keyword included in the first user query being not searched in the counseling manual, additionally identify a keyword in a counseling end history including the first user query, and
acquire the answer by searching for the additionally identified keyword in the counseling manual.
6 . The apparatus of claim 4 , wherein the processor is further configured to, based on counseling histories including the keyword included in the first user query being searched among the plurality of counseling histories, acquire the answer based on a relatively short counseling history among the searched counseling histories.
7 . The apparatus of claim 4 , wherein the processor is further configured to:
acquire the answer by searching for the keyword included in the first user query in the counseling manual,
based on the keyword included in the first user query being not searched in the counseling manual, acquire the answer by searching for the keyword included in the first user query in the plurality of counseling histories, and
based on the keyword included in the first user query being not searched in the plurality of counseling histories, acquire the answer by searching for the keyword included in the first user query from the external search engine.
8 . The apparatus of claim 1 , wherein the processor is further configured to update the answer by removing unnecessary sentences or contents from the answer or by summarizing sentences or contents included in the answer.
9 . A method for controlling an electronic apparatus, the method comprising:
identifying a plurality of counseling end histories among a plurality of counseling histories, each of the plurality of counseling end histories indicating that a counseling has failed to answer a user query;
based on a ratio of the plurality of counseling end histories to the plurality of counseling histories being equal to or greater than a threshold ratio, identifying a first user query based on the plurality of counseling end histories;
based on a number of second user queries having a similarity to the identified first user query being equal to or greater than a first threshold number, acquiring an answer to the first user query by searching in the plurality of counseling histories for a keyword included in the first user query;
acquiring a dialogue-type scenario with respect to the first user query based on the acquired answer to the first user query;
storing the acquired dialogue-type scenario;
receiving a third user query having a similarity to the first user query equal to or greater than a threshold value through a microphone included in the electronic apparatus; and
performing a counseling including the third user query based on the acquired dialogue-type scenario.
10 . The method of claim 9 , wherein the identifying of the plurality of counseling end histories comprises identifying a plurality of counseling histories for a predetermined previous time period among the plurality of counseling histories and a plurality of counseling end histories for the predetermined previous time period, and
wherein the identifying of the first user query comprises identifying whether a ratio of the plurality of counseling end histories identified for the predetermined previous time period to the plurality of counseling histories identified for the predetermined previous time period are equal to or greater than the threshold ratio.
11 . The method of claim 9 , wherein the identifying of the first user query comprises:
identifying a plurality of keywords in user queries included in the plurality of counseling end histories;
identifying a predetermined number of keywords based on a number of each of the plurality of keywords; and
based on the number of each of the identified keywords being equal to or greater than a second threshold number, identifying, as the first user query, a user query included in a history including a most identified keywords among the plurality of counseling end histories.
12 . The method of claim 9 , wherein the acquiring of the answer to the first user query comprises acquiring the answer by further searching for the keyword included in the first user query in at least one of a counseling manual, and an external search engine.
13 . The method of claim 12 , wherein the acquiring of the answer to the first user query comprises:
based on the keyword included in the first user query being not searched in the counseling manual, additionally identifying a keyword in a counseling end history including the first user query, and
acquiring the answer by searching for the additionally identified keyword in the counseling manual.
14 . The method of claim 12 , wherein based on counseling histories including the keyword included in the first user query being searched among the plurality of counseling histories, the answer is acquired based on a relatively short counseling history among the searched counseling histories.
15 . The method of claim 12 , wherein the acquiring of the answer by searching for the keyword included in the first user query comprises:
acquiring the answer by searching for the keyword included in the first user query in the counseling manual,
based on the keyword included in the first user query being not searched in the counseling manual, acquiring the answer by searching for the keyword included in the first user query in the plurality of counseling histories, and
based on the keyword included in the first user query being not searched in the plurality of counseling histories, acquiring the answer by searching for the keyword included in the first user query from the external search engine.
16 . A non-transitory computer-readable recording medium having recorded thereon a program for executing the method of claim 9 .