KR102051890B1 - Method for Responding Based on Chat-Bot - Google Patents

Method for Responding Based on Chat-Bot Download PDF

Info

Publication number
KR102051890B1
KR102051890B1 KR1020180062421A KR20180062421A KR102051890B1 KR 102051890 B1 KR102051890 B1 KR 102051890B1 KR 1020180062421 A KR1020180062421 A KR 1020180062421A KR 20180062421 A KR20180062421 A KR 20180062421A KR 102051890 B1 KR102051890 B1 KR 102051890B1
Authority
KR
South Korea
Prior art keywords
response
query
processing engine
api
chatbot
Prior art date
Application number
KR1020180062421A
Other languages
Korean (ko)
Inventor
김형락
김대한
이동규
Original Assignee
주식회사 빅트리
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 빅트리 filed Critical 주식회사 빅트리
Priority to KR1020180062421A priority Critical patent/KR102051890B1/en
Application granted granted Critical
Publication of KR102051890B1 publication Critical patent/KR102051890B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F17/2755
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/02User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail using automatic reactions or user delegation, e.g. automatic replies or chatbot-generated messages

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a chatbot-based response method, capable of performing a response with significantly increased accuracy, which comprises: a first step of receiving query information; a second step of evaluating the received query information; a third step of transmitting a response to a query to a web application server; a fourth step of transmitting a received API response to a service framework; a fifth step of performing morpheme analysis; a sixth step of generating a response element for a corresponding verb; a seventh step of outputting a reverse query; an eighth step of receiving response information on the reverse query; a ninth step of transmitting information required for a response; and a tenth step of transmitting the received API response to the service framework.

Description

챗봇 기반 응답 방법{Method for Responding Based on Chat-Bot}Chatbot-based response method {Method for Responding Based on Chat-Bot}

본 발명은 챗봇 기반 응답 방법에 대한 것으로서, 좀 더 구체적으로는 역질의를 통한 양방향 대화를 통해서 보다 더 정확한 응답을 할 수 있도록 하는 챗봇 기반 응답 방법에 대한 것이다.The present invention relates to a chatbot-based response method, and more particularly, to a chatbot-based response method that enables a more accurate response through a two-way conversation through an inverse query.

챗봇 시스템은 Amazon Lex, Dialogflow, Clova 등과 같은 자연어 처리 엔진(NLP 엔진)을 이용하여 구축할 수 있다.Chatbot systems can be built using natural language processing engines (NLP engines) such as Amazon Lex, Dialogflow, and Clova.

자연어 처리 엔진을 이용하여 구축하는 방식은, 자연어 처리 엔진이 사용자(질의자)의 음성 또는 텍스트 질의를 수신하고, 그 질의에 매칭되도록 지정되어 있는 응답을 하는 방식을 취한다. 그런데 그와 같은 방식에 따르면, 각각의 질의에 대해 매칭되는 응답을 일일이 지정하는 하드 코딩(hard coding) 작업이 수행되어야 하며, 미리 정의된 질의가 아닌 경우에는 적절한 응답을 할 수 없는 한계가 있다.The method of building using the natural language processing engine takes a manner in which the natural language processing engine receives a user's (questioner's) voice or text query and makes a response designated to match the query. However, according to such a method, a hard coding operation for specifying a matching response for each query must be performed, and there is a limit in that a proper response cannot be made when the query is not a predefined query.

본 발명은, 자연어 처리 엔진을 이용한 챗봇 기반 응답 방법을 제공하되, 역질의를 통한 양방향 대화를 통해서 현저하게 정확도가 높아진 응답을 할 수 있는 챗봇 기반 응답 방법을 제공하는 것을 목적으로 한다.An object of the present invention is to provide a chatbot-based response method using a natural language processing engine, and to provide a chatbot-based response method capable of responding with a significantly higher accuracy through a two-way conversation through an inverse query.

