KR101834564B1 - Domain matching device and method for multi-domain natural language processing - Google Patents

Domain matching device and method for multi-domain natural language processing Download PDF

Info

Publication number
KR101834564B1
KR101834564B1 KR1020170178887A KR20170178887A KR101834564B1 KR 101834564 B1 KR101834564 B1 KR 101834564B1 KR 1020170178887 A KR1020170178887 A KR 1020170178887A KR 20170178887 A KR20170178887 A KR 20170178887A KR 101834564 B1 KR101834564 B1 KR 101834564B1
Authority
KR
South Korea
Prior art keywords
domain
score
specific
module
input data
Prior art date
Application number
KR1020170178887A
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 KR1020170178887A priority Critical patent/KR101834564B1/en
Application granted granted Critical
Publication of KR101834564B1 publication Critical patent/KR101834564B1/en

Links

Images

Classifications

    • G06F17/28

Landscapes

  • Machine Translation (AREA)

Abstract

The present invention relates to a domain matching apparatus using specific scores of a chatbot module, a search engine module or a speech recognition module and a method thereof. To this end, the domain matching apparatus comprises: a domain score calculation module calculating a domain score which is information about which a domain pipe line is suitable to match phrase information; and a domain matching module matching the phrase information to the domain pipe line related to a domain having a highest domain score.

Description

도메인 특화 용어를 이용한 도메인 매칭 장치 및 방법{Domain matching device and method for multi-domain natural language processing}FIELD OF THE INVENTION [0001] The present invention relates to a domain matching device and method for domain matching using domain-

본 발명은 챗봇 모듈, 검색엔진 모듈이나 음성인식 모듈의 멀티 도메인 자연어 처리를 위해 도메인 특화 점수를 이용한 도메인 매칭 장치 및 방법에 관한 것이다. Field of the Invention [0002] The present invention relates to an apparatus and method for domain matching using a domain-specific score for multi-domain natural language processing of a chatbod module, a search engine module or a speech recognition module.

사람의 언어는 풍부하고 복잡하며, 복잡한 문법 및 문맥 의미를 갖는 많은 어휘를 포함하고 있으나 하드웨어 또는 소프트웨어 애플리케이션은 일반적으로 특정 형식 또는 규칙에 따라 데이터를 입력할 것을 요구한다. 여기서, 자연어 입력은 사람과 상호작용하기 위한 거의 모든 소프트웨어 애플리케이션에서 이용될 수 있다. 일반적인 자연어 처리 과정은 자연어를 토큰(Token)으로 분리하고 소프트웨어 애플리케이션에 의해 제공되는 하나 이상의 동작에 매핑하며 각각의 소프트웨어 애플리케이션이 일련의 고유한 동작들을 가지도록 설정된다. 즉, 소프트웨어 개발자가 자연어 입력을 해석하는 코드를 작성하여 입력을 각각의 애플리케이션에 대한 적절한 동작에 매핑하는 방식이다. 이러한 자연어 처리 장치는 음성 인식 엔진, 검색 엔진, 문장 인식 엔진 등에 이용되고 있다. Human languages are rich and complex, and contain many vocabularies with complex grammatical and contextual meanings, but hardware or software applications generally require data to be entered according to a particular format or rule. Here, natural language input can be used in almost all software applications for interacting with people. A typical natural language processing process separates the natural language into tokens, maps to one or more operations provided by the software application, and each software application is set to have a set of unique operations. That is, software developers write code that interprets natural language input and maps the input to the appropriate behavior for each application. Such a natural language processing apparatus is used in a speech recognition engine, a search engine, a sentence recognition engine, and the like.

이러한 자연어 처리 장치의 대표적인 예로 챗봇을 들 수 있다. 최근 챗봇의 등장으로 고객지원 서비스의 품질 향상 해결하기 위해, 챗봇을 도입해 고객 응대에 필요한 인력을 줄임과 동시에 24시간 빠르게 응답처리 하고자 하는 회사들이 상당히 많이 생기고 있다. 예를 들어, AT&T는 CS에 전화를 하면 봇이 응대하도록 하고 있다. A typical example of such a natural language processing apparatus is a chatbot. Recently, there have been a lot of companies trying to solve the problem by improving the quality of the customer support service by introducing the chatbot. For example, AT & T calls the CS to let the bot respond.

도 1은 챗봇의 기본적인 모듈 구성을 도시한 모식도이다. 도 1에 도시된 바와 같이 챗봇은 채팅의 텍스트나 음성으로 구성된 언어적 입력(Lexical input)을 NLP(자연어 처리 프로세서, Natural Language Processor) 모듈이 입력받아 컴퓨터상에서 처리될 수 있는 형태로 처리해주고, 처리된 자연어의 Context를 분석하는 Context Analyzer를 지나서, Context에 따라 답변 내용을 정하는 Decision Maker에서 답변 내용을 분류하여 확정하고, 확정된 답변 내용에 따라 사용자에게 답변을 하는 Response Generator를 통해 언어적 출력(Lexical output)이 나오게 되는 구조로 되어 있다. 1 is a schematic diagram showing a basic module configuration of a chatbot. As shown in FIG. 1, the chatbot receives a lexical input composed of a text or voice of a chat in a form that can be processed on a computer by a NLP (Natural Language Processor) module, In response to the Context Analyzer, which analyzes the Context of the natural language, the Decision Maker decides the answer contents according to the Context, classifies the answers and confirms them, and responds to the user according to the determined answers. output.

도 2는 일반적인 챗봇 모듈 구성을 구체적으로 도시한 모식도이다. 도 2에 도시된 바와 같이, 일반적인 챗봇은 NLP에 형태소 분석기(Morphemic Analyzer)를 붙여서 입력되는 언어적 입력의 형태소를 분석하고, 문장학적으로 어떤 의미를 갖는지에 대한 Taxonomy Analyzer를 붙여서 문장을 컴퓨터상에서 처리할 수 있는 형태로 처리하게 된다. Context Analyzer는 Context Database에서 해당 문장이 어떤 Context인지를 검색 엔진(Search engine)을 통해 매칭하게 된다. 매칭된 Context에 대한 대답을 Decision Maker에서 찾게 된다. 보통 특정 Context에 대한 대답은 챗봇을 도입하려는 특정 회사의 고객지원 프로토콜 데이터 템플릿에 의해 결정된다. FIG. 2 is a schematic diagram specifically showing a general chatbot module configuration. As shown in FIG. 2, a general chatbot analyzes a morpheme of a linguistic input inputted with a Morphemic Analyzer attached to a NLP, attaches a Taxonomy Analyzer to a semantically meaningful word, and processes the sentence on a computer It is processed in a form that can be done. The Context Analyzer will match the context in the Context Database through the search engine. The Decision Maker will find the answer to the matching context. Usually, the answer to a specific context is determined by the customer support protocol data template of the particular company that is trying to introduce the chatbot.

도 3은 머신러닝을 이용한 챗봇 모듈 구성을 구체적으로 도시한 모식도이다. 도 3에 도시된 바와 같이, 머신러닝을 이용한 챗봇은 기존의 일반적인 챗봇의 요소들이 많이 대체되었다. 머신러닝을 이용한 챗봇 모듈 구성에서는 NLP에 딥러닝 모델(Deep-learning model)이 적용된다. NLP에 적용되는 딥러닝 모델로는 2016년 4월에 공개된 Google의 SyntexNet이 이용될 수 있고, NLU(Natural Language Understanding)의 초기 버전으로 이해할 수 있다. SyntexNet을 거치면 특정 언어적 입력이 Vector 형태로 바뀌게 된다. 그 후, Context Analyzer, Decision Maker 및 Response Generator를 통합하여 딥러닝 모델을 적용하고 트레이닝 세트를 계속 학습시키게 된다. Context Analyzer, Decision Maker 및 Response Generator의 통합 모듈에 이용되는 딥러닝 모델로는 RNN(Recurrent Neural Network) 등의 적어도 하나 이상의 모델이 이용되게 된다. FIG. 3 is a schematic diagram specifically showing the configuration of a chatbot module using machine learning. As shown in FIG. 3, a chatbot using machine learning has replaced a lot of elements of a conventional chatbot. Deep-learning model is applied to NLP in the chatbot module configuration using machine learning. Deep learning models applied to NLP can be understood as an early version of NLU (Natural Language Understanding), which is available from Google's SyntexNet published in April 2016. Through SyntexNet, certain verbal input changes to Vector format. We then integrate the Context Analyzer, Decision Maker, and Response Generator to apply the Deep Learning model and continue learning the training set. At least one model such as RNN (Recurrent Neural Network) is used as the deep learning model used in the integration module of Context Analyzer, Decision Maker and Response Generator.

챗봇 이외에도 자연어 처리와 응답 생성을 기반으로 하는 서비스가 다양하게 제공되고 있다. 챗봇 이외에 자연어 처리와 응답 생성을 기반으로 하는 서비스에는 음성인식, 검색 엔진 등이 있다. In addition to chatbots, various services based on natural language processing and response generation are being provided. In addition to chatbots, services based on natural language processing and response generation include speech recognition and search engines.

대한민국 공개특허 제10-2017-0021902호, 페이스북 인크Korean Patent Publication No. 10-2017-0021902,

기존에는 챗봇, 검색엔진, 음성인식 모듈 등의 자연어 처리 장치를 설계하는 데에 있어 다음과 같은 문제점이 존재하였다. In the past, there have been the following problems in designing natural language processing devices such as chatbots, search engines, and voice recognition modules.

먼저, 자연어 학습을 위한 정제된 데이터 세트를 구하기가 굉장히 어려우므로, 정제되지 않은 데이터 세트를 정제하는 전처리 과정이 필요하게 된다. 데이터 수급과 전처리를 원활하게 하기 위해서는, 특정 도메인의 데이터를 집중적으로 수집한 후, 이에 맞는 챗봇을 설계하는 것이 가장 용이하고 정확도를 높이는 방법이다. 왜냐하면, 각각의 도메인에 따라 사용되는 용어의 의미가 다르다는 점에서, 질문과 대답의 범위가 좁아질수록 자연어 처리의 성능이 좋아지기 때문이다.First, since it is very difficult to obtain a refined data set for natural language learning, a preprocessing process for refining an uncleaned data set is required. In order to facilitate data supply and preprocessing, it is the easiest and most accurate way to design a chatbot after collecting the data of a specific domain intensively. This is because the narrower the range of questions and answers, the better the performance of natural language processing, as the meaning of the terms used for each domain is different.

특정 도메인의 데이터를 집중적으로 학습한 챗봇 등의 자연어 처리 장치를 만들면 해당 도메인에 대한 대화만이 가능한 자연어 처리 장치가 되게 된다. 이러한 자연어 처리 장치로 만들어진 챗봇, 검색엔진, 음성인식 모듈 등은 하나의 도메인 내에서는 목적에 맞게 잘 작동할 수 있으나 범용성이 떨어진다는 단점이 있다. When a natural language processing device such as a chatbot that intensively learns data of a specific domain is created, it becomes a natural language processing device capable of only talking about the domain. A chatbot, a search engine, a speech recognition module, and the like, which are made of such a natural language processing device, can work well in a single domain but have a disadvantage that they are not versatile.

위의 단점, 즉 범용성을 해결하기 위해 여러 도메인에 걸쳐진 데이터 세트를 모아서 자연어 처리 장치에 기계학습을 진행하면, 입력에 대한 자연어 처리 장치의 출력이 원하지 않는 도메인에서 도출되는 문제와 감정 분석과 같은 도메인 의존적인 과제의 처리가 어렵다는 문제가 발생한다. In order to solve the above disadvantage, that is, to solve the versatility, if the data sets spanning several domains are collected and machine learning is performed on the natural language processing device, the problem that the output of the natural language processing device for input is derived from the undesired domain, There arises a problem that it is difficult to process a dependent task.

