KR20190125154A - An apparatus for machine learning the psychological counseling data and a method thereof - Google Patents

An apparatus for machine learning the psychological counseling data and a method thereof Download PDF

Info

Publication number
KR20190125154A
KR20190125154A KR1020180140321A KR20180140321A KR20190125154A KR 20190125154 A KR20190125154 A KR 20190125154A KR 1020180140321 A KR1020180140321 A KR 1020180140321A KR 20180140321 A KR20180140321 A KR 20180140321A KR 20190125154 A KR20190125154 A KR 20190125154A
Authority
KR
South Korea
Prior art keywords
text
machine learning
data
user
learning model
Prior art date
Application number
KR1020180140321A
Other languages
Korean (ko)
Other versions
KR102199423B1 (en
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 아토머스 주식회사
Publication of KR20190125154A publication Critical patent/KR20190125154A/en
Application granted granted Critical
Publication of KR102199423B1 publication Critical patent/KR102199423B1/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/10Services
    • G06Q50/22Social work or social welfare, e.g. community support activities or counselling services
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/16Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • 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/01Social networking
    • 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/10Services

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Theoretical Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Child & Adolescent Psychology (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • Educational Technology (AREA)
  • Psychology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Developmental Disabilities (AREA)
  • Software Systems (AREA)
  • Hospice & Palliative Care (AREA)
  • Psychiatry (AREA)
  • Data Mining & Analysis (AREA)
  • Social Psychology (AREA)
  • Pathology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)

Abstract

The present invention relates to an apparatus and a method which acquire a learning model by machine learning of psychological counseling data of an expert counselor, and apply a machine learning model to text written by a user to automatically generate psychological counseling text to the user. The automatic conversation method with machine learning of psychological counseling data comprises: a step of receiving text related to psychological analysis in conversation text of a counselor and a user; a step of preprocessing the received text for machine learning to acquire a data set; and a step of using a hierarchical encoder-decoder model with an attention mechanism to perform machine learning on the data set to acquire a machine learning model. The received text includes first text including the conversation text of the counselor and the user and second text which is response text of an expert counselor immediately after the first text. The automatic conversation apparatus performs machine learning on a correlation of the first and the second text.

Description

심리 상담 데이터를 기계 학습한 자동 대화 장치 및 그 방법 {An apparatus for machine learning the psychological counseling data and a method thereof}An apparatus for machine learning the psychological counseling data and a method

본 개시는 전문 상담자의 심리 상담 데이터를 기계학습하여 학습모델을 획득하는 방법 및 장치에 관한 것이다. 또한, 사용자가 작성한 텍스트를 학습모델에 적용하여 사용자에게 자동으로 심리 상담 글을 생성하는 방법 및 장치에 관한 것이다.The present disclosure relates to a method and apparatus for acquiring a learning model by machine learning psychological counseling data of a professional counselor. The present invention also relates to a method and apparatus for automatically generating a psychological counseling text to a user by applying a text written by the user to a learning model.

정신건강치료 산업은 급격히 성장하고 있으며, 전문 상담자 대신 자동으로 심리 상담을 해주는 자동 대화 장치에 대한 수요가 증가하고 있다. 사용자와 자동 대화 장치가 자연스럽게 대화를 나누기 위해서, 자동 대화 장치는 사용자의 의도를 파악하고, 폭넓은 범위의 주제에 대한 응답을 사용자에게 제시할 필요성이 있다. 또한, 자동 대화 장치는 사용자의 유사한 발화에 대해서 다양한 응답을 생성하여 사용자의 몰입도를 높일 필요성이 있다. 또한, 자동 대화 장치가 기계학습을 할 때, 심리상담과 관련된 내용을 학습하도록 하여, 사용자와 대화 시 심리상담의 주제에 벗어나지 않는 응답을 생성할 필요성이 있다.The mental health care industry is growing rapidly, and there is an increasing demand for automatic communication devices that automatically provide psychological counseling on behalf of professional counselors. In order for the user and the automatic conversation device to talk naturally, the automatic conversation device needs to grasp the user's intention and present the user with a response to a wide range of topics. In addition, the automatic conversation apparatus needs to generate various responses to similar utterances of the user to increase the immersion of the user. In addition, when the automatic conversation device is a machine learning, it is necessary to learn the contents related to psychological counseling, so as to generate a response that does not deviate from the subject of psychological counseling when talking with the user.

인공지능(Artificial Intelligence, AI) 시스템은 인간 수준의 지능을 구현하는 컴퓨터 시스템이며, 기존 Rule 기반 스마트 시스템과 달리 기계가 스스로 학습하고 판단하며 똑똑해지는 시스템이다. 인공지능 시스템은 사용할수록 인식률이 향상되고 사용자 취향을 보다 정확하게 이해할 수 있게 되어, 기존 Rule 기반 스마트 시스템은 점차 딥러닝 기반 인공지능 시스템으로 대체되고 있다.Artificial Intelligence (AI) system is a computer system that implements human-level intelligence, and unlike conventional rule-based smart systems, machines learn, judge, and become smart. As the AI system is used, the recognition rate is improved and the user's taste can be understood more accurately. The existing Rule-based smart system is gradually replaced by the deep learning-based AI system.

인공지능 기술은 기계학습(딥러닝) 및 기계학습을 활용한 요소 기술들로 구성된다. 기계학습은 입력 데이터들의 특징을 스스로 분류/학습하는 알고리즘 기술이며, 요소기술은 딥러닝 등의 기계학습 알고리즘을 활용하여 인간 두뇌의 인지, 판단 등의 기능을 모사하는 기술로서, 언어적 이해, 추론/예측, 지식 표현 등의 기술 분야로 구성된다.AI technology is composed of elementary technologies that utilize machine learning (deep learning) and machine learning. Machine learning is an algorithm technology that classifies / learns characteristics of input data by itself, and element technology is a technology that simulates the functions of human brain cognition and judgment by using machine learning algorithms such as deep learning. It consists of technical fields such as prediction and expression of knowledge.

인공지능 기술이 응용되는 다양한 분야는 다음과 같다. 언어적 이해는 인간의 언어/문자를 인식하고 응용/처리하는 기술로서, 자연어 처리, 기계 번역, 대화시스템, 질의 응답, 음성 인식/합성 등을 포함한다. 추론 예측은 정보를 판단하여 논리적으로 추론하고 예측하는 기술로서, 지식/확률 기반 추론, 최적화 예측, 선호 기반 계획, 추천 등을 포함한다. 지식 표현은 인간의 경험정보를 지식데이터로 자동화 처리하는 기술로서, 지식 구축(데이터 생성/분류), 지식 관리(데이터 활용) 등을 포함한다.The various fields in which artificial intelligence technology is applied are as follows. Linguistic understanding is a technology for recognizing and applying / processing human language / characters and includes natural language processing, machine translation, dialogue system, question and answer, speech recognition / synthesis, and the like. Inference Prediction is a technique for judging, logically inferring, and predicting information. It includes knowledge / probability-based inference, optimization prediction, preference-based planning, and recommendation. Knowledge expression is a technology that automatically processes human experience information into knowledge data, and includes knowledge construction (data generation / classification) and knowledge management (data utilization).

본 개시는 사용자와 전문 상담자의 대화문들을 기계학습하여 학습모델을 획득하는 방법 및 장치에 관한 것이다. 또한, 학습모델에 기초하여 사용자의 대화문에 대한 응답을 생성하여, 사용자와 자연스럽게 대화하는 자동대화장치 및 방법에 관한 것이다.The present disclosure relates to a method and apparatus for acquiring a learning model by machine learning dialogues of a user and a professional counselor. In addition, the present invention relates to an automatic conversation apparatus and method for generating a response to a user's dialogue based on a learning model, thereby naturally communicating with the user.

본 개시의 일 실시예에 따른 자동대화장치는 프로세서 및 적어도 하나의 프로그램이 저장되는 메모리를 포함할 수 있다. 메모리는 적어도 하나의 프로그램이 프로세서에서 실행될 때, 프로세서가, 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 텍스트를 수신하는 단계, 기계학습을 위하여 수신된 텍스트를 전처리하여 데이터 셋을 획득하는 단계, 및 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 데이터 셋을 기계학습하여 기계학습모델을 획득하는 단계를 실행하도록 하는 명령어들을 저장하고, 수신된 텍스트는 상담자와 사용자의 대화 텍스트를 포함하는 제 1 텍스트 및 제 1 텍스트의 직후의 상담자의 응답 텍스트인 제 2 텍스트를 포함하고, 기계학습모델을 획득하는 단계는, 제 1 텍스트와 제 2 텍스트의 상관 관계에 대한 기계학습모델을 획득하는 단계인 것을 특징으로 한다.An automatic conversation apparatus according to an embodiment of the present disclosure may include a processor and a memory in which at least one program is stored. The memory includes, when the at least one program is executed in the processor, the processor receiving texts related to psychoanalysis among conversation texts of the counselor and the user, preprocessing the received texts for machine learning to obtain a data set; and Stores instructions to execute the step of acquiring the machine learning model by machine learning the data set using a hierarchical encoder-decoder with attention mechanism. The received text is stored by the counselor. And a first text including a conversation text of a user and a second text which is a response text of a counselor immediately after the first text, and obtaining the machine learning model comprises: a correlation between the first text and the second text; It is characterized in that the step of obtaining a machine learning model.

본 개시의 일 실시예에 따른 자동대화장치의 프로세서가 기계학습모델을 획득하는 단계를 실행하도록 하는 명령어는, 제 1 텍스트, 사용자의 활동 로그 및 심리 프로파일과 제 2 텍스트의 상관 관계에 대한 기계학습모델을 획득하는 단계를 포함하고, 사용자의 활동 로그는 게시글 열람, 댓글, 공감 및 북마크 중 적어도 하나를 포함하고, 심리 프로파일은 사용자의 성별, 나이, 성향 프로파일 및 성격형 테스트 결과 중 적어도 하나를 포함하는 것을 특징으로 한다.Instructions for causing the processor of the automatic conversation apparatus to execute the step of acquiring the machine learning model according to an embodiment of the present disclosure may include: machine learning about the correlation between the first text, the activity log of the user, and the psychological profile and the second text. Obtaining a model, wherein the user's activity log includes at least one of view posts, comments, empathy, and bookmarks, and the psychological profile includes at least one of the user's gender, age, propensity profile, and personality test results Characterized in that.

본 개시의 일 실시예에 따른 자동대화장치의 프로세서가 데이터 셋을 획득하는 단계를 실행하도록 하는 명령어는, 수신된 텍스트를 제 1 텍스트 및 제 2 텍스트로 구분하는 단계; 및 제 1 텍스트 및 제 2 텍스트를 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위로 분리하는 단계를 포함한다.Instructions for causing the processor of the automatic conversation apparatus to execute a step of acquiring a data set may include: dividing the received text into a first text and a second text; And dividing the first text and the second text into at least one unit of phoneme, syllable, morpheme, word, word, or sentence.

본 개시의 일 실시예에 따른 자동대화장치의 프로세서가 기계학습모델을 획득하는 단계를 실행하도록 하는 명령어는, 제 1 텍스트의 상위 계층 단위와 제 2 텍스트의 상관관계를 기계학습을 수행하여, 제 1 텍스트의 상위 계층 단위에 대한 가중치를 획득하는 단계, 제 1 텍스트의 하위 계층 단위와 제 2 텍스트의 상관관계를 기계학습을 수행하여, 제 1 텍스트의 하위 계층 단위에 대한 가중치를 획득하는 단계, 및 상위 계층 단위에 대한 가중치 및 하위 계층 단위에 대한 가중치에 기초하여 수정된 하위 계층 단위에 대한 가중치를 획득하는 단계를 포함한다. 계층 단위는 음소, 음절, 형태소, 단어, 어절 및 문장으로 갈수록 하위 계층 단위에서 상위 계층 단위인 것을 특징으로 한다.Instructions for causing the processor of the automatic communication apparatus to execute the step of acquiring the machine learning model according to an embodiment of the present disclosure, by performing the machine learning the correlation between the upper layer unit of the first text and the second text, Obtaining weights for upper layer units of the first text, performing machine learning on correlation between the lower layer units of the first text and the second text, and obtaining weights for the lower layer units of the first text; And obtaining a weight for the modified lower layer unit based on the weight for the upper layer unit and the weight for the lower layer unit. The hierarchical unit is characterized by being a higher hierarchical unit from a lower hierarchical unit toward phonemes, syllables, morphemes, words, words, and sentences.

본 개시의 일 실시예에 따른 자동대화장치의 메모리는 적어도 하나의 프로그램이 프로세서에서 실행될 때, 프로세서가, 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 제 1 텍스트를 수신하는 단계, 수신된 제 1 텍스트를 전처리하여 데이터 셋을 획득하는 단계, 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 미리 학습된 기계학습모델에 기초하여 수신된 제 1 텍스트로부터 제 2 텍스트를 자동으로 획득하는 단계, 제 2 텍스트를 출력하는 단계를 실행하도록 하는 명령어들을 저장한다.The memory of the automatic conversation apparatus according to an embodiment of the present disclosure may include receiving, when the at least one program is executed in the processor, the processor receiving first text related to psychoanalysis among conversation texts of the counselor and the user, and receiving the first text. Acquiring a data set by preprocessing the text, and using the hierarchical encoder-decoder with attention mechanism to obtain a data set from the first text received based on a previously learned machine learning model. Store instructions that cause the second text to be automatically acquired and the second text to be output.

본 개시의 일 실시예에 따른 자동대화장치의 프로세서가 제 2 텍스트를 자동으로 획득하는 단계를 실행하도록 하는 명령어는, 미리 학습된 기계학습모델에 기초하여 수신된 제 1 텍스트, 사용자의 활동 로그 및 심리 프로파일로부터 제 2 텍스트를 자동으로 획득하는 단계를 포함한다. 사용자의 활동 로그는 게시글 열람, 댓글, 공감 및 북마크 중 적어도 하나를 포함하고, 심리 프로파일은 사용자의 성별, 나이, 성향 프로파일 및 성격형 테스트 결과 중 적어도 하나를 포함하는 것을 특징으로 한다.Instructions for causing the processor of the automated communication device to automatically acquire the second text according to an embodiment of the present disclosure may include the first text received based on a pre-learned machine learning model, an activity log of a user, and Automatically obtaining a second text from the psychological profile. The activity log of the user may include at least one of a post reading, a comment, empathy, and a bookmark, and the psychological profile may include at least one of a user's gender, age, propensity profile, and personality test results.

본 개시의 일 실시예에 따른 자동대화장치의 프로세서가 데이터 셋을 획득하는 단계를 실행하도록 하는 명령어는, 제 1 텍스트를 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위로 분리하는 단계를 포함한다.Instructions for causing the processor of the automatic conversation apparatus to execute the step of acquiring the data set may include separating the first text into at least one unit of phoneme, syllable, morpheme, word, word, or sentence. Steps.

본 개시의 일 실시예에 따른 자동대화장치의 프로세서가 제 2 텍스트를 자동으로 획득하는 단계를 실행하도록 하는 명령어는, 미리 학습된 기계학습모델에 포함된 상위 계층 단위에 대한 가중치, 하위 계층 단위에 대한 가중치 및 제 1 텍스트에 기초하여 제 2 텍스트를 자동으로 획득하는 단계를 포함하고, 계층 단위는 음소, 음절, 형태소, 단어, 어절 및 문장으로 갈수록 하위 계층 단위에서 상위 계층 단위인 것을 특징으로 한다.Instructions for executing the step of automatically obtaining the second text by the processor of the automatic communication apparatus according to an embodiment of the present disclosure, weights for the upper layer unit included in the previously learned machine learning model, the lower layer unit And automatically obtaining the second text based on the weight and the first text, wherein the hierarchical unit is a higher hierarchical unit from a lower hierarchical unit toward phonemes, syllables, morphemes, words, words, and sentences. .

본 개시의 일 실시예에 따른 자동대화장치의 프로세서가 제 2 텍스트를 자동으로 획득하는 단계를 실행하도록 하는 명령어는, 미리 학습된 기계학습모델에 기초하여 제 1 텍스트를 임베딩하여 임베딩된 제 1 텍스트를 획득하는 단계, 임베딩된 제 1 텍스트와 미리 학습된 기계학습모델에 포함된 복수의 후보들의 임베딩을 코사인 유사도를 계산하는 단계, 및 계산된 유사도에 기초하여 복수의 후보들 중 제 1 텍스트와 가장 유사한 후보에 대응되는 제 2 텍스트를 선택하는 단계를 포함한다.Instructions for causing the processor of the automatic communication device to automatically acquire the second text according to an embodiment of the present disclosure may include: embedding the first text based on a previously learned machine learning model to embed the first text; Obtaining cosine similarity between the embedded first text and the embedding of the plurality of candidates included in the pre-learned machine learning model, and the most similar to the first text among the plurality of candidates based on the calculated similarity. Selecting a second text corresponding to the candidate.

본 개시의 일 실시예에 따른 자동대화장치의 메모리는 적어도 하나의 프로그램이 프로세서에서 실행될 때, 프로세서가, 코사인 유사도가 임계값보다 작은 경우, 폴벡 응답을 출력하는 단계를 실행하도록 하는 명령어들을 저장한다.The memory of the automatic conversation apparatus according to an embodiment of the present disclosure stores instructions that, when at least one program is executed in the processor, cause the processor to execute the step of outputting a Polbeck response when the cosine similarity is less than a threshold. .

본 개시의 일 실시예에 따른 자동대화방법은 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 텍스트를 수신하는 단계, 기계학습을 위하여 수신된 텍스트를 전처리하여 데이터 셋을 획득하는 단계, 및 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 데이터 셋을 기계학습하여 기계학습모델을 획득하는 단계를 포함하고, 수신된 텍스트는 상담자와 사용자의 대화 텍스트를 포함하는 제 1 텍스트 및 제 1 텍스트의 직후의 상담자의 응답 텍스트인 제 2 텍스트를 포함하고, 기계학습모델을 획득하는 단계는, 제 1 텍스트와 제 2 텍스트의 상관 관계에 대한 기계학습모델을 획득하는 단계인 것을 특징으로 한다.According to an embodiment of the present disclosure, an automatic conversation method includes receiving texts related to psychoanalysis among conversation texts of a counselor and a user, preprocessing the received texts for machine learning, and obtaining a data set, and a attention mechanism. Acquiring a machine learning model by machine learning the data set using a hierarchical encoder-decoder with attention mechanism, wherein the received text includes conversation text of the counselor and the user. Comprising the first text and the second text which is the response text of the counselor immediately after the first text, and obtaining the machine learning model, obtaining a machine learning model for the correlation between the first text and the second text It is characterized by that.

본 개시의 일 실시예에 따른 자동대화방법은 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 제 1 텍스트를 수신하는 단계, 수신된 제 1 텍스트를 전처리하여 데이터 셋을 획득하는 단계, 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 미리 학습된 기계학습모델에 기초하여 수신된 제 1 텍스트로부터 제 2 텍스트를 자동으로 획득하는 단계, 및 제 2 텍스트를 출력하는 단계를 포함한다.According to an embodiment of the present disclosure, an automatic conversation method may include receiving a first text related to psychoanalysis among conversation texts of a counselor and a user, obtaining a data set by preprocessing the received first text, and an attention mechanism. Automatically obtaining a second text from the received first text based on a previously learned machine learning model using a hierarchical encoder-decoder with attention mechanism, and outputting the second text It includes a step.

또한, 상술한 바와 같은 심리상태예측방법을 구현하기 위한 프로그램은 컴퓨터로 판독 가능한 기록 매체에 기록될 수 있다.In addition, the program for implementing the mental state prediction method as described above can be recorded in a computer-readable recording medium.

도 1은 본 개시의 일 실시예에 따른 프로세서(100)의 블록도이다.
도 2는 본 개시의 일 실시예에 따른 데이터 학습부(110)의 블록도이다.
도 3은 본 개시의 일 실시예에 따른 데이터 인식부(120)의 블록도이다.
도 4는 본 개시의 일 실시예에 따른 디바이스(400) 및 서버(420)가 서로 연동함으로써 데이터를 학습하고 인식하는 예시를 나타내는 도면이다.
도 5는 본 개시의 일 실시예에 따른 학습모델을 획득하는 방법에 관한 흐름도를 도시한다.
도 6은 본 개시의 일 실시예에 따른 제 1 텍스트와 제 2 텍스트를 나타낸다.
도 7 은 본 개시의 일 실시예에 따른 자동대화장치의 학습부를 나타낸 도면이다.
도 8은 본 개시의 실시예에 따라 기계학습모델을 이용하여 사용자의 대화문에 따른 응답을 생성하는 방법에 관한 흐름도이다.
도 9는 본 개시의 실시예에 따근 자동대화장치의 인식부에 대한 블록도이다.
도 10은 본 개시의 일 실시예에 따라 자동대화장치의 동작화면을 나타낸 도면이다.
1 is a block diagram of a processor 100 according to an embodiment of the present disclosure.
2 is a block diagram of the data learning unit 110 according to an embodiment of the present disclosure.
3 is a block diagram of the data recognition unit 120 according to an embodiment of the present disclosure.
4 is a diagram illustrating an example in which the device 400 and the server 420 learn and recognize data by interworking with each other according to an embodiment of the present disclosure.
5 is a flowchart illustrating a method of obtaining a learning model according to an embodiment of the present disclosure.
6 illustrates a first text and a second text according to an embodiment of the present disclosure.
7 is a view illustrating a learning unit of an automatic conversation apparatus according to an embodiment of the present disclosure.
8 is a flowchart illustrating a method of generating a response according to a dialogue of a user using a machine learning model according to an embodiment of the present disclosure.
9 is a block diagram of a recognition unit of an automatic conversation apparatus according to an embodiment of the present disclosure.
10 is a view showing an operation screen of the automatic conversation apparatus according to one embodiment of the present disclosure.

개시된 실시예의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 개시는 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 개시가 완전하도록 하고, 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것일 뿐이다.Advantages and features of the disclosed embodiments, and methods of achieving them will be apparent with reference to the embodiments described below in conjunction with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below, but may be implemented in various forms, and the present embodiments are merely provided to make the present disclosure complete, and those of ordinary skill in the art to which the present disclosure belongs. It is merely provided to fully inform the scope of the invention.

본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 개시된 실시예에 대해 구체적으로 설명하기로 한다. Terms used herein will be briefly described, and the disclosed embodiments will be described in detail.

본 명세서에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 관련 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다. The terminology used herein has been selected among general terms that are currently widely used while considering the functions of the present disclosure, but may vary according to the intention or precedent of a person skilled in the relevant field, the emergence of a new technology, and the like. In addition, in certain cases, there is also a term arbitrarily selected by the applicant, in which case the meaning will be described in detail in the description of the invention. Therefore, the terms used in the present disclosure should be defined based on the meanings of the terms and the contents throughout the present disclosure, rather than simply the names of the terms.

본 명세서에서의 단수의 표현은 문맥상 명백하게 단수인 것으로 특정하지 않는 한, 복수의 표현을 포함한다. 또한 복수의 표현은 문맥상 명백하게 복수인 것으로 특정하지 않는 한, 단수의 표현을 포함한다.A singular expression in this specification includes a plural expression unless the context clearly indicates that it is singular. Also, the plural expressions include the singular expressions unless the context clearly indicates the plural.

명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. When any part of the specification is to "include" any component, this means that it may further include other components, except to exclude other components unless otherwise stated.

또한, 명세서에서 사용되는 "부"라는 용어는 소프트웨어 또는 하드웨어 구성요소를 의미하며, "부"는 어떤 역할들을 수행한다. 그렇지만 "부"는 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. "부"는 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다. 따라서, 일 예로서 "부"는 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 및 변수들을 포함한다. 구성요소들과 "부"들 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 "부"들로 결합되거나 추가적인 구성요소들과 "부"들로 더 분리될 수 있다.Also, as used herein, the term "part" means a software or hardware component, and "part" plays certain roles. However, "part" is not meant to be limited to software or hardware. The “unit” may be configured to be in an addressable storage medium and may be configured to play one or more processors. Thus, as an example, a "part" refers to components such as software components, object-oriented software components, class components, and task components, processes, functions, properties, procedures, Subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays and variables. The functionality provided within the components and "parts" may be combined into a smaller number of components and "parts" or further separated into additional components and "parts".

본 개시의 일 실시예에 따르면 "부"는 프로세서 및 메모리로 구현될 수 있다. 용어 "프로세서" 는 범용 프로세서, 중앙 처리 장치 (CPU), 마이크로프로세서, 디지털 신호 프로세서 (DSP), 제어기, 마이크로제어기, 상태 머신 등을 포함하도록 넓게 해석되어야 한다. 몇몇 환경에서는, "프로세서" 는 주문형 반도체 (ASIC), 프로그램가능 로직 디바이스 (PLD), 필드 프로그램가능 게이트 어레이 (FPGA) 등을 지칭할 수도 있다. 용어 "프로세서" 는, 예를 들어, DSP 와 마이크로프로세서의 조합, 복수의 마이크로프로세서들의 조합, DSP 코어와 결합한 하나 이상의 마이크로프로세서들의 조합, 또는 임의의 다른 그러한 구성들의 조합과 같은 처리 디바이스들의 조합을 지칭할 수도 있다.According to an embodiment of the present disclosure, the “unit” may be implemented with a processor and a memory. The term “processor” should be interpreted broadly to include general purpose processors, central processing units (CPUs), microprocessors, digital signal processors (DSPs), controllers, microcontrollers, state machines, and the like. In some circumstances, a “processor” may refer to an application specific semiconductor (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), or the like. The term "processor" refers to a combination of processing devices such as, for example, a combination of a DSP and a microprocessor, a combination of a plurality of microprocessors, a combination of one or more microprocessors in conjunction with a DSP core, or a combination of any other such configuration. May be referred to.

용어 "메모리" 는 전자 정보를 저장 가능한 임의의 전자 컴포넌트를 포함하도록 넓게 해석되어야 한다. 용어 메모리는 임의 액세스 메모리 (RAM), 판독-전용 메모리 (ROM), 비-휘발성 임의 액세스 메모리 (NVRAM), 프로그램가능 판독-전용 메모리 (PROM), 소거-프로그램가능 판독 전용 메모리 (EPROM), 전기적으로 소거가능 PROM (EEPROM), 플래쉬 메모리, 자기 또는 광학 데이터 저장장치, 레지스터들 등과 같은 프로세서-판독가능 매체의 다양한 유형들을 지칭할 수도 있다. 프로세서가 메모리로부터 정보를 판독하고/하거나 메모리에 정보를 기록할 수 있다면 메모리는 프로세서와 전자 통신 상태에 있다고 불린다. 프로세서에 집적된 메모리는 프로세서와 전자 통신 상태에 있다.The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term memory refers to random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erase-programmable read-only memory (EPROM), electrical May also refer to various types of processor-readable media, such as erasable PROM (EEPROM), flash memory, magnetic or optical data storage, registers, and the like. If the processor can read information from and / or write information to the memory, the memory is said to be in electronic communication with the processor. The memory integrated in the processor is in electronic communication with the processor.

아래에서는 첨부한 도면을 참고하여 실시예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그리고 도면에서 본 개시를 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략한다.DETAILED DESCRIPTION Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the embodiments. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present disclosure.

도 1은 본 개시의 일 실시예에 따른 프로세서(100)의 블록도이다.1 is a block diagram of a processor 100 according to an embodiment of the present disclosure.

도 1을 참조하면, 일부 실시예에 따른 프로세서(1300)는 데이터 학습부(110) 및 데이터 인식부(120)를 포함할 수 있다.Referring to FIG. 1, the processor 1300 may include a data learner 110 and a data recognizer 120.

데이터 학습부(110)는 사용자의 대화문에 대한 응답을 생성하기 위한 기준을 학습할 수 있다. 대화문(대화 텍스트)는 사용자 또는 전문 상담사의 생각을 나타낸 음성 또는 글이다. 하나의 대화문은 상대방의 말이 끝난 후 당사자의 말이 시작될 때부터 당사자의 말이 끝날 때까지 당사자가 한 말이다. 대화문은 하나 이상의 문장일 수 있다. 대화문은 하나의 단어일 수 있다. The data learner 110 may learn a criterion for generating a response to the dialogue of the user. A conversation (conversation text) is a voice or text that represents the thought of a user or a professional counselor. A conversation is a word spoken by a party from the beginning of the talk after the end of the talk to the end of the talk. The conversation may be one or more sentences. The conversation may be a single word.

데이터 학습부(110)는 사용자의 대화문에 대한 응답을 생성하기 위하여 어떤 데이터를 이용할지, 데이터를 이용하여 심리 상태를 어떻게 판단할 지에 관한 기준을 학습할 수 있다. 데이터 학습부(110)는 학습에 이용될 데이터를 획득하고, 획득된 데이터를 후술할 데이터 학습모델에 적용함으로써, 사용자의 대화문에 대한 응답을 생성하기 위한 기준을 학습할 수 있다.The data learner 110 may learn a criterion about what data is used to generate a response to the user's dialogue, and how to determine the mental state using the data. The data learner 110 acquires data to be used for learning and applies the acquired data to a data learning model to be described later, thereby learning a criterion for generating a response to the user's dialogue.

데이터 인식부(120)는 데이터에 기초하여 사용자의 대화문에 대한 응답을 생성할 수 있다. 데이터 인식부(120)는 학습된 데이터 학습모델을 이용하여, 소정의 데이터로부터 사용자의 대화문에 대한 응답을 생성할 수 있다. 데이터 인식부(120)는 학습에 의한 미리 설정된 기준에 따라 소정의 데이터를 획득하고, 획득된 데이터를 입력 값으로 하여 데이터 학습모델을 이용함으로써, 소정의 데이터에 기초한 소정의 사용자의 대화문에 대한 응답을 생성할 수 있다. 또한, 획득된 데이터를 입력 값으로 하여 데이터 학습모델에 의해 출력된 결과 값은, 데이터 학습모델을 갱신하는데 이용될 수 있다.The data recognizer 120 may generate a response to the user's conversation based on the data. The data recognizer 120 may generate a response to the user's dialogue from the predetermined data by using the learned data learning model. The data recognizing unit 120 acquires predetermined data according to a preset criterion by learning, and uses a data learning model using the acquired data as an input value, thereby responding to a predetermined user's dialogue based on the predetermined data. Can be generated. In addition, the result value output by the data learning model using the acquired data as an input value may be used to update the data learning model.

데이터 학습부(110) 및 데이터 인식부(120) 중 적어도 하나는, 적어도 하나의 하드웨어 칩 형태로 제작되어 전자 장치에 탑재될 수 있다. 예를 들어, 데이터 학습부(110) 및 데이터 인식부(120) 중 적어도 하나는 인공 지능(AI; artificial intelligence)을 위한 전용 하드웨어 칩 형태로 제작될 수도 있고, 또는 기존의 범용 프로세서(예: CPU 또는 application processor) 또는 그래픽 전용 프로세서(예: GPU)의 일부로 제작되어 전술한 각종 전자 장치에 탑재될 수도 있다.At least one of the data learner 110 and the data recognizer 120 may be manufactured in the form of at least one hardware chip and mounted on the electronic device. For example, at least one of the data learner 110 and the data recognizer 120 may be manufactured in the form of a dedicated hardware chip for artificial intelligence (AI), or a conventional general purpose processor (eg, a CPU). Alternatively, the electronic device may be manufactured as a part of an application processor or a graphics dedicated processor (eg, a GPU) and mounted on the aforementioned various electronic devices.

또한 데이터 학습부(110) 및 데이터 인식부(120)는 별개의 전자 장치들에 각각 탑재될 수도 있다. 예를 들어, 데이터 학습부(110) 및 데이터 인식부(120) 중 하나는 전자 장치에 포함되고, 나머지 하나는 서버에 포함될 수 있다. 또한, 데이터 학습부(110) 및 데이터 인식부(120)는 유선 또는 무선으로 통하여, 데이터 학습부(110)가 구축한 모델 정보를 데이터 인식부(120)로 제공할 수도 있고, 데이터 인식부(120)로 입력된 데이터가 추가 학습 데이터로써 데이터 학습부(110)로 제공될 수도 있다.In addition, the data learner 110 and the data recognizer 120 may be mounted in separate electronic devices, respectively. For example, one of the data learner 110 and the data recognizer 120 may be included in the electronic device, and the other may be included in the server. In addition, the data learner 110 and the data recognizer 120 may provide the model information constructed by the data learner 110 to the data recognizer 120 through a wired or wireless connection. The data inputted to 120 may be provided to the data learner 110 as additional learning data.

한편, 데이터 학습부(110) 및 데이터 인식부(120) 중 적어도 하나는 소프트웨어 모듈로 구현될 수 있다. 데이터 학습부(110) 및 데이터 인식부(120) 중 적어도 하나가 소프트웨어 모듈(또는, 인스트럭션(instruction) 포함하는 프로그램 모듈)로 구현되는 경우, 소프트웨어 모듈은 메모리 또는 컴퓨터로 읽을 수 있는 판독 가능한 비일시적 판독 가능 기록매체(non-transitory computer readable media)에 저장될 수 있다. 또한, 이 경우, 적어도 하나의 소프트웨어 모듈은 OS(Operating System)에 의해 제공되거나, 소정의 애플리케이션에 의해 제공될 수 있다. 또는, 적어도 하나의 소프트웨어 모듈 중 일부는 OS(Operating System)에 의해 제공되고, 나머지 일부는 소정의 애플리케이션에 의해 제공될 수 있다. Meanwhile, at least one of the data learner 110 and the data recognizer 120 may be implemented as a software module. When at least one of the data learning unit 110 and the data recognizing unit 120 is implemented as a software module (or a program module including instructions), the software module may be a non-transitory computer readable non-transitory computer. It may be stored in a non-transitory computer readable media. In this case, at least one software module may be provided by an operating system (OS) or by a predetermined application. Alternatively, some of the at least one software module may be provided by an operating system (OS), and others may be provided by a predetermined application.

도 2는 본 개시의 일 실시예에 따른 데이터 학습부(110)의 블록도이다.2 is a block diagram of the data learning unit 110 according to an embodiment of the present disclosure.

도 2를 참조하면, 일부 실시예에 따른 데이터 학습부(110)는 데이터 획득부(210), 전처리부(220), 학습 데이터 선택부(230), 모델 학습부(240) 및 모델 평가부(250)를 포함할 수 있다.Referring to FIG. 2, the data learner 110 may include a data acquirer 210, a preprocessor 220, a training data selector 230, a model learner 240, and a model evaluator ( 250).

데이터 획득부(210)는 사용자의 대화문에 대한 응답을 생성하는데 필요한 데이터를 획득할 수 있다. 데이터 획득부(210)는 사용자의 대화문에 대한 응답을 생성하기 위한 학습을 위하여 필요한 데이터를 획득할 수 있다. 데이터 획득부(210)는 사용자와 전문 상담자의 대화 내용을 수신할 수 있다.The data acquirer 210 may acquire data necessary for generating a response to a user's dialogue. The data acquirer 210 may acquire data necessary for learning to generate a response to a user's dialogue. The data acquirer 210 may receive content of a conversation between a user and a professional counselor.

사용자는 PC, 스마트폰 등과 같은 전자 단말기를 이용하여 문자로 전문 상담자와 대화를 나눌 수 있다. 또한 사용자는 스마트폰, 전화 등과 같은 음성 통신 단말기를 이용하여 음성으로 전문 상담자와 대화를 나눌 수 있다. 데이터 획득부(210)는 문자로 되어 있는 대화내용을 수신할 수 있다. 또한 데이터 획득부(210)는 음성으로 되어 있는 대화내용을 수신하고 문자로 변환할 수 있다. 학습을 위해서는 많은 데이터가 필요하므로, 데이터 획득부(210)는 복수의 사용자와 전문 상담자의 대화내용을 수신할 수 있다. A user may talk to a professional counselor by text using an electronic terminal such as a PC or a smartphone. In addition, the user may talk to a professional counselor by voice using a voice communication terminal such as a smartphone or a telephone. The data acquirer 210 may receive a conversation content in text. In addition, the data acquisition unit 210 may receive the conversation contents that are spoken and convert them into text. Since a lot of data is required for learning, the data acquirer 210 may receive conversation contents of a plurality of users and a professional counselor.

전처리부(220)는 사용자의 대화문에 대한 응답을 생성하기 위해 획득된 데이터가 기계학습에 이용될 수 있도록, 획득된 데이터를 전처리할 수 있다. 전처리부(320)는 후술할 모델 학습부(240)가 사용자의 대화문에 대한 응답을 생성하기 위하여 획득된 데이터를 이용할 수 있도록, 획득된 데이터를 미리 설정된 포맷으로 가공할 수 있다. 예를 들어 전처리부(320)는 사용자와 전문상담자의 대화내용을 제 1 텍스트와 제 2 텍스트로 나눌 수 있다. 제 2 텍스트는 전문 상담자의 심리 분석과 관련된 내용이 담긴 마지막 텍스트이다. 제 1 텍스트는 제 2 텍스트가 나타나기 직전에 나온 전문 상담자와 사용자의 대화문들이다.The preprocessor 220 may preprocess the acquired data so that the obtained data may be used for machine learning to generate a response to the user's dialogue. The preprocessor 320 may process the acquired data into a preset format so that the model learner 240, which will be described later, may use the acquired data to generate a response to the user's dialogue. For example, the preprocessor 320 may divide the conversation contents of the user and the professional counselor into a first text and a second text. The second text is the last text containing contents related to the psychoanalysis of the expert counselor. The first texts are the dialogues of the expert counselor and the user that appeared just before the second text appeared.

학습 데이터 선택부(230)는 전처리된 데이터 중에서 학습에 필요한 데이터를 선택할 수 있다. 선택된 데이터는 모델 학습부(240)에 제공될 수 있다. 학습 데이터 선택부(230)는 사용자의 대화문에 대한 응답을 생성하기 위한 기 설정된 기준에 따라, 전처리된 데이터 중에서 학습에 필요한 데이터를 선택할 수 있다. 예를 들어 전문 상담사의 대화문이 선택될 수 있다. 또한 전문 상담사의 대화문 직전의 소정의 개수의 전문 상담사 또는 사용자의 대화문이 선택될 수 있다. 또한, 학습 데이터 선택부(230)는 후술할 모델 학습부(240)에 의한 학습에 의해 기 설정된 기준에 따라 데이터를 선택할 수도 있다.The training data selector 230 may select data necessary for learning from the preprocessed data. The selected data may be provided to the model learner 240. The training data selector 230 may select data required for learning from among the preprocessed data according to a preset criterion for generating a response to the user's dialogue. For example, a conversation of a professional counselor may be selected. In addition, a predetermined number of conversations of a professional counselor or a user immediately before a conversation of a professional counselor may be selected. In addition, the training data selector 230 may select data according to preset criteria by learning by the model learner 240, which will be described later.

모델 학습부(240)는 학습 데이터에 기초하여 사용자의 대화문에 대한 응답을 어떻게 생성할 지에 관한 기준을 학습할 수 있다. 또한, 모델 학습부(240)는 사용자의 대화문에 대한 응답을 생성하기 위하여 어떤 학습 데이터를 이용해야 하는 지에 대한 기준을 학습할 수도 있다.The model learner 240 may learn a criterion about how to generate a response to the dialogue of the user based on the training data. In addition, the model learner 240 may learn a criterion about what training data should be used to generate a response to the user's dialogue.

또한, 모델 학습부(240)는 사용자의 대화문에 대한 응답 생성에 이용되는 데이터 학습모델을 학습 데이터로써 이용하여 학습할 수 있다. 이 경우, 데이터 학습모델은 미리 구축된 모델일 수 있다. 예를 들어, 데이터 학습모델은 기본 학습 데이터(예를 들어, 샘플 이미지 등)에 기초하여 미리 구축된 모델일 수 있다.In addition, the model learner 240 may learn by using the data learning model used to generate a response to the user's dialogue as the training data. In this case, the data learning model may be a previously built model. For example, the data learning model may be a model built in advance based on basic training data (eg, a sample image).

데이터 학습모델은, 학습모델의 적용 분야, 학습의 목적 또는 장치의 컴퓨터 성능 등을 고려하여 구축될 수 있다. 데이터 학습모델은, 예를 들어, 신경망(Neural Network)을 기반으로 하는 모델일 수 있다. 예컨대, Deep Neural Network (DNN), Recurrent Neural Network (RNN), Long Short-Term Memory models (LSTM), BRDNN (Bidirectional Recurrent Deep Neural Network), Convolutional Neural Networks (CNN)과 같은 모델이 데이터 학습모델로써 사용될 수 있으나, 이에 한정되지 않는다.The data learning model may be constructed in consideration of the application field of the learning model, the purpose of learning, or the computer performance of the device. The data learning model may be, for example, a model based on a neural network. For example, models such as Deep Neural Network (DNN), Recurrent Neural Network (RNN), Long Short-Term Memory models (LSTM), Bidirectional Recurrent Deep Neural Network (BRDNN), and Convolutional Neural Networks (CNN) can be used as data learning models. But it is not limited thereto.

다양한 실시예에 따르면, 모델 학습부(240)는 미리 구축된 데이터 학습모델이 복수 개가 존재하는 경우, 입력된 학습 데이터와 기본 학습 데이터의 관련성이 큰 데이터 학습모델을 학습할 데이터 학습모델로 결정할 수 있다. 이 경우, 기본 학습 데이터는 데이터의 타입 별로 기 분류되어 있을 수 있으며, 데이터 학습모델은 데이터의 타입 별로 미리 구축되어 있을 수 있다. 예를 들어, 기본 학습 데이터는 학습 데이터가 생성된 지역, 학습 데이터가 생성된 시간, 학습 데이터의 크기, 학습 데이터의 장르, 학습 데이터의 생성자, 학습 데이터 내의 오브젝트의 종류 등과 같은 다양한 기준으로 기 분류되어 있을 수 있다. According to various embodiments of the present disclosure, when there are a plurality of pre-built data learning models, the model learning unit 240 may determine a data learning model having a high correlation between the input learning data and the basic learning data as a data learning model to be trained. have. In this case, the basic training data may be previously classified by data type, and the data learning model may be pre-built for each data type. For example, the basic training data is classified based on various criteria such as the region where the training data is generated, the time at which the training data is generated, the size of the training data, the genre of the training data, the creator of the training data, and the types of objects in the training data. It may be.

또한, 모델 학습부(240)는, 예를 들어, 오류 역전파법(error back-propagation) 또는 경사 하강법(gradient descent)을 포함하는 학습 알고리즘 등을 이용하여 데이터 학습모델을 학습시킬 수 있다.In addition, the model learner 240 may train the data learning model using, for example, a learning algorithm including an error back-propagation method or a gradient descent method.

또한, 모델 학습부(240)는, 예를 들어, 학습 데이터를 입력 값으로 하는 지도 학습(supervised learning) 을 통하여, 데이터 학습모델을 학습할 수 있다. 또한, 모델 학습부(240)는, 예를 들어, 별다른 지도없이 상황 판단을 위해 필요한 데이터의 종류를 스스로 학습함으로써, 상황 판단을 위한 기준을 발견하는 비지도 학습(unsupervised learning)을 통하여, 데이터 학습모델을 학습할 수 있다. 또한, 모델 학습부(240)는, 예를 들어, 학습에 따른 상황 판단의 결과가 올바른 지에 대한 피드백을 이용하는 강화 학습(reinforcement learning)을 통하여, 데이터 학습모델을 학습할 수 있다.In addition, the model learner 240 may learn the data learning model through, for example, supervised learning using the learning data as an input value. In addition, the model learning unit 240 learns data through unsupervised learning that finds a criterion for situation determination by, for example, self-learning a type of data necessary for situation determination without any guidance. You can train the model. In addition, the model learner 240 may learn the data learning model through, for example, reinforcement learning using feedback on whether the result of the situation determination according to the learning is correct.

또한, 데이터 학습모델이 학습되면, 모델 학습부(240)는 학습된 데이터 학습모델을 저장할 수 있다. 이 경우, 모델 학습부(240)는 학습된 데이터 학습모델을 데이터 인식부(120)를 포함하는 전자 장치의 메모리에 저장할 수 있다. 또는, 모델 학습부(240)는 학습된 데이터 학습모델을 전자 장치와 유선 또는 무선 네트워크로 연결되는 서버의 메모리에 저장할 수도 있다.In addition, when the data learning model is learned, the model learning unit 240 may store the learned data learning model. In this case, the model learner 240 may store the learned data learning model in a memory of the electronic device including the data recognizer 120. Alternatively, the model learner 240 may store the learned data learning model in a memory of a server connected to the electronic device through a wired or wireless network.

이 경우, 학습된 데이터 학습모델이 저장되는 메모리는, 예를 들면, 전자 장치의 적어도 하나의 다른 구성요소에 관계된 명령 또는 데이터를 함께 저장할 수도 있다. 또한, 메모리는 소프트웨어 및/또는 프로그램을 저장할 수도 있다. 프로그램은, 예를 들면, 커널, 미들웨어, 어플리케이션 프로그래밍 인터페이스(API) 및/또는 어플리케이션 프로그램(또는 "어플리케이션") 등을 포함할 수 있다.In this case, the memory in which the learned data learning model is stored may store, for example, commands or data related to at least one other element of the electronic device. The memory may also store software and / or programs. The program may include, for example, a kernel, middleware, an application programming interface (API) and / or an application program (or “application”), and the like.

모델 평가부(250)는 데이터 학습모델에 평가 데이터를 입력하고, 평가 데이터로부터 출력되는 인식 결과가 소정 기준을 만족하지 못하는 경우, 모델 학습부(240)로 하여금 다시 학습하도록 할 수 있다. 이 경우, 평가 데이터는 데이터 학습모델을 평가하기 위한 기 설정된 데이터일 수 있다. The model evaluator 250 may input the evaluation data into the data learning model, and allow the model learner 240 to relearn when the recognition result output from the evaluation data does not satisfy a predetermined criterion. In this case, the evaluation data may be preset data for evaluating the data learning model.

예를 들어, 모델 평가부(250)는 평가 데이터에 대한 학습된 데이터 학습모델의 인식 결과 중에서, 인식 결과가 정확하지 않은 평가 데이터의 개수 또는 비율이 미리 설정된 임계치를 초과하는 경우 소정 기준을 만족하지 못한 것으로 평가할 수 있다. 예컨대, 소정 기준이 비율 2%로 정의되는 경우, 학습된 데이터 학습모델이 총 1000개의 평가 데이터 중의 20개를 초과하는 평가 데이터에 대하여 잘못된 인식 결과를 출력하는 경우, 모델 평가부(250)는 학습된 데이터 학습모델이 적합하지 않은 것으로 평가할 수 있다.For example, the model evaluator 250 does not satisfy a predetermined criterion when the number or ratio of the evaluation data that is not accurate among the recognition results of the learned data learning model for the evaluation data exceeds a preset threshold. It can be evaluated as not. For example, when a predetermined criterion is defined as a ratio of 2%, when the trained data learning model outputs an incorrect recognition result for more than 20 evaluation data out of a total of 1000 evaluation data, the model evaluator 250 learns. The data learning model can be evaluated as not suitable.

한편, 학습된 데이터 학습모델이 복수 개가 존재하는 경우, 모델 평가부(250)는 각각의 학습된 동영상 학습모델에 대하여 소정 기준을 만족하는지를 평가하고, 소정 기준을 만족하는 모델을 최종 데이터 학습모델로써 결정할 수 있다. 이 경우, 소정 기준을 만족하는 모델이 복수 개인 경우, 모델 평가부(250)는 평가 점수가 높은 순으로 미리 설정된 어느 하나 또는 소정 개수의 모델을 최종 데이터 학습모델로써 결정할 수 있다.On the other hand, when there are a plurality of trained data learning models, the model evaluator 250 evaluates whether each of the learned video learning models satisfies a predetermined criterion and uses the model satisfying the predetermined criterion as the final data learning model. You can decide. In this case, when there are a plurality of models satisfying a predetermined criterion, the model evaluator 250 may determine any one or a predetermined number of models which are preset in the order of the highest evaluation score as the final data learning model.

한편, 데이터 학습부(110) 내의 데이터 획득부(210), 전처리부(220), 학습 데이터 선택부(230), 모델 학습부(240) 및 모델 평가부(250) 중 적어도 하나는, 적어도 하나의 하드웨어 칩 형태로 제작되어 전자 장치에 탑재될 수 있다. 예를 들어, 데이터 획득부(210), 전처리부(220), 학습 데이터 선택부(230), 모델 학습부(240) 및 모델 평가부(250) 중 적어도 하나는 인공 지능(AI; artificial intelligence)을 위한 전용 하드웨어 칩 형태로 제작될 수도 있고, 또는 기존의 범용 프로세서(예: CPU 또는 application processor) 또는 그래픽 전용 프로세서(예: GPU)의 일부로 제작되어 전술한 각종 전자 장치에 탑재될 수도 있다.At least one of the data acquirer 210, the preprocessor 220, the training data selector 230, the model learner 240, and the model evaluator 250 in the data learner 110 may be at least one. May be manufactured in the form of a hardware chip and mounted on an electronic device. For example, at least one of the data acquirer 210, the preprocessor 220, the training data selector 230, the model learner 240, and the model evaluator 250 may be artificial intelligence (AI). It may be manufactured in the form of a dedicated hardware chip, or may be manufactured as a part of an existing general purpose processor (eg, a CPU or an application processor) or a graphics dedicated processor (eg, a GPU) and mounted on the aforementioned various electronic devices.

또한, 데이터 획득부(210), 전처리부(220), 학습 데이터 선택부(230), 모델 학습부(240) 및 모델 평가부(250)는 하나의 전자 장치에 탑재될 수도 있으며, 또는 별개의 전자 장치들에 각각 탑재될 수도 있다. 예를 들어, 데이터 획득부(210), 전처리부(220), 학습 데이터 선택부(230), 모델 학습부(240) 및 모델 평가부(250) 중 일부는 전자 장치에 포함되고, 나머지 일부는 서버에 포함될 수 있다.In addition, the data acquirer 210, the preprocessor 220, the training data selector 230, the model learner 240, and the model evaluator 250 may be mounted on one electronic device or may be separate. Each of the electronic devices may be mounted on the electronic device. For example, some of the data acquirer 210, the preprocessor 220, the training data selector 230, the model learner 240, and the model evaluator 250 are included in the electronic device, and the rest of the data is included in the electronic device. Can be included on the server.

또한, 데이터 획득부(210), 전처리부(220), 학습 데이터 선택부(230), 모델 학습부(240) 및 모델 평가부(250) 중 적어도 하나는 소프트웨어 모듈로 구현될 수 있다. 데이터 획득부(210), 전처리부(220), 학습 데이터 선택부(230), 모델 학습부(240) 및 모델 평가부(250) 중 적어도 하나가 소프트웨어 모듈(또는, 인스트럭션(instruction) 포함하는 프로그램 모듈)로 구현되는 경우, 소프트웨어 모듈은 컴퓨터로 읽을 수 있는 판독 가능한 비일시적 판독 가능 기록매체(non-transitory computer readable media)에 저장될 수 있다. 또한, 이 경우, 적어도 하나의 소프트웨어 모듈은 OS(Operating System)에 의해 제공되거나, 소정의 애플리케이션에 의해 제공될 수 있다. 또는, 적어도 하나의 소프트웨어 모듈 중 일부는 OS(Operating System)에 의해 제공되고, 나머지 일부는 소정의 애플리케이션에 의해 제공될 수 있다.In addition, at least one of the data acquirer 210, the preprocessor 220, the training data selector 230, the model learner 240, and the model evaluator 250 may be implemented as a software module. A program in which at least one of the data acquirer 210, the preprocessor 220, the training data selector 230, the model learner 240, and the model evaluator 250 includes a software module (or instruction). Module may be stored on a computer readable non-transitory computer readable media. In this case, at least one software module may be provided by an operating system (OS) or by a predetermined application. Alternatively, some of the at least one software module may be provided by an operating system (OS), and others may be provided by a predetermined application.

도 3은 본 개시의 일 실시예에 따른 데이터 인식부(120)의 블록도이다.3 is a block diagram of the data recognition unit 120 according to an embodiment of the present disclosure.

도 3을 참조하면, 일부 실시예에 따른 데이터 인식부(120)는 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350)를 포함할 수 있다.Referring to FIG. 3, the data recognizer 120 according to an exemplary embodiment may include a data acquirer 310, a preprocessor 320, a recognition data selector 330, a recognition result provider 340, and a model updater. And may include 350.

데이터 획득부(310)는 사용자의 대화문에 대한 응답을 생성하기 위해 필요한 데이터를 획득할 수 있으며, 전처리부(320)는 사용자의 대화문에 대한 응답을 생성하기 위해 획득된 데이터가 이용될 수 있도록, 획득된 데이터를 전처리할 수 있다. 전처리부(320)는 후술할 인식 결과 제공부(340)가 사용자의 대화문에 대한 응답을 생성하기 위하여 획득된 데이터를 이용할 수 있도록, 획득된 데이터를 기 설정된 포맷으로 가공할 수 있다. The data acquirer 310 may acquire data necessary for generating a response to the user's conversation, and the preprocessor 320 may use the acquired data to generate a response to the user's conversation. The acquired data can be preprocessed. The preprocessor 320 may process the acquired data into a preset format so that the recognition result providing unit 340, which will be described later, may use the acquired data to generate a response to the user's dialogue.

인식 데이터 선택부(330)는 전처리된 데이터 중에서 사용자의 대화문에 대한 응답을 생성에 필요한 데이터를 선택할 수 있다. 선택된 데이터는 인식 결과 제공부(340)에게 제공될 수 있다. 인식 데이터 선택부(330)는 사용자의 대화문에 대한 응답을 생성하기 위한 기 설정된 기준에 따라, 전처리된 데이터 중에서 일부 또는 전부를 선택할 수 있다. 또한, 인식 데이터 선택부(330)는 모델 학습부(240)에 의한 학습에 의해 기 설정된 기준에 따라 데이터를 선택할 수도 있다.The recognition data selector 330 may select data required for generating a response to the dialogue of the user from the preprocessed data. The selected data may be provided to the recognition result provider 340. The recognition data selector 330 may select some or all of the preprocessed data according to a preset criterion for generating a response to the user's dialogue. In addition, the recognition data selector 330 may select data according to a predetermined criterion by learning by the model learner 240.

인식 결과 제공부(340)는 선택된 데이터를 데이터 학습모델에 적용하여 사용자의 대화문에 대한 응답을 생성할 수 있다. 인식 결과 제공부(340)는 데이터의 인식 목적에 따른 인식 결과를 제공할 수 있다. 인식 결과 제공부(340)는 인식 데이터 선택부(330)에 의해 선택된 데이터를 입력 값으로 이용함으로써, 선택된 데이터를 데이터 학습모델에 적용할 수 있다. 또한, 인식 결과는 데이터 학습모델에 의해 결정될 수 있다.The recognition result providing unit 340 may generate a response to the user's dialogue by applying the selected data to the data learning model. The recognition result providing unit 340 may provide a recognition result according to the recognition purpose of the data. The recognition result providing unit 340 may apply the selected data to the data learning model by using the data selected by the recognition data selecting unit 330 as an input value. In addition, the recognition result may be determined by the data learning model.

모델 갱신부(350)는 인식 결과 제공부(340)에 의해 제공되는 인식 결과에 대한 평가에 기초하여, 데이터 학습모델이 갱신되도록할 수 있다. 예를 들어, 모델 갱신부(350)는 인식 결과 제공부(340)에 의해 제공되는 인식 결과를 모델 학습부(240)에게 제공함으로써, 모델 학습부(240)가 데이터 학습모델을 갱신하도록 할 수 있다.The model updater 350 may cause the data learning model to be updated based on the evaluation of the recognition result provided by the recognition result provider 340. For example, the model updater 350 may provide the model learning unit 240 with the recognition result provided by the recognition result providing unit 340 so that the model training unit 240 updates the data learning model. have.

한편, 데이터 인식부(120) 내의 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350) 중 적어도 하나는, 적어도 하나의 하드웨어 칩 형태로 제작되어 전자 장치에 탑재될 수 있다. 예를 들어, 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350) 중 적어도 하나는 인공 지능(AI; artificial intelligence)을 위한 전용 하드웨어 칩 형태로 제작될 수도 있고, 또는 기존의 범용 프로세서(예: CPU 또는 application processor) 또는 그래픽 전용 프로세서(예: GPU)의 일부로 제작되어 전술한 각종 전자 장치에 탑재될 수도 있다.Meanwhile, at least one of the data acquiring unit 310, the preprocessor 320, the recognition data selecting unit 330, the recognition result providing unit 340, and the model updating unit 350 in the data recognizing unit 120 may be at least. It may be manufactured in the form of one hardware chip and mounted on an electronic device. For example, at least one of the data acquirer 310, the preprocessor 320, the recognition data selector 330, the recognition result provider 340, and the model updater 350 may be artificial intelligence (AI). ) May be manufactured in the form of a dedicated hardware chip, or may be manufactured as a part of an existing general purpose processor (eg, a CPU or an application processor) or a graphics dedicated processor (eg, a GPU) and mounted on the aforementioned various electronic devices.

또한, 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350)는 하나의 전자 장치에 탑재될 수도 있으며, 또는 별개의 전자 장치들에 각각 탑재될 수도 있다. 예를 들어, 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350) 중 일부는 전자 장치에 포함되고, 나머지 일부는 서버에 포함될 수 있다.In addition, the data acquisition unit 310, the preprocessor 320, the recognition data selector 330, the recognition result providing unit 340, and the model updater 350 may be mounted on one electronic device or may be separate. May be mounted on the electronic devices. For example, some of the data acquirer 310, the preprocessor 320, the recognition data selector 330, the recognition result provider 340, and the model updater 350 may be included in the electronic device, and some of the others may be included in the electronic device. May be included in the server.

또한, 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350) 중 적어도 하나는 소프트웨어 모듈로 구현될 수 있다. 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350) 중 적어도 하나가 소프트웨어 모듈(또는, 인스트럭션(instruction) 포함하는 프로그램 모듈)로 구현되는 경우, 소프트웨어 모듈은 컴퓨터로 읽을 수 있는 판독 가능한 비일시적 판독 가능 기록매체(non-transitory computer readable media)에 저장될 수 있다. 또한, 이 경우, 적어도 하나의 소프트웨어 모듈은 OS(Operating System)에 의해 제공되거나, 소정의 애플리케이션에 의해 제공될 수 있다. 또는, 적어도 하나의 소프트웨어 모듈 중 일부는 OS(Operating System)에 의해 제공되고, 나머지 일부는 소정의 애플리케이션에 의해 제공될 수 있다.In addition, at least one of the data acquirer 310, the preprocessor 320, the recognition data selector 330, the recognition result provider 340, and the model updater 350 may be implemented as a software module. At least one of the data acquirer 310, the preprocessor 320, the recognition data selector 330, the recognition result provider 340, and the model updater 350 may include a software module (or instructions). If implemented as a program module, the software module may be stored in a computer readable non-transitory computer readable media. In this case, at least one software module may be provided by an operating system (OS) or by a predetermined application. Alternatively, some of the at least one software module may be provided by an operating system (OS), and others may be provided by a predetermined application.

도 4는 본 개시의 일 실시예에 따른 디바이스(400) 및 서버(420)가 서로 연동함으로써 데이터를 학습하고 인식하는 예시를 나타내는 도면이다.4 is a diagram illustrating an example in which the device 400 and the server 420 learn and recognize data by interworking with each other according to an embodiment of the present disclosure.

도 4를 참조하면, 서버(420)는 사용자의 대화문에 대한 응답을 생성하기 위한 기준을 학습할 수 있으며, 디바이스(400)는 서버(420)에 의한 학습 결과에 기초하여 사용자의 대화문에 대한 응답을 생성할 수 있다.Referring to FIG. 4, the server 420 may learn a criterion for generating a response to the user's conversation, and the device 400 may respond to the user's conversation based on the learning result by the server 420. Can be generated.

이 경우, 서버(420)의 모델 학습부(430)는 도 2에 도시된 데이터 학습부(110)의 기능을 수행할 수 있다. 서버(420)의 모델 학습부(430)는 사용자의 대화문에 대한 응답을 생성하기 위하여 어떤 데이터를 이용할지, 데이터를 이용하여 사용자의 대화문에 대한 응답을 어떻게 생성할지에 관한 기준을 학습할 수 있다. 모델 학습부(430)는 학습에 이용될 데이터를 획득하고, 획득된 데이터를 후술할 데이터 학습모델에 적용함으로써, 사용자의 대화문에 대한 응답을 생성하기 위한 기준을 학습할 수 있다.In this case, the model learner 430 of the server 420 may perform the function of the data learner 110 shown in FIG. 2. The model learner 430 of the server 420 may learn a criterion about what data to use to generate a response to the user's conversation and how to generate a response to the user's conversation using the data. . The model learner 430 acquires data to be used for learning, and applies the acquired data to a data learning model to be described later, thereby learning a criterion for generating a response to the user's dialogue.

또한, 디바이스(400)의 인식 결과 제공부(404)는 인식 데이터 선택부(403)에 의해 선택된 데이터를 서버(420)에 의해 생성된 데이터 학습모델에 적용하여 사용자의 대화문에 대한 응답을 생성할 수 있다. 예를 들어, 인식 결과 제공부(404)는 인식 데이터 선택부(403)에 의해 선택된 데이터를 서버(420)에게 전송하고, 서버(420)가 인식 데이터 선택부(403)에 의해 선택된 데이터를 학습모델에 적용하여 사용자의 대화문에 대한 응답을 생성할 것을 요청할 수 있다. 또한, 인식 결과 제공부(404)는 서버(420)에 의해 생성된 사용자의 대화문에 대한 응답에 관한 정보를 서버(420)로부터 수신할 수 있다. In addition, the recognition result providing unit 404 of the device 400 may apply the data selected by the recognition data selection unit 403 to the data learning model generated by the server 420 to generate a response to the user's dialogue. Can be. For example, the recognition result providing unit 404 transmits the data selected by the recognition data selection unit 403 to the server 420, and the server 420 learns the data selected by the recognition data selection unit 403. You can apply it to the model and request to generate a response to the user's dialog. In addition, the recognition result providing unit 404 may receive information about the response to the user's dialogue generated by the server 420 from the server 420.

또는, 디바이스(400)의 인식 결과 제공부(404)는 서버(420)에 의해 생성된 학습모델을 서버(420)로부터 수신하고, 수신된 학습모델을 이용하여 사용자의 대화문에 대한 응답을 생성할 수 있다. 이 경우, 디바이스(400)의 인식 결과 제공부(404)는 인식 데이터 선택부(403)에 의해 선택된 데이터를 서버(420)로부터 수신된 데이터 학습모델에 적용하여 사용자의 대화문에 대한 응답을 생성할 수 있다. Alternatively, the recognition result providing unit 404 of the device 400 may receive a learning model generated by the server 420 from the server 420, and generate a response to a user's dialogue using the received learning model. Can be. In this case, the recognition result providing unit 404 of the device 400 may apply the data selected by the recognition data selection unit 403 to the data learning model received from the server 420 to generate a response to the user's dialogue. Can be.

도 4는 디바이스(400)에 인식부(410)를 포함하고, 서버(420)에 학습부(430)를 포함하는 구성을 기재하였으나 이에 한정되는 것은 아니다. 디바이스(400)는 서버(420)와 다른 서버로 구현될 수 있다. 사용자는 디바이스(400)로부터 인식 결과 정보만 수신할 수 있다.4 illustrates a configuration in which the device 400 includes a recognizer 410 and a server 420 includes a learner 430, but the present invention is not limited thereto. The device 400 may be implemented as a server different from the server 420. The user may receive only recognition result information from the device 400.

도 5는 본 개시의 일 실시예에 따른 학습모델을 획득하는 방법에 관한 흐름도를 도시한다.5 is a flowchart illustrating a method of obtaining a learning model according to an embodiment of the present disclosure.

자동대화장치는 프로세서 및 적어도 하나의 프로그램이 저장되는 메모리를 포함할 수 있다. 자동대화장치의 메모리는 프로세서에서 실행될 수 있는 적어도 하나의 프로그램을 저장할 수 있다.The automatic communication device may include a processor and a memory in which at least one program is stored. The memory of the automatic conversation apparatus may store at least one program that may be executed in the processor.

자동대화장치는 전문 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 텍스트를 수신하는 단계(510)를 수행할 수 있다. 자동대화장치는 기계학습을 위하여 수신된 텍스트를 전처리하여 데이터 셋을 획득하는 단계(520)를 수행할 수 있다. 자동대화장치는 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 데이터 셋을 기계학습하여 기계학습모델을 획득하는 단계(530)를 수행할 수 있다. 수신된 텍스트는 전문 상담자와 사용자의 대화문(대화 텍스트)를 포함하는 제 1 텍스트 및 제 1 텍스트의 직후의 전문 상담자의 응답 텍스트인 제 2 텍스트를 포함할 수 있다. 기계학습모델을 획득하는 단계(530)는 제 1 텍스트와 제 2 텍스트의 상관 관계에 대한 기계학습모델을 획득하는 단계일 수 있다.The automatic conversation apparatus may perform a step 510 of receiving texts related to psychoanalysis among conversation texts of a professional counselor and a user. The automatic conversation apparatus may perform step 520 of acquiring a data set by preprocessing the received text for machine learning. The automatic conversation apparatus may perform step 530 of acquiring the machine learning model by machine learning the data set using a hierarchical encoder-decoder with attention mechanism. The received text may include a first text including a conversation (conversation text) of the expert counselor and the user, and a second text that is a response text of the expert counselor immediately after the first text. Acquiring the machine learning model (530) may be a step of obtaining a machine learning model for the correlation between the first text and the second text.

자동대화장치에 포함된 데이터 획득부(210)는 전문 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 텍스트를 수신하는 단계(510)를 수행할 수 있다. 자동대화장치는 전문 상담자와 사용자의 대화 텍스트를 수신하기 위하여 상담 이론에 의한 주관식, 객관식 질문 셋(Q)을 사용자에게 제공할 수 있다. 자동대화장치는 사용자로부터 질문 셋에 대한 응답(R)을 수신할 수 있다. 자동대화장치는 전문 상담사로부터 사용자의 응답(R)에 대한 유형화된 응답(F)을 수신할 수 있다. 전문 상담사는 상담 매뉴얼에 따라 다양한 응답(F)을 사용자에게 제공할 수 있다.The data acquisition unit 210 included in the automatic conversation apparatus may perform a step 510 of receiving texts related to psychoanalysis among conversation texts of a professional counselor and a user. The automatic conversation apparatus may provide the user with the subjective and multiple choice question set Q based on the counseling theory in order to receive the text of the dialogue between the expert counselor and the user. The automatic conversation device may receive a response (R) to the question set from the user. The automatic conversation device may receive a typed response (F) for the user's response (R) from a professional counselor. The professional counselor may provide the user with various responses F according to the consultation manual.

자동대화장치는 객관식 질문 셋(Q)을 사용자에게 제공하고, 사용자로부터 질문 셋에 대한 응답(R)을 수신하고, 전문 상담사로부터 유형화된 응답(F)을 수신할 수 있다. 질문 셋(Q), 응답(R) 및 응답(F)은 구조가 유형화 되어 있으므로 자동대화장치의 학습부는 기계학습을 신속하고 정확하게 수행할 수 있다. The automatic conversation device may provide a multiple-choice question set Q to a user, receive a response R to the question set from the user, and receive a typed response F from a professional counselor. The question set (Q), the answer (R), and the answer (F) are structured, so that the learning unit of the automatic dialog can perform machine learning quickly and accurately.

또한, 자동대화장치가 질문 셋(Q)을 먼저 제시하므로, 자동대화장치는 기계학습모델을 생성하기 위한 데이터 셋의 주제를 심리상담으로 한정할 수 있다. 자동대화장치의 인식부는 사용자의 대화 텍스트에 학습된 기계학습모델을 적용하여, 사용자의 대화 텍스트에 대한 응답 텍스트를 생성할 수 있다. 데이터 셋이 유형화 되어 있으므로 자동대화장치의 인식부의 응답 텍스트는 사용자에게 부정적인 반응을 유발하지 않을 수 있고, 심리상담에 대한 주제를 다룰 수 있다.In addition, since the automatic dialogue device first presents the question set Q, the automatic dialogue device may limit the subject of the data set for generating the machine learning model to psychological counseling. The recognition unit of the automatic conversation apparatus may generate a response text to the user's conversation text by applying the learned machine learning model to the user's conversation text. Since the data set is typed, the response text of the recognition part of the automatic conversation device may not cause negative reaction to the user, and may deal with the subject of psychological counseling.

자동대화장치는 사용자와 전문 상담사들이 실시간 채팅 상담의 로그를 수신할 수 있다. 자동대화장치는 사용자와 전문 상담사들의 실시간 대화문들을 학습하여, 학습모델을 회득할 수 있다. 자동대화장치는 학습모델에 기초하여 사용자의 자유로운 대화문에 응답할 수 있다.The automatic conversation device allows users and professional counselors to receive a log of real-time chat consultation. The automatic dialogue device can learn the real time dialogues of the user and the professional counselors, and acquire the learning model. The automatic conversation device can respond to the free dialogue of the user based on the learning model.

자동대화장치에 포함된 전처리부(220)는 기계학습을 위하여 수신된 텍스트를 전처리하여 데이터 셋을 획득하는 단계(520)를 수행할 수 있다. 자동대화장치는 수신된 텍스트를 제 1 텍스트 및 제 2 텍스트로 구분하는 단계를 수행할 수 있다. 제 2 텍스트는 전문 상담사의 응답으로써 수신된 텍스트의 가장 마지막에 온 대화문일 수 있다. 제 1 텍스트는 제 2 텍스트 이전의 적어도 하나의 대화문들일 수 있다. The preprocessing unit 220 included in the automatic conversation apparatus may perform a step 520 of obtaining a data set by preprocessing the received text for machine learning. The automatic conversation apparatus may perform the step of dividing the received text into a first text and a second text. The second text may be the last conversation of the text received in response to a professional counselor. The first text may be at least one conversations before the second text.

자동대화장치는 제 1 텍스트 및 제 2 텍스트를 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위로 분리하는 단계를 수행할 수 있다. 자동대화장치는 제 1 텍스트 및 제 2 텍스트를 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위로 분리하고, 각각의 단위의 시작점과 끝점을 나타내는 기호를 삽입할 수 있다. 예를 들어 자동대화장치는 제 1 텍스트 및 제 2 텍스트를 형태소로 나누고 하나의 형태소의 시작점에 시작을 나타내는 기호를 삽입할 수 있다. 또한 형태소의 끝점에 끝을 나타내는 기호를 삽입할 수 있다. The automatic conversation apparatus may perform the step of separating the first text and the second text into at least one unit of phoneme, syllable, morpheme, word, word, or sentence. The automatic conversation apparatus may separate the first text and the second text into at least one unit of a phoneme, syllable, morpheme, word, word, or sentence, and insert a symbol representing a start point and an end point of each unit. For example, the automatic conversation apparatus may divide the first text and the second text into morphemes and insert a symbol representing a start at a start point of one morpheme. You can also insert an end sign at the end of the morpheme.

시작을 나타내는 기호와 끝을 나타내는 기호는 다를 수 있다. 하지만 이에 한정되는 것은 아니고 시작을 나타내는 기호와 끝을 나타내는 기호는 같을 수 있다. 하나의 단위의 끝을 나타내는 기호는 다른 단위의 시작을 나타내는 기호가 될 수 있기 때문이다. The symbol for start and the symbol for end can be different. However, the present invention is not limited thereto, and the sign indicating the start and the sign indicating the end may be the same. This is because a symbol indicating the end of one unit may be a symbol indicating the start of another unit.

자동대화장치는 서로 다른 단위를 구분하기 위하여, 서로 다른 기호를 사용할 수 있다. 예를 들어 단어를 구분하는 기호는 문장을 구분하는 기호와 다를 수 있다. 자동대화장치는 기호의 종류에 기초하여 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위를 이용하여 학습을 수행할 수 있다.The automatic conversation apparatus may use different symbols to distinguish different units. For example, a symbol that separates words may be different from a symbol that separates sentences. The automatic conversation apparatus may perform learning using at least one unit of phoneme, syllable, morpheme, word, word, or sentence based on the type of symbol.

자동대화장치는 동일한 음을 가지는 음소, 음절, 형태소 또는 단어이지만 서로 다른 의미를 가지는 음소, 음절, 형태소 또는 단어를 구별하기 위하여, 음소, 음절, 형태소 또는 단어에 주석문자를 추가할 수 있다. 예를 들어 "가"는 조사일 수도 있고 "가다"의 "가"일 수 있다. 자동대화장치는 형태소의 하나인 조사 "가"에는 "XXX"를 추가하고 동사 "가"에는 XXY를 추가할 수 있다. 하지만 이에 한정되는 것은 아니다. 같은 음을 가지지만 다른 뜻을 가지는 음소, 음절, 형태소 또는 단어를 구별하기 위한 다양한 방법이 사용될 수 있다The automatic conversation apparatus may add annotation characters to the phonemes, syllables, morphemes, or words in order to distinguish phonemes, syllables, morphemes, or words having the same sounds but having different meanings. For example, "a" may be an investigation or "a" of "go". The automatic conversation device may add "XXX" to the survey "A", one of the morphemes, and XXY to the verb "A". But it is not limited thereto. Various methods can be used to distinguish phonemes, syllables, morphemes, or words that have the same sound but different meanings

자동대화장치에 포함된 학습 데이터 선택부(230)는 모델 학습을 위하여 사용할 텍스트를 선택할 수 있다. 도 2는 학습 데이터 선택부(230)가 전처리부(220) 이후에 기재되어 있으나, 이에 한정되는 것은 아니다. 학습 데이터 선택부(230)의 동작 수행 이후에 전처리부(220)의 동작이 수행될 수 있다.The training data selector 230 included in the automatic conversation apparatus may select text to be used for model training. 2 illustrates the learning data selector 230 after the preprocessor 220, but is not limited thereto. After the operation of the training data selector 230 is performed, the operation of the preprocessor 220 may be performed.

학습 데이터 선택부(230)에 대해서는 도 6과 함께 보다 자세히 설명한다. The learning data selector 230 will be described in more detail with reference to FIG. 6.

도 6은 본 개시의 일 실시예에 따른 제 1 텍스트와 제 2 텍스트를 나타낸다.6 illustrates a first text and a second text according to an embodiment of the present disclosure.

자동대화장치는 전문 상담사와 사용자의 자유로운 실시간 상담 텍스트를 수신할 수 있다. 화면(600)은 자동대화장치가 수신한 전문 상담사와 사용자의 자유로운 실시간 상담 텍스트의 일 예시이다. 자동대화장치는 실시간 상담 텍스트 중에서 심리 상담과 관련된 텍스트를 선택할 수 있다. The automatic conversation device may receive free real-time consultation texts from professional counselors and users. The screen 600 is an example of free real-time consultation texts of a professional counselor and a user received by the automatic conversation device. The automatic conversation device may select text related to psychological counseling from real-time counseling text.

자동대화장치는 미리 학습된 학습모델을 이용하여 심리 상담과 관련된 텍스트를 선택할 수 있다. 예를 들어, 미리 학습된 학습모델은 복수의 전문 상담사의 대화 텍스트를 학습한 모델일 수 있다. 자동대화장치는 미리 학습된 학습모델에 기초하여, 전문 상담사의 대화 텍스트와 전문 상담사의 대화 텍스트가 아닌 것을 구분할 수 있다. 자동대화장치는 미리 학습된 학습모델에 기초하여 실시간 상담 텍스트들 중 전문 상담사의 대화 텍스트(620)를 선택할 수 있다. The automatic conversation apparatus may select texts related to psychological counseling using a previously trained learning model. For example, the previously trained learning model may be a model for learning conversation texts of a plurality of professional counselors. The automatic conversation apparatus may distinguish between the conversation text of the professional counselor and the conversation text of the professional counselor, based on the previously learned learning model. The automatic conversation apparatus may select a conversation text 620 of a professional counselor among real-time counseling texts based on a previously learned learning model.

또한 전문 상담사의 대화 텍스트 이전의 대화 텍스트들(610)을 함께 선택할 수 있다. 자동대화장치는 소정의 개수의 대화 텍스트들(610)을 선택할 수 있다. 예를 들어 선택된 대화 텍스트들은 3개의 대화 텍스트들(610)일 수 있다. 선택된 전문 상담사의 대화 텍스트는 제 2 텍스트(620)가 될 수 있다. 또한 전문 상담사의 대화 텍스트 이전의 대화 텍스트들은 제 1 텍스트(610)가 될 수 있다. In addition, the conversation texts 610 before the conversation text of the expert counselor may be selected together. The automatic conversation device may select a predetermined number of conversation texts 610. For example, the selected conversation texts may be three conversation texts 610. The conversation text of the selected professional counselor may be the second text 620. Also, the conversation texts before the conversation text of the expert counselor may be the first text 610.

자동대화장치는 모델 학습을 위하여 사용할 텍스트를 자동으로 선택할 수 있으나 이에 한정되는 것은 아니다. 자동대화장치는 모델 학습을 위하여 사용할 텍스트를 사용자로부터 입력받을 수 있다. 자동대화장치는 입력받은 텍스트들의 마지막에 기재되어 있는 전문 상담사의 텍스트를 제 2 텍스트(620)로 결정할 수 있다. 또한 제 2 텍스트 이전의 텍스트를 제 1 텍스트(610)로 결정할 수 있다.The automatic dialog may automatically select text to be used for model training, but is not limited thereto. The automatic conversation device may receive text input from the user to use for model training. The automatic conversation apparatus may determine the text of the professional counselor described at the end of the input texts as the second text 620. Also, the text before the second text may be determined as the first text 610.

이하에서는 도 7과 함께 자동대화장치의 학습부(110)에 대하여 설명한다.Hereinafter, the learning unit 110 of the automatic conversation apparatus will be described with reference to FIG. 7.

도 7 은 본 개시의 일 실시예에 따른 자동대화장치의 학습부를 나타낸 도면이다.7 is a view illustrating a learning unit of an automatic conversation apparatus according to an embodiment of the present disclosure.

자동대화장치(700)에 포함된 모델 학습부(710)는 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 데이터 셋을 기계학습하여 기계학습모델(712)을 획득하는 단계(530)를 수행할 수 있다. The model learner 710 included in the automatic conversation apparatus 700 uses a hierarchical encoder-decoder with attention mechanism to machine-learn a data set and machine-learning model 712. Operation 530 may be performed.

계층적 인코더-디코더 모형은 데이터 셋으로 계층적으로 학습하는 모형이다. 인코더는 사용자와 전문 상담사의 대화문에 기초하여 기계학습모델(712)을 생성하는 과정을 나타낸다. 디코더는 사용자의 대화문을 기계학습모델(712)에 적용하여 사용자의 대화문에 이어질 자연스러운 응답을 생성하는 과정을 나타낸다. The hierarchical encoder-decoder model is a hierarchical learning model with a data set. The encoder represents a process of generating the machine learning model 712 based on the dialogue between the user and the professional counselor. The decoder represents the process of applying the user's dialogue to the machine learning model 712 to generate a natural response that will follow the user's dialogue.

데이터 셋에 포함된 데이터는 기계학습되어 {A1, A2, A3, A4, ... Ak}와 같은 벡터 또는 메트릭스로 표현될 수 있다. A1, A2, A3, A4, ... Ak는 각각 숫자일 수 있다. A1, A2, A3, A4, ... Ak는 각각 실수 값을 가질 수 있다. k는 k차원으로 인코딩된 것을 의미한다. 데이터를 벡터로 표현하는 것을 임베딩이라고 할 수 있다. 단어 단위를 벡터로 표현한 것을 단어 임베딩이라고 할 수 있다. 또한 텍스트 단위를 벡터로 표현한 것을 텍스트 임베딩이라고 할 수 있다. The data included in the data set may be machine-learned and expressed as a vector or matrix such as {A1, A2, A3, A4, ... Ak}. A1, A2, A3, A4, ... Ak may each be a number. A1, A2, A3, A4, ... Ak may each have a real value. k means encoded in the k-dimensional. Representing data as vectors can be referred to as embedding. The expression of word units as vectors can be called word embedding. In addition, text embedding is a representation of text units as vectors.

자동대화장치(700)는 단어 임베딩을 위하여 word2vec, fastText, GloVe, 음절 단위 word2vec 또는 자모 단위 word2vec 와 같은 알고리즘을 사용할 수 있다. 또한 자동대화장치(700)는 텍스트 임베딩을 위하여 Word Mover's Distance(WMD) 및 doc2vec 알고리즘을 사용할 수 있다.The automatic conversation apparatus 700 may use an algorithm such as word2vec, fastText, GloVe, syllable unit word2vec, or Jamo unit word2vec for word embedding. In addition, the automatic conversation apparatus 700 may use the Word Mover's Distance (WMD) and doc2vec algorithms for text embedding.

자동대화장치(700)는 기계학습을 위하여 Recurrent Neural Networks (RNN)에 Long Short-Term Memory models(LSTM) 또는 Gated Recurrent Unit(GRU)라는 모듈을 추가하여 사용할 수 있다. LSTM 및 GRU는 RNN의 일종으로서 RNN의 장기 의존성 문제를 해결하기 위한 알고리즘이다. 또한 기본적인 모형을 개선하기 위하여 일방향성 기계학습을 역방향으로 수행해볼 수 있다. 또한 일방향성 기계학습을 양방향으로 수행해볼 수 있다.The automatic conversation apparatus 700 may add a module called Long Short-Term Memory models (LSTM) or Gated Recurrent Unit (GRU) to Recurrent Neural Networks (RNN) for machine learning. LSTM and GRU are types of RNNs and algorithms for solving the long-term dependency problem of RNNs. In addition, one-way machine learning can be reversed to improve the basic model. In addition, one-way machine learning can be performed in both directions.

자동대화장치(700)는 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 계층으로 기계학습을 수행할 수 있다. 음소, 음절, 형태소, 단어, 어절 또는 문장은 각각 계층 단위가 될 수 있다. 음소에서 음절, 형태소, 단어, 어절 및 문장으로 갈수록 하위 계층 단위에서 상위 계층 단위일 수 있다. 상위 계층을 이용하여 학습된 학습모델이 하위 계층을 이용하여 학습된 학습모델에 영향을 줄 수 있다. 반대로 하위 계층을 이용하여 학습된 학습모델이 상위 계층을 이용하여 학습된 학습모델에 영향을 줄 수 있다. The automatic conversation apparatus 700 may perform machine learning in at least one layer of phonemes, syllables, morphemes, words, words, or sentences. Phonemes, syllables, morphemes, words, words, or sentences can each be hierarchical. In the phoneme, the syllable, the morpheme, the word, the word, and the sentence may be from the lower hierarchy unit to the higher hierarchy unit. A learning model trained using the upper layer can affect the learning model trained using the lower layer. On the contrary, a learning model trained using a lower layer may affect a learning model trained using a higher layer.

자동대화장치(700)는 제 1 텍스트의 상위 계층 단위와 제 2 텍스트의 상관관계를 기계학습을 수행하여, 제 1 텍스트의 상위 계층 단위에 대한 가중치를 획득하는 단계를 수행할 수 있다. 자동대화장치(700)는 제 1 텍스트의 하위 계층 단위와 제 2 텍스트의 상관관계를 기계학습을 수행하여, 제 1 텍스트의 하위 계층 단위에 대한 가중치를 획득하는 단계를 수행할 수 있다. 자동대화장치(700)는 상위 계층 단위에 대한 가중치 및 하위 계층 단위에 대한 가중치에 기초하여 수정된 하위 계층 단위에 대한 가중치를 획득하는 단계를 수행할 수 있다. 계층 단위는 음소, 음절, 형태소, 단어, 어절 및 문장으로 갈수록 하위 계층 단위에서 상위 계층 단위일 수 있다.The automatic conversation apparatus 700 may perform a machine learning on the correlation between the upper hierarchical unit of the first text and the second text to obtain a weight for the upper hierarchical unit of the first text. The automatic conversation apparatus 700 may perform a machine learning on the correlation between the lower hierarchical unit of the first text and the second text to obtain a weight for the lower hierarchical unit of the first text. The automatic conversation apparatus 700 may perform a step of obtaining a weight for the modified lower layer unit based on the weight for the upper layer unit and the weight for the lower layer unit. The hierarchical unit may be a higher hierarchical unit from a lower hierarchical unit toward phonemes, syllables, morphemes, words, words, and sentences.

하위 계층 단위만으로 학습모델을 획득하는 경우 상위 계층 단위의 자연스러운 흐름이 학습모델에 반영되지 않을 수 있다. 또한 상위 계층 단위만으로 학습모델을 획득하는 경우 하위 계층 단위의 자연스러운 흐름이 학습모델에 반영되지 않을 수 있다. 자동대화장치는 계층적 인코더-디코더 모형을 이용하여 자연스러운 응답을 생성할 수 있다. When acquiring the learning model only by the lower layer unit, the natural flow of the upper layer unit may not be reflected in the learning model. In addition, when acquiring the learning model only by the upper layer unit, the natural flow of the lower layer unit may not be reflected in the learning model. The automator can generate a natural response using a hierarchical encoder-decoder model.

주목 메커니즘(attention mechanism)은 시퀀스 대 시퀀스 기반의 딥러닝(sequence to sequence based deep learning)에 사용되는 메커니즘이다. 시퀀스 대 시퀀스 기반의 딥러닝은 RNN(Recurrent Neural Network, 순환신경망)을 사용하여 문장을 학습하는 기법이다. 시퀀스 대 시퀀스 기반의 딥러닝은 시퀀스가 길어질수록 과거 상태를 기억하지 못하는 단점이 존재한다. 따라서 주목 메커니즘은 별도의 네트워크를 이용하여 자동대화장치가 결과를 도출하기 위해 주목해야하는 부분을 강조하는데 목적이 있다.Attention mechanism is a mechanism used for sequence to sequence based deep learning. Sequence-to-sequence deep learning is a technique for learning sentences using RNN (Recurrent Neural Network). Sequence-to-sequence deep learning has a disadvantage in that the longer the sequence does not remember the past state. Therefore, the attention mechanism aims to emphasize the part that the automatic communication device should pay attention to to obtain a result by using a separate network.

자동대화장치(700)의 학습부(710)는 주목 메커니즘을 사용할 수 있다. 자동대화장치는 제 1 텍스트와 제 2 텍스트의 상관관계에 대한 기계학습모델(712)을 학습할 수 있다. 자동대화장치(700)는 기계학습에서 제 1 텍스트에 포함된 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나에 주목할 수 있다. 왜냐하면, 제 1 텍스트에 포함된 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위가 제 2 텍스트와 가장 관련이 높을 수 있기 때문이다. 예를 들어 제 1 텍스트에 "우울"이라는 단어가 포함되어있고, 제 2 텍스트는 우울증에 도움이 되는 전문 상담자의 대화 텍스트일 수 있다. 제 1 텍스트의 "우울"이라는 단어는 제 2 텍스트를 도출하는데 가장 높은 영향을 미칠 수 있다. 따라서 자동대화장치의 학습부(110)는 제 1 텍스트의 "우울"이라는 단어에 집중하여 기계학습모델(712)을 생성할 수 있다.The learning unit 710 of the automatic conversation apparatus 700 may use the attention mechanism. The automatic conversation apparatus may learn the machine learning model 712 about the correlation between the first text and the second text. The automatic conversation apparatus 700 may pay attention to at least one of a phoneme, a syllable, a morpheme, a word, a word, or a sentence included in the first text in machine learning. This is because at least one unit of a phoneme, syllable, morpheme, word, word, or sentence included in the first text may be most relevant to the second text. For example, the first text may include the word "depressed", and the second text may be conversational text of a professional counselor who helps depression. The word "depressed" in the first text may have the highest impact on deriving the second text. Therefore, the learner 110 of the automatic conversation apparatus may generate the machine learning model 712 by focusing on the word “depressed” of the first text.

자동대화장치의 인식부는 주목 메커니즘을 사용할 수 있다. 자동대화장치는 학습부(710)로부터 수신한 기계학습모델(712)을 저장할 수 있다. 자동대화장치는 사용자로부터 대화문을 수신할 수 있다. 사용자로부터 수신한 대화문은 제 1 텍스트에 대응될 수 있다. 자동대화장치는 제 1 텍스트을 학습모델에 적용하여 응답 텍스트를 생성할 수 있다. 응답 텍스트는 제 2 텍스트에 대응될 수 있다. 자동대화장치에 저장되어 있는 학습모델은 주목 메커니즘에 의하여 생성된 학습모델이므로, 제 1 텍스트의 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나에 집중하여 제 2 텍스트를 생성할 수 있다.The recognition unit of the automatic conversation apparatus may use the attention mechanism. The automatic conversation device may store the machine learning model 712 received from the learner 710. The automatic conversation device may receive a conversation from the user. The conversation received from the user may correspond to the first text. The automatic conversation apparatus may generate the response text by applying the first text to the learning model. The response text may correspond to the second text. Since the learning model stored in the automatic conversation apparatus is a learning model generated by the attention mechanism, the second text may be generated by focusing on at least one of a phoneme, a syllable, a morpheme, a word, a word, or a sentence of the first text.

자동대화장치(700)는 제 1 텍스트, 사용자의 활동 로그 및 심리 프로파일과 제 2 텍스트의 상관 관계에 대한 기계학습모델(712)을 획득하는 단계를 수행할 수 있다. 사용자의 활동 로그는 게시글 열람, 댓글, 공감 및 북마크 중 적어도 하나를 포함할 수 있다. 심리 프로파일은 사용자의 성별, 나이, 성향 프로파일 및 성격형 테스트 결과 중 적어도 하나를 포함할 수 있다. 자동대화장치(700)의 학습부(710)는 사용자의 활동 로그 및 심리 프로파일을 기계학습하여 기계학습모델(712)을 생성하므로, 자동대화장치(700)의 인식부는 기계학습모델(712)을 사용하여 사용자의 상황에 더 적절한 응답을 생성할 수 있다.The automatic conversation apparatus 700 may perform a step of acquiring the machine learning model 712 about the correlation between the first text, the activity log of the user, and the psychological profile and the second text. The activity log of the user may include at least one of a post view, a comment, a sympathy, and a bookmark. The psychological profile may include at least one of a user's gender, age, disposition profile, and personality test results. Since the learning unit 710 of the automatic conversation apparatus 700 generates the machine learning model 712 by machine learning the activity log and the psychological profile of the user, the recognition unit of the automatic conversation apparatus 700 generates the machine learning model 712. Can be used to generate a response more appropriate to the user's situation.

도 8은 본 개시의 실시예에 따라 기계학습모델을 이용하여 사용자의 대화문에 따른 응답을 생성하는 방법에 관한 흐름도이다.8 is a flowchart illustrating a method of generating a response according to a dialogue of a user using a machine learning model according to an embodiment of the present disclosure.

자동대화장치는 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 제 1 텍스트를 수신하는 단계(810)를 수행한다. 자동대화장치는 수신된 제 1 텍스트를 전처리하여 데이터 셋을 획득하는 단계(820)를 수행한다. 자동대화장치는 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 미리 학습된 기계학습모델에 기초하여 수신된 제 1 텍스트로부터 제 2 텍스트를 자동으로 획득하는 단계(830)를 수행한다. 자동대화장치는 제 2 텍스트를 출력하는 단계(840)를 수행한다.The automatic conversation apparatus performs step 810 of receiving a first text related to psychoanalysis among conversation texts of the counselor and the user. The automatic conversation apparatus preprocesses the received first text to obtain a data set (820). The automatic conversation apparatus automatically obtains the second text from the received first text based on a previously learned machine learning model using a hierarchical encoder-decoder with attention mechanism. Step 830 is performed. The automatic dialogue device performs step 840 of outputting the second text.

도 9는 본 개시의 실시예에 따근 자동대화장치의 인식부에 대한 블록도이다.9 is a block diagram of a recognition unit of an automatic conversation apparatus according to an embodiment of the present disclosure.

자동대화장치(900)는 인식부(910)를 포함할 수 있다. 인식부(910)는 학습부(710)와 동일한 장치에 포함될 수 있다. 하지만 이에 한정되는 것은 아니며 학습부(710)는 인식부(910)와 서로 다른 장치에 존재할 수 있다. 학습부(710)는 기계학습모델을 인식부(910)에 제공할 수 있다.The automatic conversation apparatus 900 may include a recognition unit 910. The recognition unit 910 may be included in the same device as the learning unit 710. However, the present invention is not limited thereto, and the learner 710 may exist in a different device from the recognizer 910. The learner 710 may provide the machine learning model to the recognizer 910.

인식부(910)는 도 3에서 설명한 바와 같이 데이터 획득부(310), 전처리부(320), 인식 데이터 선택부(330), 인식 결과 제공부(340) 및 모델 갱신부(350)를 포함할 수 있다. 인식부(910)는 제 1 텍스트(911)를 수신하여 제 2 텍스트(912)를 출력할 수 있다.The recognizer 910 may include a data acquirer 310, a preprocessor 320, a recognition data selector 330, a recognition result provider 340, and a model updater 350 as described with reference to FIG. 3. Can be. The recognition unit 910 may receive the first text 911 and output the second text 912.

자동대화장치에 포함된 데이터 획득부(310)는 상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 제 1 텍스트를 수신하는 단계(810)를 수행할 수 있다. 추가적으로 자동대화장치는 사용자의 활동 로그 및 심리 프로파일을 수신할 수 있다. 사용자의 활동 로그는 게시글 열람, 댓글, 공감 및 북마크 중 적어도 하나를 포함할 수 있다. 심리 프로파일은 사용자의 성별, 나이, 성향 프로파일 및 성격형 테스트 결과 중 적어도 하나를 포함할 수 있다.The data acquisition unit 310 included in the automatic conversation apparatus may perform step 810 of receiving a first text related to psychoanalysis among conversation texts of the counselor and the user. Additionally, the automated conversation device may receive a user's activity log and psychological profile. The activity log of the user may include at least one of a post view, a comment, a sympathy, and a bookmark. The psychological profile may include at least one of a user's gender, age, disposition profile, and personality test results.

자동대화장치에 포함된 전처리부(320)는 수신된 제 1 텍스트를 전처리하여 데이터 셋을 획득하는 단계(820)를 수행할 수 있다. 자동대화장치는 제 1 텍스트를 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위로 분리하는 단계를 수행할 수 있다.The preprocessor 320 included in the automatic conversation apparatus may perform a step 820 of obtaining a data set by preprocessing the received first text. The automatic conversation apparatus may perform the step of separating the first text into at least one unit of phoneme, syllable, morpheme, word, word, or sentence.

자동대화장치에 포함된 인식데이터 선택부(330)는 사용자로부터의 대화 텍스트 중 일부 텍스트를 선택할 수 있다. 자동대화장치는 마지막 사용자의 대화 텍스트를 선택할 수 있다. 자동대화장치는 사용자의 대화 텍스트를 제 1 텍스트로 결정할 수 있다. 또한 자동대화장치는 마지막 사용자의 대화 텍스트 및 자동대화장치가 미리 생성한 질문 텍스트를 제 1 텍스트로 설정할 수 있다.The recognition data selector 330 included in the automatic conversation apparatus may select some text from the dialogue text from the user. The automator can select the last user's conversation text. The automatic conversation device may determine the conversation text of the user as the first text. In addition, the automatic conversation apparatus may set the dialogue text of the last user and the question text previously generated by the automatic dialogue apparatus as the first text.

자동대화장치에 포함된 인식 결과 제공부(340)는 주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 미리 학습된 기계학습모델에 기초하여 수신된 제 1 텍스트로부터 제 2 텍스트를 자동으로 획득하는 단계(830)를 수행할 수 있다. The recognition result providing unit 340 included in the automatic conversation apparatus receives a first received based on a previously learned machine learning model using a hierarchical encoder-decoder with attention mechanism. Automatically acquiring the second text from the text may be performed 830.

도 10은 본 개시의 일 실시예에 따라 자동대화장치의 동작화면을 나타낸 도면이다.10 is a view showing an operation screen of the automatic conversation apparatus according to one embodiment of the present disclosure.

자동대화장치의 화면(1000)은 제 1 텍스트를 나타내고 있다. 제 1 텍스트는 자동대화장치의 대화 텍스트(1011) 및 사용자의 대화 텍스트(1012)를 포함할 수 있다. The screen 1000 of the automatic communication device shows the first text. The first text may include conversation text 1011 of the automatic conversation device and conversation text 1012 of the user.

자동대화장치는 학습부(110)에서 미리 학습한 기계학습모델을 수신할 수 있다. 기계학습모델은 주목 메커니즘을 동반한 계층적 인코더-디코더 모형에 기초하여 생성된 모델일 수 있다. 자동대화장치는 제 1 텍스트(1011, 1012)에 기계학습모델을 적용하여 제 2 텍스트(1060)를 생성할 수 있다. 제 2 텍스트(1060)는 전문 상담사의 대화를 모방한 대화 텍스트일 수 있다.The automatic conversation device may receive a machine learning model learned in advance from the learning unit 110. The machine learning model may be a model generated based on a hierarchical encoder-decoder model with a mechanism of interest. The automatic conversation apparatus may generate the second text 1060 by applying the machine learning model to the first text 1011 and 1012. The second text 1060 may be conversation text that mimics the conversation of a professional counselor.

자동대화장치는 미리 학습된 기계학습모델에 기초하여 수신된 제 1 텍스트(1011, 1012), 사용자의 활동 로그 및 심리 프로파일로부터 제 2 텍스트(1060)를 자동으로 획득하는 단계를 수행할 수 있다. 자동대화장치는 제 1 텍스트(1011, 1012) 외에 사용자의 활동 로그 및 심리 프로파일을 이용하여 보다 자연스러운 제 2 텍스트(1060)를 생성할 수 있다.The automatic conversation apparatus may perform the step of automatically obtaining the second text 1060 from the received first text 1011, 1012, the activity log of the user, and the psychological profile based on the previously learned machine learning model. In addition to the first texts 1011 and 1012, the automator may generate a more natural second text 1060 using the user's activity log and psychological profile.

자동대화장치가 수신한 기계학습모델은 주목 메커니즘을 동반한 계층적 인코더-디코더 모형이 반영되어 있을 수 있다. 자동대화장치는 미리 학습된 기계학습모델에 포함된 상위 계층 단위에 대한 가중치, 하위 계층 단위에 대한 가중치 및 제 1 텍스트에 기초하여 제 2 텍스트를 자동으로 획득하는 단계를 수행할 수 있다. 계층 단위는 음소, 음절, 형태소, 단어, 어절 및 문장으로 갈수록 하위 계층 단위에서 상위 계층 단위일 수 있다.The machine learning model received by the automatic dialogue device may reflect a hierarchical encoder-decoder model with attention mechanism. The automatic conversation apparatus may perform the step of automatically obtaining the second text based on the weight of the upper layer unit, the weight of the lower layer unit, and the first text included in the previously learned machine learning model. The hierarchical unit may be a higher hierarchical unit from a lower hierarchical unit toward phonemes, syllables, morphemes, words, words, and sentences.

자동대화장치는 미리 학습된 기계학습모델에 기초하여 제 1 텍스트를 임베딩하여 임베딩된 제 1 텍스트를 획득할 수 있다. 상술한 바와 같이 임베딩된 제 1 텍스트는 텍스트를 벡터 또는 메트릭스 형식으로 표현한 것일 수 있다. 자동대화장치는 임베딩된 제 1 텍스트와 미리 학습된 기계학습모델에 포함된 복수의 후보들의 임베딩을 코사인 유사도를 계산하는 단계를 수행할 수 있다. 자동대화장치는 계산된 유사도에 기초하여 복수의 후보들 중 제 1 텍스트와 가장 유사한 후보에 대응되는 제 2 텍스트를 선택하는 단계를 포함할 수 있다.The automatic conversation apparatus may acquire the embedded first text by embedding the first text based on the previously learned machine learning model. As described above, the embedded first text may represent text in a vector or matrix format. The automatic conversation apparatus may perform the step of calculating the cosine similarity of the embedding of the plurality of candidates included in the embedded first text and the pre-learned machine learning model. The automatic conversation apparatus may include selecting a second text corresponding to the candidate most similar to the first text among the plurality of candidates based on the calculated similarity.

자동대화장치는 코사인 유사도가 임계값보다 작은 경우, 폴벡 응답을 출력하는 단계를 수행할 수 있다. 폴벡 응답은 사용자에게 다시 대화 텍스트를 입력하라는 응답일 수 있다. 또는 사용자의 대화 텍스트를 처리할 수 없음을 나타내는 응답일 수 있다. 하지만 이에 한정되는 것은 아니며 자동대화장치는 비유사도가 임계값보다 높은 경우, 폴벡 응답을 출력하는 단계를 수행할 수 있다.When the cosine similarity is smaller than the threshold, the automatic conversation device may perform the step of outputting a Polbeck response. The Polbeck response may be a response that prompts the user to enter conversation text again. Alternatively, the response may indicate that the user's conversation text cannot be processed. However, the present invention is not limited thereto, and when the dissimilarity level is higher than the threshold value, the automatic conversation apparatus may perform a step of outputting a Polbeck response.

이제까지 다양한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the various embodiments. Those skilled in the art will appreciate that the present invention can be implemented in a modified form without departing from the essential features of the present invention. Therefore, the disclosed embodiments should be considered in descriptive sense only and not for purposes of limitation. The scope of the present invention is shown in the claims rather than the foregoing description, and all differences within the scope will be construed as being included in the present invention.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등)와 같은 저장매체를 포함한다.Meanwhile, the above-described embodiments of the present invention can be written as a program that can be executed in a computer, and can be implemented in a general-purpose digital computer that operates the program using a computer-readable recording medium. The computer-readable recording medium may include a storage medium such as a magnetic storage medium (eg, a ROM, a floppy disk, a hard disk, etc.) and an optical reading medium (eg, a CD-ROM, a DVD, etc.).

110: 학습부
120: 인식부
210: 데이터 획득부
220: 전처리부
230: 학습 데이터 선택부
240: 모델 학습부
250: 모델 평가부
110: learning
120: recognition unit
210: data acquisition unit
220: preprocessing unit
230: training data selection unit
240: model learning unit
250: model evaluation unit

Claims (14)

심리 치료를 위한 자동대화장치에 있어서,
상기 장치는 프로세서 및 적어도 하나의 프로그램이 저장되는 메모리를 포함하고,
상기 메모리는 상기 적어도 하나의 프로그램이 상기 프로세서에서 실행될 때, 상기 프로세서가,
상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 텍스트를 수신하는 단계;
기계학습을 위하여 상기 수신된 텍스트를 전처리하여 데이터 셋을 획득하는 단계; 및
주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 상기 데이터 셋을 기계학습하여 기계학습모델을 획득하는 단계를 실행하도록 하는 명령어들을 저장하고,
상기 수신된 텍스트는 상기 상담자와 상기 사용자의 대화 텍스트를 포함하는 제 1 텍스트 및 제 1 텍스트의 직후의 상담자의 응답 텍스트인 제 2 텍스트를 포함하고,
상기 기계학습모델을 획득하는 단계는,
제 1 텍스트와 제 2 텍스트의 상관 관계에 대한 기계학습모델을 획득하는 단계인 것을 특징으로 하는 자동대화장치.
In the automatic dialog for psychotherapy,
The apparatus includes a processor and a memory in which at least one program is stored,
The memory may be generated by the processor when the at least one program is executed in the processor.
Receiving texts related to psychoanalysis among conversation texts of a counselor and a user;
Preprocessing the received text for machine learning to obtain a data set; And
Storing instructions for executing the step of machine learning the data set to obtain a machine learning model using a hierarchical encoder-decoder with attention mechanism;
The received text includes a first text including a conversation text of the counselor and the user and a second text that is a response text of the counselor immediately after the first text,
Acquiring the machine learning model,
Obtaining a machine learning model for the correlation between the first text and the second text.
제 1 항에 있어서,
상기 프로세서가 상기 기계학습모델을 획득하는 단계를 실행하도록 하는 명령어는,
상기 제 1 텍스트, 사용자의 활동 로그 및 심리 프로파일과 제 2 텍스트의 상관 관계에 대한 기계학습모델을 획득하는 단계를 포함하고,
상기 사용자의 활동 로그는 게시글 열람, 댓글, 공감 및 북마크 중 적어도 하나를 포함하고,
상기 심리 프로파일은 사용자의 성별, 나이, 성향 프로파일 및 성격형 테스트 결과 중 적어도 하나를 포함하는 것을 특징으로 하는 자동대화장치.
The method of claim 1,
Instructions for causing the processor to execute the step of obtaining the machine learning model,
Obtaining a machine learning model for the correlation of the first text, the activity log of the user, and the psychological profile and the second text,
The activity log of the user includes at least one of viewing posts, comments, empathy and bookmarks,
And the psychological profile comprises at least one of a gender, age, disposition profile, and personality test result of the user.
제 1 항에 있어서,
상기 프로세서가 상기 데이터 셋을 획득하는 단계를 실행하도록 하는 명령어는,
상기 수신된 텍스트를 제 1 텍스트 및 제 2 텍스트로 구분하는 단계; 및
상기 제 1 텍스트 및 제 2 텍스트를 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위로 분리하는 단계를 포함하는 자동대화장치.
The method of claim 1,
Instructions for causing the processor to execute the step of acquiring the data set include:
Dividing the received text into a first text and a second text; And
And dividing the first text and the second text into at least one unit of phoneme, syllable, morpheme, word, word or sentence.
제 1 항에 있어서,
상기 프로세서가 상기 기계학습모델을 획득하는 단계를 실행하도록 하는 명령어는,
상기 제 1 텍스트의 상위 계층 단위와 제 2 텍스트의 상관관계를 기계학습을 수행하여, 제 1 텍스트의 상위 계층 단위에 대한 가중치를 획득하는 단계;
상기 제 1 텍스트의 하위 계층 단위와 제 2 텍스트의 상관관계를 기계학습을 수행하여, 제 1 텍스트의 하위 계층 단위에 대한 가중치를 획득하는 단계; 및
상기 상위 계층 단위에 대한 가중치 및 상기 하위 계층 단위에 대한 가중치에 기초하여 수정된 하위 계층 단위에 대한 가중치를 획득하는 단계를 포함하고,
계층 단위는 음소, 음절, 형태소, 단어, 어절 및 문장으로 갈수록 하위 계층 단위에서 상위 계층 단위인 것을 특징으로 하는 자동대화장치.
The method of claim 1,
Instructions for causing the processor to execute the step of obtaining the machine learning model,
Performing machine learning on the correlation between the higher layer unit of the first text and the second text to obtain a weight for the higher layer unit of the first text;
Performing machine learning the correlation between the lower hierarchical units of the first text and the second text to obtain weights for the lower hierarchical units of the first text; And
Obtaining a weight for the modified lower layer unit based on the weight for the upper layer unit and the weight for the lower layer unit,
The hierarchical unit is a phone, syllables, morphemes, words, words and sentences, the automatic dialogue device characterized in that the lower hierarchical unit from the upper hierarchical unit.
심리 치료를 위한 자동대화장치에 있어서,
상기 장치는 프로세서 및 적어도 하나의 프로그램이 저장되는 메모리를 포함하고,
상기 메모리는 상기 적어도 하나의 프로그램이 상기 프로세서에서 실행될 때, 상기 프로세서가,
상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 제 1 텍스트를 수신하는 단계;
상기 수신된 제 1 텍스트를 전처리하여 데이터 셋을 획득하는 단계;
주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 미리 학습된 기계학습모델에 기초하여 상기 수신된 제 1 텍스트로부터 제 2 텍스트를 자동으로 획득하는 단계; 및
상기 제 2 텍스트를 출력하는 단계를 실행하도록 하는 명령어들을 저장하는 자동대화장치.
In the automatic dialog for psychotherapy,
The apparatus includes a processor and a memory in which at least one program is stored,
The memory may be generated by the processor when the at least one program is executed in the processor.
Receiving a first text related to psychoanalysis among conversation texts of a counselor and a user;
Preprocessing the received first text to obtain a data set;
Automatically obtaining a second text from the received first text based on a previously learned machine learning model using a hierarchical encoder-decoder with attention mechanism; And
And save instructions to execute the step of outputting the second text.
제 5 항에 있어서,
상기 프로세서가 상기 제 2 텍스트를 자동으로 획득하는 단계를 실행하도록 하는 명령어는,
상기 미리 학습된 기계학습모델에 기초하여 상기 수신된 제 1 텍스트, 사용자의 활동 로그 및 심리 프로파일로부터 제 2 텍스트를 자동으로 획득하는 단계를 포함하고,
상기 사용자의 활동 로그는 게시글 열람, 댓글, 공감 및 북마크 중 적어도 하나를 포함하고,
상기 심리 프로파일은 사용자의 성별, 나이, 성향 프로파일 및 성격형 테스트 결과 중 적어도 하나를 포함하는 것을 특징으로 하는 자동대화장치.
The method of claim 5,
Instructions for causing the processor to execute the step of automatically obtaining the second text include:
Automatically obtaining a second text from the received first text, an activity log of the user, and a psychological profile based on the pre-learned machine learning model,
The activity log of the user includes at least one of viewing posts, comments, empathy and bookmarks,
And the psychological profile comprises at least one of a gender, age, disposition profile, and personality test result of the user.
제 5 항에 있어서,
상기 프로세서가 상기 데이터 셋을 획득하는 단계를 실행하도록 하는 명령어는,
상기 제 1 텍스트를 음소, 음절, 형태소, 단어, 어절 또는 문장 중 적어도 하나의 단위로 분리하는 단계를 포함하는 자동대화장치.
The method of claim 5,
Instructions for causing the processor to execute the step of acquiring the data set include:
And dividing the first text into at least one unit of phoneme, syllable, morpheme, word, word, or sentence.
제 5 항에 있어서,
상기 프로세서가 상기 제 2 텍스트를 자동으로 획득하는 단계를 실행하도록 하는 명령어는,
상기 미리 학습된 기계학습모델에 포함된 상위 계층 단위에 대한 가중치, 하위 계층 단위에 대한 가중치 및 상기 제 1 텍스트에 기초하여 제 2 텍스트를 자동으로 획득하는 단계를 포함하고,
계층 단위는 음소, 음절, 형태소, 단어, 어절 및 문장으로 갈수록 하위 계층 단위에서 상위 계층 단위인 것을 특징으로 하는 자동대화장치.
The method of claim 5,
Instructions for causing the processor to execute the step of automatically obtaining the second text include:
Automatically obtaining a second text based on a weight for a higher layer unit, a weight for a lower layer unit, and the first text included in the pre-learned machine learning model,
The hierarchical unit is a phone, syllables, morphemes, words, words and sentences, the automatic dialogue device characterized in that the lower hierarchical unit from the upper hierarchical unit.
제 5 항에 있어서,
상기 프로세서가 상기 제 2 텍스트를 자동으로 획득하는 단계를 실행하도록 하는 명령어는,
상기 미리 학습된 기계학습모델에 기초하여 상기 제 1 텍스트를 임베딩하여 임베딩된 제 1 텍스트를 획득하는 단계;
상기 임베딩된 제 1 텍스트와 상기 미리 학습된 기계학습모델에 포함된 복수의 후보들의 임베딩을 코사인 유사도를 계산하는 단계; 및
상기 계산된 유사도에 기초하여 상기 복수의 후보들 중 제 1 텍스트와 가장 유사한 후보에 대응되는 제 2 텍스트를 선택하는 단계를 포함하는 자동대화장치.
The method of claim 5,
Instructions for causing the processor to execute the step of automatically obtaining the second text include:
Embedding the first text based on the pre-learned machine learning model to obtain an embedded first text;
Calculating a cosine similarity between embedding of the embedded first text and a plurality of candidates included in the pre-learned machine learning model; And
And selecting a second text corresponding to a candidate most similar to a first text among the plurality of candidates based on the calculated similarity.
제 8 항에 있어서,
상기 메모리는 상기 적어도 하나의 프로그램이 상기 프로세서에서 실행될 때, 상기 프로세서가,
상기 코사인 유사도가 임계값보다 작은 경우, 폴벡 응답을 출력하는 단계를 실행하도록 하는 명령어들을 저장하는 자동대화장치
The method of claim 8,
The memory may be generated by the processor when the at least one program is executed in the processor.
An automatic conversation device storing instructions for executing a step of outputting a polbeck response when the cosine similarity is smaller than a threshold value
심리 치료를 위한 자동대화방법에 있어서,
상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 텍스트를 수신하는 단계;
기계학습을 위하여 상기 수신된 텍스트를 전처리하여 데이터 셋을 획득하는 단계; 및
주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 상기 데이터 셋을 기계학습하여 기계학습모델을 획득하는 단계를 포함하고,
상기 수신된 텍스트는 상기 상담자와 상기 사용자의 대화 텍스트를 포함하는 제 1 텍스트 및 제 1 텍스트의 직후의 상담자의 응답 텍스트인 제 2 텍스트를 포함하고,
상기 기계학습모델을 획득하는 단계는,
제 1 텍스트와 제 2 텍스트의 상관 관계에 대한 기계학습모델을 획득하는 단계인 것을 특징으로 하는 자동대화방법.
In the automatic dialogue method for psychotherapy,
Receiving texts related to psychoanalysis among conversation texts of a counselor and a user;
Preprocessing the received text for machine learning to obtain a data set; And
Machine learning the data set using a hierarchical encoder-decoder with attention mechanism to obtain a machine learning model,
The received text includes a first text including a conversation text of the counselor and the user and a second text that is a response text of the counselor immediately after the first text,
Acquiring the machine learning model,
Obtaining a machine learning model for the correlation between the first text and the second text.
심리 치료를 위한 자동대화방법에 있어서,
상담자와 사용자의 대화 텍스트 중 심리분석과 관련된 제 1 텍스트를 수신하는 단계;
상기 수신된 제 1 텍스트를 전처리하여 데이터 셋을 획득하는 단계;
주목 메커니즘을 동반한 계층적 인코더-디코더 모형(hierarchical encoder-decoder with attention mechanism)을 이용하여 미리 학습된 기계학습모델에 기초하여 상기 수신된 제 1 텍스트로부터 제 2 텍스트를 자동으로 획득하는 단계; 및
상기 제 2 텍스트를 출력하는 단계를 포함하는 자동대화방법.
In the automatic dialogue method for psychotherapy,
Receiving a first text related to psychoanalysis among conversation texts of a counselor and a user;
Preprocessing the received first text to obtain a data set;
Automatically obtaining a second text from the received first text based on a previously learned machine learning model using a hierarchical encoder-decoder with attention mechanism; And
And outputting the second text.
제 11 항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 포함하는 컴퓨터 프로그램 제품.
A computer program product comprising a computer readable recording medium having recorded thereon a program for executing the method of claim 11 on a computer.
제 12 항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 포함하는 컴퓨터 프로그램 제품.
A computer program product comprising a computer readable recording medium having recorded thereon a program for executing the method of claim 12 on a computer.
KR1020180140321A 2018-04-27 2018-11-14 An apparatus for machine learning the psychological counseling data and a method thereof KR102199423B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20180049445 2018-04-27
KR1020180049445 2018-04-27

Publications (2)

Publication Number Publication Date
KR20190125154A true KR20190125154A (en) 2019-11-06
KR102199423B1 KR102199423B1 (en) 2021-01-06

Family

ID=68541703

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180140321A KR102199423B1 (en) 2018-04-27 2018-11-14 An apparatus for machine learning the psychological counseling data and a method thereof

Country Status (1)

Country Link
KR (1) KR102199423B1 (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102193656B1 (en) * 2020-01-20 2020-12-21 권경애 Recording service providing system and method supporting analysis of consultation contents
KR102208387B1 (en) * 2020-03-10 2021-01-28 주식회사 엘솔루 Method and apparatus for reconstructing voice conversation
KR20210098623A (en) * 2020-02-03 2021-08-11 한국과학기술원 Method and system for mimicking tone and style of real person
KR20210108293A (en) * 2020-02-25 2021-09-02 휴멜로 주식회사 Apparatus for generating text and method thereof
KR102332740B1 (en) * 2021-07-28 2021-12-01 주식회사 비플컨설팅 Method, apparatus and system for diagnosing patient's symptoms using deep learning
KR102359988B1 (en) * 2021-02-02 2022-02-09 모바일 엔트로피 주식회사 System for providing non face-to-face interactive visual collaboration service for city gas customer service
KR102372642B1 (en) * 2021-01-27 2022-03-08 아주대학교산학협력단 Apparatus and method for generating an automatic response
KR102385176B1 (en) 2021-11-16 2022-04-14 주식회사 하이 Psychology counseling device and method therefor
KR102458666B1 (en) * 2021-05-28 2022-10-26 주식회사 대도테크윈 An AI character service system, or it's method
KR102481216B1 (en) 2022-03-25 2022-12-28 주식회사 하이 Self-talk device and method therefor
KR102495725B1 (en) 2022-03-25 2023-02-07 주식회사 하이 Self-talk device and method therefor
WO2023095988A1 (en) * 2021-11-29 2023-06-01 한국과학기술원 Customized dialogue generation system for increasing reliability by considering personality information about dialogue counterpart, and method therefor
KR102590930B1 (en) 2023-02-01 2023-10-19 박정민 Service providing device, system, method and program for determining user`s psychological state
KR102598304B1 (en) * 2022-06-09 2023-11-03 주식회사 엘솔루 Speech to text conversion method and device
CN117216230A (en) * 2023-11-09 2023-12-12 智慧眼科技股份有限公司 AI psychological doctor dialogue interactive processing method, system, terminal and medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220133581A (en) 2021-03-25 2022-10-05 이병관 Mental care system using artificial intelligence
KR102327669B1 (en) 2021-04-01 2021-11-23 이병관 Mental care system using artificial intelligence

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012248065A (en) * 2011-05-30 2012-12-13 Nippon Telegr & Teleph Corp <Ntt> Angry feeling estimation device, angry feeling estimation method, and program thereof
KR20150065523A (en) * 2013-12-05 2015-06-15 포항공과대학교 산학협력단 Method and apparatus for providing counseling dialogue using counseling information
KR20150075191A (en) * 2013-12-24 2015-07-03 서강대학교산학협력단 Method of learning chatting data and system thereof
KR20180017342A (en) * 2016-08-09 2018-02-21 주식회사 피노텍 Robot automatic counselling method and system with determined scenario using machine-learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012248065A (en) * 2011-05-30 2012-12-13 Nippon Telegr & Teleph Corp <Ntt> Angry feeling estimation device, angry feeling estimation method, and program thereof
KR20150065523A (en) * 2013-12-05 2015-06-15 포항공과대학교 산학협력단 Method and apparatus for providing counseling dialogue using counseling information
KR20150075191A (en) * 2013-12-24 2015-07-03 서강대학교산학협력단 Method of learning chatting data and system thereof
KR20180017342A (en) * 2016-08-09 2018-02-21 주식회사 피노텍 Robot automatic counselling method and system with determined scenario using machine-learning

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102193656B1 (en) * 2020-01-20 2020-12-21 권경애 Recording service providing system and method supporting analysis of consultation contents
KR20210098623A (en) * 2020-02-03 2021-08-11 한국과학기술원 Method and system for mimicking tone and style of real person
KR20210108293A (en) * 2020-02-25 2021-09-02 휴멜로 주식회사 Apparatus for generating text and method thereof
KR102208387B1 (en) * 2020-03-10 2021-01-28 주식회사 엘솔루 Method and apparatus for reconstructing voice conversation
KR102372642B1 (en) * 2021-01-27 2022-03-08 아주대학교산학협력단 Apparatus and method for generating an automatic response
KR102359988B1 (en) * 2021-02-02 2022-02-09 모바일 엔트로피 주식회사 System for providing non face-to-face interactive visual collaboration service for city gas customer service
KR102458666B1 (en) * 2021-05-28 2022-10-26 주식회사 대도테크윈 An AI character service system, or it's method
KR102332740B1 (en) * 2021-07-28 2021-12-01 주식회사 비플컨설팅 Method, apparatus and system for diagnosing patient's symptoms using deep learning
KR102385176B1 (en) 2021-11-16 2022-04-14 주식회사 하이 Psychology counseling device and method therefor
KR20230072375A (en) 2021-11-16 2023-05-24 주식회사 하이 Psychology counseling device and method therefor
WO2023095988A1 (en) * 2021-11-29 2023-06-01 한국과학기술원 Customized dialogue generation system for increasing reliability by considering personality information about dialogue counterpart, and method therefor
KR102481216B1 (en) 2022-03-25 2022-12-28 주식회사 하이 Self-talk device and method therefor
KR102495725B1 (en) 2022-03-25 2023-02-07 주식회사 하이 Self-talk device and method therefor
KR102598304B1 (en) * 2022-06-09 2023-11-03 주식회사 엘솔루 Speech to text conversion method and device
KR102590930B1 (en) 2023-02-01 2023-10-19 박정민 Service providing device, system, method and program for determining user`s psychological state
CN117216230A (en) * 2023-11-09 2023-12-12 智慧眼科技股份有限公司 AI psychological doctor dialogue interactive processing method, system, terminal and medium

Also Published As

Publication number Publication date
KR102199423B1 (en) 2021-01-06

Similar Documents

Publication Publication Date Title
KR102199423B1 (en) An apparatus for machine learning the psychological counseling data and a method thereof
KR102222451B1 (en) An apparatus for predicting the status of user&#39;s psychology and a method thereof
US11929059B2 (en) Method, device, and computer readable storage medium for text-to-speech synthesis using machine learning on basis of sequential prosody feature
CN110782870B (en) Speech synthesis method, device, electronic equipment and storage medium
KR102401512B1 (en) Method and computer readable storage medium for performing text-to-speech synthesis using machine learning
US10559225B1 (en) Computer-implemented systems and methods for automatically generating an assessment of oral recitations of assessment items
US10665231B1 (en) Real time machine learning-based indication of whether audio quality is suitable for transcription
KR20230043084A (en) Method and computer readable storage medium for performing text-to-speech synthesis using machine learning based on sequential prosody feature
KR102062524B1 (en) Voice recognition and translation method and, apparatus and server therefor
KR20210070213A (en) Voice user interface
CN111897935B (en) Knowledge graph-based conversational path selection method and device and computer equipment
CN115599901B (en) Machine question-answering method, device, equipment and storage medium based on semantic prompt
Qian et al. A prompt-aware neural network approach to content-based scoring of non-native spontaneous speech
CN117711444B (en) Interaction method, device, equipment and storage medium based on talent expression
CN115376547B (en) Pronunciation evaluation method, pronunciation evaluation device, computer equipment and storage medium
US20220230626A1 (en) Creative work systems and methods thereof
KR20230120790A (en) Speech Recognition Healthcare Service Using Variable Language Model
CN113012685B (en) Audio recognition method and device, electronic equipment and storage medium
CN114420159A (en) Audio evaluation method and device and non-transient storage medium
Zhan et al. Application of machine learning and image target recognition in English learning task
KR102408638B1 (en) Method and system for evaluating the quality of recordingas
Imam et al. The Computation of Assimilation of Arabic Language Phonemes
CN115186083B (en) Data processing method, device, server, storage medium and product
CN113555006B (en) Voice information identification method and device, electronic equipment and storage medium
Andayani Investigating the Impacts of LSTM-Transformer on Classification Performance of Speech Emotion Recognition

Legal Events

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