본 발명에 의한 챗봇 기반 응답 방법은, 응답 처리 엔진과, 웹 어플리케이션 서버와, 서비스 프레임워크를 포함하는 환경에서 수행되며, 응답 처리 엔진이, 질의 정보를 수신하는 제1 단계와; 응답 처리 엔진이, 제1 단계에서 수신한 질의 정보를 평가하는 제2 단계와; 제2 단계에서 소정의 기준에 도달한 것으로 평가되면, 응답 처리 엔진이 질의에 대한 응답을 데이터베이스에서 추출하여 웹 어플리케이션 서버로 전송하는 제3 단계와; 응답 처리 엔진이, 웹 어플리케이션 서버로부터 수신한 API 응답을 서비스 프레임워크로 전송하는 제4 단계와; 제2 단계에서 소정의 기준에 도달하지 못한 것으로 평가되면, 응답 처리 엔진이 질의 정보에 대해서 형태소 분석을 수행하는 제5 단계와; 응답 처리 엔진이, 제5 단계의 형태소 분석에 의해 추출된 명사에 대해서는 계층화를 수행하고, 제5 단계의 형태소 분석에 의해 추출된 동사에 대해서는 해당 동사에 대한 응답 요소를 생성하는 제6 단계와; 응답 처리 엔진이, 제6 단계에서 명사의 계층화에 기초하여 역질의를 생성하고 역질의를 출력하는 제7 단계와; 응답 처리 엔진이, 제7 단계의 역질의에 대한 응답 정보를 수신하고, 응답 정보에 기초하여 제6 단계의 응답 요소와 결합하여 응답을 생성하는 제8 단계와; 응답 처리 엔진이, 질의 정보와 제8 단계에서 생성된 응답을 데이터베이스에 저장하고 웹 어플리케이션 서버로 응답에 필요한 정보를 전송하는 제9 단계와; 응답 처리 엔진이, 웹 어플리케이션 서버로부터 수신한 API 응답을 서비스 프레임워크로 전송하는 제10 단계를 포함한다.The chatbot-based response method according to the present invention may be performed in an environment including a response processing engine, a web application server, and a service framework, the response processing engine comprising: a first step of receiving query information; A second step of the response processing engine evaluating the query information received in the first step; A third step of, if it is determined that the predetermined criterion is reached in the second step, the response processing engine extracts a response to the query from the database and transmits the response to the web application server; A fourth step of, by the response processing engine, transmitting the API response received from the web application server to the service framework; A fifth step of, if it is determined that the predetermined criterion is not reached in the second step, the response processing engine performing morphological analysis on the query information; A sixth step of the response processing engine performing hierarchization on the nouns extracted by the morphological analysis of the fifth step, and generating a response element for the verbs on the verb extracted by the morphological analysis of the fifth step; A seventh step in which the response processing engine generates the inverse query and outputs the inverse query based on the hierarchical nouns in the sixth step; An eighth step of receiving, by the response processing engine, response information for the inverse query of the seventh step, and generating a response by combining with the response element of the sixth step based on the response information; A ninth step of the response processing engine storing the query information and the response generated in the eighth step in a database and transmitting information necessary for the response to the web application server; The response processing engine may include a tenth step of transmitting the API response received from the web application server to the service framework.

제9 단계는, 제8 단계에서 생성된 응답이 데이터베이스에 저장된 기존 응답들과 확률적으로 구조가 유사한지를 판단하는 제9-1 단계와; 응답을 항목별로 클러스터링하는 제9-2 단계를 더 포함할 수 있다.The ninth step may include: a 9-1 step of determining whether the response generated in the eighth step is similar in structure to the existing responses stored in the database; The method may further include a step 9-2 of clustering the responses by items.

제2 단계는, 질의 정보를 파싱하는 제2-1 단계와; 제2-1 단계에서 파싱되어 추출된 의미 형태소 중에서 단일 의미를 가지는 의미 형태소의 비율을 수치화하는 제2-2 단계를 포함할 수 있다.The second step includes: 2-1 parsing query information; Step 2-1 may include a step 2-2 of digitizing the ratio of the semantic morpheme having a single meaning among the semantic morphemes parsed and extracted in the step 2-1.

제3 단계는, 응답 처리 엔진이 의미 형태소만 포함하도록 변형된 변형 질의에 대한 응답을 데이터베이스에서 추출하여 웹 어플리케이션 서버로 전송하는 단계일 수 있다.The third step may be a step in which the response processing engine extracts a response to the modified query modified to include only semantic morphemes from the database and transmits the response to the web application server.

웹 어플리케이션 서버는 웹 API 모듈과, API 챗봇 브리지 모듈을 포함할 수 있고, 제3 단계의 응답은 API 챗봇 브리지 모듈이 수신하며, 제4 단계의 API 응답은, API 챗봇 브리지 모듈이 웹 API 모듈과 통신하여 응답에 미리 매칭되어 있는 API 함수를 호출하여 그 결과값이 응답에 포함된 정보가 될 수 있다.The web application server may include a web API module and an API chatbot bridge module, the response of the third stage is received by the API chatbot bridge module, and the API response of the fourth stage is that the API chatbot bridge module is connected to the web API module. By communicating, the API function, which is previously matched to the response, can be called, and the result value can be information included in the response.

본 발명에 따르면, 역질의를 통한 양방향 대화에 의해서 응답의 정확도를 현저하게 높일 수 있고, API 챗봇 브리지 모듈이 각각의 API 함수와 실제 응답을 자동으로 매칭할 수 있으므로 종래의 자연어 처리 엔진을 이용함으로써 개발 비용을 저감시키면서도 특정 분야에 특화된 자체 챗봇 응답 시스템을 구축할 수 있는 작용효과가 제공된다.According to the present invention, the accuracy of the response can be significantly increased by two-way conversation through inverse query, and the API chatbot bridge module can automatically match each API function and the actual response, thereby using a conventional natural language processing engine. While reducing development costs, the benefits of building your own chatbot response system specific to a specific area are provided.

도 1은 본 발명에 의한 챗봇 기반 응답 방법이 수행되는 환경을 도시한 블록도.
도 2는 본 발명에 의한 응답을 위해 API 답변을 생성하는 웹 어플리케이션 서버의 블록도.
도 3는 본 발명에 의한 챗봇 기반 응답 방법의 흐름도.
1 is a block diagram illustrating an environment in which a chatbot-based response method according to the present invention is performed.
Figure 2 is a block diagram of a web application server for generating an API answer for a response according to the present invention.
3 is a flowchart of a chatbot based response method according to the present invention;

본 명세서에서 수행되는 정보(데이터) 전송/수신 과정은 필요에 따라서 암호화/복호화가 적용될 수 있으며, 본 명세서 및 특허청구범위에서 정보(데이터) 전송 과정을 설명하는 표현은 별도로 언급되지 않더라도 모두 암호화/복호화하는 경우도 포함하는 것으로 해석되어야 한다. 본 명세서에서 "A로부터 B로 전송(전달)" 또는 "A가 B로부터 수신"과 같은 형태의 표현은 중간에 다른 매개체가 포함되어 전송(전달) 또는 수신되는 것도 포함하며, A로부터 B까지 직접 전송(전달) 또는 수신되는 것 만을 표현하는 것은 아니다. 본 발명의 설명에 있어서 각 단계의 순서는 선행 단계가 논리적 및 시간적으로 반드시 후행 단계에 앞서서 수행되어야 하는 경우가 아니라면 각 단계의 순서는 비제한적으로 이해되어야 한다. 즉 위와 같은 예외적인 경우를 제외하고는 후행 단계로 설명된 과정이 선행 단계로 설명된 과정보다 앞서서 수행되더라도 발명의 본질에는 영향이 없으며 권리범위 역시 단계의 순서에 관계없이 정의되어야 한다. 그리고 본 명세서에서 “A 또는 B”은 A와 B 중 어느 하나를 선택적으로 가리키는 것뿐만 아니라 A와 B 모두를 포함하는 것도 의미하는 것으로 정의된다. 또한, 본 명세서에서 "포함"이라는 용어는 포함하는 것으로 나열된 요소 이외에 추가로 다른 구성요소를 더 포함하는 것도 포괄하는 의미를 가진다.Encryption / decryption may be applied to the information (data) transmission / reception process performed in this specification as necessary, and the expressions describing the information (data) transmission process in the specification and claims are all encrypted / It should be interpreted as including the case of decoding. In this specification, expressions of the form "transfer from A to B (transfer)" or "A receives from B" include those that are transmitted (transmitted) or received with other mediators in between, and directly from A to B. It does not represent only what is transmitted (delivered) or received. In the description of the present invention, the order of each step is to be understood without limitation unless the preceding step is to be performed logically and temporally prior to the later step. In other words, except in the exceptional case described above, even if the process described in the following step is performed in advance of the process described in the preceding step, the nature of the invention is not affected, and the scope of rights should be defined regardless of the order of the steps. In this specification, “A or B” is defined to mean not only selectively indicating any one of A and B, but also including both A and B. In addition, the term "comprising" in this specification has the meaning encompassing further including other elements in addition to the elements listed as containing.

본 명세서에서 "엔진" 또는 "모듈"이라 함은 범용적인 하드웨어와 해당 엔진 또는 모듈 기능을 수행하는 소프트웨어의 논리적 결합을 의미한다. As used herein, the term "engine" or "module" refers to a logical combination of general-purpose hardware and software that performs a corresponding engine or module function.

본 명세서에서는 본 발명의 설명에 필요한 필수적인 구성요소만을 설명하며, 본 발명의 본질과 관계가 없는 구성요소는 언급하지 아니한다. 그리고 언급되는 구성요소만을 포함하는 배타적인 의미로 해석되어서는 아니되며 필수적이지 않은 특정 구성요소를 배제하거나 다른 구성요소도 포함할 수 있는 비배타적인 의미로 해석되어야 한다.In this specification, only essential components necessary for the description of the present invention are described, and components not related to the nature of the present invention are not mentioned. It should not be construed in an exclusive sense including only the components mentioned, but in a non-exclusive sense, which may exclude certain components that are not essential or may include other components.

도 1에는 본 발명에 의한 챗봇 기반 응답 방법이 수행되는 환경의 블록도가 도시되어 있다. 설명의 편의와 간소화를 위해 이하에서는 주로 질의가 음성으로 입력되고, 그 음성 질의가 자연어 처리 엔진(10)을 통해서 응답 처리 엔진(20)으로 전달되어 처리되는 과정에 대해서 설명하지만, 질의가 텍스트로 입력되는 경우 역시 본 발명의 범위에 포함된다는 점이 이해되어야 한다. 질의가 텍스트로 입력되는 경우에는 자연어 처리 엔진(10)을 거치지 않고 응답 처리 엔진(20)으로 입력될 수도 있다.1 is a block diagram of an environment in which a chatbot-based response method according to the present invention is performed. For convenience and simplicity of explanation, the following describes mainly a process in which a query is input by voice, and the voice query is transmitted to the response processing engine 20 through the natural language processing engine 10 for processing. It is to be understood that the input is also within the scope of the present invention. When the query is input as text, the query may be input to the response processing engine 20 without passing through the natural language processing engine 10.

본 발명이 수행되는 환경은, 자연어 처리 엔진(NLP 엔진; 10)과, 응답 처리 엔진(20)과, 서비스 프레임워크(30)를 포함한다. 응답 처리 엔진(20)은, 질의 평가 모듈(21)과, 응답 모듈(22)과, 형태소 분석 모듈(23)과, 응답 결정 모듈(24)을 포함한다.The environment in which the present invention is carried out includes a natural language processing engine (NLP engine) 10, a response processing engine 20, and a service framework 30. The response processing engine 20 includes a query evaluation module 21, a response module 22, a morphological analysis module 23, and a response determination module 24.

서비스 프레임워크(30)는, 사용자가 본 발명에 의한 챗봇 기반 응답을 이용할 때 사용하는 플랫폼 예를 들어, 카카오톡, 페이스북, 기타 웹 어플리케이션 서비스를 의미한다.The service framework 30 refers to a platform used by a user when using a chatbot-based response according to the present invention, for example, KakaoTalk, Facebook, and other web application services.

도 2에는 본 발명에 의한 챗봇 기반 응답을 위해 API 답변을 생성하는 웹 어플리케이션 서버(40)의 블록도가 도시되어 있다.2 is a block diagram of a web application server 40 for generating an API answer for a chatbot based response according to the present invention.

웹 어플리케이션 서버(40)는, 웹 API 모듈(50)과, API 챗봇 브리지 모듈(60)을 포함한다. API 챗봇 브리지 모듈(60)은, 응답 처리 모듈(20)로부터 답변에 필요한 정보를 수신하여 웹 API 모듈(50)에 대해 API 함수를 자동으로 호출하고, 그 결과를 받아서 API 답변을 생성한다.The web application server 40 includes a web API module 50 and an API chatbot bridge module 60. The API chatbot bridge module 60 receives information required for an answer from the response processing module 20 to automatically call an API function for the web API module 50, and receives the result to generate an API answer.

도 3의 흐름도를 참조하여 본 발명의 챗봇 기반 응답 방법에 대해서 설명한다.The chatbot-based response method of the present invention will be described with reference to the flowchart of FIG. 3.

먼저, 사용자가 질의를 하면 자연어 처리 엔진(10)이 이를 분석하여 텍스트 데이터로 변환한다. 응답 처리 모듈(20)의 질의 평가 모듈(21)은 그와 같은 텍스트 데이터를 자연어 처리 엔진(10)으로부터 질의 정보로서 수신한다(단계 300).First, when a user makes a query, the natural language processing engine 10 analyzes it and converts it into text data. The query evaluation module 21 of the response processing module 20 receives such text data from the natural language processing engine 10 as query information (step 300).

질의가 텍스트로 입력되는 경우에는 자연어 처리 엔진(10)을 거치지 않고 응답 처리 엔진(20)으로 입력될 수 있다.When the query is input as text, the query may be input to the response processing engine 20 without passing through the natural language processing engine 10.

질의 평가 모듈(21)은, 질의 정보를 평가한다(단계 305). 질의 정보 평가는 질의 정보를 파싱하고, 파싱된 질의 정보 중에서 의미 형태소를 구분한다. 본 명세서에서 "의미 형태소"는 형태소 중에서 응답에 영향을 미칠 수 있는 의미를 가지는 형태소를 의미한다. 명사와 동사는 의미 형태소에 포함된다.The query evaluation module 21 evaluates the query information (step 305). Query information evaluation parses query information and distinguishes semantic morphemes from the parsed query information. As used herein, "mean morpheme" means a morpheme that has a meaning that can affect the response among the morphemes. Nouns and verbs are included in meaning morphemes.

질의 정보 평가는, 질의에 포함된 의미 형태소 중에서, 단일 의미를 가지는 의미 형태소의 비율을 수치화하는 방식으로 수행될 수 있다. 단일 의미를 가진다는 것은 해당 의미 형태소의 의미로 응답하기에 충분한 것을 의미하며, 단일 의미를 가지지 않는 의미 형태소는, 해당 의미 형태소가 복수 개의 하위 개념으로 계층화가 될 수 있는 형태소를 가리킨다.The query information evaluation may be performed by quantifying the ratio of the semantic morphemes having a single meaning among semantic morphemes included in the query. Having a single meaning means that it is sufficient to respond with the meaning of the corresponding morpheme, and a morpheme that does not have a single meaning refers to a morpheme that can be layered into a plurality of subordinate concepts.

예를 들어 질의 정보가 "오늘의 삼성전자 주가가 얼마나 올랐어?"라고 할 때, 질의 평가 모듈(21)에 의해 파싱되어 추출된 형태소는 '오늘', '의', '삼성전자', '주가', '가', '얼마나', '올르', '았', '어', '?'가 된다.For example, when the query information is "How much has Samsung's stock price rise today?", The morphemes parsed and extracted by the query evaluation module 21 are 'today', 'of', 'samsung', 'stock prices'. ',' Ga ',' how much ',' ol ',' he ',' er ','? '.

이 중에서 의미 형태소는 '오늘', '삼성전자, '주가', '얼마나', '올랐어' 5개가 된다. 이 중에서 '주가'는 종가, 호가, 상한가, 하한가 등 하위 개념에 복수 개의 의미를 가지고 계층화가 가능한 형태소이며, 전술한 방식으로 질의를 평가하면 위 질의 정보는 4/5*100 = 80점으로 평가될 수 있다.Among them, the meaning morphemes are 'Today', 'Samsung Electronics', 'Stock Price', 'How Much' and 'Up'. Among these, 'share price' is a morpheme that can be stratified with a plurality of meanings in the lower concept such as closing price, quotation, upper limit, and lower limit. Can be.

질의 정보 평가 결과가 소정의 기준(예를 들어, 80점)에 도달한 것으로 평가되면(단계 310), 질의 정보를 응답 모듈(22)로 전송하여 데이터베이스에서 해당 질의에 대한 응답을 추출한다(단계 315). 본 발명에서는, 질의 정보의 평가가 소정의 기준에 도달한 경우라면 해당 질의에 대한 응답이 미리 데이터베이스에 기록되어 있다는 것을 전제한다.If the evaluation result of the query information is estimated to have reached a predetermined criterion (for example, 80 points) (step 310), the query information is transmitted to the response module 22 to extract a response to the query from the database (step). 315). In the present invention, if the evaluation of the query information reaches a predetermined criterion, it is assumed that the response to the query is previously recorded in the database.

응답 모듈(22)은 추출된 응답을 웹 어플리케이션 서버(40)의 API 챗봇 브리지 모듈(60)로 전송한다(단계 320). 응답을 수신한 API 챗봇 브리지 모듈(60)은, 웹 API 모듈(50)과 통신하여 자동으로 함수 이름, 입력매개변수(parameter), 그리고 출력값을 찾고 응답 리스트를 생성한 후에, 생성된 응답에 따른 API 함수를 호출한다.The response module 22 transmits the extracted response to the API chatbot bridge module 60 of the web application server 40 (step 320). After receiving the response, the API chatbot bridge module 60 communicates with the web API module 50 to automatically find the function name, input parameters, and output values, and generates a response list. Call an API function.

API 챗봇 브리지 모듈(60)은, 각각의 API 함수명과 실제 응답을 매칭해서 함수의 매개변수와 리턴값을 테스트하고 실제로 원하는 응답에 부합하는 것인지를 시험하는 프레임워크를 가진다. 테스트 결과는 설계자가 검토하고 응답과 API 함수를 매칭시킨다. 그렇게 매칭된 후에는, API 챗봇 브리지 모듈(60)이 응답 모듈(22)로부터 응답을 전달받으면 전술한 바와 같이 자동으로 API 함수를 호출하게 된다.The API chatbot bridge module 60 has a framework that matches each API function name with the actual response to test the parameters and return values of the function and whether it actually matches the desired response. The test results are reviewed by the designer and matched the response with the API function. After such a match, when the API chatbot bridge module 60 receives the response from the response module 22, it automatically calls the API function as described above.

API 함수 호출에 의해서 API 응답이 생성되면 응답 모듈(22)이 API 응답을 수신하고(단계 325), 이를 서비스 프레임워크(30)로 전달해서 사용자에게 출력하게 한다(단계 330). API 응답이라 함은 API 함수 호출에 의해 획득하는 정보가 응답에 포함되어야 하는 경우 그 정보를 포함한 응답을 의미한다. 예를 들어, "삼성전자 주식의 일주일간 변동율이 얼마야?"라는 질의에 대한 응답을 하기 위해서는 관련 API 함수 호출을 통해서 일주일간 변동율 데이터를 획득해야 하고 그렇게 획득한 정보가 응답에 포함되어야 하는데 그 응답을 "API 응답"으로 정의한다.When the API response is generated by the API function call, the response module 22 receives the API response (step 325), passes it to the service framework 30, and outputs it to the user (step 330). The API response means a response including the information when the information obtained by the API function call is to be included in the response. For example, in order to answer the question, "What is the weekly rate of change of Samsung's stock?", The rate of change data must be obtained by calling the relevant API function, and the information must be included in the response. Define the response as an "API response".

단계(310)에서 질의 정보 평가 결과가 소정의 기준에 도달하지 못한 것으로 판단되는 경우에는, 질의 정보를 형태소 분석 모듈(23)에 전달하여 형태소를 분석한다(단계 340). 이 형태소 분석에 의해서 질의 정보 중의 명사와 동사가 추출된다.If it is determined in step 310 that the query information evaluation result does not reach a predetermined criterion, the query information is transmitted to the morpheme analysis module 23 to analyze the morpheme (step 340). This morphological analysis extracts nouns and verbs from the query information.

추출된 동사에 대해서는 응답 요소를 해당 동사에 대응하는 응답(YES) 또는 해당 동사의 반대 응답(No)로 구분하여 생성한다(단계 360). 이 과정은 애매한 의미의 동사를 포함하는 질의에 대해서 학습하기 위한 것으로서 예를 들어, Siamese Machine Learning 을 사용한 학습을 적용할 수 있다.The extracted verb is generated by dividing the response element into a response corresponding to the verb (YES) or an opposite response of the verb (No) (step 360). This process is for learning queries containing ambiguous verbs. For example, we can apply learning using Siamese Machine Learning.

추출된 명사에 대해서는 계층화를 수행한다(단계 345). 계층화라함은 해당 명사의 하위 개념들을 분류하는 것을 의미한다. 예를 들어 "주가"이라는 명사가 추출되었다면, 시가와 종가라는 하위 개념으로 계층화를 할 수 있다.The extracted nouns are stratified (step 345). Hierarchical means to classify subordinate concepts of a noun. For example, if the noun "stock price" is extracted, it can be hierarchized by sub-concepts such as market price and closing price.

계층화 결과에 기초하여 응답 모듈이 역질의를 생성하고 이를 서비스 프레임워크(30)로 전달하여 사용자에게 출력한다(단계 350).Based on the layering result, the response module generates an inverse query and passes it to the service framework 30 to output to the user (step 350).

예를 들어, 질의 내용이 "삼성전자 주식의 일주일간 변동률은 얼마야?"일 때 역질의는 "삼성전자의 종가와 시가 중에 어떤 것을 알려 드릴까요?"라고 역질의할 수 있다.For example, when the query asks "What is the weekly rate of change in Samsung's stock?", The reverse query can ask, "Would you like to know whether Samsung's closing price or market price?"

역질의에 대해 사용자가 응답하면 그 응답 정보를 자연어 처리 엔진(10)을 통해서 수신하고(단계 355), 그 응답 정보는 단계(360)에서 생성된 동사의 응답 요소와 결합하여 응답을 생성한다(단계 365).When the user responds to the inverse query, the response information is received through the natural language processing engine 10 (step 355), and the response information is combined with the response element of the verb generated in step 360 to generate a response ( Step 365).

그렇게 생성된 응답은 질의 정보와 함께 응답 모듈(22)로 전달되어 데이터베이스에 저장된다(단계 370). 설명의 간소화를 위해, 본 명세서에서는 1번의 역질의를 통해서 질의 정보가 소정의 기준에 도달하는 경우로 가정한다. 1번의 역질의를 통해서도 단계(310)에서의 평가가 요구하는 소정의 기준에 도달하지 못하는 경우에는 추가적으로 더 많은 횟수의 역질의를 할 수 있다.The response so generated is passed along with the query information to the response module 22 and stored in the database (step 370). For simplicity of explanation, it is assumed herein that the query information reaches a predetermined criterion through one inverse query. If one evaluation does not reach a predetermined criterion required by the evaluation in step 310, an additional number of inverse queries may be performed.

응답 모듈(22)로 전달하기 전에, 입력된 질의 정보와 생성된 응답을 응답 결정 모듈(24)로 전달해서, 확률적으로 기존 응답과 구조가 유사한지 여부를 판단하고, 항목별로 클러스터링(clustering)한 후에 응답 모듈(22)로 전달할 수 있다.Before passing to the response module 22, the input query information and the generated response are passed to the response determination module 24 to determine whether or not the structure is similar to the existing response, and clustering by item. And then to the response module 22.

응답 모듈(22)은, 단계(320)으로 이행하여 응답에 필요한 정보를 API 챗봇 브리지 모듈(60)로 전달하고 전술한 이후의 단계(325)와 단계(330)을 거쳐서 최종 API 답변을 생성하여 사용자에게 출력한다.The response module 22 transfers the information necessary for the response to the API chatbot bridge module 60 by moving to step 320 and generates a final API answer through the steps 325 and 330 after the above-described operation. Print to user

좀 더 자세히 설명하면, 형태소 분석을 통해서 동사에 대한 응답 요소 예를 들어, 위 질문에 대해서 "올랐습니다" "내렸습니다" 두 개가 있는데, 역질의를 통해서 주가 중에서 "종가"에 대한 질의인 것으로 판단되어 단계(365)에서 응답을 생성하고 이를 챗봇 브리지(60)로 전송한다. 그 때 브리지로 보내는 응답에 필요한 정보는 "삼성전자, 종가, 일주일, 변동율"이 되고, API 함수 호출 결과 +10%로 나오면, 최종 API 응답은 "올랐습니다" "내렸습니다" 중에서 "올랐습니다"를 선택하여 "10% 올랐습니다"로 응답을 하고, API 함수 호출 결과 -10%로 나오면, 최종 API 응답은 "내렸습니다"를 선택하여 "10% 내렸습니다"로 생성할 수 있다.In more detail, there are two elements of response to verbs through morphological analysis, for example, two questions "up" and "down" for the above question. To generate a response in step 365 and send it to the chatbot bridge 60. At that time, the information required for the response to the bridge would be "Samsung, closing price, week, change rate". When the API function call resulted in + 10%, the final API response was "up" or "up". If you select to answer "10% up" and the API function call returns -10%, the final API response can be generated as "10% down" by selecting "down".

본 발명에 따르면, 역질의를 통한 양방향 대화에 의해서 응답의 정확도를 현저하게 높일 수 있고, API 챗봇 브리지 모듈이 각각의 API 함수와 실제 응답을 자동으로 매칭할 수 있으므로 종래의 자연어 처리 엔진을 이용함으로써 개발 비용을 저감시키면서도 특정 분야에 특화된 자체 챗봇 응답 시스템을 구축할 수 있는 작용효과가 제공된다.According to the present invention, the accuracy of the response can be significantly increased by two-way conversation through inverse query, and the API chatbot bridge module can automatically match each API function and the actual response, thereby using a conventional natural language processing engine. While reducing development costs, the benefits of building your own chatbot response system specific to a specific area are provided.

이상 첨부 도면을 참고하여 본 발명에 대해서 설명하였지만 본 발명의 권리범위는 후술하는 특허청구범위에 의해 결정되며 전술한 실시예 및/또는 도면에 제한되는 것으로 해석되어서는 아니된다. 그리고 특허청구범위에 기재된 발명의, 당업자에게 자명한 개량, 변경 및 수정도 본 발명의 권리범위에 포함된다는 점이 명백하게 이해되어야 한다.While the invention has been described above with reference to the accompanying drawings, the scope of the invention is determined by the claims that follow, and should not be construed as limited to the embodiments and / or drawings described above. And it should be clearly understood that improvements, changes and modifications apparent to those skilled in the art of the invention described in the claims are included in the scope of the present invention.

10: 자연어 처리 엔진
20: 응답 처리 엔진
30: 서비스 프레임워크
10: Natural Language Processing Engine
20: response processing engine
30: Service framework

Claims (5)

응답 처리 엔진과, 웹 API 모듈 및 API 챗봇 브리지 모듈을 포함하는 웹 어플리케이션 서버와, 서비스 프레임워크를 포함하는 환경에서, 응답 처리 엔진이 수행하는 챗봇 기반 응답 방법에 있어서,
응답 처리 엔진이, 질의 정보를 수신하는 제1 단계와,
응답 처리 엔진이, 제1 단계에서 수신한 질의 정보를 평가하는 제2 단계와,
제2 단계에서 소정의 기준에 도달한 것으로 평가되면, 응답 처리 엔진이 질의에 대한 응답을 데이터베이스에서 추출하여 웹 어플리케이션 서버로 전송하는 제3 단계와,
응답 처리 엔진이, 웹 어플리케이션 서버로부터 수신한 API 응답을 서비스 프레임워크로 전송하는 제4 단계와,
제2 단계에서 소정의 기준에 도달하지 못한 것으로 평가되면, 응답 처리 엔진이 질의 정보에 대해서 형태소 분석을 수행하는 제5 단계와,
응답 처리 엔진이, 제5 단계의 형태소 분석에 의해 추출된 명사에 대해서는 계층화를 수행하고, 제5 단계의 형태소 분석에 의해 추출된 동사에 대해서는 해당 동사에 대한 응답 요소를 생성하는 제6 단계와,
응답 처리 엔진이, 제6 단계에서 명사의 계층화에 기초하여 역질의를 생성하고 역질의를 출력하는 제7 단계와,
응답 처리 엔진이, 제7 단계의 역질의에 대한 응답 정보를 수신하고, 응답 정보에 기초하여 제6 단계의 응답 요소와 결합하여 응답을 생성하는 제8 단계와,
응답 처리 엔진이, 질의 정보와 제8 단계에서 생성된 응답을 데이터베이스에 저장하고 웹 어플리케이션 서버로 응답에 필요한 정보를 전송하는 제9 단계와,
응답 처리 엔진이, 웹 어플리케이션 서버로부터 수신한 API 응답을 서비스 프레임워크로 전송하는 제10 단계를 포함하며,
제3 단계의 응답은 API 챗봇 브리지 모듈이 수신하며,
제4 단계의 API 응답은, API 챗봇 브리지 모듈이 웹 API 모듈과 통신하여 응답에 미리 매칭되어 있는 API 함수를 호출하여 그 결과값이 응답에 포함된 정보인,
챗봇 기반 응답 방법.
In a chatbot-based response method performed by the response processing engine in an environment including a response processing engine, a web application server including a web API module and an API chatbot bridge module, and a service framework,
A first step in which the response processing engine receives the query information;
A second step of the response processing engine evaluating the query information received in the first step,
Evaluating the response to the query in the second step, the response processing engine extracts a response to the query from the database and sends it to the web application server;
A fourth step of the response processing engine sending the API response received from the web application server to the service framework;
A fifth step in which the response processing engine performs morphological analysis on the query information when it is determined that the predetermined criterion is not reached in the second step;
A sixth step of the response processing engine performing hierarchization on the nouns extracted by the morphological analysis of the fifth step, and generating a response element for the verbs on the verbs extracted by the morphological analysis of the fifth step;
A seventh step in which the response processing engine generates the inverse query and outputs the inverse query based on the hierarchical nouns in the sixth step;
An eighth step of receiving, by the response processing engine, response information for the inverse query of the seventh step, and generating a response by combining with the response element of the sixth step based on the response information;
A ninth step of the response processing engine storing the query information and the response generated in the eighth step in a database and transmitting information necessary for the response to the web application server;
A tenth step of sending, by the response processing engine, an API response received from the web application server to the service framework,
The response from the third step is received by the API chatbot bridge module,
The API response of the fourth step is information in which the API chatbot bridge module communicates with the web API module to call an API function previously matched to the response, and the result value is included in the response.
Chatbot-based response method.
청구항 1에 있어서,
제9 단계는, 제8 단계에서 생성된 응답이 데이터베이스에 저장된 기존 응답들과 확률적으로 구조가 유사한지를 판단하는 제9-1 단계와,
응답을 항목별로 클러스터링하는 제9-2 단계를 더 포함하는,
챗봇 기반 응답 방법.
The method according to claim 1,
In a ninth step, the ninth step of determining whether the response generated in the eighth step is stochastic similar to the existing responses stored in the database;
Further comprising step 9-2 of clustering the responses by items,
Chatbot-based response method.
청구항 1 또는 청구항 2에 있어서,
제2 단계는,
질의 정보를 파싱하는 제2-1 단계와,
제2-1 단계에서 파싱되어 추출된 의미 형태소 중에서 단일 의미를 가지는 의미 형태소의 비율을 수치화하는 제2-2 단계를 포함하는,
챗봇 기반 응답 방법.
The method according to claim 1 or 2,
The second step is
Parsing the query information in step 2-1;
Comprising a step 2-2 of quantifying the ratio of the semantic morpheme having a single meaning among the semantic morpheme parsed and extracted in the step 2-1,
Chatbot-based response method.
청구항 1 또는 청구항 2에 있어서,
제3 단계는,
응답 처리 엔진이 의미 형태소만 포함하도록 변형된 변형 질의에 대한 응답을 데이터베이스에서 추출하여 웹 어플리케이션 서버로 전송하는 단계인,
챗봇 기반 응답 방법.
The method according to claim 1 or 2,
The third step is
Wherein the response processing engine extracts the response to the transform query transformed to include only the semantic morpheme from the database and transmits the response to the web application server,
Chatbot-based response method.
삭제delete
KR1020180062421A 2018-05-31 2018-05-31 Method for Responding Based on Chat-Bot KR102051890B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180062421A KR102051890B1 (en) 2018-05-31 2018-05-31 Method for Responding Based on Chat-Bot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180062421A KR102051890B1 (en) 2018-05-31 2018-05-31 Method for Responding Based on Chat-Bot

Publications (1)

Publication Number Publication Date
KR102051890B1 true KR102051890B1 (en) 2019-12-06

Family

ID=68837306

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180062421A KR102051890B1 (en) 2018-05-31 2018-05-31 Method for Responding Based on Chat-Bot

Country Status (1)

Country Link
KR (1) KR102051890B1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210156515A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Recording Medium
KR20210156533A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Recording Medium
KR20210156547A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Program for providing user interface based on chatbot using text carousel
KR20210156542A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Method for providing user interface based on chatbot using text carousel
KR20210156514A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Program for providing user interface based on chatbot using image carousel
KR20210156526A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus and method for providing user interface based on chatbot using carousel
KR20210156546A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus for providing user interface based on chatbot using text carousel
KR20210156513A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus for providing user interface based on chatbot using image carousel
KR20210156522A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Program for providing user interface based on chatbot using image and text carousel
KR20210156508A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Recording Medium
KR20210156520A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus for providing user interface based on chatbot using image and text carousel
KR20210156510A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Method for providing user interface based on chatbot using image carousel
KR20210156518A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Method for providing user interface based on chatbot using image and text carousel

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170048008A (en) * 2015-10-26 2017-05-08 에스케이텔레콤 주식회사 Apparatus for analyzing intention of query and method thereof
KR101849750B1 (en) * 2017-01-26 2018-04-17 주식회사 솔트룩스 Interactive Automatic Question-Answering System
KR101858206B1 (en) * 2017-12-07 2018-05-15 디비손해보험 주식회사 Method for providing conversational administration service of chatbot based on artificial intelligence

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170048008A (en) * 2015-10-26 2017-05-08 에스케이텔레콤 주식회사 Apparatus for analyzing intention of query and method thereof
KR101849750B1 (en) * 2017-01-26 2018-04-17 주식회사 솔트룩스 Interactive Automatic Question-Answering System
KR101858206B1 (en) * 2017-12-07 2018-05-15 디비손해보험 주식회사 Method for providing conversational administration service of chatbot based on artificial intelligence

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210156515A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Recording Medium
KR20210156533A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Recording Medium
KR20210156547A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Program for providing user interface based on chatbot using text carousel
KR20210156542A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Method for providing user interface based on chatbot using text carousel
KR20210156514A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Program for providing user interface based on chatbot using image carousel
KR20210156526A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus and method for providing user interface based on chatbot using carousel
KR20210156546A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus for providing user interface based on chatbot using text carousel
KR20210156513A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus for providing user interface based on chatbot using image carousel
KR20210156522A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Program for providing user interface based on chatbot using image and text carousel
KR20210156508A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Recording Medium
KR20210156520A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Apparatus for providing user interface based on chatbot using image and text carousel
KR20210156510A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Method for providing user interface based on chatbot using image carousel
KR20210156518A (en) 2020-06-18 2021-12-27 주식회사 꿈많은청년들 Method for providing user interface based on chatbot using image and text carousel

Similar Documents

Publication Publication Date Title
KR102051890B1 (en) Method for Responding Based on Chat-Bot
US10102246B2 (en) Natural language consumer segmentation
CN109344170B (en) Stream data processing method, system, electronic device and readable storage medium
CN110991391A (en) Information processing method and device based on block chain network
US20150172293A1 (en) Managing user access to query results
US20170228365A1 (en) Systems and methods for language feature generation over multi-layered word representation
US9582486B2 (en) Apparatus and method for classifying and analyzing documents including text
CN111182162B (en) Telephone quality inspection method, device, equipment and storage medium based on artificial intelligence
US10824816B2 (en) Semantic parsing method and apparatus
WO1998037478A3 (en) Group action processing between users
KR101990895B1 (en) System for providing artificial intelligence interactive comments to automatically reply to online posts and comments
Curiel et al. Workload generators for web-based systems: Characteristics, current status, and challenges
CN110852095B (en) Statement hot spot extraction method and system
CA3207902A1 (en) Auditing citations in a textual document
CN112632139A (en) Information pushing method and device based on PMIS system, computer equipment and medium
US20230306263A1 (en) Pattern-based classification
KR101450453B1 (en) Method and apparatus for recommending contents
US20210165966A1 (en) Systems and methods of updating computer modeled processes based on real time external data
CN104636386A (en) Information monitoring method and device
KR102135075B1 (en) Method for providing fake news alert service through syntactic analysis of instant messages based on news writing and broadcast guidelines and apparatus thereof
US20120136883A1 (en) Automatic Dynamic Multi-Variable Matching Engine
US11533279B2 (en) Method for electronic messaging using image based noisy content
CN114004599A (en) Material demand plan examination system based on artificial intelligence
CN112287104A (en) Natural language processing method and device
US10817554B2 (en) Observation-based query interpretation model modification

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant