KR20190134053A - Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling - Google Patents

Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling Download PDF

Info

Publication number
KR20190134053A
KR20190134053A KR1020180059215A KR20180059215A KR20190134053A KR 20190134053 A KR20190134053 A KR 20190134053A KR 1020180059215 A KR1020180059215 A KR 1020180059215A KR 20180059215 A KR20180059215 A KR 20180059215A KR 20190134053 A KR20190134053 A KR 20190134053A
Authority
KR
South Korea
Prior art keywords
sequence
corpus
neural network
morpheme
learning
Prior art date
Application number
KR1020180059215A
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 KR1020180059215A priority Critical patent/KR20190134053A/en
Publication of KR20190134053A publication Critical patent/KR20190134053A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/50Business processes related to the communications industry
    • G06Q50/30
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • G10L25/63Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination for estimating an emotional state

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Child & Adolescent Psychology (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Hospice & Palliative Care (AREA)
  • Psychiatry (AREA)
  • Evolutionary Computation (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Operations Research (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Machine Translation (AREA)

Abstract

Disclosed is a method of learning emotional conversations based on a sequence-to-sequence neural network model for psychological counseling. The method of learning emotional conversations comprises: a step of refining a corpus and generating morphemes in advance; a step of extracting an emotion vector for an input sentence and embedding a sentence; and a step of learning emotional conversations based on a sequence-to-sequence neural network model. The step of refining the corpus and generating the morphemes in advance includes a corpus refining step for learning a language model, a corpus reconstruction step, and a step of generating the morphemes in advance. The step of extracting the emotion vector for the input sentence and embedding the sentence includes an emotion vector extraction step and a sentence embedding step. The step of learning the emotional conversations based on the sequence-to-sequence neural network model is a step of using the emotion vector for the input sentence to learn the emotional conversations for psychological counseling. A chatbot capable of understanding psychological counseling content in a natural language and providing a proper response can be developed by the present invention.

Description

심리상담을 위한 시퀀스-투-시퀀스 신경망 모델 기반 정서적 대화 학습 방법 {Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling}Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling}

본 발명은 심리상담을 위해 시퀀스-투-시퀀스(Sequence-to-Sequence) 신경망 모델 기반으로 정서적 대화를 학습하는 방법에 관한 것이다. The present invention relates to a method of learning emotional conversation based on a sequence-to-sequence neural network model for psychological counseling.

채팅은 컴퓨터 등의 장치를 통해 인터넷 상의 사용자가 만나 메시지를 주고받는 것으로 예전부터 사용되었다. 이후 휴대전화 및 모바일 장치의 발달로 인터넷 접속에 있어서의 공간적인 제약을 극복하여 채팅은 인터넷에 연결 할 수 있는 장치가 있는 곳이면 어디에서든 사용 가능하게 되었다. Chat has long been used to send and receive messages from users on the Internet through computers and other devices. Later, with the development of mobile phones and mobile devices, overcoming the spatial limitations of Internet access, chat became available wherever there is a device that can connect to the Internet.

그럼에도 불구하고, 채팅은 상대방이 존재하지 않는 경우에는 사용하기 힘들다. 이를 해결하기 위해서 채트봇이 탄생하여 입력된 말에 따라 적절한 대답을 추천함으로써 채트봇이 채팅 상대방을 대체 할 수 있게 되었다.Nevertheless, chat is difficult to use if no counterpart exists. To solve this, chatbots were born and chatbots could replace chat counterparts by recommending appropriate answers based on the words entered.

최근 채트봇에 대한 관심이 증가함에 따라, 여러 회사들에서 채트봇을 만들고 있다. 이렇게 상용화된 채트봇이 많이 만들어지고 있으나, 주로 정보 전달을 목적으로 만들어진다. 사람들의 기분이나 감정과 같은 정서적인 대화를 다루는 채트봇은 드물다. As interest in chatbots has increased in recent years, several companies are building chatbots. Many commercialized chatbots are being made, but mainly for informational purposes. Chatbots rarely deal with emotional conversations such as people's moods and feelings.

현재 채트봇은 질문과 답변 문장 쌍으로 이루어진 데이터를 딥 러닝을 이용하여 학습을 시킨다. 그러므로 채트봇이 사용자의 감정을 고려하여 적절한 답변을 하는 것이 어렵다. Chatbot currently uses deep learning to learn data that consists of pairs of question and answer sentences. Therefore, it is difficult for the chatbot to respond appropriately in consideration of the user's feelings.

기존의 Sequence-to-Sequence 신경망 모델을 이용한 채트봇은 사용자의 대화로부터 기본적인 문장을 학습 시킬 수 있다. 그러나 문장 내에 내재된 감정을 추출하여, 이를 반영하여 사용자에게 적절한 답변을 내는 것은 어렵다. 따라서, 문장 내에 내재된 감정을 추출하여 정서적인 대화를 학습할 수 있는 방법에 대한 연구가 필요하게 되었다. Chatbots using the existing Sequence-to-Sequence neural network model can learn basic sentences from the user's conversation. However, it is difficult to extract the emotion inherent in the sentence and reflect the information to give an appropriate answer to the user. Therefore, it is necessary to study a method of learning emotional conversation by extracting emotions embedded in sentences.

본 발명은 Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 이용하여 정서적인 대화를 학습 시키는 방법을 제공하기 위한 것이다.An object of the present invention is to provide a method of learning emotional conversation using a sequence-to-sequence neural network model and an emotion vector for an input sentence.

본 발명의 실시 형태에 따른 Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 추출하여 심리상담을 위한 정서적 대화를 학습하는 방법은 말뭉치 정제 및 형태소 사전 생성 단계; 입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계; Sequence-to-Sequence 신경망 모델 기반 정서적 대화 학습 단계를 포함한다.According to an embodiment of the present invention, a method of learning emotional conversation for psychological counseling by extracting a sequence-to-sequence neural network model and an emotion vector for an input sentence includes: corpus refining and morphological dictionary generation; Emotion vector extraction and sentence embedding for input sentences; Sequence-to-Sequence neural network model-based emotional dialogue learning step.

일 실시예에 따르면, 말뭉치 정제 및 형태소 사전 생성 단계는, 언어모델 학습을 위한 말뭉치 정제 단계, 말뭉치 재구축 단계와, 형태소 단위로 감정을 분류하기 위해 필요한 형태소 사전 생성하는 단계를 포함할 수 있다.According to an embodiment, the corpus refinement and morpheme dictionary generation step may include a corpus refinement step for language model learning, a corpus reconstruction step, and a morpheme dictionary generation for classifying emotions in morpheme units.

일 실시예에 따르면, 입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계는 상기 형태소 사전을 참조하여 입력 문장에 대한 연속된 값의 벡터를 추출 단계, RNN 인코더의 문장 임베딩 단계를 포함할 수 있다.According to an embodiment, the emotion vector extraction and sentence embedding of the input sentence may include extracting a vector of consecutive values for the input sentence with reference to the morpheme dictionary, and embedding the sentence of the RNN encoder.

본 발명은 Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 추출하여 심리상담을 위한 정서적 대화와 관련된 심리상담용 챗봇을 구현하기 위한 원천 기술로서 제공한다. 이 기술을 통해 자연어로 이루어지는 상담내용을 이해하고 적합한 응답을 해줄 수 있는 챗봇을 개발할 수 있다. The present invention provides a source technology for implementing a psycho-chat chatbot related to emotional conversation for psychological counseling by extracting a sequence-to-sequence neural network model and an emotion vector for an input sentence. This technology enables the development of chatbots that understand natural language counseling and respond appropriately.

도 1은 본 발명의 실시예에 따른 Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 추출하여 심리상담을 위한 정서적 대화를 학습하는 방법을 나타내는 흐름도이다.
도 2는 본 발명의 실시예에 따른 말뭉치 정제 및 형태소 사전 생성 단계에 관한 상세 흐름도이다.
도 3은 본 발명의 실시예에 따른 입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계에 관한 상세 흐름도이다.
도 4는 본 발명의 실시예에 따른 Sequence-to-Sequence 신경망 모델 기반 정서적 대화를 학습하는 방법을 나타내는 도면이다.
1 is a flowchart illustrating a method of learning an emotional conversation for psychological counseling by extracting an emotion vector for a sequence-to-sequence neural network model and an input sentence according to an embodiment of the present invention.
Figure 2 is a detailed flowchart of the corpus refining and morpheme dictionary generation step according to an embodiment of the present invention.
3 is a detailed flowchart illustrating an emotion vector extraction and sentence embedding step for an input sentence according to an embodiment of the present invention.
4 is a diagram illustrating a method of learning emotional dialogue based on a Sequence-to-Sequence neural network model according to an embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.DETAILED DESCRIPTION The following detailed description of the invention refers to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It should be understood that the various embodiments of the present invention are different but need not be mutually exclusive. For example, certain shapes, structures, and characteristics described herein may be embodied in other embodiments without departing from the spirit and scope of the invention with respect to one embodiment. In addition, it is to be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the invention. The following detailed description, therefore, is not to be taken in a limiting sense, and the scope of the present invention, if properly described, is defined only by the appended claims, along with the full range of equivalents to which such claims are entitled. Like reference numerals in the drawings refer to the same or similar functions throughout the several aspects.

이하, 첨부되는 도면을 참조하여 본 발명의 실시 형태에 따른 Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 추출하여 심리리 상담을 위한 정서적 대화를 학습하는 방법을 설명한다.Hereinafter, a method of learning emotional conversation for psychological counseling by extracting a sequence-to-sequence neural network model and an emotion vector for an input sentence according to an embodiment of the present invention will be described with reference to the accompanying drawings.

도 1은 본 발명의 실시예에 따른 Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 추출하여 심리상담을 위한 정서적 대화를 학습하는 방법을 나타내는 흐름도이다.1 is a flowchart illustrating a method of learning an emotional conversation for psychological counseling by extracting an emotion vector for a sequence-to-sequence neural network model and an input sentence according to an embodiment of the present invention.

도 1을 참조하면 Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 추출하여 심리 상담을 위한 정서적 대화를 학습하는 방법은 말뭉치 정제 및 형태소 사전 생성 단계(S100), 입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계(S200), Sequence-to-Sequence 신경망 모델 기반 정서적 대화 학습 단계(S300)를 포함할 수 있다.Referring to FIG. 1, a method of learning an emotional conversation for psychological counseling by extracting a sequence-to-sequence neural network model and an emotion vector for an input sentence is a corpus refinement and a morpheme dictionary generation step (S100), and an emotion vector for an input sentence. The extraction and sentence embedding step S200 and the sequence-to-sequence neural network model-based emotional conversation learning step S300 may be included.

상기 말뭉치 정제 및 형태소 사전 생성 단계(S100)는 언어모델 학습을 위한 심리 상담 대화 데이터의 내용을 정제하고, 입력 문장에 대한 감정 벡터를 추출하기 위해 형태소 사전을 생성하는 단계이다.The corpus refining and morpheme dictionary generation step S100 is a step of refining the contents of the psychological counseling conversation data for language model learning, and generating a morpheme dictionary to extract an emotion vector for the input sentence.

상기 입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계(S200)는 입력 문장에 대한 감정을 분류하기 상기 형태소 사전을 참고하여 연속된 값을 지니는 감정 벡터 값을 추출하고, RNN 인코더의 문장 임베딩을 하는 단계이다. In the emotion vector extraction and sentence embedding step (S200), the emotion vector value having a continuous value is extracted by referring to the morpheme dictionary for classifying emotions regarding the input sentence, and sentence embedding of the RNN encoder is performed. to be.

상기 Sequence-to-Sequence 신경망 모델 기반 정서적 대화 학습 단계(S300)는 상기 감정 벡터를 고려하여 채트봇이 정서적 대화가 가능할 수 있도록 모델을 학습하는 과정이다.The emotional dialogue learning step based on the sequence-to-sequence neural network model (S300) is a process of learning a model so that the chatbot can have emotional dialogue in consideration of the emotion vector.

도 2는 본 발명의 실시예에 따라 도 1의 말뭉치 정제 및 형태소 사전 생성 단계(S100)의 구체적인 수행 방법에 관한 상세 흐름도이다.FIG. 2 is a detailed flowchart of a concrete method of performing the corpus purification and morpheme dictionary generation step S100 of FIG. 1 according to an exemplary embodiment of the present invention.

도 2를 참조하면, 예시적인 실시예에 따른 말뭉치 정제 및 형태소 사전 생성 단계(S100)는 언어모델 학습을 위한 말뭉치 정제 단계(S110), 말뭉치 재구축 단계(S120), 입력 문장에 대한 감정 벡터를 추출하기 위한 형태소 사전 생성 단계(S130)를 포함할 수 있다.Referring to FIG. 2, the corpus refinement and morpheme dictionary generation step S100 according to an exemplary embodiment may include a corpus refinement step S110, a corpus reconstruction step S120, and an emotion vector for an input sentence. It may include a morpheme dictionary generation step (S130) for extraction.

예시적인 실시예에 따른 상기 언어모델 학습을 위한 말뭉치 정제 단계(S110)는 심리 상담 대화 데이터를 말뭉치 형태로 변형하는 단계일 수 있다. 메신저와 같은 환경에서 이루어지는 대화 데이터는 일반적으로 오타나 띄어쓰기 오류를 많이 포함할 수 있다. 또한 문장을 문장 부호 기준으로 간단하게 분리할 수가 없으며, 한 문장이 여러 대화에 걸쳐 쪼개지기도 한다. 연속된 대화에 대해서는 문장을 결합하고 문맥상 질문이 변경되었을 때는 대화 세션을 분리하여 말뭉치를 구축하여야 한다.The corpus refinement step (S110) for language model learning according to an exemplary embodiment may be a step of transforming psychological counseling conversation data into a corpus form. Conversation data in an environment such as a messenger may generally include a large number of typos or spacing errors. Also, sentences cannot be simply separated by punctuation marks, and a sentence may be split over several conversations. For sequential conversations, construct sentences by combining sentences and separating conversation sessions when contextual questions change.

예시적인 실시예에 따른 상기 말뭉치 재구축 단계(S120)는 입력 문장에 대해 문장 단위로 감정을 분류하기 어렵기 때문에 말뭉치를 형태소 단위로 나눠서, 형태소 단위로 말뭉치를 재구축하는 단계이다.In the corpus reconstruction step (S120) according to an exemplary embodiment, since it is difficult to classify the emotions in sentence units with respect to the input sentence, the corpus is divided into morpheme units to rebuild the corpus in morpheme units.

예시적인 실시예에 따른 상기 입력 문장에 대한 감정 벡터를 추출하기 위한 형태소 사전 생성 단계(S130)는 상기 재구축된 말뭉치에 대한 감정 벡터를 추출하기 위해 감정 별로 해당하는 형태소들에 대한 사전을 생성하는 단계이다. 이를 위해 감정을 크게 긍정, 중립, 부정 3가지로 분류한다. A morpheme dictionary generation step S130 of extracting an emotion vector for the input sentence according to an exemplary embodiment may include generating a dictionary for morphemes corresponding to emotions to extract an emotion vector for the reconstructed corpus. Step. To this end, emotions are classified into three categories: positive, neutral, and negative.

다음으로, 도 3은 본 발명의 예시적인 실시예에 따른 상기 입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계(S200)의 구체적인 수행 방법에 관한 상세 흐름도이다. Next, FIG. 3 is a detailed flowchart illustrating a method of specifically performing an emotion vector extraction and sentence embedding step S200 for the input sentence according to an exemplary embodiment of the present invention.

예시적인 실시예에 따르면, 상기 형태소 사전을 참고하여 입력 문장에 대해 감정 벡터를 추출할 수 있다(S210). 이 단계(S210)는 상기 재구축된 말뭉치에서 형태소 단위로 감정을 분류할 때, 형태소 단위에 감정마다 다른 값을 부여할 수 있다. 분류를 위해 사용하는 감정은 긍정, 중립, 부정으로 3가지로 구분할 수 있다. 형태소 단위가 어떤 감정에 속하는지를 알기 위해 상기 형태소 사전을 참고할 수 있다. 형태소 단위가 상기 형태소 사전의 긍정 형태소에 해당되면 1.0의 실수 값을 부여할 수 있다. 중립의 경우에는 0.0의 실수 값을 부여할 수 있다. 부정의 경우에는 ??1.0의 실수 값을 부여할 수 있다. 그리고 입력 문장에 대해 형태소 단위마다 부여된 값을 가지고 평균값을 산출할 수 있다. 따라서 입력 문장의 감정 벡터 값이 1.0에 가까우면 긍정을 의미하고, 0.0에 가까우면 중립을 의미하며 ??1.0에 가까우면 부정을 의미할 수 있다. 이를 통해 입력 문자에 대한 감정을 고려하여 정서적 대화 학습에 반영할 수 있다. According to an exemplary embodiment, an emotion vector may be extracted with respect to an input sentence by referring to the morpheme dictionary (S210). In this step (S210), when the emotions are classified by the morpheme unit in the reconstructed corpus, the morpheme unit may be assigned different values for each emotion. The emotions used for classification can be divided into three categories: positive, neutral, and negative. The morpheme dictionary may be consulted to know which emotion the morpheme unit belongs to. If the morpheme unit corresponds to the positive morpheme of the morpheme dictionary, a real value of 1.0 may be assigned. In the case of neutral, a real value of 0.0 can be given. In case of negation, a real value of ?? 1.0 can be given. The average value may be calculated based on a value given for each morpheme unit of the input sentence. Therefore, if the emotion vector value of the input sentence is close to 1.0, it may mean positive, and if it is close to 0.0, it means neutral, and if it is close to ?? 1.0, it may mean negative. Through this, it can be reflected in the emotional dialogue learning considering the feelings about the input characters.

예시적인 실시예에 따르면, 상기 문장 임베딩 단계(S220)는 RNN 문장 인코딩 자질을 추출할 수 있다. RNN 인코더는 Bi-directional LSTM 모델을 사용할 수 있다. 입력 층에는 각 단어의 워드 임베딩 결과가 순차적으로 입력될 수 있다.According to an exemplary embodiment, the sentence embedding step S220 may extract the RNN sentence encoding feature. The RNN encoder can use the Bi-directional LSTM model. The word embedding result of each word may be sequentially input to the input layer.

다음으로, 도 4은 본 발명의 실시예에 따른 심리상담을 위한 정서적 대화 학습 방법을 나타내는 도면이다. Next, FIG. 4 is a diagram illustrating an emotional dialogue learning method for psychological counseling according to an embodiment of the present invention.

도 4를 참조하면서, 도 1에 나타낸 상기 Sequence-to-Sequence 신경망 모델 기반 정서적 대화 학습 단계(S300)를 설명한다.  Referring to FIG. 4, the sequence-to-sequence neural network model-based emotional dialogue learning step S300 illustrated in FIG. 1 will be described.

상기 정서적 대화 학습 단계(S300)는 심리상담 대화 데이터를 Sequence-to-Sequence 신경망 모델을 이용하여 정서적 대화를 학습하는 단계이다. Sequence-to-Sequence 신경망 모델은 크게 인코더와 디코더로 이루어질 수 있다. 인코더의 각 셀(cell)은 LSTM 이고, 전체 구조는 Bidirectional LSTM 구조이다. 입력 문장에 대해 1개의 hidden state 값으로 인코딩하기 위해 도 4의 인코더에서 진하게 표시된 두 개의 cell 들에서 생성되는 출력값을 접합시킨다. 도 4에서 concat vector 는 디코더의 입력으로 사용된다. 디코더의 각 cell 들은 LSTM 구조일 수 있다. 디코더에서는 concat vector와 워드 임베딩 된 상기 재구축된 말뭉치가 입력으로 사용될 수 있다. 일반적인 Sequence-to-Sequence 신경망 모델에서는 입력 문장에서 특정한 부분을 강조하고 싶을 때 attention mechanism을 사용할 수 있다. 따라서 상기 Sequence-to-Sequence 신경망 모델을 이용하여 정서적 대화를 학습 시킬 때, 입력 문장에 해당하는 감정을 특화시키기 위해 상기 attention mechanism 에 상기 추출한 감정 벡터를 사용할 수 있다.The emotional dialogue learning step (S300) is a step of learning emotional dialogue using the psychological counseling dialogue data using a sequence-to-sequence neural network model. The sequence-to-sequence neural network model can be largely composed of an encoder and a decoder. Each cell of the encoder is LSTM, and the overall structure is a Bidirectional LSTM structure. In order to encode the input sentence into one hidden state value, the output values generated in two cells marked in bold in the encoder of FIG. 4 are joined. In FIG. 4, the concat vector is used as an input of a decoder. Each cell of the decoder may have an LSTM structure. At the decoder, a concat vector and the word-embedded reconstructed corpus can be used as input. In a typical sequence-to-sequence neural network model, an attention mechanism can be used when you want to emphasize a specific part of an input sentence. Therefore, when the emotional dialogue is trained using the sequence-to-sequence neural network model, the extracted emotion vector may be used as the attention mechanism to characterize the emotion corresponding to the input sentence.

이와 같이 본 발명은 자연어로 이루어지는 심리상담 내용을 이해하고 적합한 응답을 해줄 수 있는 챗봇을 개발하는 원천 기술을 제공할 수 있다.As described above, the present invention can provide a source technology for developing a chatbot that can understand psychological counseling contents and respond appropriately.

이상에서 실시 예들에 설명된 특징, 구조, 효과 등은 본 발명의 하나의 실시 예에 포함되며, 반드시 하나의 실시 예에만 한정되는 것은 아니다. 나아가, 각 실 시예에서 예시된 특징, 구조, 효과 등은 실시 예들이 속하는 분야의 통상의 지식을 가지는 자에 의해 다른 실시들에 대해서도 조합 또는 변형되어 실시 가능하다. 따라서 이러한 조합과 변형에 관계된 내용들은 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다.Features, structures, effects, etc. described in the above embodiments are included in one embodiment of the present invention, and are not necessarily limited to only one embodiment. Furthermore, the features, structures, effects, and the like illustrated in the embodiments may be combined or modified with respect to other embodiments by those skilled in the art to which the embodiments belong. Therefore, contents related to such combinations and modifications should be construed as being included in the scope of the present invention.

또한, 이상에서 실시 예를 중심으로 설명하였으나 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 예를 들어, 실시 예에 구체적으로 나타난 각 구성 요소는 변형하여 실시할 수 있는 것이다. 그리고 이러한 변형과 응용에 관계된 차이점들은 첨부된 청구 범위에서 규정하는 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다.In addition, the above description has been made with reference to the embodiments, which are merely examples and are not intended to limit the present invention. Those skilled in the art to which the present invention pertains will be exemplified above as long as they do not depart from the essential characteristics of the present embodiments. It will be appreciated that various modifications and applications are possible. For example, each component specifically shown in the embodiment can be modified. And differences relating to such modifications and applications will have to be construed as being included in the scope of the invention defined in the appended claims.

Claims (5)

컴퓨터 장치의 프로세서에 의해 실행되는 방법으로서,
언어모델 학습을 위한 심리 상담 대화 데이터의 내용을 정제하고, 입력 문장에 대한 감정 벡터를 추출하기 위해 형태소 사전을 생성하는 '말뭉치 정제 및 형태소 사전 생성 단계';
입력 문장에 대한 감정을 분류하기 상기 형태소 사전을 참고하여 연속된 값을 지니는 감정 벡터 값을 추출하고, RNN 인코더의 문장 임베딩을 수행하는 '입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계'; 및
상기 감정 벡터를 고려하여 채트봇이 정서적 대화가 가능할 수 있도록 모델을 학습하는 '시퀀스-투-시퀀스(Sequence-to-Sequence) 신경망 모델 기반 정서적 대화 학습 단계'를 포함하여,
Sequence-to-Sequence 신경망 모델과 입력 문장에 대한 감정 벡터를 추출하여 심리상담을 하는 것을 특징으로 하는 시퀀스-투-시퀀스 신경망 모델 기반 정서적 대화 학습 방법.
A method executed by a processor of a computer device,
A corpus refinement and morpheme dictionary generation step of generating a morpheme dictionary for refining the contents of psychological counseling dialogue data for language model learning and extracting an emotion vector for an input sentence;
Classifying emotions for the input sentence; extracting emotion vector values having a continuous value by referring to the morpheme dictionary, and performing sentence embedding of the RNN encoder; And
Including a 'sequence-to-sequence neural network model-based emotional dialogue learning step' that trains the model so that the chatbot can have emotional dialogue in consideration of the emotion vector,
A sequence-to-sequence neural network model-based emotional dialogue learning method characterized by psychological counseling by extracting a emotion vector for an input sentence and a sequence-to-sequence neural network model.
제1항에 있어서, 상기 '말뭉치 정제 및 형태소 사전 생성 단계'는, 심리 상담 대화 데이터를 말뭉치 형태로 변형하는 '언어모델 학습을 위한 말뭉치 정제 단계'; 말뭉치를 형태소 단위로 나눠서, 형태소 단위로 말뭉치를 재구축하는 '말뭉치 재구축 단계'; 그리고 상기 재구축된 말뭉치에 대한 감정 벡터를 추출하기 위해 감정 별로 해당하는 형태소들에 대한 사전을 생성하는 '입력 문장에 대한 감정 벡터를 추출하기 위한 형태소 사전 생성 단계'를 포함하는 것을 특징으로 하는 시퀀스-투-시퀀스 신경망 모델 기반 정서적 대화 학습 방법.The method of claim 1, wherein the corpus refinement and morpheme dictionary generation step comprises: a corpus refinement step for language model learning that transforms psychological counseling conversation data into corpus form; A corpus reconstruction step of dividing corpus into morpheme units to reconstruct corpus into morpheme units; And a step of generating a morpheme dictionary for extracting an emotion vector for an input sentence to generate a dictionary for morphemes corresponding to each emotion in order to extract the emotion vector for the reconstructed corpus. Emotional dialogue learning method based on two-sequence neural network model. 제2항에 있어서, 상기 '입력 문장에 대한 감정 벡터 추출 및 문장 임베딩 단계'는 상기 형태소 사전을 참조하여 입력 문장에 대한 연속된 값의 감정 벡터를 추출하는 단계; 그리고 RNN 문장 인코딩 자질을 추출하는 'RNN 인코더의 문장 임베딩 단계'를 포함하는 것을 특징으로 하는 시퀀스-투-시퀀스 신경망 모델 기반 정서적 대화 학습 방법.3. The method of claim 2, wherein the extracting the emotion vector for the input sentence and embedding the sentence comprises: extracting an emotion vector of consecutive values for the input sentence with reference to the morpheme dictionary; And a sentence embedding step of the RNN encoder extracting the RNN sentence encoding qualities. 제3항에 있어서, 상기 재구축된 말뭉치에서 형태소 단위로 감정을 분류할 때, 분류를 위해 사용하는 감정은 긍정, 중립, 부정의 3가지를 포함하고, 형태소 단위에 감정마다 다른 값을 부여하며, 형태소 단위가 어떤 감정에 속하는지를 알기 위해 상기 형태소 사전을 참고하되, 형태소 단위가 상기 형태소 사전의 긍정 형태소에 해당되면 1.0의 실수 값을 부여하고, 중립의 경우에는 0.0의 실수 값을 부여하며, 부정의 경우에는 -1.0의 실수 값을 부여하고, 입력 문장에 대해 형태소 단위마다 부여된 값을 가지고 평균값을 산출하여 상기 감적 벡터로 추출하는 것을 특징으로 하는 시퀀스-투-시퀀스 신경망 모델 기반 정서적 대화 학습 방법.The method of claim 3, wherein when classifying emotions in morpheme units in the reconstructed corpus, the emotions used for classification include three types of positive, neutral, and negative, and give different values to each emotion in the morpheme unit. Refer to the morpheme dictionary to know which emotion the morpheme unit belongs to, but if the morpheme unit corresponds to the positive morpheme of the morpheme dictionary, a real value of 1.0 is given, and in the case of neutral, a real value of 0.0 is given. In the case of negation, emotional dialogue learning based on a sequence-to-sequence neural network model is characterized by assigning a real value of -1.0, calculating an average value with values given for each morphological unit for the input sentence, and extracting the average value as the marker vector. Way. 제1항에 있어서, 상기 '시퀀스-투-시퀀스(Sequence-to-Sequence) 신경망 모델 기반 정서적 대화 학습 단계'에서 상기 Sequence-to-Sequence 신경망 모델을 이용하여 정서적 대화를 학습 시킬 때에 입력 문장에 해당하는 감정을 특화시키기 위해 attention mechanism 에 상기 추출한 감정 벡터를 사용는 것을 특징으로 하는 시퀀스-투-시퀀스 신경망 모델 기반 정서적 대화 학습 방법.
The method of claim 1, wherein in the 'sequence-to-sequence neural network model-based emotional dialogue learning step', when the emotional dialogue is trained using the sequence-to-sequence neural network model, it corresponds to an input sentence. Emotional dialogue learning method based on a sequence-to-sequence neural network model, characterized in that using the extracted emotion vector in the attention mechanism to characterize the emotion.
KR1020180059215A 2018-05-24 2018-05-24 Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling KR20190134053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180059215A KR20190134053A (en) 2018-05-24 2018-05-24 Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180059215A KR20190134053A (en) 2018-05-24 2018-05-24 Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling

Publications (1)

Publication Number Publication Date
KR20190134053A true KR20190134053A (en) 2019-12-04

Family

ID=69004378

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180059215A KR20190134053A (en) 2018-05-24 2018-05-24 Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling

Country Status (1)

Country Link
KR (1) KR20190134053A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597759A (en) * 2020-11-30 2021-04-02 深延科技(北京)有限公司 Text-based emotion detection method and device, computer equipment and medium
CN112765333A (en) * 2021-01-08 2021-05-07 山东师范大学 Automatic dialogue generation method and system based on emotion and prompt word combination
KR20220046025A (en) * 2020-10-06 2022-04-14 연세대학교 산학협력단 Psychological Counseling Method and System with voice recognition that induces empathetic communications through emotional keywords and desire search
KR102507809B1 (en) * 2022-10-28 2023-03-10 주식회사 닥터송 Artificial intelligence dialogue system for psychotherapy through consensus formation
US11736423B2 (en) 2021-05-04 2023-08-22 International Business Machines Corporation Automated conversational response generation

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220046025A (en) * 2020-10-06 2022-04-14 연세대학교 산학협력단 Psychological Counseling Method and System with voice recognition that induces empathetic communications through emotional keywords and desire search
CN112597759A (en) * 2020-11-30 2021-04-02 深延科技(北京)有限公司 Text-based emotion detection method and device, computer equipment and medium
CN112597759B (en) * 2020-11-30 2024-04-09 深延科技(北京)有限公司 Emotion detection method and device based on text, computer equipment and medium
CN112765333A (en) * 2021-01-08 2021-05-07 山东师范大学 Automatic dialogue generation method and system based on emotion and prompt word combination
US11736423B2 (en) 2021-05-04 2023-08-22 International Business Machines Corporation Automated conversational response generation
KR102507809B1 (en) * 2022-10-28 2023-03-10 주식회사 닥터송 Artificial intelligence dialogue system for psychotherapy through consensus formation
WO2024090712A1 (en) * 2022-10-28 2024-05-02 주식회사 닥터송 Artificial intelligence chatting system for psychotherapy through empathy

Similar Documents

Publication Publication Date Title
Chopra et al. Natural language processing
CN112131366B (en) Method, device and storage medium for training text classification model and text classification
KR20190134053A (en) Method of learning emotional conversations based on sequence-to-sequence neural network for psychological counseling
Nguyen et al. NEU-chatbot: Chatbot for admission of National Economics University
Aluísio et al. Towards brazilian portuguese automatic text simplification systems
CN111738025B (en) Artificial intelligence based translation method and device, electronic equipment and storage medium
Sayers et al. The Dawn of the Human-Machine Era: A forecast of new and emerging language technologies.
Naous et al. Empathy-driven Arabic conversational chatbot
Lozynska et al. Individual sign translator component of tourist information system
López-Ludeña et al. Methodology for developing an advanced communications system for the Deaf in a new domain
Aliwy et al. Development of arabic sign language dictionary using 3D avatar technologies
Li et al. Cm-gen: A neural framework for chinese metaphor generation with explicit context modelling
Al-Barahamtoshy et al. Arabic text-to-sign (ArTTS) model from automatic SR system
Kumar Contextual semantics using hierarchical attention network for sentiment classification in social internet-of-things
Kumar et al. Explaining (sarcastic) utterances to enhance affect understanding in multimodal dialogues
Tsakiris et al. The development of a chatbot using Convolutional Neural Networks
KR102390068B1 (en) Chatbot system capable of expressing emotion visually
Wang The performance of artificial intelligence translation app in Japanese language education guided by deep learning
Lee et al. An integrated neural network model for domain action determination in goal-oriented dialogues
CN113705251A (en) Training method of machine translation model, language translation method and equipment
Salvatierra Science-fictional Multilingualism in Ursula K. Le Guin
Tulsian et al. Generating ISL using audio speech
CN112749553A (en) Text information processing method and device for video file and server
Chakkarwar et al. A Review on BERT and Its Implementation in Various NLP Tasks
Abuzinadah An avatar-based system for Arabic sign language to enhance hard-of-hearing and deaf students' performance in a fundamentals of computer programming course.

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E601 Decision to refuse application