따라서, 본 발명의 목적은, 위와 같은 문제를 해결하기 위해 특정 도메인 특화된 복수개의 응답 모듈을 설계하고, 입력 데이터(예를 들어, 입력 발화 데이터, 입력 문장 데이터, 질의 데이터 등)를 여러 개의 도메인 중 하나로 분류할 수 있는 중간 분류기를 만들어, 입력 데이터를 여러 개의 도메인 중 하나로 분류하고 분류된 도메인에 맞는 도메인 특화된 응답 모듈로 입력 데이터를 할당하는 방법에 관한 멀티 도메인 자연어 처리를 위한 도메인 매칭 장치 및 방법을 제공하는데에 있다. SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to design a plurality of response modules specific to a specific domain in order to solve the above problem, and to provide input data (for example, input speech data, input sentence data, query data, A domain matching apparatus and method for multi-domain natural language processing related to a method of classifying input data into one of a plurality of domains and assigning input data to a domain-specific response module suited to the classified domain, .

또한, 본 발명의 다른 목적은, 위와 같은 문제를 해결하기 위해 특정 도메인 특화된 복수개의 응답 모듈에서 생성된 대답 데이터 등과 같은 출력 데이터에 대해 적정한 도메인의 출력 데이터를 선정하는 방법에 관한 멀티 도메인 자연어 처리를 위한 도메인 매칭 장치 및 방법을 제공하는데에 있다. It is another object of the present invention to provide a multi-domain natural language processing method for selecting output data of an appropriate domain for output data such as answer data generated in a plurality of response modules specific to a specific domain in order to solve the above- And to provide a domain matching apparatus and method for the same.

또한, 본 발명의 다른 목적은, 위와 같은 문제를 해결하기 위해 이전 대화 또는 쿼리에서 어떤 도메인으로 분류되었는지에 따라 현재 대화 또는 쿼리의 도메인의 선정에 가중치를 달리 주는 방법에 대한 멀티 도메인 자연어 처리를 위한 도메인 매칭 장치 및 방법을 제공하는데에 있다. Another object of the present invention is to provide a method and apparatus for multi-domain natural language processing for a method of assigning weights to selection of domains of a current dialogue or query according to which domain is classified in a previous dialogue or query in order to solve the above- Domain matching apparatus and method.

또한, 본 발명의 다른 목적은, 위와 같은 문제를 해결하기 위해 이전 대화 또는 쿼리에서 어떤 도메인으로 분류되었는지와 특정 도메인에서 다른 특정 도메인으로 전이될 확률인 전이 확률을 이용하여 현재 대화 또는 쿼리의 도메인의 선정에 가중치를 달리 주는 방법에 대한 멀티 도메인 자연어 처리를 위한 도메인 매칭 장치 및 방법을 제공하는데에 있다. Another object of the present invention is to solve the above problems by using a transition probability which is a probability of transition from a specific domain to another domain, And a domain matching apparatus and method for multi-domain natural language processing on a method of assigning weights to selection.

또한, 본 발명의 다른 목적은, 위와 같은 문제를 해결하기 위해 특정 분류 방법으로 특정 대화 또는 쿼리에 대해 도메인을 분류한 뒤 출력 데이터를 출력하고, 출력 데이터에 따른 사용자의 응답 데이터의 센티멘탈 분석을 통해 해당 도메인의 분류 모델에 대한 강화학습을 하는 방법에 대한 도메인 특화 점수를 이용한 도메인 매칭 장치 및 방법을 제공하는데에 있다.It is another object of the present invention to provide a method and apparatus for classifying a domain for a specific conversation or query by a specific classification method, outputting output data, and analyzing user response data according to output data And a domain matching apparatus and method using a domain-specific score for a method of performing reinforcement learning on a classification model of a corresponding domain.

이하 본 발명의 목적을 달성하기 위한 구체적 수단에 대하여 설명한다.Hereinafter, specific means for achieving the object of the present invention will be described.

본 발명의 목적은, 입력 데이터를 일반 문자열 형태로 입력받고, 상기 입력 데이터를 개체(entity) 또는 의미구(intent)로 구분하여 단어 또는 단어 조합으로 구성되는 어구 정보를 생성하는 구분 모듈; 및 상기 어구 정보와 질문 데이터 세트를 토대로 특정 도메인에 대한 출력 데이터를 생성하는, 복수개의 도메인에 대한 복수개의 도메인 파이프라인;을 포함하는 멀티 도메인의 자연어 처리를 수행하기 위한 자연어 처리 장치의 도메인 매칭을 위한 도메인 매칭 장치에 있어서, 상기 어구 정보를 어떤 도메인 파이프라인에 매칭하는 것이 적합할지에 대한 정보인 도메인 스코어를 계산하는 도메인 스코어 계산 모듈; 및 상기 도메인 스코어가 가장 높은 도메인에 관련된 상기 도메인 파이프라인에 상기 어구 정보를 매칭하는 도메인 매칭 모듈;을 포함하며, 상기 도메인 스코어의 계산은, 상기 어구 정보와 상기 질문 데이터 세트와의 유사도를 기초로 수행되고, 상기 어구 정보와 매칭된 상기 복수개의 도메인 파이프라인 중 하나의 도메인 파이프라인이 상기 출력 데이터를 생성하도록 구성되는 것을 특징으로 하는, 멀티 도메인의 자연어 처리를 위한 도메인 매칭 장치를 제공하여 달성될 수 있다. An object of the present invention is to provide a classifying module that receives input data in a general string form and generates phrase information composed of a word or word combination by dividing the input data into entities or intents. And a plurality of domain pipelines for a plurality of domains for generating output data for a specific domain on the basis of the phrase information and the set of question data. The domain matching method of the multi- A domain score calculation module for calculating a domain score which is information on which domain pipeline is suitable to match the phrase information; And a domain matching module for matching the phrase information to the domain pipeline associated with the domain having the highest domain score, wherein the calculation of the domain score is based on a degree of similarity between the phrase information and the query data set And a domain pipeline of one of the plurality of domain pipelines matched with the phrase information is configured to generate the output data, wherein a domain matching apparatus for multi-domain natural language processing is provided .

또한, 가중치를 생성하고, 상기 도메인 스코어 계산 모듈의 도메인 스코어 계산에 상기 가중치를 제공하는 가중치 모듈;을 더 포함하고, 상기 도메인 스코어의 계산은, 상기 유사도 및 상기 가중치를 기초로 수행되며, 상기 가중치는 이전의 도메인 스코어에 대한 정보인 것을 특징으로 할 수 있다. Further comprising a weight module for generating a weight and providing the weight to the domain score calculation of the domain score calculation module, wherein the calculation of the domain score is performed based on the similarity and the weight, May be characterized by being information on a previous domain score.

또한, 가중치를 생성하고, 상기 도메인 스코어 계산 모듈의 도메인 스코어 계산에 상기 가중치를 제공하는 가중치 모듈;을 더 포함하고, 상기 도메인 스코어의 계산은, 상기 유사도 및 상기 가중치를 기초로 수행되며, 상기 가중치는 직전 동일 도메인 구간 정보인 것을 특징으로 할 수 있다.Further comprising a weight module for generating a weight and providing the weight to the domain score calculation of the domain score calculation module, wherein the calculation of the domain score is performed based on the similarity and the weight, Is the same domain section information immediately before.

또한, 가중치를 생성하고, 상기 도메인 스코어 계산 모듈의 도메인 스코어 계산에 상기 가중치를 제공하는 가중치 모듈;을 더 포함하고, 상기 도메인 스코어의 계산은, 상기 유사도 및 상기 가중치를 기초로 수행되며, 상기 가중치는 타 도메인으로의 전이 확률인 것을 특징으로 할 수 있다.Further comprising a weight module for generating a weight and providing the weight to the domain score calculation of the domain score calculation module, wherein the calculation of the domain score is performed based on the similarity and the weight, Is a transition probability to another domain.

또한, 상기 도메인 스코어의 계산은, 상기 어구 정보를 상태(state), 상기 도메인 매칭 장치를 에이전트(agent), 상기 도메인 파이프라인의 매칭을 액션(action), 상기 출력 데이터에 따른 새로운 입력 데이터에 대한 정보를 보상(reward)로 하는 강화학습에 의해 업데이트되는 것을 특징으로 할 수 있다.In addition, the calculation of the domain score may be performed by using the word information as a state, the domain matching apparatus as an agent, the matching of the domain pipeline as an action, And the information is updated by reinforcement learning that makes the information reward.

또한, 이전의 도메인 스코어에 대한 정보인 가중치를 생성하고, 상기 도메인 스코어 계산 모듈의 도메인 스코어 계산에 상기 가중치를 제공하는 가중치 모듈;을 더 포함하고, 상기 도메인 스코어의 계산은, 상기 유사도 및 상기 가중치를 기초로 수행되며, 상기 가중치 모듈의 가중치 생성은, 상기 어구 정보를 상태(state), 상기 가중치 모듈을 에이전트(agent), 상기 가중치의 생성을 액션(action), 상기 출력 데이터에 따른 새로운 입력 데이터에 대한 정보를 보상(reward)로 하는 강화학습에 의해 업데이트되는 것을 특징으로 할 수 있다.And a weight module for generating weights that are information about previous domain scores and providing the weights to the domain score calculation of the domain score calculation module, wherein the calculation of the domain scores comprises: Wherein the generation of the weights of the weighting module is performed by using the word information as a state, the weighting module as an agent, the generation of the weighting as an action, new input data according to the output data Is rewritten by the reinforcement learning that rewrites the information on the information to be rewritten.

본 발명의 다른 목적은, 입력 데이터를 일반 문자열 형태로 입력받고, 상기 입력 데이터를 개체(entity) 또는 의미구(intent)로 구분하여 단어 또는 단어 조합으로 구성되는 어구 정보를 생성하는 구분 모듈; 및 상기 어구 정보와 질문 데이터 세트를 토대로 특정 도메인에 대한 출력 데이터를 생성하는, 복수개의 도메인에 대한 복수개의 도메인 파이프라인;을 포함하는 멀티 도메인의 자연어 처리를 수행하기 위한 자연어 처리 장치의 도메인 매칭을 위한 도메인 매칭 장치에 의해 수행되는 도메인 매칭 방법에 있어서, 상기 도메인 매칭 장치의 일구성인 도메인 스코어 계산 모듈이, 상기 어구 정보를 어떤 도메인 파이프라인에 매칭하는 것이 적합할지에 대한 정보인 도메인 스코어를 계산하는 도메인 스코어 계산 단계; 및 상기 도메인 매칭 장치의 일구성인 도메인 매칭 모듈이, 상기 도메인 스코어가 가장 높은 도메인에 관련된 상기 도메인 파이프라인에 상기 어구 정보를 매칭하는 도메인 매칭 단계;을 포함하며, 상기 도메인 스코어의 계산은, 상기 어구 정보와 상기 질문 데이터 세트와의 유사도를 기초로 수행되고, 상기 어구 정보와 매칭된 상기 복수개의 도메인 파이프라인 중 하나의 도메인 파이프라인이 상기 출력 데이터를 생성하도록 구성되는 것을 특징으로 하는, 멀티 도메인의 자연어 처리를 위한 도메인 매칭 방법을 제공하여 달성될 수 있다. It is another object of the present invention to provide a classifying module for inputting input data in a general string form and generating phrase information composed of words or word combinations by dividing the input data into entities or intents; And a plurality of domain pipelines for a plurality of domains for generating output data for a specific domain on the basis of the phrase information and the set of question data. The domain matching method of the multi- Wherein a domain score calculation module that is a component of the domain matching device calculates a domain score which is information on which domain pipeline is suitable to match the phrase information to the domain matching device, A domain score calculation step; And a domain matching step in which the domain matching module, which is a component of the domain matching apparatus, matches the phrase information to the domain pipeline related to the domain having the highest domain score, Wherein the plurality of domain pipelines are constructed on the basis of similarity between the query information and the query data set, and one of the plurality of domain pipelines matched with the query information is configured to generate the output data. And a domain matching method for natural language processing of the domain name.

본 발명의 다른 목적은, 입력 데이터를 일반 문자열 형태로 입력받고, 상기 입력 데이터를 개체(entity) 또는 의미구(intent)로 구분하여 단어 또는 단어 조합으로 구성되는 어구 정보를 생성하는 구분 모듈; 상기 어구 정보와 질문 데이터 세트를 토대로 특정 도메인에 대한 출력 데이터를 생성하는, 복수개의 도메인에 대한 복수개의 도메인 파이프라인; 상기 어구 정보를 어떤 도메인 파이프라인에 매칭하는 것이 적합할지에 대한 정보인 도메인 스코어를 계산하는 도메인 스코어 계산 모듈; 및 상기 도메인 스코어가 가장 높은 도메인에 관련된 상기 도메인 파이프라인에 상기 어구 정보를 매칭하는 도메인 매칭 모듈;을 포함하며, 상기 도메인 스코어의 계산은, 상기 어구 정보와 상기 질문 데이터 세트와의 유사도를 기초로 수행되고, 상기 어구 정보와 매칭된 상기 복수개의 도메인 파이프라인 중 하나의 도메인 파이프라인이 상기 출력 데이터를 생성하도록 구성되는 것을 특징으로 하는, 멀티 도메인의 자연어 처리를 수행하기 위한 자연어 처리 장치를 제공하여 달성될 수 있다.It is another object of the present invention to provide a classifying module for inputting input data in a general string form and generating phrase information composed of words or word combinations by dividing the input data into entities or intents; A plurality of domain pipelines for a plurality of domains for generating output data for a specific domain based on the set of query information and query data; A domain score calculation module for calculating a domain score, which is information on which domain pipeline is suitable to match the phrase information; And a domain matching module for matching the phrase information to the domain pipeline associated with the domain having the highest domain score, wherein the calculation of the domain score is based on a degree of similarity between the phrase information and the query data set And a domain pipeline of one of the plurality of domain pipelines matched with the phrase information is configured to generate the output data, wherein the natural language processing apparatus for performing multi-domain natural language processing is provided Can be achieved.

본 발명의 다른 목적은, 입력 데이터를 수신하고, 상기 입력 데이터의 어구 정보를 생성하는 제1구분 모듈; 특정 도메인에 대한 출력 데이터를 생성하는 특정 도메인 파이프라인의 질문 데이터 세트를 수신하고, 상기 질문 데이터 세트의 어구 정보를 생성하는 제2구분 모듈; 상기 입력 데이터의 어구 정보 및 상기 특정 도메인 파이프라인의 상기 질문 데이터 세트의 어구 정보를 이용하여 각각의 도메인 파이프라인에 대한 도메인 스코어를 계산하는 도메인 스코어 계산 모듈; 및 상기 도메인 스코어가 가장 높은 상기 도메인 파이프라인에 상기 입력 데이터의 상기 어구 정보를 매칭하여 입력하는 도메인 매칭 모듈;을 포함하는, 멀티 도메인의 자연어 처리를 위한 도메인 매칭 장치를 제공하여 달성될 수 있다.Another object of the present invention is to provide a data processing apparatus, comprising: a first segmenting module for receiving input data and generating the phrase information of the input data; A second classification module for receiving a query data set of a specific domain pipeline that generates output data for a specific domain and generating phrase information of the query data set; A domain score calculation module for calculating a domain score for each domain pipeline using the phrase information of the input data and the phrase information of the query data set of the specific domain pipeline; And a domain matching module for matching the input information of the input data with the domain pipeline having the highest domain score, and inputting the matching information. The domain matching device for multi-domain natural language processing can be achieved.

본 발명의 다른 목적은, 제1구분 모듈이, 입력 데이터를 수신하고, 상기 입력 데이터의 어구 정보를 생성하는 제1구분 단계; 제2구분 모듈이, 특정 도메인에 대한 출력 데이터를 생성하는 특정 도메인 파이프라인의 질문 데이터 세트를 수신하고, 상기 질문 데이터 세트의 어구 정보를 생성하는 제2구분 단계; 도메인 스코어 계산 모듈이, 상기 입력 데이터의 어구 정보 및 상기 특정 도메인 파이프라인의 상기 질문 데이터 세트의 어구 정보를 이용하여 각각의 도메인 파이프라인에 대한 도메인 스코어를 계산하는 도메인 스코어 계산 단계; 및 도메인 매칭 모듈이, 상기 도메인 스코어가 가장 높은 상기 도메인 파이프라인에 상기 입력 데이터의 상기 어구 정보를 매칭하여 입력하는 도메인 매칭 단계;를 포함하는, 멀티 도메인의 자연어 처리를 위한 도메인 매칭 방법을 제공하여 달성될 수 있다.It is another object of the present invention to provide a data processing apparatus, comprising: a first segmenting step in which a first segmenting module receives input data and generates a phrase information of the input data; A second segmentation module receiving a query data set of a specific domain pipeline that generates output data for a specific domain and generating the query information of the query data set; A domain score calculation step of calculating a domain score for each domain pipeline using the phrase information of the input data and the phrase information of the query data set of the specific domain pipeline; And a domain matching step in which the domain matching module matches the input information of the input data to the domain pipeline having the highest domain score and inputs the same to the domain pipeline. Can be achieved.

본 발명의 다른 목적은, 제1구분 모듈이, 입력 데이터를 수신하고, 상기 입력 데이터의 어구 정보를 생성하는 제1구분 단계; 제2구분 모듈이, 특정 도메인에 대한 출력 데이터를 생성하는 특정 도메인 파이프라인의 질문 데이터 세트를 수신하고, 상기 질문 데이터 세트의 어구 정보를 생성하는 제2구분 단계; 도메인 스코어 계산 모듈이, 상기 입력 데이터의 어구 정보 및 상기 특정 도메인 파이프라인의 상기 질문 데이터 세트의 어구 정보를 이용하여 각각의 도메인 파이프라인에 대한 도메인 스코어를 계산하는 도메인 스코어 계산 단계; 및 도메인 매칭 모듈이, 상기 도메인 스코어가 가장 높은 상기 도메인 파이프라인에 상기 입력 데이터의 상기 어구 정보를 매칭하여 입력하는 도메인 매칭 단계;를 포함하는, 멀티 도메인의 자연어 처리를 위한 도메인 매칭 방법이 컴퓨터 상에서 수행되는 기록매체에 저장된 프로그램을 제공하여 달성될 수 있다.It is another object of the present invention to provide a data processing apparatus, comprising: a first segmenting step in which a first segmenting module receives input data and generates a phrase information of the input data; A second segmentation module receiving a query data set of a specific domain pipeline that generates output data for a specific domain and generating the query information of the query data set; A domain score calculation step of calculating a domain score for each domain pipeline using the phrase information of the input data and the phrase information of the query data set of the specific domain pipeline; And a domain matching step in which the domain matching module matches the word information of the input data to the domain pipeline having the highest domain score and inputs the word information to the domain pipeline. And a program stored in a recording medium to be executed.

상기한 바와 같이, 본 발명에 의하면 이하와 같은 효과가 있다.As described above, the present invention has the following effects.

첫째, 본 발명의 일실시예에 따르면, 각각의 특정 도메인에 특화된 응답의 생성이 가능해지는 효과가 발생된다.First, according to one embodiment of the present invention, the effect of enabling generation of a response specific to each specific domain occurs.

둘째, 본 발명의 일실시예에 따르면, 각각의 특정 도메인에 특화된 입력 데이터가 쌓여서, 도메인 별로 응답 모듈의 집중적인 학습이 가능해지는 효과가 발생된다.Second, according to an embodiment of the present invention, input data specialized for each specific domain is accumulated, and intensive learning of a response module is enabled for each domain.

셋째, 본 발명의 일실시예에 따른 도메인 매칭 장치에 따르면, 입력 데이터를 수신하여 각각의 특정 도메인 파이프라인에 할당하는 작업의 계산량이 매우 적어지고 처리 속도가 향상되는 효과가 발생된다. Thirdly, according to the domain matching apparatus according to an embodiment of the present invention, the calculation amount of the task of receiving input data and assigning it to each specific domain pipeline is very small and the processing speed is improved.

넷째, 본 발명의 일실시예에 따른 가중치 모듈에 따르면, 입력 데이터를 수신하여 각각의 특정 도메인 파이프라인에 할당하는 작업의 계산량이 매우 적어지면서도 정확도가 점진적으로 향상되는 효과가 발생된다. Fourthly, according to the weight module according to an embodiment of the present invention, the accuracy is gradually improved even though the calculation amount of the task of receiving input data and allocating it to each specific domain pipeline is very small.

본 명세서에 첨부되는 다음의 도면들은 본 발명의 바람직한 실시예를 예시하는 것이며, 발명의 상세한 설명과 함께 본 발명의 기술사상을 더욱 이해시키는 역할을 하는 것이므로, 본 발명은 그러한 도면에 기재된 사항에만 한정되어 해석되어서는 아니 된다.
도 1은 챗봇의 기본적인 모듈 구성을 도시한 모식도,
도 2는 일반적인 챗봇 모듈 구성을 구체적으로 도시한 모식도,
도 3은 머신러닝을 이용한 챗봇 모듈 구성을 구체적으로 도시한 모식도,
도 4는 본 발명의 일실시예에 따른 도메인 매칭 장치와 응답 모듈과의 관계를 나타낸 모식도,
도 5는 본 발명의 제1확장예에 따른 자연어 처리 장치의 신호 흐름을 도시한 모식도,
도 6은 본 발명의 제4확장예에 따른 자연어 처리 장치의 신호 흐름을 도시한 모식도,
도 7은 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습을 도시한 모식도,
도 8은 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습의 상태흐름을 도시한 모식도,
도 9는 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습의 신호 흐름을 도시한 모식도,
도 10은 본 발명의 제5확장예에 따른 자연어 처리 장치의 강화학습의 예측치에 관한 Q 함수를 도시한 것,
도 11, 12는 본 발명의 제7확장예에 따른 뉴럴 네트워크를 이용한 강화학습을 도시한 것,
도 13은 본 발명의 제8확장예에 따른 자연어 처리 장치의 뉴럴 네트워크를 이용한 강화학습의 네트워크 구조를 도시한 것,
도 14는 본 발명의 변형예에 따른 자연어 처리 장치의 신호 흐름을 도시한 것,
도 15, 16은 본 발명의 변형예에 따른 자연어 처리 장치의 강화학습의 신호 흐름을 도시한 모식도,
도 17은 본 발명의 일실시예에 따른 멀티 도메인 자연어 처리를 위한 자연어 처리 장치의 도메인 매칭 방법을 도시한 흐름도,
도 18은 본 발명의 일실시예에 따른 도메인 매칭 방법의 각 단계별 결과 예시를 도시한 것,
도 19는 본 발명의 제1확장예에 따른 도메인 매칭 방법을 도시한 흐름도,
도 20은 본 발명의 제2확장예에 따른 도메인 매칭 방법을 도시한 흐름도,
도 21은 본 발명의 제3확장예에 따른 도메인 매칭 방법을 도시한 흐름도,
도 22는 본 발명의 제4확장예에 따른 도메인 매칭 방법을 도시한 흐름도,
도 23은 본 발명의 제4확장예에 따른 도메인 매칭 방법의 다른 예를 도시한 흐름도,
도 24는 본 발명의 변형예에 따른 자연어 처리 장치의 신호 흐름을 도시한 모식도이다.
BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and, together with the description, And shall not be interpreted.
1 is a schematic diagram showing a basic module configuration of a chatbox,
FIG. 2 is a schematic diagram specifically showing a general chatbot module configuration,
FIG. 3 is a schematic diagram specifically showing the configuration of a chatbot module using machine learning,
4 is a schematic diagram illustrating a relationship between a domain matching apparatus and a response module according to an embodiment of the present invention;
5 is a schematic diagram showing a signal flow of the natural language processing apparatus according to the first extended example of the present invention;
6 is a schematic diagram showing a signal flow of the natural language processing apparatus according to the fourth extended example of the present invention;
FIG. 7 is a schematic diagram showing reinforcement learning of a natural language processing apparatus according to a fourth extended example of the present invention;
8 is a schematic diagram showing a state flow of reinforcement learning of a natural language processing apparatus according to a fourth extended example of the present invention;
9 is a schematic diagram showing a signal flow of reinforcement learning in the natural language processing apparatus according to the fourth extended example of the present invention,
10 is a graph showing a Q function relating to the predicted value of reinforcement learning of the natural language processing apparatus according to the fifth extended example of the present invention,
11 and 12 are diagrams showing reinforcement learning using a neural network according to a seventh extended example of the present invention,
13 shows a network structure of reinforcement learning using a neural network of a natural language processing apparatus according to an eighth extended example of the present invention,
FIG. 14 shows a signal flow of a natural language processing apparatus according to a modification of the present invention,
15 and 16 are schematic diagrams showing a signal flow of reinforcement learning of a natural language processing apparatus according to a modification of the present invention;
FIG. 17 is a flowchart illustrating a domain matching method of a natural language processing apparatus for multi-domain natural language processing according to an embodiment of the present invention;
FIG. 18 illustrates an example of results of each step of the domain matching method according to an embodiment of the present invention,
FIG. 19 is a flowchart illustrating a domain matching method according to a first extended example of the present invention;
20 is a flowchart illustrating a domain matching method according to a second extended example of the present invention,
FIG. 21 is a flowchart illustrating a domain matching method according to a third extended example of the present invention;
FIG. 22 is a flowchart illustrating a domain matching method according to a fourth extended example of the present invention;
23 is a flowchart showing another example of a domain matching method according to a fourth extended example of the present invention;
24 is a schematic diagram showing a signal flow of a natural language processing apparatus according to a modification of the present invention.

이하 첨부된 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 본 발명을 쉽게 실시할 수 있는 실시예를 상세히 설명한다. 다만, 본 발명의 바람직한 실시예에 대한 동작원리를 상세하게 설명함에 있어서 관련된 공지기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following detailed description of the operation principle of the preferred embodiment of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may unnecessarily obscure the subject matter of the present invention.

또한, 도면 전체에 걸쳐 유사한 기능 및 작용을 하는 부분에 대해서는 동일한 도면 부호를 사용한다. 명세서 전체에서, 특정 부분이 다른 부분과 연결되어 있다고 할 때, 이는 직접적으로 연결되어 있는 경우뿐만 아니라, 그 중간에 다른 소자를 사이에 두고, 간접적으로 연결되어 있는 경우도 포함한다. 또한, 특정 구성요소를 포함한다는 것은 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라, 다른 구성요소를 더 포함할 수 있는 것을 의미한다.The same reference numerals are used for portions having similar functions and functions throughout the drawings. In the specification, when a specific portion is connected to another portion, it includes not only a direct connection but also a case where the other portion is indirectly connected with another element in between. In addition, the inclusion of a specific constituent element does not exclude other constituent elements unless specifically stated otherwise, but may include other constituent elements.

멀티 도메인 자연어 처리를 위한 도메인 매칭 장치Domain matching device for multi-domain natural language processing

도 4는 본 발명의 일실시예에 따른 도메인 매칭 장치와 응답 모듈과의 관계를 나타낸 모식도이다. 도 4에 도시된 바와 같이, 질문이나 검색 쿼리로 구성된 입력 데이터(200)를 멀티 도메인 자연어 처리 장치(1)의 일구성인 구분 모듈(2)에서 수신하고, 형태소로 구분된 입력 데이터를 도메인 매칭 장치(3)에 전달하여 응답 모듈(4)의 특정 도메인 파이프라인(40)에 매칭하여 출력 데이터를 생성하게 된다. 4 is a schematic diagram illustrating a relationship between a domain matching apparatus and a response module according to an embodiment of the present invention. As shown in FIG. 4, input data 200 composed of a question or a search query is received by the classification module 2, which is one component of the multi-domain natural language processing device 1, Device 3 to match the particular domain pipeline 40 of the response module 4 to produce output data.

구분 모듈(2)은 입력 데이터(200)를 일반 문자열 형태(Normal text)로 입력받게 되고, 이렇게 입력받은 일반 문자열 형태를 NLP 모듈(21)에 의해 개체(entity)와 의미구(intent)로 구분하는 모듈이다. 구분 모듈(2)에 의해 입력 데이터는 단어 또는 단어의 조합인 어구로 구분될 수 있다. NLP 모듈(21)은 구체적으로 형태소 분석, 어간 추출, 불용어 추출, TF, TFIDF 등의 기능을 포함할 수 있다. 이후, 벡터화 모듈(22, Sentence2vec나 Word2vec, SyntexNet)에 의해 구분된 개체와 의미구를 벡터값으로 처리하게 된다. 또는 Word2vec가 이용될 수 있고, 구체적으로는 n-gram, 문맥으로부터 단어를 예측하는 CBOW 모델, 또는 단어로부터 문맥을 예측하는 Skip-gram 모델 등이 이용될 수 있다. 즉, 구분 모듈(2)은 개체와 의미구를 포함하는 어구 정보를 생성할 수 있고, 벡터화 모듈(22)에 의해 어구 정보는 벡터값으로 표현될 수 있다. 본 발명의 일실시예에 따르면 벡터화 모듈(22)은 도메인 매칭 장치(3)에서 유사도 판단을 수행하는 경우에만 선택적으로 구성될 수 있다. The classification module 2 receives the input data 200 in a normal text form and divides the general character string type into an entity and an intent by the NLP module 21 . The input data may be divided into words or phrases that are combinations of words by the classification module (2). The NLP module 21 may specifically include morphological analysis, stem extraction, abstraction extraction, TF, TFIDF, and the like. Thereafter, the objects and semantic phrases separated by the vectorization module 22 (Sentence2vec, Word2vec, SyntexNet) are processed as vector values. Or Word2vec may be used, and specifically, an n-gram, a CBOW model for predicting a word from a context, or a Skip-gram model for predicting a context from a word may be used. That is, the classification module 2 may generate the phrase information including the entity and the semantic phrase, and the phrase information by the vectorization module 22 may be expressed by the vector value. According to an embodiment of the present invention, the vectorization module 22 can be selectively configured only when performing the similarity determination in the domain matching device 3. [

도메인 매칭 장치(3)는 상기 구분 모듈(2)에서 수신한 벡터화 된 어구 정보를 토대로 각각의 특정 도메인 파이프라인(40)의 질문 데이터 세트와의 유사도를 산출하여 도메인 스코어를 생성하고, 각각의 도메인 중 도메인 스코어가 가장 높은 도메인으로 입력 데이터를 매칭하게 된다. 이때 유사도의 계산은 General Corpus를 이용한 유사도를 이용할 수 있다. 이를 Corpus-used Similarity라고 할 수 있다. 예를 들어, 한국어의 경우, 국립국어원의 General Corpus 등을 이용할 수 있고, 영어는 Brown Corpus 등을 이용할 수 있다. 또는, 의미 네트워크(Semantic network)를 활용한 유사도 측정을 이용할 수 있다. 이를 Knowledge-based Similarity라고 할 수 있다. 예를 들어, wordNet을 들 수 있다. wordNet을 활용한 단어와 단어 사이의 유사도 측정은 노드 사이의 최소 거리를 활용하는 Path similarity, 노드의 최소거리 및 최대 깊이를 활용하는 Leacock & Chodorow Similarity, 깊이 및 최소 상위 노드를 활용하는 Wu & Palmer Similarity 등의 방법으로 수행될 수 있다.The domain matching apparatus 3 generates a domain score by calculating the degree of similarity with the query data set of each specific domain pipeline 40 based on the vectorized phrase information received from the classification module 2, The input data is matched to the domain having the highest domain score. At this time, similarity calculation using General Corpus can be used. This is called Corpus-used Similarity. For example, in the case of Korean, the National Corpus of General Corpus can be used, and English can use Brown Corpus. Alternatively, a similarity measure using a semantic network can be used. This is called Knowledge-based Similarity. For example, wordNet. The similarity measure between word and word using wordNet is based on the similarity of path, Leacock & Chodorow Similarity, which utilizes minimum distance and maximum depth of node, Wu & Palmer Similarity Or the like.

또한, 본 발명의 다른 실시예에 따른 도메인 매칭 장치(3)의 유사도 계산 방법은, k-nearest neighbors algorithm, Naive Bayes classifier, Support Vector machine 등의 방법을 사용할 수 있다. 또한, 예를 들어, 본 발명의 일실시예에 따르면 아래 수학식과 같은 방법으로 유사도를 계산할 수 있다.Also, the similarity calculation method of the domain matching apparatus 3 according to another embodiment of the present invention may use a k-nearest neighbors algorithm, a Naive Bayes classifier, or a support vector machine. Also, for example, according to an embodiment of the present invention, the degree of similarity can be calculated by the following equation.

Figure 112017128602056-pat00001
Figure 112017128602056-pat00001

위 수학식 1에서, Score는 벡터 x가 Dk 도메인에 속할 확률 점수로서의 도메인 스코어, Dk는 k번째 도메인, x는 n개의 원소로 이루어진 벡터, xi는 x의 i번째 원소, P(Dk)와 P(x)는 스케일링 팩터를 의미할 수 있다. 본 발명의 일실시예에 따른 수학식 1과 같은 방법으로는 유사도인 P(Dk|x)가 가장 높은 도메인 Dk로 입력 벡터 x를 분류하게 된다. 위와 같이 벡터 x가 Dk 도메인에 속할 확률 점수를 이용하는 방법에 따르면 적은 계산량을 가지고도 빠르게 도메인을 매칭시킬 수 있는 효과가 발생된다.In the above equation (1), Score is a domain score as a probability score that a vector x belongs to a D k domain, D k is a kth domain, x is a vector composed of n elements, x i is an i th element of x, P k ) and P (x) may denote a scaling factor. According to the method of Equation (1) according to an embodiment of the present invention, the input vector x is classified into the domain D k having the highest degree of similarity P (D k | x). According to the method using the probability score that the vector x belongs to the D k domain as described above, it is possible to quickly match the domain even with a small amount of calculation.

또한, 본 발명의 다른 실시예에 따른 도메인 매칭 장치(3)는 구분 모듈(2)에서 구분된 어구가 어떤 특정 도메인에 특징적인지 여부를 판단하기 위하여 특정 도메인 파이프라인(40)의 질문 데이터 세트에서의 입력 데이터(200)의 어구 출현 빈도(또는 어구 출현 확률)와 다른 특정 도메인 파이프라인(40)의 질문 데이터 세트에서의 입력 데이터(200)의 어구 출현 빈도(또는 어구 출현 확률)을 비교하고, 이를 통해 입력 데이터의 해당 어구가 해당 도메인에 얼마나 특징적인 어구인지에 대한 스코어인 도메인 특화 점수를 판정하여 도메인 스코어에 반영한 뒤, 각각의 도메인 중 도메인 스코어가 가장 높은 특정 도메인에 입력 데이터(200)를 매칭할 수 있다. In addition, the domain matching apparatus 3 according to another embodiment of the present invention may further include a query data set of a specific domain pipeline 40 to determine whether the phrases classified in the classification module 2 are characteristic to a particular domain (Or probability of appearance of a word) of the input data 200 of the specific domain pipeline 40 and the query appearance frequency of the input data 200 of the specific domain pipeline 40 are compared with each other, In this way, a domain-specific score, which is a score of how characteristic phrases of the input data are to the domain, is determined and reflected in the domain score, and input data 200 to a specific domain having the highest domain score among the respective domains Can be matched.

또한, 본 발명의 다른 실시예에 따른 도메인 매칭 장치(3)는 구분 모듈(2)에서 구분된 어구가 어떤 특정 도메인에 특징적인지 여부를 판단하기 위하여 특정 도메인 파이프라인(40)의 질문 데이터 세트에서의 입력 데이터(200)의 어구 출현 빈도(또는 어구 출현 확률)와 General corpus에서의 입력 데이터(200)의 어구 출현 빈도(또는 어구 출현 확률)를 비교하고, 두 빈도의 차이(또는 확률의 차이)를 통해 입력 데이터의 해당 어구가 해당 도메인에 얼마나 특징적인 어구인지에 대한 스코어인 도메인 특화 점수를 판정하여 도메인 스코어에 반영한 뒤, 각각의 도메인 중 도메인 스코어가 가장 높은 특정 도메인에 입력 데이터(200)를 매칭할 수 있다. General corpus 내 각 단어의 좌우 단어를 확인하여 해당 어구가 General corpus에서 나올 수 있는 경우의 수(또는 어구 출현 확률)를 파악하고, General corpus의 어구 출현 빈도보다 질문 데이터 세트에서의 어구 출현 빈도(또는 어구 출현 확률)가 더 높을 경우, 입력 데이터(200)의 해당 어구는 해당 도메인에 특징적이라고 판정될 수 있다. General corpus의 데이터의 양에 따라 어구 출현 빈도 판단의 기준이 될 상호관계의 거리를 i+n, i-n 까지 늘리거나 줄일 수 있다. 여기서 말하는 i는 문장 내 단어의 index 이다. 데이터의 양과 상수 n은 비례할 수 있다.In addition, the domain matching apparatus 3 according to another embodiment of the present invention may further include a query data set of a specific domain pipeline 40 to determine whether the phrases classified in the classification module 2 are characteristic to a particular domain (Or probability of occurrence of a word) of the input data 200 of the general corpus is compared with the frequency of occurrence of a word (or probability of occurrence of a word of the input data 200 of the general corpus) A domain specific score, which is a score of how much the input word of the input data is in the domain, is reflected in the domain score, and the input data 200 is assigned to the specific domain having the highest domain score among the respective domains Can be matched. (Or probabilities of occurrence of words) in the general corpus by checking the left and right words of each word in the general corpus, and comparing the frequency of occurrence of the words in the question data set The probability of appearance of the word) is higher, the corresponding phrase of the input data 200 can be determined to be characteristic to the corresponding domain. Depending on the amount of data in the general corpus, we can increase or decrease the distance of the correlation, which will be the basis for determining the frequency of occurrence of the word, to i + n, i-n. Here, i is the index of the word in the sentence. The amount of data and the constant n can be proportional.

삭제delete

본 발명의 일실시예에 따른 도메인 매칭 장치에 따르면, 입력 데이터를 수신하여 각각의 특정 도메인 파이프라인에 할당하는 작업의 계산량이 매우 적어지고 처리 속도가 향상되는 효과가 발생된다. According to the domain matching apparatus according to the embodiment of the present invention, the amount of calculation of the task of receiving input data and assigning it to each specific domain pipeline is very small and the processing speed is improved.

본 발명의 다른 실시예에 따르면, 구분 모듈은 제1구분 모듈과 제2구분 모듈로 구성되고, 제1구분 모듈은 입력 데이터를 수신하고, 상기 입력 데이터의 어구 정보를 생성하도록 구성될 수 있다. 제2구분 모듈은 특정 도메인에 대한 출력 데이터를 생성하는 특정 도메인 파이프라인의 질문 데이터 세트를 수신하고, 상기 질문 데이터 세트의 어구 정보를 생성하도록 구성될 수 있다. 이때, 도메인 스코어 계산 모듈은, 상기 입력 데이터의 어구 정보 및 상기 특정 도메인 파이프라인의 상기 질문 데이터 세트의 어구 정보를 이용하여 각각의 도메인 파이프라인에 대한 도메인 스코어를 계산하도록 구성될 수 있다.According to another embodiment of the present invention, the classifying module is composed of a first classifying module and a second classifying module, and the first classifying module can be configured to receive input data and generate the phrase information of the input data. The second segmentation module may be configured to receive a query data set of a particular domain pipeline that generates output data for a particular domain, and to generate the query information of the query data set. At this time, the domain score calculation module may be configured to calculate a domain score for each domain pipeline using the input information of the input data and the query information of the query data set of the specific domain pipeline.

응답 모듈(4)은 복수개의 특정 도메인 파이프라인(40)을 보유하고, 도메인 매칭 장치(3)에 의해 매칭된 도메인에 대해 입력 데이터를 특정 도메인 파이프라인(40)에 할당하여 특정 도메인에 맞는 응답을 출력하는 모듈이다. The response module 4 has a plurality of specific domain pipelines 40 and assigns input data to the specific domain pipeline 40 for the domain matched by the domain matching device 3 to generate a response .

특정 도메인 파이프라인(40)은 도 1 내지 도 4와 같은 기존의 자연어 응답 모듈에서 구분 모듈을 제외한 나머지 모듈인 문맥 분석기(Context Analyzer), 응답 결정기(Decision Maker), 응답 생성기(Response Generator) 및 각각의 도메인에 맞는 질문 데이터 세트를 포함할 수 있다. The specific domain pipeline 40 includes a Context Analyzer, a Decision Maker, a Response Generator, and the like, which are modules other than the classification module in the existing natural language response module as shown in FIGS. 1 to 4 Lt; RTI ID = 0.0 > domain < / RTI >

[[ 제1확장예First extended example ]]

본 발명의 일실시예에 따른 멀티 도메인 자연어 처리를 위한 도메인 매칭 장치의 제1확장예와 관련하여, 도메인 매칭 장치는 도메인의 매칭에 관한 가중치를 도메인 스코어의 계산에 적용할 수 있고, 이러한 가중치를 시계열적으로 업데이트하는 가중치 모듈과 연결될 수 있다.With respect to the first extension example of the domain matching apparatus for multi-domain natural language processing according to an embodiment of the present invention, the domain matching apparatus can apply the weight for matching of the domain to the calculation of the domain score, And can be linked to a weight module that updates the time thermally.

도 5는 본 발명의 제1확장예에 따른 자연어 처리 장치의 신호 흐름을 도시한 모식도이다. 도 5에 도시된 바와 같이, 본 발명의 제1확장예에 따른 자연어 처리 장치는 시간 t의 자연어 처리 장치와 시간 t+1의 자연어 처리 장치 사이에 가중치 모듈(5)을 더 포함할 수 있다. 5 is a schematic diagram showing a signal flow of the natural language processing apparatus according to the first extended example of the present invention. As shown in FIG. 5, the natural language processing apparatus according to the first extended example of the present invention may further include a weight module 5 between the natural language processing apparatus at time t and the natural language processing apparatus at time t + 1.

가중치 모듈(5)은 시간 t의 도메인 매칭 장치(3)에서 산출된 도메인 스코어 또는 특정 도메인에 대한 정보를 시간 t+1의 도메인 매칭 장치(3)에서의 도메인 스코어 또는 특정 도메인의 매칭에 가중치로서 적용하는 모듈이다. The weighting module 5 calculates information on the domain score or the specific domain calculated in the domain matching apparatus 3 at time t as a weight for the matching of the domain score or the specific domain in the domain matching apparatus 3 at time t + It is a module to apply.

가중치의 산출 방법으로, 시간 t에 입력된 입력 데이터가 매칭된 도메인의 도메인 스코어가 시간 t+1의 입력 데이터에 대한 도메인 스코어에 영향을 주는 것으로서, 가까운 시간 내에 입력 데이터가 연속적으로 입력될수록 특정 도메인의 도메인 스코어에 양의 가중치를 더 주게 되고, 시간이 지날수록 이러한 양의 가중치는 저감되며, 다른 특정 도메인의 도메인 스코어가 더 높아서 다른 도메인으로 매칭되어야 하는 경우 음의 가중치를 주게 되는 방법으로 구성될 수 있다. 즉, 가중치는 입력 데이터가 입력되는 시간차에 따라 도메인이 유지될 확률을 의미할 수 있다.As the method of calculating the weight, the domain score of the domain matched with the input data inputted at the time t affects the domain score of the input data at the time t + 1, and as the input data is continuously input in the near time, The weighting of these quantities is reduced as time goes by and the domain scores of the other specific domains are higher and they are constructed in such a way as to give negative weights when they are to be matched to different domains . That is, the weight may mean the probability that the domain will be maintained according to the time difference in which the input data is input.

또는, 다른 형태의 가중치 산출 방법으로, 이전에 어떤 어구 정보에 대해 어떻게 도메인 스코어가 나왔는지, 또는 이전에 어떤 어구 정보에 대해 어떤 도메인으로 매칭되었는지를 의미할 수 있다. Alternatively, with another form of weighting calculation method, it may mean how the domain score was previously obtained for certain phrase information, or which domain was previously matched with which phrase information.

이러한 가중치를 시계열적으로 업데이트하는 가중치 모듈에 따르면, 예를 들어, "얼마에요?" 등과 같은 어떤 도메인 파이프라인에 매칭해야 하는지가 애매한 입력 데이터에 대해 정교하게 도메인 매칭을 수행할 수 있게 되는 효과가 발생된다.According to a weight module that updates these weights in a time-wise manner, for example, "How much?" It is possible to finely perform domain matching on ambiguous input data.

본 발명의 일실시예에 따른 가중치 산출 방법의 확장예로는 이하와 같다. An extended example of the weight calculation method according to an embodiment of the present invention is as follows.

[[ 제2확장예Second Extended Example -메모리 방식]- Memory type]

일련의 입력 데이터가 들어오고 있는 상황에서, 본 발명의 제2확장예에 따른 가중치 모듈(5)은 앞서 들어온 입력 데이터를 매칭한 도메인에 대해 도메인 매칭 장치(3)가 가중치를 부여하도록 구성될 수 있다. 현재 입력 데이터, 즉 i번째 입력 데이터를 x(i)이라고 했을 때, x(i-1), x(i-2), x(i-3) … x(i-M) 가 각각 할당된 도메인이 모두 Dk로 동일하면 이는 하나의 도메인에서 M개의 입력 데이터가 연속되었다고 볼 수 있다. 이때, i-1, i-2, i-3,..., i-M은 '직전 동일 도메인 구간'으로 정의될 수 있다. 또한, 이러한 직전 동일 도메인 구간에 기매칭된 도메인인 Dk는 '기매칭 도메인'으로 정의될 수 있다. In a situation where a series of input data is input, the weight module 5 according to the second extended example of the present invention may be configured such that the domain matching device 3 assigns a weight to the domain matched with the input data inputted in advance have. X (i-1), x (i-2), x (i-3) ... when the current input data, that is, the i- If all of the domains to which x (iM) are assigned are the same as D k , it can be seen that M input data is continuous in one domain. In this case, i-1, i-2, i-3, ..., iM may be defined as 'immediately before the same domain period'. Also, D k, which is a matched domain in the immediately preceding same domain period, can be defined as a 'matching domain'.

이에 따라 도메인 매칭 장치(3)는 가중치인 W(Dk, x(i))를 유사도 방식에서 산출한 P(Dk|x)에 곱하여 다른 나머지 도메인 파이프라인에 대한 유사도 계산을 수행하지 않고도 도메인 매칭을 유지할 수 있다. 본 발명의 제2확장예에서 가중치 모듈(5)은 직전 동일 도메인 구간의 도메인 스코어를 토대로 시간 t의 도메인 스코어에 적용할 가중치를 생성할 수 있다. Accordingly, the domain matching apparatus 3 multiplies the weight W (D k , x (i)) by P (D k | x) calculated by the similarity method to calculate the similarity of the domain P Matching can be maintained. In the second extension example of the present invention, the weight module 5 may generate a weight to be applied to the domain score at time t based on the domain score of the immediately preceding same domain period.

보다 구체적으로는 아래 수학식과 같다.More specifically, it is expressed by the following equation.

Figure 112017128602056-pat00002
Figure 112017128602056-pat00002

Figure 112017128602056-pat00003
Figure 112017128602056-pat00003

Figure 112017128602056-pat00004
Figure 112017128602056-pat00004

수학식 3은 M개의 입력 데이터가 연속으로 Dk에 포함되거나, 포함되지 않을 때에 M에 대한 함수로 표현되는 가중치 W(Dk, x)를 기재한 것이다. Equation (3) describes a weight W (D k , x) expressed as a function of M when M input data are included in D k consecutively or not.

수학식 2, 3에서 Score는 벡터 x가 Dk 도메인에 속할 확률 점수로서의 도메인 스코어, Dk는 k번째 도메인, x는 n개의 원소로 이루어진 벡터, xi는 x의 i번째 원소, P(Dk)와 P(x)는 스케일링 팩터 또는 확률 분포를 의미할 수 있다. 또한, i번째 입력 데이터를 x(i)이라고 했을 때, x(i-1), x(i-2), x(i-3) … x(i-M) 가 각각 할당된 도메인이 모두 Dk로 동일하면 이는 하나의 도메인에서 M개의 입력 데이터가 연속되었다고 볼 수 있으며, 이에 따라 가중치인 W(Dk, x(i))를 유사도 방식에서 산출한 P(Dk|x)에 곱하여 도메인 스코어를 산출하게 됨으로써 도메인 매칭을 유지할 수 있다.In Equations (2) and (3), Score is a domain score as a probability score that a vector x belongs to a D k domain, D k is a k th domain, x is a vector composed of n elements, x i is an i th element of x, P k ) and P (x) may mean a scaling factor or a probability distribution. (I-1), x (i-2), x (i-3) ... If all the domains to which x (iM) are assigned are the same as D k , it can be considered that M input data is continuous in one domain. Thus, weights W (D k , x The domain matching can be maintained by multiplying the calculated P (D k | x) by calculating the domain score.

또는, 유사도 P(Dk|x)의 불연속 미분값을 산출하여 변화도를 구하고 이를 통해 최근 M개의 입력 데이터에 대한 가중치 W(Dk, x(i))를 구할 수도 있다. Alternatively, the discontinuous differential value of the similarity P (D k | x) may be calculated, and the weight W (D k , x (i)) for the recent M input data may be obtained.

Figure 112017128602056-pat00005
Figure 112017128602056-pat00005

위 수학식에서 N은 입력 데이터의 최종 입력 횟수를 의미할 수 있다. 각 도메인의 가중치인 W(Dk) 양상은 아래와 같이 변화할 수 있다.In the above equation, N may mean the number of times the input data is finally input. The W (D k ) aspect of each domain can be changed as follows.

Figure 112017128602056-pat00006
Figure 112017128602056-pat00006
제2확장예에 따른 각 도메인의 가중치인 W(Dk)의 시계열적 양상The time-wise aspect of W (D k ), which is the weight of each domain according to the second expansion example

본 발명의 제2확장예의 또 다른 예에서의 가중치는 직전 동일 도메인 구간의 도메인에 속할 확률을 별도로 계측하는 것이다. 이는 Recurrent Neural Network과 같은 방식으로 시계열적인 시퀀스 데이터를 기초로 학습될 수 있다. 예를 들어, 본 발명의 제2확장예에서의 가중치는 특정 도메인에서 입력 데이터 A가 입력된 뒤에 순차적으로 입력 데이터 B가 입력될 확률을 의미할 수 있다. In another example of the second extended example of the present invention, the weight is a measure of the probability of belonging to the domain of the immediately preceding same domain period. This can be learned based on time series sequence data in the same way as Recurrent Neural Network. For example, the weight in the second extended example of the present invention may mean the probability that input data B is sequentially input after input data A is input in a specific domain.

Figure 112017128602056-pat00007
Figure 112017128602056-pat00007
Figure 112017128602056-pat00008
Figure 112017128602056-pat00008
제2확장예의 다른 예에 따른 RNN 방식의 모식도A schematic diagram of the RNN scheme according to another example of the second extended example

위의 표 2에서 wrec는 RNN에서의 되먹임 가중치를 의미할 수 있다.위 표 2에서 S함수는 특정 도메인 파이프라인을 의미할 수 있다. 이러한 경우 RNN의 출력 데이터인 y(t)로 시간 t에 어떤 어구 정보가 입력 데이터로 입력될지에 대한 예측이 가능해지는 효과가 발생된다. 본 발명의 제2확장예에서의 가중치는 이러한 입력 데이터 예측 정보가 이용될 수 있다.In Table 2 above, wrec can mean the feedback weights in the RNN. In Table 2 above, the S function can refer to a specific domain pipeline. In this case, it is possible to predict which word information will be input as input data at time t by the output data y (t) of the RNN. This input data prediction information can be used as the weight in the second extended example of the present invention.

이와 같은 방식을 적용하면, 예를 들어, 치킨 배달 도메인으로 분류되는 입력 데이터를 처리하는 도중(ex. 파닭은 얼마에요? / 황금올리브 쿠폰 적용 되나요?) 말뭉치 유사도만으로 특정 도메인을 판정하기 어려운 입력 데이터(ex. 그래서 몇시까지 되요? / 얼마냐구요?)가 입력되더라도 이를 기존에 처리하고 있던 도메인으로 분류하여 일관적인 주제의 대화로 수렴시키는 것이 가능해지는 효과가 발생된다.When applying this method, for example, when input data classified as a chicken delivery domain is processed (eg, how much is chicken / golden olive coupon applies), input data (eg, what time is it / how much?) is input, it is possible to classify it into a domain that has been processed previously and converge it into a conversation of consistent subject.

또한, 입력 데이터를 통해 도메인 파이프라인을 매칭하는데 있어서, 연산량 절감의 효과가 발생된다. 직전의 입력 벡터(벡터화된 입력 데이터)인 x(i-1)이 Dk에 속하는 경우, P(Dk|x(i)) 와 W(Dk, x(i))의 곱이 임계확률(예. 50%)을 넘으면 Dk를 제외한 다른 도메인과 유사도를 산출할 필요 없이 곧바로 x(i-1)을 Dk에 할당할 수 있도록 구성할 수 있는 효과가 발생된다.Further, in matching the domain pipeline through the input data, the effect of reducing the amount of computation is generated. When the previous input vector (vectorized input data) x (i-1) belongs to D k , the product of P (D k | x (i)) and W (D k , x examples the effects that can be configured to immediately assign the x (i-1) to D k, without having to calculate the degree of similarity with other domains except for D k greater than 50%) is generated.

[[ 제3확장예Third Expansion Example -전이 확률 방식]- transition probability method]

일련의 입력 데이터가 들어오고 있는 상황에서, 현재 매칭되어 있는 도메인 파이프라인에서 다른 도메인 파이프라인으로 전이해야 할 상황이 오는 경우, 본 발명의 제3확장예에 따른 가중치 모듈(5)은 앞서 들어온 입력 데이터를 매칭한 도메인에서 다른 도메인으로 전이될 확률에 기초해 도메인 매칭 장치(3)에 가중치를 부여하도록 구성될 수 있다. 보다 구체적으로 본 발명의 제3확장예에 따른 가중치 모듈(5)은, 일련의 입력 데이터가 들어오고 있고 앞서 들어온 입력 데이터가 각각 하나씩의 도메인에 할당되어 있을 때, 직전에 들어온 입력 데이터가 할당된 도메인에서 도메인 집합 내의 도메인으로 전이될 수 있는 확률 분포 테이블(도메인 전이 확률 분포)을 구성하고, 이를 적용하여 각 도메인에 할당될 확률을 계산하도록 구성될 수 있다. 예를 들어 아래와 같이 설명될 수 있다. In the case where a series of input data comes in, and a situation is to be transferred from the currently matched domain pipeline to another domain pipeline, the weight module 5 according to the third extended example of the present invention is a module And to assign a weight to the domain matching apparatus 3 based on the probability that the data will be transferred from the matched domain to another domain. More specifically, the weight module 5 according to the third extended example of the present invention, when a series of input data is input and input data previously input is assigned to one domain, A probability distribution table (domain transition probability distribution) that can be transferred from a domain to a domain in a domain set, and applying this to calculate the probability to be assigned to each domain. For example, it can be explained as follows.

Figure 112017128602056-pat00009
Figure 112017128602056-pat00009
제3확장예에 따른 도메인 전이 확률 분포의 도식화된 예Schematic example of domain transition probability distribution according to the third extension example

도메인 전이 확률 분포 테이블Domain transition probability distribution table D1 (게임)D1 (game) D2 (영화)D2 (movie) D3 (치킨)D3 (chicken) ...... D1 (게임)D1 (game) 60%60% 20%20% 4%4% D2 (영화)D2 (movie) 15%15% 75%75% 5%5% D3 (치킨)D3 (chicken) 3%3% 2%2% 80%80% ......

Figure 112017128602056-pat00010
Figure 112017128602056-pat00010

Figure 112017128602056-pat00011
Figure 112017128602056-pat00011

위 수학식에서 Score는 도메인 스코어, P(Dk|x)는 입력 데이터 x가 Dk에 속하는 확률, W(Dk, x(i))는 가중치, P(Dk|Dj)는 Dk에서 Dj로 전이될 도메인 전이 확률을 의미할 수 있다. Above equation Score domain score, P (D k | x) is a weight, P probability that the input data x belong to the D k, W (D k, x (i)) (D k | D j) is D k To D j .

이와 같은 방식을 적용하면, 도메인의 전환이 일어나는 시점에서 도메인 간의 전이에 대한 확률인 도메인 전이 확률을 기반으로, 이전 입력 데이터의 도메인으로부터 전이될 확률이 높은 도메인으로 다음 입력 데이터를 분류할 수 있는 확률을 곱하여 도메인 스코어를 결정할 수 있다. 예를 들어, 영화 이야기를 나누다가 연예인 이야기로 도메인이 전이될 확률은 높지만, 영화 이야기를 나누다가 치킨 이야기로 도메인이 전이될 확률은 낮다는 것을 도메인 스코어의 계산에 적용할 수 있다. 도메인 전이 확률은 과거의 도메인 전이에 관한 데이터를 기반으로 계산될 수 있고, 입력 데이터의 입력 시간차에 따라 달라질 수 있다.In this way, the probability that a next input data can be classified into a domain having a high probability of transition from the domain of the previous input data is calculated based on the domain transition probability, which is a probability of transition between the domains at the time of domain conversion. Lt; / RTI > to determine the domain score. For example, the probability that a domain will be transferred to an entertainer story when sharing a movie story is high, but it can be applied to the calculation of a domain score that the probability that a domain is transferred to a story of a chicken after a story of a movie is low. The domain transition probability can be calculated based on data on past domain transitions and can be changed according to the input time difference of input data.

또한, 도메인이 기존의 Dk에서 다음 도메인 Dj로 넘어가는 시점에서, Dj를 계산하기 위해 Dk를 제외한 모든 도메인과 유사도를 구할 필요 없이, Dk와의 도메인 전이 확률이 높은 도메인들을 먼저 계산하는 것으로 계산량을 감축시킬 수 있다.Also, at the time when the domain moves from the existing D k to the next domain D j , it is necessary to first calculate the domains with high probability of domain transition with D k without calculating the similarity with all domains except D k in order to calculate D j The amount of computation can be reduced.

[[ 제4확장예Fourth Extended Example - 도메인 강화학습]- Domain reinforcement learning]

일련의 입력 데이터가 들어오고 있는 상황에서, 본 발명의 제4확장예에 따른 가중치 모듈(5)은 앞서 들어온 입력 데이터를 매칭한 도메인에서 다른 도메인으로 전이될 확률에 기초해 가중치를 부여하도록 구성되는 동시에, 해당 가중치에 강화학습(Reinforcement Learning)을 수행하여 사용자의 반응에 따라 가중치가 업데이트 되도록 구성될 수 있다. 강화 학습에서 이용될 보상으로는 도메인 매칭 장치(3)의 특정 도메인 파이프라인(40)의 매칭에 의해 출력되는 시간 t의 출력 데이터(201)에 대한 사용자의 반응, 즉 시간 t의 출력 데이터(201)를 사용자가 수신한 뒤에 재차 입력되는 시간 t+1의 입력 데이터(200)의 감성 분석값이 이용될 수 있다. In a situation where a series of input data is input, the weight module 5 according to the fourth extended example of the present invention is configured to assign a weight based on the probability of transition from the matching domain to the other domain At the same time, reinforcement learning may be performed on the weight, so that the weight is updated according to the user's response. The compensation to be used in the reinforcement learning includes the user's reaction to the output data 201 of the time t output by the matching of the specific domain pipeline 40 of the domain matching apparatus 3, ) Of the input data 200 at the time t + 1 that is input again after the user has received the input data 200 may be used.

도 6은 본 발명의 제4확장예에 따른 자연어 처리 장치의 신호 흐름을 도시한 모식도이다. 도 6에 도시된 바와 같이, 본 발명의 제4확장예에 따른 자연어 처리 장치는 시간 t의 자연어 처리 장치와 시간 t+1의 자연어 처리 장치 사이에 구성되는 가중치 모듈(5)과 센티멘탈 분석 모듈(6)을 더 포함할 수 있다. 가중치 모듈(5)은 시간 t의 도메인 매칭 장치(3)에서 산출된 도메인 스코어 또는 특정 도메인에 대한 정보를 시간 t+1의 도메인 매칭 장치(3)에서의 도메인 스코어 또는 특정 도메인의 매칭에 적용하는 모듈로서, 제1,2,3확장예의 가중치 모듈(5)과 동일한 역할을 수행하도록 구성될 수 있다. 다만, 제4확장예에서의 가중치 모듈(5)의 가중치는 센티멘탈 분석 모듈(6)의 감성 분석값에 의해 업데이트 되도록 구성될 수 있다. 또한, 센티멘탈 분석 모듈(6)은 시간 t+1의 구분 모듈(2)과 연결되어 입력 데이터(200)의 구분된 어구 및 Sentiment dictionary를 이용하여 시간 t+1의 입력 데이터(200)의 감성 분석값을 생성하고, 생성된 감성 분석값을 가중치 모듈(5)에 제공할 수 있다. 6 is a schematic diagram showing a signal flow of a natural language processing apparatus according to a fourth extended example of the present invention. As shown in FIG. 6, the natural language processing apparatus according to the fourth extended example of the present invention includes a weight module 5 and a sentiment analysis module 5, which are configured between a natural language processing apparatus at time t and a natural language processing apparatus at time t + 6). The weighting module 5 applies the domain score calculated in the domain matching apparatus 3 at time t or the information about the specific domain to the domain score in the domain matching apparatus 3 at time t + As the module, it can be configured to perform the same role as the weight module 5 of the first, second and third extension examples. However, the weight of the weight module 5 in the fourth extended example may be configured to be updated by the emotion analysis value of the sentiment analysis module 6. The sentiment analysis module 6 is connected to the classification module 2 at time t + 1 and performs sentiment analysis of the input data 200 at time t + 1 using the delimited phrases of the input data 200 and the sentiment dictionary Value, and provide the generated emotion analysis value to the weight module 5.

도 7은 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습을 도시한 모식도이다. 도 7에 도시된 바와 같이, 본 발명의 제4확장예에 따른 자연어 처리 장치는 시간 t의 자연어 처리 장치와 시간 t+1의 자연어 처리 장치 사이에 구성되는 가중치 모듈(5)을 Agent로 하고, 가중치 모듈(5)에서 생성되는 가중치를 Agent의 Action으로, 도메인 매칭 장치(3)의 각각의 특정 도메인 파이프라인(40)에 포함된 질문 데이터 세트와 입력 데이터(200)와의 유사도 및 가중치에 의해 도메인 스코어가 결정되는 환경을 Environment로, 시간 t의 입력 데이터(200)를 State로, 시간 t+1의 입력 데이터(200)를 센티멘탈 분석 모듈(6)이 감성 분석하여 생성하는 감성 분석값을 Reward로 하는 강화학습 알고리즘이 구성될 수 있다. 7 is a schematic diagram showing reinforcement learning of a natural language processing apparatus according to a fourth extended example of the present invention. As shown in FIG. 7, the natural language processing apparatus according to the fourth extended example of the present invention uses the weight module 5, which is configured between the natural language processing apparatus at time t and the natural language processing apparatus at time t + 1, as Agent, The weights generated in the weighting module 5 are used as actions of the Agent in accordance with the degree of similarity and weight between the query data set included in each specific domain pipeline 40 of the domain matching apparatus 3 and the input data 200, The sentiment analysis value generated by the sentiment analysis module 6 by the sentiment analysis module 6 is expressed as Reward by the input data 200 of the time t and the input data 200 of the time t + A reinforcement learning algorithm can be constructed.

기존의 강화학습은 대부분 게임과 같은 도메인에 주로 이용되었고, 본 발명의 제4확장예와 같이 자연어 처리 장치에 이용된 바가 매우 드믈다. 또한, 기존에 자연어 처리를 함에 있어서 강화학습을 적용한다 하여도 구체적으로 본 발명의 제4확장예와 같이 Agent, Action, State, Reward 및 Environment를 설정한 바는 찾아보기 힘들다. 본 발명의 제4확장예와 같이 Agent를 가중치 모듈(5)로 구성하고, 가중치 모듈(5)의 가중치를 Action으로, 그리고 시간 t의 입력 데이터(200)를 State로 구성하게 되면, 복수개의 도메인 파이프라인을 가진 자연어 처리 장치가 특정 입력 데이터(200)의 어구 구성에 따라 가중치가 다이나믹하게 업데이트 되면서 점점 정교하게 특정 도메인 파이프라인을 매칭하게 될 확률이 높아지는 효과가 발생된다. 또한, 가중치 모듈(5)의 가중치 결정을 Action으로 하는 동시에 시간 t+1의 입력 데이터(200)의 감성 분석값을 Reward로 구성한 것에 의해 사용자의 내심의 의사에 맞는 특정 도메인 파이프라인이 매칭될 수 있는 효과가 발생된다.The existing reinforcement learning is mainly used in a domain such as a game, and it is very rare that the reinforcement learning is used in a natural language processing apparatus as in the fourth extension example of the present invention. In addition, even if the reinforcement learning is applied in the conventional natural language processing, it is hard to find an Agent, Action, State, Reward, and Environment set as in the fourth extension example of the present invention. If the weight of the weight module 5 is set to Action and the input data 200 of the time t is configured to State as in the fourth extension example of the present invention, There is an effect that the probability that a natural language processing apparatus having a pipeline will gradually and specifically match a specific domain pipeline becomes higher as the weights are dynamically updated according to the phrase configuration of the specific input data 200. [ In addition, since the weighting of the weight module 5 is determined as Action and the sensitivity analysis value of the input data 200 at time t + 1 is configured as Reward, the specific domain pipeline matching the intention of the user can be matched An effect is generated.

도 8은 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습의 상태흐름을 도시한 모식도이다. 도 8에 도시된 바와 같이, 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습은 State, Action, Reward의 상태가 연속적으로 수행될 수 있다. 이러한 자연어 처리 장치의 강화학습은 이러한 신호 단계로 계속되거나, 도 8의 Sn과 같은 최종 상태(Terminal state)를 포함하도록 구성될 수 있다.8 is a schematic diagram showing a state flow of reinforcement learning of the natural language processing apparatus according to the fourth extended example of the present invention. As shown in FIG. 8, in the reinforcement learning of the natural language processing apparatus according to the fourth extended example of the present invention, states of State, Action, and Reward can be continuously performed. Reinforcement learning of this natural language processing apparatus may be continued to this signaling stage or may be configured to include a terminal state S n as shown in FIG. 8.

도 9는 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습의 신호 흐름을 도시한 모식도이다. 도 9에 도시된 바와 같이, 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습은 시간 t의 자연어 처리 장치와 시간 t+1의 자연어 처리 장치 사이에 구성되는 가중치 모듈(5)을 Agent로 하고, 가중치 모듈(5)에서 생성되는 가중치를 Agent의 Action0으로, 시간 t의 입력 데이터(200)를 State0로, 시간 t+1의 입력 데이터(200)를 센티멘탈 분석 모듈(6)이 감성 분석하여 생성하는 감성 분석값을 Reward1로 하는 강화학습 알고리즘이 구성될 수 있다. 이후 시간 t+1의 입력 데이터(200)를 State1로 다시 강화학습 사이클을 시작할 수 있다.9 is a schematic diagram showing a signal flow of reinforcement learning of the natural language processing apparatus according to the fourth extended example of the present invention. 9, reinforcement learning of the natural language processing apparatus according to the fourth extended example of the present invention is performed by assigning a weight module 5 configured between the natural language processing apparatus at time t and the natural language processing apparatus at time t + The input data 200 of the time t to the state 0 and the input data 200 of the time t + 1 to the sentiment analyzing module 6 as the action 0 of Agent, the weight generated by the weight module 5, A reinforcement learning algorithm can be constructed in which the sensibility analysis value generated by emotion analysis is Reward 1 . Then, the input data 200 at time t + 1 can be restarted to State 1 to start the reinforcement learning cycle.

위와 같은 본 발명의 제4확장예에 따르면, 기존에 자연어 처리 장치에 적용하기 어려웠던 강화학습을 이용하여 각각의 입력 데이터에 가장 맞는 특정 도메인 파이프라인을 매칭하게 되는 효과가 발생된다.According to the fourth extended example of the present invention, it is possible to match a specific domain pipeline that best matches each input data by using reinforcement learning, which has been difficult to apply to a natural language processing apparatus.

[[ 제5확장예Fifth Extended Example -Q를 이용한 강화학습]Reinforcement learning using -Q]

본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습은 Reward가 희박(sparse)하다는 문제가 발생될 수 있다. Reward가 희박하다는 문제는 특정 상태(state, 입력 데이터)가 주어졌을 때 어떤 행위(action, 가중치)를 선택할지에 대해 더 나은 방향으로 훈련하는 과정에 있어서, 특정 action을 하더라도 이로 인한 Reward가 시간이 지나 시간 t+1의 입력 데이터가 입력된 이후에 나타나기 때문에 훈련이 제대로 되지 않을 리스크가 있다는 것이다.The reinforcement learning of the natural language processing apparatus according to the fourth extended example of the present invention may cause a problem that the reward is sparse. The problem of Reward being lean is that in the course of training in a better way to choose which action (weight) to take when given a certain state (input data) And there is a risk that the training will not be performed because the input data at time t + 1 appears after inputting.

따라서 이러한 문제를 해소하기 위하여 예측치 Q를 이용하여 강화학습을 하도록 구성될 수 있다. 이를 본 발명의 제5확장예로 정의할 수 있고, 도 10은 본 발명의 제5확장예에 따른 자연어 처리 장치의 강화학습의 예측치에 관한 Q 함수를 도시한 것이다. 도 10에 도시된 바와 같이, 본 발명의 제5확장예에 따른 자연어 처리 장치의 Q 함수를 이용한 강화학습은 입력 데이터(200)를 State로 하고, Agent인 가중치 모듈(5)에서 설정되는 가중치를 Action으로 하여 예상되는 Reward인 Quality를 출력하는 함수 Q(state, action)를 이용할 수 있다. Q함수를 이용하게 되면 특정 행동을 하기 이전에 Reward에 대한 예측치를 이용하여 강화학습 할 수 있게 되는 효과가 있다. Therefore, in order to solve such a problem, it can be configured to perform reinforcement learning using the predicted value Q. FIG. 10 shows a Q function relating to the predicted value of reinforcement learning of the natural language processing apparatus according to the fifth extended example of the present invention. 10, in the reinforcement learning using the Q function of the natural language processing apparatus according to the fifth extended example of the present invention, the input data 200 is set to the State, and the weight set by the weight module 5, which is the agent, It is possible to use a function Q (state, action) for outputting Reward Quality expected as an Action. Using the Q function, it is possible to reinforce learning by using the predicted value of Reward before performing a specific action.

Figure 112017128602056-pat00012
Figure 112017128602056-pat00012

위 수학식 6에서 Q는 Reward에 대한 예측치, Max Q는 Q가 가질 수 있는 최대값, s는 시간 t의 state, a'는 시간 t+1의 action을 의미한다. "'"는 시간 t+1을 의미한다. Q의 최대치를 주는 action에 대해서는 아래와 같은 Optimal policy가 제안될 수 있다. In Equation (6), Q denotes a predicted value for Reward, Max Q denotes a maximum value Q can have, s denotes a state at time t, and a 'denotes an action at time t + 1. "" Means time t + 1. For the action giving the maximum value of Q, the following optimal policy can be proposed.

Figure 112017128602056-pat00013
Figure 112017128602056-pat00013

위의 수학식 7에서 π*은 Q에 대한 Optimal Policy를 의미할 수 있다. 이때, 시간 t의 Q(s,a)를 시간 t+1의 Q(s',a')로 이용하여 표현하기 위해 아래와 같은 방식이 제안될 수 있다.In Equation (7), π * can mean an Optimal Policy for Q. At this time, the following method may be proposed to express Q (s, a) at time t as Q (s ', a') at time t + 1.

Figure 112017128602056-pat00014
Figure 112017128602056-pat00014

Agent인 가중치 모듈(5)이 받을 수 있는 미래의 모든 Reward의 합을 R, 최종 상태를 n이라고 정의했을 때, R은 위의 수학식 8과 같이 정의될 수 있다. R을 시간 t에 대한 변수로 표현하면 아래와 같이 계산될 수 있다.When the sum of all future rewards which can be received by the weighting module 5 as an agent is defined as R, and the final state is defined as n, R can be defined as Equation 8 above. Expressing R as a variable for time t, it can be calculated as follows.

Figure 112017128602056-pat00015
Figure 112017128602056-pat00015

또한, 수학식 9를 시간 t+1에 대한 변수로 표현하면 아래와 같이 계산될 수 있다. Also, Expression (9) can be expressed as a variable for time t + 1 as follows.

Figure 112017128602056-pat00016
Figure 112017128602056-pat00016

따라서, Rt는 아래와 같이 표현될 수 있다. Therefore, R t can be expressed as follows.

Figure 112017128602056-pat00017
Figure 112017128602056-pat00017

이러한 Rt에 대한 Optimal 값은 대략적으로 아래와 같이 표현될 수 있다. The Optimal value for this R t can be roughly expressed as follows.

Figure 112017128602056-pat00018
Figure 112017128602056-pat00018

위 수학식 12에서 "*"는 Optimal, max는 최대치를 의미할 수 있다. In Equation (12), "*" may mean Optimal, and max may mean a maximum value.

따라서, 수학식 12에 따르면 아래와 같이 Q함수에 대해서도 수학식 12와 같이 표현할 수 있게 된다.Therefore, according to Equation (12), the Q function can be expressed as Equation (12) as follows.

Figure 112017128602056-pat00019
Figure 112017128602056-pat00019

수학식 13에서 Q hat은 Q값에 대한 예측치, s,a는 시간 t의 state와 action, r은 시간 t의 reward, s',a'는 시간 t+1의 state와 action을 의미할 수 있다. 수학식 13에 따르면, 현재의 Q값에 대한 예측치는 현재의 reward와 t+1의 Q값의 예측치의 최대치를 이용하여 업데이트 될 수 있다. 따라서, 본 발명의 제4확장예에 따른 자연어 처리 장치의 강화학습에서 Q값은 수학식 13과 같이 강화학습 될 수 있다. In Equation 13, Q hat is the predicted value of Q, s, a is state and action of time t, r is reward of time t, s ', a' is state and action of time t + 1 . According to Equation (13), the predicted value for the current Q value can be updated using the maximum value of the predicted value of the Q value of the current reward and t + 1. Therefore, in the reinforcement learning of the natural language processing apparatus according to the fourth extended example of the present invention, the Q value can be reinforcement learned as shown in Equation (13).

구체적인 알고리즘과 관련하여, 이하 표는 본 발명의 제5확장예에 따른 Q값을 이용한 강화학습 알고리즘을 도시한 것이다. With respect to the concrete algorithm, the following table shows a reinforcement learning algorithm using the Q value according to the fifth extended example of the present invention.

Algorithm
For each s,a initialize table entry

Figure 112017128602056-pat00020

Observe current state s
Do forever:
-Select an action a and execute it
-Receive immediate reward r
-Observe the new state s'
-Update the table entry for
Figure 112017128602056-pat00021
as follows:
Figure 112017128602056-pat00022

-s <- s'

Algorithm
For each s, a initialize table entry
Figure 112017128602056-pat00020

Observe current state s
Do forever:
-Select an action a and execute it
-Receive immediate reward r
-Observe the new state s'
-Update the table entry for
Figure 112017128602056-pat00021
as follows:
Figure 112017128602056-pat00022

-s <- s>

본 발명의 제5확장예에 따른 자연어 처리 장치의 강화학습에서 Q값을 이용한 강화학습 알고리즘The reinforcement learning algorithm using the Q value in the reinforcement learning of the natural language processing apparatus according to the fifth extended example of the present invention

[[ 제6확장예Example 6 extended - 학습률을 이용한 강화학습]- reinforcement learning using learning rate]

본 발명의 제4,5확장예에 따른 강화학습은 action인 가중치와 실제로 특정 도메인 파이프라인을 매칭하는 것이 동일하지 않을 가능성이 있어서 학습이 어려운 문제가 발생될 수 있다. 예를 들어, 특정 입력 데이터의 어구 정보에 대해 '날씨'에 대한 도메인에 높은 가중치가 부여되도록 action이 결정되는 경우, 도메인 매칭 장치(3)에서는 입력 데이터의 어구 정보와 각각의 특정 도메인 파이프라인에 포함되는 질문 데이터 세트와의 유사도를 상기 가중치와 함께 고려하기 때문에, 확률적(Stochastic)으로 '날씨'에 대한 도메인이 매칭되도록 구성될 수 있다. Reinforcement learning according to the fourth and fifth extended examples of the present invention may cause a difficulty in learning because it is likely that the weighting of the action and the matching of a specific domain pipeline are not actually the same. For example, when an action is determined such that a high weight is given to the domain for the 'weather' with respect to the phrase information of the specific input data, the domain matching apparatus 3 searches the input information of the input data for each specific domain pipeline The similarity degree with respect to the query data set included is considered together with the weight, so that the domain for 'weather' can be configured to be stochastic.

이렇게 확률적으로 action이 Environment에 적용되는 경우, 제대로 학습이 되지않을 가능성이 있다. 왜냐하면, 특정 action의 선택에 따라 특정 action이 확률적으로 수행된다면 제대로 된 피드백이 확률적으로 발생하게 되기 때문이다. If the action is applied to the environment in such a stochastic manner, there is a possibility that learning can not be performed properly. This is because, if a certain action is performed stochastically according to the selection of a specific action, a proper feedback occurs stochastically.

따라서, 본 발명의 제6확장예에서는 이러한 문제를 해결하기 위해 학습률(learning rate)을 더 추가적으로 적용할 수 있다. 시간 t의 Q(s,a)를 업데이트함에 있어서, 학습률을 적용하여 시간 t+1의 Q(s')에 대해서는 가중치 모듈(5)을를 0~1의 특정 비율로 학습하고, 시간 t의 Q(s)도 특정 비율로 함께 고려하는 것이다. Accordingly, in the sixth extended example of the present invention, a learning rate can be further applied to solve this problem. In updating the Q (s, a) of the time t, the learning module is applied to learn the weight module 5 with a specific ratio of 0 to 1 for Q (s') at time t + (s) are also considered together at a certain rate.

학습률을 적용한 Q(s,a)의 업데이트는 아래 수학식과 같이 수행될 수 있다. The update of Q (s, a) to which the learning rate is applied can be performed according to the following equation.

Figure 112017128602056-pat00023
Figure 112017128602056-pat00023

위 수학식 14에서 k는 학습률을 의미할 수 있다. In Equation (14), k may mean a learning rate.

위의 수학식 14에 따라 본 발명의 제6확장예에 따른 자연어 처리 장치의 강화학습의 알고리즘은 아래와 같이 대략적으로 구성될 수 있다. According to Equation (14) above, the reinforcement learning algorithm of the natural language processing apparatus according to the sixth extended example of the present invention can be roughly configured as follows.

Algorithm
For each s,a initialize table entry

Figure 112017128602056-pat00024

Observe current state s
Do forever:
-Select an action a and execute it
-Receive immediate reward r
-Observe the new state s'
-Update the table entry for
Figure 112017128602056-pat00025
as follows:
Figure 112017128602056-pat00026

-s <- s'

Algorithm
For each s, a initialize table entry
Figure 112017128602056-pat00024

Observe current state s
Do forever:
-Select an action a and execute it
-Receive immediate reward r
-Observe the new state s'
-Update the table entry for
Figure 112017128602056-pat00025
as follows:
Figure 112017128602056-pat00026

-s <- s>

본 발명의 제6확장예에 따른 자연어 처리 장치의 강화학습에서 학습률 k를 이용한 강화학습 알고리즘The reinforcement learning algorithm using the learning rate k in the reinforcement learning of the natural language processing apparatus according to the sixth extended example of the present invention

위와 같이 본 발명의 제6확장예에 따라 학습률을 적용하게 되면, action이 확률적으로 수행되는 경우에도 강화학습이 잘 진행될 수 있는 효과가 발생된다.If the learning rate is applied according to the sixth extended example of the present invention as described above, reinforcement learning can be performed well even if the action is performed stochastically.

[[ 제7확장예Example 7 expansion - - 뉴럴Neural 네트워크를 이용한 강화학습 1] Reinforcement learning using network 1]

본 발명의 제4,5,6확장예에 따른 자연어 처리 장치의 강화학습은 입력 데이터의 자유도가 높거나 경우의 수가 많을수록 학습이 어려워지는 문제가 발생될 수 있다. The reinforcement learning of the natural language processing apparatus according to the fourth, fifth and sixth extended examples of the present invention may cause a problem that the degree of freedom of the input data is high or the number of cases increases, which makes learning difficult.

따라서, 이러한 문제를 해결하기 위해 본 발명의 제7확장예에 따른 자연어 처리 장치의 강화학습은 뉴럴 네트워크를 이용할 수 있다. 도 11, 12는 본 발명의 제7확장예에 따른 뉴럴 네트워크를 이용한 강화학습을 도시한 것이다. 도 11에 도시된 바와 같이, state인 입력 데이터와 action인 가중치를 뉴럴 네트워크의 인풋 레이어(input layer)에 입력하고 해당 action에 대한 예측되는 reward인 Q값의 근사치를 아웃풋 레이어(ouput layer)에서 출력받는 모델을 적용할 수 있다. 또한, 도 12에 도시된 바와 같이 state인 입력 데이터만을 뉴럴 네트워크의 인풋 레이어(input layer)에 입력하고 전체의 action에 대해 예측되는 reward인 Q값의 근사치를 아웃풋 레이어(ouput layer)에서 출력받는 모델을 적용할 수 있다. Therefore, in order to solve such a problem, reinforcement learning of the natural language processing apparatus according to the seventh extended example of the present invention can use a neural network. FIGS. 11 and 12 show reinforcement learning using a neural network according to a seventh extended example of the present invention. As shown in FIG. 11, input data of a state and a weight of an action are input to an input layer of a neural network, and an approximation of a predicted reward Q value is output from an output layer You can apply the receiving model. 12, only the input data of the state is input to the input layer of the neural network, and an approximate value of the Q value, which is a reward predicted for the entire action, is output to the output layer (ouput layer) Can be applied.

본 발명의 제7확장예에 따라 뉴럴 네트워크를 이용한 강화학습을 적용하면 입력 데이터의 자유도가 지나치게 높아서 전체 environment의 경우의 수의 계산량이 지나치게 많은 경우에 근사적으로 Q를 출력하게 되므로 계산량이 감축되는 효과가 발생된다.According to the seventh extended example of the present invention, when the reinforcement learning using the neural network is applied, the degree of freedom of the input data is excessively high, and when the calculation amount of the number of cases in the entire environment is excessively large, Q is outputted in an approximate manner, Effect is generated.

도 12를 기초로 보다 구체적으로 기술하면, 뉴럴 네트워크의 타겟(y)은 optimal한 Q값인 Q*로 설정될 수 있고, 해당 뉴럴 네트워크에서 최소화하고자 하는 cost 함수는 다음과 같이 기술될 수 있다.12, the target y of the neural network can be set to Q * , which is an optimal Q value, and the cost function to be minimized in the neural network can be described as follows.

Figure 112017128602056-pat00027
Figure 112017128602056-pat00027

위 수학식에서 cost(W)는 뉴럴 네트워크 W에 대한 cost function, Ws는 state인 입력 데이터가 input layer에 입력되었을 때 output layer에서 출력되는 값으로 Q의 예측값이자 근사치라고 할 수 있다. y는 optimal한 Q값 이다. 이때 y는 아래와 같이 기술될 수 있다.In the above equation, cost (W) is the cost function for the neural network W, and Ws is the output value from the output layer when input data is input to the input layer. y is the optimal Q value. At this time, y can be described as follows.

Figure 112017128602056-pat00028
Figure 112017128602056-pat00028

y는 optimal한 Q값으로 Q*을 의미하며, r은 시간 t의 reward, maxQ(s')는 시간 t+1에 받을 수 있는 Q값의 최대치를 의미할 수 있다. 이를 조금 더 formal한 수학식으로 변경하면 아래와 같다.y is the optimal Q value, Q is the reward of time t, and maxQ (s') is the maximum value of Q that can be received at time t + 1. We change this to a more formal formula:

Figure 112017128602056-pat00029
Figure 112017128602056-pat00029

위 수학식에서 Ws는 뉴럴 네트워크의 출력값,

Figure 112017128602056-pat00030
은 Q에 대한 예측값으로 주어진 s 또는 s,a에 의해서 주어지고 θ라는 상태를 전제로 하게 된다. θ는 뉴럴 네트워크 또는 뉴럴 네트워크의 weight를 의미할 수 있다. Q*은 optimal Q값을 의미한다. 따라서 뉴럴 네트워크의 cost function은 아래와 같이 표현될 수 있다. In the above equation, Ws is the output value of the neural network,
Figure 112017128602056-pat00030
Is given by s or s, a given as a predictive value of Q, and is assumed to be θ. θ can be the weight of a neural network or a neural network. Q * means the optimal Q value. Therefore, the cost function of the neural network can be expressed as follows.

Figure 112017128602056-pat00031
Figure 112017128602056-pat00031

위 수학식 18에 따르면 Q에 대한 예측값과 optimal Q값의 차이를 최소화하는 θ값을 찾는 방향으로 자연어 처리 장치의 강화학습이 진행되게 된다. According to Equation (18), the reinforcement learning of the natural language processing apparatus proceeds in the direction of finding a value of θ that minimizes the difference between the predicted value of Q and the optimal Q value.

위의 수학식 18에 따라 본 발명의 제7확장예에 따른 자연어 처리 장치의 강화학습의 알고리즘은 아래와 같이 예시적으로 구성될 수 있다. The algorithm for reinforcement learning of the natural language processing apparatus according to the seventh extended example of the present invention can be exemplarily constructed as follows according to the above equation (18).

Algorithm
Initialize action - value function Q with random weights θ
Initialize state s1 = {x1}
for t =1, T do
With probability ε select a random action at,
otherwise select at = maxaQ*(st,a;θ)
Execute action at in 가중치 모듈 and observe reward rt
Set st+1 = st,at

Set

Figure 112017128602056-pat00032

Perform a gradient descent step on (yj - Q(sj,aj;θ))2
end for
Algorithm
Initialize action - value function Q with random weights θ
Initialize state s 1 = {x 1 }
for t = 1, T do
With probability ε select a random action a t,
otherwise select a t = max a Q * (s t , a; θ)
Execute action a t in Weight module and observe reward r t
Set s t + 1 = s t , a t

Set
Figure 112017128602056-pat00032

Perform a gradient descent step on (y j - Q (s j , a j ; θ)) 2
end for
본 발명의 제7확장예에 따른 자연어 처리 장치의 강화학습에서 뉴럴 네트워크를 이용한 강화학습 알고리즘In the reinforcement learning of the natural language processing apparatus according to the seventh extended example of the present invention, a reinforcement learning algorithm using a neural network

위 알고리즘에서 확률ε는 action의 선택을 위한 greedy algorithm 등을 의미할 수 있다. s는 state, a는 action, Q는 Q값, θ는 뉴럴 네트워크의 weight, r은 reward, y는 타겟을 의미할 수 있다.In the above algorithm, the probability ε may mean a greedy algorithm for selecting an action. s is the state, a is the action, Q is the Q value, θ is the weight of the neural network, r is the reward, and y is the target.

[[ 제8확장예Example 8 expansion -  - 뉴럴Neural 네트워크를 이용한 강화학습 2] Network reinforcement learning 2]

본 발명의 제7확장예에 따른 자연어 처리 장치의 뉴럴 네트워크를 이용한 강화학습은 타겟이 일정하게 유지되지 않는다는 문제가 발생될 수 있다. 위 수학식 18에 기재된 바와 같이, 뉴럴 네트워크의 cost function에서 Q에 대한 예측값과 optimal Q값의 차이를 최소화하는 θ값을 찾는 방향으로 자연어 처리 장치의 강화학습이 진행되게 되는데, Q에 대한 예측값이 θ값의 업데이트와 함게 업데이트 되는 동시에 cost function의 타겟인 optimal Q값의 θ값도 함께 업데이트가 되게 되므로 타겟이 일정하게 유지되지 않아 학습이 어려워진다. 위 수학식 18에서

Figure 112017128602056-pat00033
가 Q에 대한 예측값,
Figure 112017128602056-pat00034
가 optimal Q값(타겟)을 의미할 수 있다. The reinforcement learning using the neural network of the natural language processing apparatus according to the seventh extended example of the present invention may cause a problem that the target is not kept constant. As described in Equation (18), reinforcement learning of the natural language processing apparatus proceeds in the direction of seeking a value that minimizes the difference between the predicted value of Q and the optimal Q value in the cost function of the neural network. the θ value of the optimal Q value, which is the target of the cost function, is updated together with the update of the θ value, so that the target is not kept constant and learning becomes difficult. In Equation 18,
Figure 112017128602056-pat00033
Is the predicted value for Q,
Figure 112017128602056-pat00034
May mean an optimal Q value (target).

따라서, 본 발명의 제8확장예에 따른 자연어 처리 장치의 뉴럴 네트워크를 이용한 강화학습은 이러한 문제를 해결하기 위해 Q에 대한 예측값에서 이용되는 뉴럴 네트워크와 타겟에서 이용되는 뉴럴 네트워크를 θ와

Figure 112017128602056-pat00035
로 다르게 구성하고, 특정 시간이 지난 뒤에 또는 특정 조건이 만족되면
Figure 112017128602056-pat00036
를 θ로 업데이트하는 방법을 이용할 수 있다. 도 13은 본 발명의 제8확장예에 따른 자연어 처리 장치의 뉴럴 네트워크를 이용한 강화학습의 네트워크 구조를 도시한 것인데, 도 13에 도시된 바와 같이, 뉴럴 네트워크 θ는 Q의 예측값(Ws)에 이용하고, 뉴럴 네트워크
Figure 112017128602056-pat00037
는 optimal Q값에 이용하도록 구성될 수 있다. 이에 따르면 위의 수학식 18은 아래의 수학식과 같이 수정될 수 있다. Therefore, reinforcement learning using a neural network of a natural language processing apparatus according to an eighth extended embodiment of the present invention can solve such a problem by setting the neural network used in the predicted value of Q and the neural network used in the target as?
Figure 112017128602056-pat00035
And after a certain time has elapsed or when certain conditions are satisfied
Figure 112017128602056-pat00036
To &amp;thetas; can be used. 13 shows a network structure of reinforcement learning using a neural network of a natural language processing apparatus according to an eighth extended example of the present invention. As shown in FIG. 13, a neural network? Is used for a predicted value Ws of Q And a neural network
Figure 112017128602056-pat00037
May be configured to use for the optimal Q value. According to this, equation (18) can be modified as shown in the following equation.

Figure 112017128602056-pat00038
Figure 112017128602056-pat00038

위 수학식 19에 따르면 Q에 대한 예측값과 고정된 optimal Q값의 차이를 최소화하는 θ값을 찾는 방향으로 자연어 처리 장치의 강화학습이 진행되게 된다. 또한, θ값이 업데이트 될 때, Q에 대한 예측값만 업데이트되고 optimal Q값은 고정되게 되는 효과가 발생된다.According to Equation (19), reinforcement learning of the natural language processing apparatus proceeds in the direction of finding a value of θ that minimizes the difference between the predicted value of Q and the fixed optimal Q value. Also, when the? Value is updated, only the predicted value for Q is updated and the optimal Q value is fixed.

위의 수학식 19에 따라 본 발명의 제8확장예에 따른 자연어 처리 장치의 강화학습의 알고리즘은 아래와 같이 예시적으로 구성될 수 있다. According to Equation (19) above, the reinforcement learning algorithm of the natural language processing apparatus according to the eighth extension example of the present invention can be configured as an example as follows.

Algorithm
Initialize action - value function Q with random weights θ
Initialize target action - value function

Figure 112017128602056-pat00039
with weights
Figure 112017128602056-pat00040

Initialize state s1 = {x1}
for t =1, T do
With probability ε select a random action at,
otherwise select at = maxaQ*(st,a;θ)
Execute action at in 가중치 모듈 and observe reward rt
Set st+1 = st,at

Set
Figure 112017128602056-pat00041

Perform a gradient descent step on (yj - Q(sj,aj;θ))2 with respect to network parameters θ
Every n steps reset
Figure 112017128602056-pat00042

end for
Algorithm
Initialize action - value function Q with random weights θ
Initialize target action - value function
Figure 112017128602056-pat00039
with weights
Figure 112017128602056-pat00040

Initialize state s 1 = {x 1 }
for t = 1, T do
With probability ε select a random action a t,
otherwise select a t = max a Q * (s t , a; θ)
Execute action a t in Weight module and observe reward r t
Set s t + 1 = s t , a t

Set
Figure 112017128602056-pat00041

Perform a gradient descent step on (y j - Q (s j , a j ; θ)) 2 with respect to network parameters θ
Every n steps reset
Figure 112017128602056-pat00042

end for
본 발명의 제8확장예에 따른 자연어 처리 장치의 강화학습에서 뉴럴 네트워크를 이용한 강화학습 알고리즘In the reinforcement learning of the natural language processing apparatus according to the eighth extended embodiment of the present invention, a reinforcement learning algorithm using a neural network

본 발명의 제8확장예에 따른 자연어 처리 장치의 강화학습의 위 알고리즘 예시에서 타겟과 예측값이 이용하는 뉴럴 네트워크가 각각 달라서 타겟이 뉴럴 네트워크의 weight 업데이트에 의해 변동되지 않는 효과가 발생된다. 타겟이 고정되게 되므로 강화학습이 제대로 작동하게 된다. 또한, 특정 단계마다 타겟의 뉴럴 네트워크도 함께 업데이트 되므로 타겟이 업데이트 되지 않은 채로 오랫동안 고정되는 문제도 함께 해결될 수 있다.In the example of the algorithm for reinforcement learning of the natural language processing apparatus according to the eighth extended example of the present invention, the target and the neural network used by the predictive value are different from each other, so that the effect that the target is not varied by the weight update of the neural network is generated. The reinforcement learning works properly because the target is fixed. Also, since the target neural network is updated together with each specific step, the problem that the target is fixed for a long time without being updated can be solved.

위 본 발명의 제4,5,6,7,8확장예에 따른 자연어 처리 장치의 강화학습에서 reward는 시간 t+1의 입력 데이터에 대한 감성 분석값으로 처리되는 것으로 기재되었다. 하지만 본 발명의 범위는 이에 한정되지 않으며, 시간 t+1의 입력 데이터가 입력되는 시간이 얼마나 짧은지, 시간 t+1의 입력 데이터가 얼마나 길게 입력 되는지 등을 강화학습의 reward로 할 수 있다. In the reinforcement learning of the natural language processing apparatus according to the fourth, fifth, sixth, seventh and eighth embodiments of the present invention, reward is described as being processed by the emotion analysis value for the input data at time t + 1. However, the scope of the present invention is not limited to this, and how long input data of time t + 1 is input and how long input data of time t + 1 is inputted can be reordering of reinforcement learning.

[[ 변형예Variation example ]]

본 발명의 변형예에서는 가중치 모듈(5)의 기능이 도메인 매칭 장치(3) 내에 포함되도록 구성될 수 있다. 도 14는 본 발명의 변형예에 따른 자연어 처리 장치의 신호 흐름을 도시한 것이다. 도 14에 도시된 바와 같이, 본 발명의 변형예에 따르면 가중치 모듈(5)의 기능이 도메인 매칭 장치(3) 내에 포함되도록 구성되어, 시간 t의 도메인 매칭 장치(3)에서 가중치가 생성되어 시간 t+1의 도메인 매칭 장치(3)에 송신하도록 구성될 수 있다. 본 발명의 변형예에 따라 도메인 매칭 장치(3)에서 생성되는 가중치는 본 발명의 제1,2,3확장예의 가중치를 포함할 수 있다.In a modification of the present invention, the function of the weight module 5 may be configured to be included in the domain matching apparatus 3. FIG. 14 shows a signal flow of a natural language processing apparatus according to a modification of the present invention. As shown in Fig. 14, according to a modification of the present invention, the function of the weight module 5 is configured to be included in the domain matching apparatus 3 so that a weight is generated in the domain matching apparatus 3 at time t, to the domain matching apparatus 3 of t + 1. The weight generated in the domain matching apparatus 3 according to the modified embodiment of the present invention may include the weights of the first, second and third extended examples of the present invention.

본 발명의 변형예에 따라 가중치 모듈(5)의 기능이 도메인 매칭 장치(3) 내에 포함되는 경우의 강화학습은 도 15, 16과 같이 구성될 수 있다. 도 15, 16은 본 발명의 변형예에 따른 자연어 처리 장치의 강화학습의 신호 흐름을 도시한 모식도이다. 도 15, 16에 도시된 바와 같이, 본 발명의 변형예에 따른 자연어 처리 장치의 강화학습은 시간 t의 자연어 처리 장치에 구성되는 도메인 매칭 장치(3)를 Agent로 하고, 도메인 매칭 장치(3)에서 생성되는 도메인의 매칭을 Agent의 Action0으로, 시간 t의 입력 데이터(200)를 State0로, 시간 t+1의 입력 데이터(200)를 센티멘탈 분석 모듈(6)이 감성 분석하여 생성하는 감성 분석값을 Reward1로 하는 강화학습 알고리즘이 구성될 수 있다. 이후 시간 t+1의 입력 데이터(200)를 State1로 다시 강화학습 사이클을 시작할 수 있다. 전체 environment에는 응답 모듈(4)의 각각의 특정 도메인 파이프라인에 포함되는 질문 데이터 세트와 각 시간의 입력 데이터(200)가 포함될 수 있다. The reinforcement learning in the case where the function of the weight module 5 is included in the domain matching apparatus 3 according to the modification of the present invention can be configured as shown in Figs. 15 and 16 are schematic diagrams showing a signal flow of reinforcement learning of a natural language processing apparatus according to a modification of the present invention. 15 and 16, the reinforcement learning of the natural language processing apparatus according to the modified embodiment of the present invention is performed by using the domain matching apparatus 3 constituted in the natural language processing apparatus at time t as Agent, the domain matching apparatus 3, the matching of the domain is generated from the Agent of Action 0, the input data 200 of the time t in State 0, the time sensitivity of input data sentimental analysis module (200) (6) of the t + 1 is generated by sensibility analysis A reinforcement learning algorithm can be constructed in which the analysis value is Reward 1 . Then, the input data 200 at time t + 1 can be restarted to State 1 to start the reinforcement learning cycle. The entire environment may include a query data set included in each specific domain pipeline of the response module 4 and input data 200 of each time.

멀티 도메인 자연어 처리를 위한 도메인 매칭 방법Domain Matching Method for Multidomain Natural Language Processing

본 발명의 일실시예에 따른 멀티 도메인 자연어 처리를 위한 도메인 매칭 방법에 있어서, 도 17은 본 발명의 일실시예에 따른 멀티 도메인 자연어 처리를 위한 자연어 처리 장치의 도메인 매칭 방법을 도시한 흐름도이다. 도 17에 도시된 바와 같이, 본 발명의 일실시예에 따른 도메인 매칭 방법은, 구분 단계(S10), 도메인 스코어 생성 단계(S11), 매칭 단계(S12)를 포함할 수 있다.FIG. 17 is a flowchart illustrating a domain matching method of a natural language processing apparatus for multi-domain natural language processing according to an embodiment of the present invention, in a domain matching method for multi-domain natural language processing according to an embodiment of the present invention. As shown in FIG. 17, the domain matching method according to an embodiment of the present invention may include a dividing step S10, a domain score generating step S11, and a matching step S12.

구분 단계(S10)는 구분 모듈(2)이 입력 데이터(200)를 일반 문자열 형태(Normal text)로 입력받게 되고, 이렇게 입력받은 일반 문자열 형태를 NLP 모듈(21)에 의해 개체(entity)와 의미구(intent)로 구분하는 단계이다. 구분 단계에 의해 입력 데이터는 단어 또는 단어의 조합(어구 정보)으로 구분될 수 있다. In the classification step S10, the classification module 2 receives the input data 200 in a normal text form, and the general character type input in the classification module 2 is input to the NLP module 21 as an entity, And is divided into intent. The input data may be divided into words or word combinations (phrase information) by the segmentation step.

도메인 스코어 생성 단계(S11)는 도메인 매칭 장치(3)가 상기 구분 모듈(2)에서 수신한 벡터화 된 어구 정보를 토대로 각각의 특정 도메인 파이프라인(40)의 질문 데이터 세트와의 유사도를 산출하여 도메인 스코어를 생성하는 단계이다.The domain score generation step S11 is a step in which the domain matching apparatus 3 calculates the degree of similarity between the query data set of each specific domain pipeline 40 based on the vectorized phrase information received from the classification module 2, This is the step of generating the score.

매칭 단계(S12)는 각각의 도메인 파이프라인 중 도메인 스코어가 가장 높은 도메인으로 입력 데이터를 매칭하는 단계이다. The matching step S12 is a step of matching the input data to the domain having the highest domain score among the respective domain pipelines.

본 발명의 일실시예에 따른 도메인 매칭 방법에 따르면, 입력 데이터를 수신하여 각각의 특정 도메인 파이프라인에 할당하는 작업의 계산량이 매우 적어지고 처리 속도가 향상되는 효과가 발생된다. According to the domain matching method according to an embodiment of the present invention, the amount of calculation of the task of receiving input data and allocating it to each specific domain pipeline is very small and the processing speed is improved.

도 18은 본 발명의 일실시예에 따른 도메인 매칭 방법의 각 단계별 결과 예시를 도시한 것이다. 도 18에 따르면, S10에서는 "강남역으로 양념치킨 배달 가능해요?"와 같은 입력 데이터가 형태소 분석으로 '강남역', '양념치킨', '배달', '가능'와 같은 어구로 분절되고, S11에서 도메인 매칭 장치(3)는 적어도 하나의 어구 정보에 대해 어떤 특정 도메인 파이프라인에 얼마나 특화되어 있는지에 대한 점수인 도메인 스코어를 계산하여 '음식 배달'=1, '의류 주문'=0.5, '날씨'=0.3, '시간'=0.2 등으로 생성하게 된다. S12에서 도메인 매칭 장치(3)는 가장 높거나 특정 조건을 만족하는 도메인 스코어에 매칭되는 특정 도메인 파이프라인인 "음식 배달" 도메인 파이프라인에 해당 입력 데이터(200)를 매칭하게 된다.FIG. 18 shows an example of the result of each step of the domain matching method according to an embodiment of the present invention. According to Fig. 18, input data such as "Is it possible to deliver seasoned chicken to Gangnam Station?" Is segmented into phrases such as 'Gangnam Station', 'Seasoned chicken', 'Delivery' The domain matching device 3 calculates a domain score, which is a score for how specific the at least one phrase information is to a specific domain pipeline, to determine 'food delivery' = 1, 'clothing order' = 0.5, 'weather' = 0.3, and 'time' = 0.2. In step S12, the domain matching apparatus 3 matches the input data 200 to the "food delivery" domain pipeline, which is a particular domain pipeline that matches the highest or the domain score satisfying a certain condition.

본 발명의 일실시예에 따르면 S11의 도메인 스코어 계산에 입력 데이터와 각각의 특정 도메인 파이프라인에 구성되는 질문 데이터 세트와의 유사도를 이용할 수 있다. According to an embodiment of the present invention, the similarity between the input data and the set of question data included in each specific domain pipeline can be used in the domain score calculation of S11.

[[ 제1확장예First extended example ]]

본 발명의 일실시예에 따른 멀티 도메인 자연어 처리를 위한 도메인 매칭 방법의 제1확장예와 관련하여, 도 19는 본 발명의 제1확장예에 따른 도메인 매칭 방법을 도시한 흐름도이다. 도 19에 도시된 바와 같이, 본 발명의 제1확장예에 따른 도메인 매칭 방법은 S11 이전에 가중치 생성 단계(S10')를 더 포함할 수 있다. 또한 도메인 스코어 생성 단계인 S11는 도메인 스코어를 산출하는데 있어서 추가적으로 가중치를 더 적용할 수 있도록 구성될 수 있다(S11'). FIG. 19 is a flowchart illustrating a domain matching method according to a first extended example of the present invention, with respect to a first extended example of a domain matching method for multi-domain natural language processing according to an embodiment of the present invention. As shown in FIG. 19, the domain matching method according to the first extended example of the present invention may further include a weight generating step (S10 ') before S11. In addition, the domain score generation step S11 may be configured to further apply a weight in calculating the domain score (S11 ').

도메인 매칭 장치는 도메인 스코어를 계산하는 S11 단계에서 도메인의 매칭에 관한 가중치를 도메인 스코어의 계산에 적용하는 가중치를 생성하기 위한 가중치 생성 단계(S10')를 S11' 이전에 수행할 수 있고, 이러한 가중치를 시계열적으로 업데이트하는 가중치 모듈과 연결될 수 있다.The domain matching apparatus may perform a weight generation step S10 'before S11' for generating a weight for applying a weight for matching a domain in the calculation of a domain score in step S11 of calculating a domain score, Lt; RTI ID = 0.0 &gt; and / or &lt; / RTI &gt;

가중치 생성 단계(S10')에서 가중치는 가중치 모듈(5) 또는 시간 t-1의 도메인 매칭 장치(3)가 생성하여 시간 t의 도메인 매칭 장치(3)에 제공하는 weight를 의미할 수 있다. 가중치 생성 단계(S10')에서는 가중치를 생성하여 S11'에 이용할 수 있다. S11에서 가중치를 적용하는 것은 시간 t의 도메인 매칭 장치(3)에서 산출된 도메인 스코어 또는 특정 도메인에 대한 정보를 시간 t+1의 도메인 매칭 장치(3)에서의 도메인 스코어 또는 특정 도메인의 매칭에 적용하는 것이다.The weight in the weight generation step S10 'may mean a weight generated by the weighting module 5 or the domain matching device 3 at time t-1 and provided to the domain matching device 3 at time t. In the weight generation step S10 ', a weight can be generated and used for S11'. Applying the weight in S11 applies the domain score calculated in the domain matching apparatus 3 at time t or the information about the specific domain to the domain score in the domain matching apparatus 3 at time t + 1 or the matching of a specific domain .

S10'의 가중치의 산출 방법으로, 시간 t에 입력된 입력 데이터가 매칭된 도메인의 도메인 스코어가 시간 t+1의 입력 데이터에 대한 도메인 스코어에 영향을 주는 것으로서, 가까운 시간 내에 입력 데이터가 연속적으로 입력될수록 특정 도메인의 도메인 스코어에 양의 가중치를 더 주게 되고, 시간이 지날수록 이러한 양의 가중치는 저감되며, 다른 특정 도메인의 도메인 스코어가 더 높아서 다른 도메인으로 매칭되어야 하는 경우 음의 가중치를 주게 되는 방법으로 구성될 수 있다. 즉, 가중치는 입력 데이터가 입력되는 시간차에 따라 도메인이 유지될 확률을 의미할 수 있다.The input data input at time t affects the domain score of the matched domain with respect to the input data at time t + 1, and the input data is continuously input The more weighted weights are given to the domain scores of a particular domain, the less weights are weighed over time, and the weights are weighted when we need to match another domain with a higher domain score of another particular domain . That is, the weight may mean the probability that the domain will be maintained according to the time difference in which the input data is input.

[[ 제2확장예Second Extended Example ]]

일련의 입력 데이터가 들어오고 있는 상황에서, 본 발명의 제2확장예에 따른 도메인 매칭 방법에서, 가중치 모듈(5)은 앞서 들어온 입력 데이터를 매칭한 도메인에 대해서 도메인 매칭 장치(3)가 가중치를 부여하도록 구성될 수 있다. 현재 입력 데이터, 즉 i번째 입력 데이터를 x(i)이라고 했을 때, x(i-1), x(i-2), x(i-3) … x(i-M) 가 각각 할당된 도메인이 모두 Dk로 동일하면 이는 하나의 도메인에서 M개의 입력 데이터가 연속되었다고 볼 수 있으며, 이에 따라 도메인 매칭 장치(3)는 가중치인 W(Dk, x(i))를 유사도 방식에서 산출한 P(Dk|x)에 곱하여 도메인 매칭을 유지할 수 있다.In the domain matching method according to the second extended example of the present invention, in a situation where a series of input data is input, the weighting module 5 determines the weighting value of the domain matching device 3 . &Lt; / RTI &gt; X (i-1), x (i-2), x (i-3) ... when the current input data, that is, the i- If x (iM) is equal to D k all of the allocated domain, which can be seen that the M input data is continuous in a domain, so that the domain matching unit 3 is a weight of W (D k, x ( i)) may be multiplied by P (D k | x) calculated in the similarity method to maintain the domain matching.

도 20은 본 발명의 제2확장예에 따른 도메인 매칭 방법을 도시한 흐름도이다. 도 20에 도시된 바와 같이, 본 발명의 제2확장예에 따른 도메인 매칭 방법은 구분 단계(S10), 가중치 생성 단계(S20), 도메인 스코어 계산 단계(S21), 도메인 유지 여부 판정 단계(S22), 도메인 유지 단계(S23), 도메인 스코어 계산 단계(S24), 도메인 매칭 단계(S25)를 포함할 수 있다. 20 is a flowchart illustrating a domain matching method according to a second extended example of the present invention. 20, the domain matching method according to the second extended example of the present invention includes a classification step S10, a weight generation step S20, a domain score calculation step S21, a domain sustainability determination step S22, A domain maintenance step S23, a domain score calculation step S24, and a domain matching step S25.

구분 단계(S10)는 구분 모듈(2)이 입력 데이터(200)를 일반 문자열 형태(Normal text)로 입력받게 되고, 이렇게 입력받은 일반 문자열 형태를 NLP 모듈(21)에 의해 개체(entity)와 의미구(intent)로 구분하는 단계이다. 구분 단계에 의해 입력 데이터는 단어 또는 단어의 조합(어구 정보)으로 구분될 수 있다. In the classification step S10, the classification module 2 receives the input data 200 in a normal text form, and the general character type input in the classification module 2 is input to the NLP module 21 as an entity, And is divided into intent. The input data may be divided into words or word combinations (phrase information) by the segmentation step.

가중치 생성 단계(S20)는 현재의 도메인 매칭 방법의 단계를 시간 t라고 가정할 때, 가중치 모듈(5) 또는 도메인 매칭 장치(3)가 직전 동일 도메인 구간의 도메인 스코어를 토대로 시간 t의 도메인 스코어에 적용할 가중치를 생성하는 단계이다. 본 발명의 제2확장예에서 직전 동일 도메인 구간은 t-1의 도메인과 동일한 도메인 파이프라인으로 매칭된 시간 t-1, t-2,..., t-n의 시간 구간을 의미할 수 있다.The weight generating step S20 is a step in which the weighting module 5 or the domain matching device 3 calculates the weighting factor of the domain score of the time domain t based on the domain score of the immediately preceding same domain domain, And generating a weight to be applied. In the second extended example of the present invention, the immediately preceding same domain period may mean a time period of time t-1, t-2, ..., t-n matched with the same domain pipeline as the domain of t-1.

도메인 스코어 계산 단계(S21)는 도메인 매칭 장치(3)가 S10에서 수신한 어구 정보를 토대로 산출되는 직전 동일 도메인 구간에 기매칭된 특정 도메인 파이프라인의 질문 데이터 세트와의 유사도와 S20의 가중치를 이용하여 도메인 스코어를 생성하는 단계이다.The domain score calculation step S21 uses the similarity degree with the query data set of the specific domain pipeline matched in the immediately preceding same domain interval calculated on the basis of the phrase information received in S10 and the weight of S20 calculated by the domain matching apparatus 3 To generate a domain score.

도메인 유지 여부 판정 단계(S22)는 시간 t의 도메인 매칭 장치(3)가 도메인을 유지할지 말지에 대해 판정하는 단계이고, S21에서 생성된 도메인 스코어가 기설정된 특정 값 또는 특정 확률의 이상 또는 초과인 경우 직전 동일 도메인 구간에 기매칭된 특정 도메인 파이프라인에 재차 매칭되도록 S23으로 분기될 수 있다. 또한, S21에서 생성된 도메인 스코어가 기설정된 특정 값 또는 특정 확률의 미만 또는 이하인 경우 직전 동일 도메인 구간에 기매칭된 특정 도메인 파이프라인이 아닌 다른 특정 도메인 파이프라인에 매칭되도록 S24로 분기될 수 있다. The domain sustainability determination step S22 is a step of determining whether or not the domain matching apparatus 3 at time t holds the domain or not. If the domain score generated at S21 is greater than or equal to a predetermined specific value or a specific probability The process may be branched to S23 so as to be matched again to the specific domain pipeline matching the immediately preceding domain period. In addition, if the domain score generated in S21 is less than or equal to a predetermined specific value or a specific probability, the process may be branched to S24 so as to match the specific domain pipeline other than the specific domain pipeline matched in the immediately preceding same domain period.

도메인 유지 단계(S23)는 S21에서 생성된 도메인 스코어가 기설정된 특정 값 또는 특정 확률의 이상 또는 초과인 경우, 직전 동일 도메인 구간에 기매칭된 특정 도메인 파이프라인에 재차 매칭되도록 도메인 매칭 장치(3)가 도메인을 유지하는 단계이다. In the domain maintenance step S23, if the domain score generated in step S21 is greater than or equal to a preset specific value or a predetermined probability, the domain matching apparatus 3 is set so as to match again the specific domain pipeline matched in the immediately preceding same domain period. Is the step of maintaining the domain.

도메인 스코어 계산 단계(S24)는 S21에서 생성된 도메인 스코어가 기설정된 특정 값 또는 특정 확률의 미만 또는 이하인 경우, 직전 동일 도메인 구간에 기매칭된 특정 도메인 파이프라인이 아닌 다른 특정 도메인 파이프라인에 매칭되도록 도메인 매칭 장치(3)가 S10에서 수신한 어구 정보를 토대로 나머지 특정 도메인 파이프라인의 질문 데이터 세트와의 유사도를 산출하고, 이러한 유사도와 S20의 가중치를 이용하여 각각의 나머지 특정 도메인 파이프라인에 대한 도메인 스코어를 계산하는 단계이다.The domain score calculation step S24 is performed so that the domain score generated in S21 is matched to a specific domain pipeline other than the specific domain pipeline matched in the immediately preceding same domain period when the domain score is less than or equal to a predetermined specific value or a specific probability. The domain matching apparatus 3 calculates similarity with the query data set of the other specific domain pipeline based on the phrase information received in S10 and uses the similarity and the weight of S20 to calculate the domain for each remaining specific domain pipeline And calculating the score.

도메인 매칭 단계(S25)는 각각의 나머지 특정 도메인 파이프라인 중 도메인 스코어가 가장 높은 도메인으로 입력 데이터를 매칭하는 단계이다. 기매칭된 도메인이 다른 도메인으로 전이되는 단계이다.The domain matching step S25 is a step of matching the input data to the domain having the highest domain score among the remaining specific domain pipelines. And the matched domain is transferred to another domain.

이와 같은 방식을 적용하면, 예를 들어, 치킨 배달 도메인으로 분류되는 입력 데이터를 처리하는 도중(ex. 파닭은 얼마에요? / 황금올리브 쿠폰 적용 되나요?) 말뭉치 유사도만으로 특정 도메인을 판정하기 어려운 입력 데이터(ex. 그래서 몇시까지 되요? / 얼마냐구요?)가 입력되더라도 이를 기존에 처리하고 있던 도메인으로 분류하여 일관적인 주제의 대화로 수렴시키는 것이 가능해지는 효과가 발생된다.When applying this method, for example, when input data classified as a chicken delivery domain is processed (eg, how much is chicken / golden olive coupon applies), input data (eg, what time is it / how much?) is input, it is possible to classify it into a domain that has been processed previously and converge it into a conversation of consistent subject.

또한, 입력 데이터를 통해 도메인 파이프라인을 매칭하는데 있어서, 연산량 절감의 효과가 발생된다. 직전의 입력 벡터(벡터화된 입력 데이터)인 x(i-1)이 Dk에 속하는 경우, P(Dk|x(i)) 와 W(Dk, x(i))의 곱이 임계확률(예. 50%)을 넘으면 Dk를 제외한 다른 도메인과 유사도를 산출할 필요 없이 곧바로 x(i-1)을 Dk에 할당할 수 있도록 구성할 수 있는 효과가 발생된다.Further, in matching the domain pipeline through the input data, the effect of reducing the amount of computation is generated. When the previous input vector (vectorized input data) x (i-1) belongs to D k , the product of P (D k | x (i)) and W (D k , x examples the effects that can be configured to immediately assign the x (i-1) to D k, without having to calculate the degree of similarity with other domains except for D k greater than 50%) is generated.

[[ 제3확장예Third Expansion Example ]]

일련의 입력 데이터가 들어오고 있는 상황에서, 현재 매칭되어 있는 도메인 파이프라인에서 다른 도메인 파이프라인으로 전이해야 할 상황이 오는 경우, 본 발명의 제3확장예에 따른 도메인 매칭 방법에서, 가중치 모듈(5)은 앞서 들어온 입력 데이터를 매칭한 도메인에서 다른 도메인으로 전이될 확률에 기초해 도메인 매칭 장치(3)에 가중치를 부여하도록 구성될 수 있다. 보다 구체적으로 본 발명의 제3확장예에 따른 도메인 매칭 방법에서 가중치 모듈(5)은, 일련의 입력 데이터가 들어오고 있고 앞서 들어온 입력 데이터가 각각 하나씩의 도메인에 할당되어 있을 때, 직전에 들어온 입력 데이터가 할당된 도메인에서 도메인 집합 내의 도메인으로 전이될 수 있는 확률 분포 테이블(도메인 전이 확률 분포)을 구성하고, 이를 적용하여 각 도메인에 할당될 확률을 계산하도록 구성될 수 있다. In a domain matching method according to the third extended example of the present invention, when a situation in which a series of input data is input and a situation is to be transferred from the currently matched domain pipeline to another domain pipeline, the weight module 5 May be configured to weight the domain matching device 3 based on the probability of transitioning from the matching domain to the other domain with the incoming input data. More specifically, in the domain matching method according to the third extension example of the present invention, when a series of input data is input and each of the previously input data is assigned to one domain, A probability distribution table (domain transition probability distribution) that can be transferred from a domain in which data is allocated to a domain in a domain set is constructed and applied to calculate a probability to be assigned to each domain.

보다 구체적으로, 도 21은 본 발명의 제3확장예에 따른 도메인 매칭 방법을 도시한 흐름도이다. 도 21에 도시된 바와 같이, 본 발명의 제3확장예에 따른 도메인 매칭 방법은, 도 20의 도메인 스코어 계산 단계인 S24 이전에 전이 확률 적용 단계(S24')를 더 포함할 수 있다. More specifically, FIG. 21 is a flowchart illustrating a domain matching method according to a third extended example of the present invention. As shown in FIG. 21, the domain matching method according to the third extended example of the present invention may further include a transition probability application step S24 'before S24, which is the domain score calculation step of FIG.

전이 확률 적용 단계(S24')는 S24에서 이용되는 가중치에 전이 확률이 포함될 수 있도록 가중치에 전이 확률을 적용하는 단계이다. 전이 확률은 특정 도메인에서 다른 도메인으로 전이될 확률에 대한 정보를 의미한다. The transition probability application step S24 'is a step of applying the transition probability to the weight so that the transition probability can be included in the weight used in S24. Transition probability means information about the probability of transition from one domain to another.

이와 같은 방식을 적용하면, 도메인의 전환이 일어나는 시점에서 도메인 간의 전이에 대한 확률인 도메인 전이 확률을 기반으로, 이전 입력 데이터의 도메인으로부터 전이될 확률이 높은 도메인으로 다음 입력 데이터를 분류할 수 있는 확률을 곱하여 도메인 스코어를 결정할 수 있다. 예를 들어, 영화 이야기를 나누다가 연예인 이야기로 도메인이 전이될 확률은 높지만, 영화 이야기를 나누다가 치킨 이야기로 도메인이 전이될 확률은 낮다는 것을 도메인 스코어의 계산에 적용할 수 있다. 도메인 전이 확률은 과거의 도메인 전이에 관한 데이터를 기반으로 계산될 수 있고, 입력 데이터의 입력 시간차에 따라 달라질 수 있다.In this way, the probability that a next input data can be classified into a domain having a high probability of transition from the domain of the previous input data is calculated based on the domain transition probability, which is a probability of transition between the domains at the time of domain conversion. Lt; / RTI &gt; to determine the domain score. For example, the probability that a domain will be transferred to an entertainer story when sharing a movie story is high, but it can be applied to the calculation of a domain score that the probability that a domain is transferred to a story of a chicken after a story of a movie is low. The domain transition probability can be calculated based on data on past domain transitions and can be changed according to the input time difference of input data.

또한, 도메인이 기존의 Dk에서 다음 도메인 Dj로 넘어가는 시점에서, Dj를 계산하기 위해 Dk를 제외한 모든 도메인과 유사도를 구할 필요 없이, Dk와의 도메인 전이 확률이 높은 도메인들을 먼저 계산하는 것으로 계산량을 감축시킬 수 있다.Also, at the time when the domain moves from the existing D k to the next domain D j , it is necessary to first calculate the domains with high probability of domain transition with D k without calculating the similarity with all domains except D k in order to calculate D j The amount of computation can be reduced.

[[ 제4확장예Fourth Extended Example ]]

일련의 입력 데이터가 들어오고 있는 상황에서, 본 발명의 제4확장예에 따른 도메인 매칭 방법의 가중치 모듈(5)은 앞서 들어온 입력 데이터를 매칭한 도메인에서 다른 도메인으로 전이될 확률에 기초해 가중치를 부여하도록 구성되는 동시에, 해당 가중치에 강화학습(Reinforcement Learning)을 수행하여 사용자의 반응에 따라 가중치가 업데이트 되도록 구성될 수 있다. 강화 학습에서 이용될 보상으로는 도메인 매칭 장치(3)의 특정 도메인 파이프라인(40)의 매칭에 의해 출력되는 시간 t의 출력 데이터(201)에 대한 사용자의 반응, 즉 시간 t의 출력 데이터(201)를 사용자가 수신한 뒤에 재차 입력되는 시간 t+1의 입력 데이터(200)의 감성 분석값이 이용될 수 있다. The weighting module 5 of the domain matching method according to the fourth extended example of the present invention calculates the weight based on the probability of transition from the matching domain to the other domain And a reinforcement learning is performed on the weight, so that the weight is updated in accordance with the reaction of the user. The compensation to be used in the reinforcement learning includes the user's reaction to the output data 201 of the time t output by the matching of the specific domain pipeline 40 of the domain matching apparatus 3, ) Of the input data 200 at the time t + 1 that is input again after the user has received the input data 200 may be used.

보다 구체적으로, 도 22는 본 발명의 제4확장예에 따른 도메인 매칭 방법을 도시한 흐름도이다. 도 22에 도시된 바와 같이, 도 17의 도메인 매칭 단계(S12) 이후에 감성분석 단계(S40), 강화학습 단계(S41)를 더 포함할 수 있다. More specifically, FIG. 22 is a flowchart illustrating a domain matching method according to a fourth extended example of the present invention. As shown in FIG. 22, after the domain matching step S12 of FIG. 17, the emotional analysis step S40 and the reinforcement learning step S41 may be further included.

감성분석 단계(S40)는 도메인 매칭 단계(S12) 이후에 매칭된 도메인 파이프라인에서 출력 데이터가 출력된 이후에 사용자가 입력한 새로운 입력 데이터의 감성분석을 수행하여 감성 분석값을 생성하는 단게이다. The sensibility analysis step S40 is a step for generating sensibility analysis values by performing sensibility analysis of new input data inputted by a user after output data is outputted in a domain pipeline matched after the domain matching step S12.

강화학습 단계(S41)는 S40의 감성 분석값을 reward로 하고, 도메인 매칭 장치(3)를 agent, 도메인 스코어를 action으로 하여, 특정 어구 정보에 대한 도메인 스코어를 감성 분석값에 따라 업데이트하는 단계이다. 예를 들어, 새로운 입력 데이터의 감성이 "좋음"으로 분류되는 경우 S10의 입력 데이터의 어구 정보에 대해서는 S12에서 매칭된 도메인에 대해 높은 가중치가 부여되도록 도메인 매칭 장치(3)의 도메인 스코어 산출 방법이 업데이트 될 수 있다. 또한, 예를 들어, 새로운 입력 데이터의 감성이 "나쁨"으로 분류되는 경우 S10의 입력 데이터의 어구 정보에 대해서는 S12에서 매칭된 도메인에 대해 낮은 가중치가 부여되도록 도메인 매칭 장치(3)의 도메인 스코어 산출 방법이 업데이트 될 수 있다.The reinforcement learning step S41 is a step of updating the sensitivity score of S40 to reward, setting the domain matching device 3 as an agent, setting the domain score as action, and updating the domain score of specific phrase information according to the emotion analysis value . For example, when the sensitivity of the new input data is classified as "good ", the domain score calculation method of the domain matching apparatus 3 is performed such that a high weight is assigned to the matching domain in S12 with respect to the phrase information of the input data in S10 Can be updated. For example, when the sensitivity of the new input data is classified as "bad ", the domain score calculation of the domain matching apparatus 3 is performed so that a weighted value is assigned to the matching domain in S12 with respect to the phrase information of the input data in S10 The method can be updated.

도 23은 본 발명의 제4확장예에 따른 도메인 매칭 방법의 다른 예를 도시한 흐름도이다. 도 23에 도시된 바와 같이, 본 발명의 제4확장예에 따른 도메인 매칭 방법의 강화학습에서, 강화학습 단계(S41)는 S40의 감성 분석값을 reward로 하고, 가중치 모듈(5)을 agent, 가중치를 action으로 하여, 특정 어구 정보에 대한 가중치를 감성 분석값에 따라 업데이트하도록 구성될수도 있다. 예를 들어, 새로운 입력 데이터의 감성이 "좋음"으로 분류되는 경우 S10의 입력 데이터의 어구 정보에 대해서는 S12에서 매칭된 도메인에 대해 높은 가중치가 부여되도록 가중치 모듈(5)의 가중치 산출 방법이 업데이트 될 수 있다. 또한, 예를 들어, 새로운 입력 데이터의 감성이 "나쁨"으로 분류되는 경우 S10의 입력 데이터의 어구 정보에 대해서는 S12에서 매칭된 도메인에 대해 낮은 가중치가 부여되도록 가중치 모듈(5)의 가중치 산출 방법이 업데이트 될 수 있다.23 is a flowchart showing another example of the domain matching method according to the fourth extended example of the present invention. 23, in the reinforcement learning of the domain matching method according to the fourth extended example of the present invention, the reinforcement learning step S41 sets the emotion analysis value of S40 as reward and the weight module 5 as agent, The weight may be set to action, and the weight for the specific phrase information may be updated in accordance with the sentence analysis value. For example, when the sensitivity of new input data is classified as "good ", the weight calculation method of the weight module 5 is updated so that a high weight is assigned to the matching domain in S12 for the phrase information of the input data of S10 . For example, when the sensitivity of the new input data is classified as "bad ", the weight calculation method of the weight module 5 is performed such that a weighted value is assigned to the matching domain in S12 with respect to the phrase information of the input data in S10 Can be updated.

이상에서는 설명의 편의를 위해 입력 데이터가 입력된 뒤에 도메인 매칭 장치(3)가 도메인을 매칭하여 특정 도메인 파이프라인(40)에 입력 데이터를 할당하는 것으로 기재하였으나, 도 24에 도시된 바와 같이 순서가 바뀌는 것을 본 발명의 범위에 포함하지 않는 것은 아니다. 도 24는 본 발명의 변형예에 따른 자연어 처리 장치의 신호 흐름을 도시한 모식도이다. 도 24에 도시된 바와 같이, 구분 모듈에 의해 어구 정보로 구분된 입력 데이터(200)를 각각의 도메인 파이프라인(40)이 직접 받은 뒤, 각각의 도메인 파이프라인(40)에서 각각 출력 데이터를 생성하고, 도메인 매칭 장치(3)에서 복수의 출력 데이터를 rating하거나 ranking하는 등의 방법으로 선별하여 하나의 출력 데이터를 선택하도록 구성될 수 있다. In the above description, it is described that, after the input data is inputted, the domain matching apparatus 3 matches the domain and assigns the input data to the specific domain pipeline 40. However, as shown in FIG. 24, And the scope of the present invention is not limited thereto. 24 is a schematic diagram showing a signal flow of a natural language processing apparatus according to a modification of the present invention. As shown in FIG. 24, each domain pipeline 40 directly receives the input data 200 divided by the phrase information by the classification module, and generates output data in each domain pipeline 40 And selects one output data by selecting and sorting a plurality of output data in the domain matching apparatus 3 by rating or ranking.

이상에서는 설명의 편의를 위해 챗봇을 위주로 설명하였으나, 본 발명의 범위는 챗봇에만 국한되는 것이 아니고, 음성 분석(음성 봇)을 위한 인공지능 모듈, 자연어 분석을 위한 인공지능 모듈이나 문장 생성을 위한 Generative 인공지능 모듈 등의 자연어 처리 장치에 본 발명이 적용되는 것이 본 발명의 범위에 포함될 수 있다.Although the chatbot has been described above for the convenience of explanation, the scope of the present invention is not limited to the chatbot, but an artificial intelligence module for voice analysis (voice bots), an artificial intelligence module for natural language analysis, It is within the scope of the present invention that the present invention is applied to a natural language processing apparatus such as an artificial intelligence module.

이상에서 설명한 바와 같이, 본 발명이 속하는 기술 분야의 통상의 기술자는 본 발명이 그 기술적 사상이나 필수적 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 상술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로서 이해해야만 한다. 본 발명의 범위는 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 등가 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함하는 것으로 해석되어야 한다.As described above, those skilled in the art will appreciate that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. It is therefore to be understood that the above-described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the present invention is defined by the appended claims rather than the detailed description, and all changes or modifications derived from the meaning and scope of the claims and their equivalents should be construed as being included in the scope of the present invention.

본 명세서 내에 기술된 특징들 및 장점들은 모두를 포함하지 않으며, 특히 많은 추가적인 특징들 및 장점들이 도면들, 명세서, 및 청구항들을 고려하여 당업자에게 명백해질 것이다. 더욱이, 본 명세서에 사용된 언어는 주로 읽기 쉽도록 그리고 교시의 목적으로 선택되었고, 본 발명의 주제를 묘사하거나 제한하기 위해 선택되지 않을 수도 있다는 것을 주의해야 한다.The features and advantages described herein are not all inclusive, and in particular, many additional features and advantages will be apparent to those skilled in the art in view of the drawings, specification, and claims. Moreover, it should be noted that the language used herein is primarily chosen for readability and for purposes of teaching, and may not be selected to delineate or limit the subject matter of the invention.

본 발명의 실시예들의 상기한 설명은 예시의 목적으로 제시되었다; 이는 개시된 정확한 형태로 본 발명을 제한하거나, 빠뜨리는 것 없이 만들려고 의도한 것이 아니다. 당업자는 상기한 개시에 비추어 많은 수정 및 변형이 가능하다는 것을 이해할 수 있다.The foregoing description of embodiments of the invention has been presented for purposes of illustration; It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Those skilled in the art will appreciate that many modifications and variations are possible in light of the above teachings.

본 설명의 일부는 정보 상 연산의 기호 표현 및 알고리즘에 관한 본 발명의 실시예들을 기술한다. 이러한 알고리즘적 설명 및 표현은, 일반적으로 그들의 작업의 핵심을 효율적으로 다른 당업자에게 전달하기 위해 데이터 처리 분야의 당업자에 의해 사용된다. 이러한 동작은 기능적, 연산적, 또는 논리적으로 설명되지만, 컴퓨터나 이와 동등한 전기 회로, 마이크로코드 등에 의해 구현될 것으로 이해된다. 나아가, 또한 이것은 모듈로서의 이러한 동작의 배열을 나타내기 위해, 때때로 일반성의 상실 없이 편리하게 입증된다. 상기 기술된 동작 및 그들의 연관된 모듈은 소프트웨어, 펌웨어, 하드웨어, 또는 이들의 임의의 조합 내에서 구현될 수 있다.Some portions of this description describe embodiments of the present invention relating to symbolic representations and algorithms of informational operations. These algorithmic descriptions and representations are generally used by those skilled in the data processing arts to efficiently convey the essence of their work to the other skilled artisan. While such operations are described functionally, computationally, or logically, they are understood to be implemented by a computer or equivalent electrical circuitry, microcode, or the like. Furthermore, this is also conveniently demonstrated without loss of generality, sometimes to represent an arrangement of such operations as a module. The operations described above and their associated modules may be implemented in software, firmware, hardware, or any combination thereof.

여기서 기술된 임의의 단계, 동작, 또는 프로세스는, 하나 이상의 하드웨어 또는 소프트웨어 모듈과 함께 단독으로 또는 다른 장치와 조합하여 수행되거나 구현될 수 있다. 일 실시예에서, 소프트웨어 모듈은 컴퓨터 프로그램 코드를 포함하는 컴퓨터-판독 가능 매체로 구성되는 컴퓨터 프로그램 제품과 함께 구현되고, 컴퓨터 프로그램 코드는 기술된 임의의 또는 모든 공정, 단계, 또는 동작을 수행하기 위한 컴퓨터 프로세서에 의해 실행될 수 있다.Any of the steps, operations, or processes described herein may be performed or implemented in conjunction with one or more hardware or software modules, alone or in combination with other devices. In one embodiment, a software module is implemented with a computer program product comprised of a computer-readable medium comprising computer program code, and the computer program code is executable to perform any or all of the processes, steps, May be executed by a computer processor.

또한, 본 발명의 실시예들은, 여기서의 동작을 수행하기 위한 장치와 관련될 수 있다. 이들 장치는 요구되는 목적을 위해 특별히 제작될 수 있고/있거나, 컴퓨터 내에 저장된 컴퓨터 프로그램에 의해 선택적으로 활성화되거나 재구성되는 일반적-목적의 연산 장치를 포함할 수 있다. 이러한 컴퓨터 프로그램은, 유형의 컴퓨터 판독가능 저장 매체 또는 전자 명령어를 저장하기 위해 적합한 임의의 유형의 미디어 내에 저장될 수 있고, 컴퓨터 시스템 버스에 결합될 수 있다. 나아가, 본 명세서에 참조되는 임의의 연산 시스템은 단일 프로세서를 포함할 수 있거나, 증가한 연산 능력을 위한 다중 프로세서 디자인을 채택한 구조가 될 수 있다.Furthermore, embodiments of the invention may relate to an apparatus for performing the operations herein. These devices may include a general-purpose computing device that may be specially constructed and / or selectively activated or reconfigured by a computer program stored within the computer for the required purpose. Such a computer program may be stored in any type of media suitable for storing computer readable storage media or type of instructions, and may be coupled to a computer system bus. Further, any computing system referred to herein may comprise a single processor, or it may be a structure employing a multiprocessor design for increased computing power.

마지막으로, 본 명세서에 사용된 언어는 주로 읽기 쉽도록 그리고 교시의 목적으로 선택되었고, 본 발명의 주제를 묘사하거나 제한하기 위해 선택되지 않을 수 있다.Finally, the language used herein has been chosen primarily for readability and for purposes of teaching, and may not be selected to describe or limit the subject matter of the invention.

그러므로 본 발명의 범위는 상세한 설명에 의해 한정되지 않고, 이를 기반으로 하는 출원의 임의의 청구항들에 의해 한정된다. 따라서, 본 발명의 실시예들의 개시는 예시적인 것이며, 이하의 청구항에 기재된 본 발명의 범위를 제한하는 것은 아니다.The scope of the invention is, therefore, not to be limited by the Detailed Description, but is to be defined by the claims of any application based thereon. Accordingly, the disclosure of embodiments of the invention is illustrative and not restrictive of the scope of the invention, which is set forth in the following claims.

1: 자연어 처리 장치
2: 구분 모듈
3: 도메인 매칭 장치
4: 응답 모듈
5: 가중치 모듈
6: 센티멘탈 분석 모듈
21: NLP 모듈
22: 벡터화 모듈
40: 도메인 파이프라인
200: 입력 데이터
201: 출력 데이터
1: Natural language processing device
2: Separation module
3: Domain matching device
4: Response module
5: Weight module
6: Sentimental analysis module
21: NLP module
22: vectorization module
40: Domain Pipeline
200: input data
201: Output data

Claims (3)

입력 데이터를 수신하고, 상기 입력 데이터의 어구 정보를 생성하는 제1구분 모듈;
특정 도메인에 대한 출력 데이터를 생성하는 특정 도메인 파이프라인의 질문 데이터 세트를 수신하고, 상기 질문 데이터 세트의 어구 정보를 생성하는 제2구분 모듈;
상기 제1구분 모듈에서 구분된 어구가 특정 도메인에 특징적인지 여부를 판단하기 위하여 상기 질문 데이터 세트에서의 어구 출현 빈도 또는 어구 출현 확률과 General corpus에서의 어구 출현 빈도 또는 어구 출현 확률을 비교하고, 차이를 통해 해당 어구가 해당 도메인에 얼마나 특징적인 어구인지에 대한 스코어인 도메인 특화 점수를 판정하는 도메인 특화 점수 계산 모듈;
상기 입력 데이터의 어구 정보와 상기 특정 도메인 파이프라인의 상기 질문 데이터 세트의 어구 정보의 유사도 및 상기 도메인 특화 점수를 이용하여 각각의 도메인 파이프라인에 대한 도메인 스코어를 계산하는 도메인 스코어 계산 모듈; 및
상기 도메인 스코어가 가장 높은 상기 도메인 파이프라인에 상기 입력 데이터의 상기 어구 정보를 매칭하여 입력하는 도메인 매칭 모듈;
을 포함하는,
도메인 특화 점수를 이용한 도메인 매칭 장치.
A first classifying module for receiving input data and generating the phrase information of the input data;
A second segmentation module for receiving a query data set of a specific domain pipeline that generates output data for a particular domain and generating the query information of the query data set;
In order to determine whether or not the phrases classified in the first classification module are characteristic to a specific domain, the probability of occurrence of a word or occurrence of a phrase in the query data set is compared with the probability of occurrence of a word or occurrence of a word in a general corpus, A domain-specific score calculation module for determining a domain-specific score, which is a score of a characteristic word of a corresponding word in the domain;
A domain score calculation module for calculating a domain score for each domain pipeline using the similarity of the input information of the input data and the query information of the query data set of the specific domain pipeline and the domain specific score; And
A domain matching module for matching and inputting the phrase information of the input data to the domain pipeline having the highest domain score;
/ RTI &gt;
Domain matching device using domain - specific score.
제1구분 모듈이, 입력 데이터를 수신하고, 상기 입력 데이터의 어구 정보를 생성하는 제1구분 단계;
제2구분 모듈이, 특정 도메인에 대한 출력 데이터를 생성하는 특정 도메인 파이프라인의 질문 데이터 세트를 수신하고, 상기 질문 데이터 세트의 어구 정보를 생성하는 제2구분 단계;
도메인 특화 점수 계산 모듈이, 상기 제1구분 모듈에서 구분된 어구가 특정 도메인에 특징적인지 여부를 판단하기 위하여 상기 질문 데이터 세트에서의 어구 출현 빈도 또는 어구 출현 확률과 General corpus에서의 어구 출현 빈도 또는 어구 출현 확률을 비교하고, 차이를 통해 해당 어구가 해당 도메인에 얼마나 특징적인 어구인지에 대한 스코어인 도메인 특화 점수를 판정하는 도메인 특화 점수 계산 단계;
도메인 스코어 계산 모듈이, 상기 입력 데이터의 어구 정보와 상기 특정 도메인 파이프라인의 상기 질문 데이터 세트의 어구 정보의 유사도 및 상기 도메인 특화 점수를 이용하여 각각의 도메인 파이프라인에 대한 도메인 스코어를 계산하는 도메인 스코어 계산 단계; 및
도메인 매칭 모듈이, 상기 도메인 스코어가 가장 높은 상기 도메인 파이프라인에 상기 입력 데이터의 상기 어구 정보를 매칭하여 입력하는 도메인 매칭 단계;
를 포함하는,
도메인 특화 점수를 이용한 도메인 매칭 방법.
A first segmenting step of receiving the input data and generating the phrase information of the input data;
A second segmentation module receiving a query data set of a specific domain pipeline that generates output data for a specific domain and generating the query information of the query data set;
The domain-specific score calculation module may determine whether a word classified in the first classification module is characteristic to a specific domain, a probability of occurrence of a word in the query data set or a probability of occurrence of a word in the query data set, A domain-specific score calculation step of comparing the probability of appearance and determining a domain-specific score which is a score of a characteristic word of the corresponding word in the corresponding domain through a difference;
Domain score calculation module calculates a domain score for each domain pipeline using the similarity of the input information of the input data to the query information of the query data set of the specific domain pipeline and the domain specific score, Calculating step; And
A domain matching step in which the domain matching module matches and inputs the phrase information of the input data to the domain pipeline having the highest domain score;
/ RTI &gt;
Domain matching method using domain - specific score.
제1구분 모듈이, 입력 데이터를 수신하고, 상기 입력 데이터의 어구 정보를 생성하는 제1구분 단계;
제2구분 모듈이, 특정 도메인에 대한 출력 데이터를 생성하는 특정 도메인 파이프라인의 질문 데이터 세트를 수신하고, 상기 질문 데이터 세트의 어구 정보를 생성하는 제2구분 단계;
도메인 특화 점수 계산 모듈이, 상기 제1구분 모듈에서 구분된 어구가 특정 도메인에 특징적인지 여부를 판단하기 위하여 상기 질문 데이터 세트에서의 어구 출현 빈도 또는 어구 출현 확률과 General corpus에서의 어구 출현 빈도 또는 어구 출현 확률을 비교하고, 차이를 통해 해당 어구가 해당 도메인에 얼마나 특징적인 어구인지에 대한 스코어인 도메인 특화 점수를 판정하는 도메인 특화 점수 계산 단계;
도메인 스코어 계산 모듈이, 상기 입력 데이터의 어구 정보와 상기 특정 도메인 파이프라인의 상기 질문 데이터 세트의 어구 정보의 유사도 및 상기 도메인 특화 점수를 이용하여 각각의 도메인 파이프라인에 대한 도메인 스코어를 계산하는 도메인 스코어 계산 단계; 및
도메인 매칭 모듈이, 상기 도메인 스코어가 가장 높은 상기 도메인 파이프라인에 상기 입력 데이터의 상기 어구 정보를 매칭하여 입력하는 도메인 매칭 단계;
를 포함하는,
도메인 특화 점수를 이용한 도메인 매칭 방법이 컴퓨터 상에서 수행되는 기록매체에 저장된 프로그램.
A first segmenting step of receiving the input data and generating the phrase information of the input data;
A second segmentation module receiving a query data set of a specific domain pipeline that generates output data for a specific domain and generating the query information of the query data set;
The domain-specific score calculation module may determine whether a word classified in the first classification module is characteristic to a specific domain, a probability of occurrence of a word in the query data set or a probability of occurrence of a word in the query data set, A domain-specific score calculation step of comparing the probability of appearance and determining a domain-specific score which is a score of a characteristic word of the corresponding word in the corresponding domain through a difference;
Domain score calculation module calculates a domain score for each domain pipeline using the similarity of the input information of the input data to the query information of the query data set of the specific domain pipeline and the domain specific score, Calculating step; And
A domain matching step in which the domain matching module matches and inputs the phrase information of the input data to the domain pipeline having the highest domain score;
/ RTI &gt;
A domain matching method using a domain specific score is a program stored in a recording medium executed on a computer.
KR1020170178887A 2017-12-22 2017-12-22 Domain matching device and method for multi-domain natural language processing KR101834564B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170178887A KR101834564B1 (en) 2017-12-22 2017-12-22 Domain matching device and method for multi-domain natural language processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170178887A KR101834564B1 (en) 2017-12-22 2017-12-22 Domain matching device and method for multi-domain natural language processing

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020170058838A Division KR101851787B1 (en) 2017-05-11 2017-05-11 Domain matching device and method for multi-domain natural language processing

Publications (1)

Publication Number Publication Date
KR101834564B1 true KR101834564B1 (en) 2018-03-06

Family

ID=61727398

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170178887A KR101834564B1 (en) 2017-12-22 2017-12-22 Domain matching device and method for multi-domain natural language processing

Country Status (1)

Country Link
KR (1) KR101834564B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019190073A1 (en) * 2018-03-29 2019-10-03 Samsung Electronics Co., Ltd. Electronic device and control method thereof
KR20200020223A (en) * 2018-08-16 2020-02-26 한양대학교 산학협력단 Method and apparatus for calculating online advertising effectiveness based on suitability
WO2022055147A1 (en) * 2020-09-11 2022-03-17 삼성전자주식회사 Electronic device, and method for controlling same

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101309042B1 (en) 2012-09-17 2013-09-16 포항공과대학교 산학협력단 Apparatus for multi domain sound communication and method for multi domain sound communication using the same

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101309042B1 (en) 2012-09-17 2013-09-16 포항공과대학교 산학협력단 Apparatus for multi domain sound communication and method for multi domain sound communication using the same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
W. Zhang et al., A topic clustering approach to finding similar questions from large question and answer archives, www.plosone.org, vol.9 issue 3, 2014 march

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019190073A1 (en) * 2018-03-29 2019-10-03 Samsung Electronics Co., Ltd. Electronic device and control method thereof
US11145303B2 (en) 2018-03-29 2021-10-12 Samsung Electronics Co., Ltd. Electronic device for speech recognition and control method thereof
KR20200020223A (en) * 2018-08-16 2020-02-26 한양대학교 산학협력단 Method and apparatus for calculating online advertising effectiveness based on suitability
KR102144122B1 (en) * 2018-08-16 2020-08-13 한양대학교 산학협력단 Method and apparatus for calculating online advertising effectiveness based on suitability
WO2022055147A1 (en) * 2020-09-11 2022-03-17 삼성전자주식회사 Electronic device, and method for controlling same

Similar Documents

Publication Publication Date Title
KR101851787B1 (en) Domain matching device and method for multi-domain natural language processing
US10909152B2 (en) Predicting intent of a user from anomalous profile data
Yao et al. An improved LSTM structure for natural language processing
US10741176B2 (en) Customizing responses to users in automated dialogue systems
Kim et al. Two-stage multi-intent detection for spoken language understanding
KR101851793B1 (en) Domain matching device and method for multi-domain natural language processing
US9269354B2 (en) Semantic re-ranking of NLU results in conversational dialogue applications
US9171542B2 (en) Anaphora resolution using linguisitic cues, dialogue context, and general knowledge
KR101715118B1 (en) Deep Learning Encoding Device and Method for Sentiment Classification of Document
US9361884B2 (en) Communicating context across different components of multi-modal dialog applications
CN110457708B (en) Vocabulary mining method and device based on artificial intelligence, server and storage medium
US20140309990A1 (en) Semantic re-ranking of nlu results in conversational dialogue applications
KR101851788B1 (en) Apparatus and method for updating dictionary of text sentimental analysis
JP2021152963A (en) Word meaning feature generating method, model training method, apparatus, device, medium, and program
CN104484815A (en) Product-oriented emotion analysis method and system based on fuzzy body
KR101851790B1 (en) Question Data Set Extension and Method
KR101834564B1 (en) Domain matching device and method for multi-domain natural language processing
Noaman et al. Enhancing recurrent neural network-based language models by word tokenization
Fathullah et al. Ensemble distillation approaches for grammatical error correction
Yan et al. Implicit emotional tendency recognition based on disconnected recurrent neural networks
Seilsepour et al. Self-supervised sentiment classification based on semantic similarity measures and contextual embedding using metaheuristic optimizer
KR101851795B1 (en) Apparatus and method for update of emotion dictionary using domain-specific terminology
US20230350929A1 (en) Method and system for generating intent responses through virtual agents
Khassanov et al. Enriching rare word representations in neural language models by embedding matrix augmentation
Sheikhan et al. Structure and weights optimisation of a modified Elman network emotion classifier using hybrid computational intelligence algorithms: a comparative study

Legal Events

Date Code Title Description
A302 Request for accelerated examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant