KR102334583B1 - A method and apparatus for question-answering on educational contents in interactive query system - Google Patents

A method and apparatus for question-answering on educational contents in interactive query system Download PDF

Info

Publication number
KR102334583B1
KR102334583B1 KR1020190179110A KR20190179110A KR102334583B1 KR 102334583 B1 KR102334583 B1 KR 102334583B1 KR 1020190179110 A KR1020190179110 A KR 1020190179110A KR 20190179110 A KR20190179110 A KR 20190179110A KR 102334583 B1 KR102334583 B1 KR 102334583B1
Authority
KR
South Korea
Prior art keywords
query
user
embedding vector
response
content
Prior art date
Application number
KR1020190179110A
Other languages
Korean (ko)
Other versions
KR20210085728A (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 (주)위드캣
Priority to KR1020190179110A priority Critical patent/KR102334583B1/en
Publication of KR20210085728A publication Critical patent/KR20210085728A/en
Application granted granted Critical
Publication of KR102334583B1 publication Critical patent/KR102334583B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3347Query execution using vector based model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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
    • 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/20Education

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Human Resources & Organizations (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Biomedical Technology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 명세서는 전자 장치에 의하여 수행되는 질의 응답 방법에 있어서, 컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하는 단계; 사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하는 단계; 상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하는 질의 응답 방법을 개시한다.The present specification provides a method for answering a question performed by an electronic device, the method comprising: generating an embedding vector for each part included in content using a neural network; generating an embedding vector for a user query using the neural network; Disclosed is a method for answering a question including determining a portion of the content having an embedding vector value most similar to an embedding vector for the user query as a response to the user query.

Description

대화식 질의 시스템에서 교육 컨텐츠에 관한 학습자 질의에 응답하기 위한 질의 응답 방법 및 질의 응답 시스템 {A method and apparatus for question-answering on educational contents in interactive query system}A question-answering method and question-answering system for answering learners' questions about educational contents in an interactive questioning system {A method and apparatus for question-answering on educational contents in interactive query system}

본 발명은 사용자 질의에 대한 응답을 사용자에게 제시하는 방법에 관한 것이다.The present invention relates to a method for presenting a user with a response to a user query.

학습 과정 중에 학습자는 모르는 내용을 일일이 서적이나 인터넷을 통해 찾아봐야 하는 불편함을 겪고 있다. 이러한 검색에 소모되는 시간이 많다 보면 학습자들은 교육 내용을 학습하는 것 보다 모르는 내용을 검색하는 데에 더 많은 시간을 보내게 되는 경우가 종종 있다. 이러한 과정은 학습자가 학습 과정에서 흥미를 놓치게 만드는 일 요인이다.During the learning process, learners experience the inconvenience of having to search through books or the Internet for information they do not know. Given that a lot of time is spent on such searches, learners often spend more time searching for content they don't know than learning the educational content. This process is one factor that makes the learner lose interest in the learning process.

모르는 내용을 찾아보는 시간을 줄이기 위해 개인 교습이나, 강사 또는 인터넷에 모르는 내용을 질의하고 그에 대한 답변을 기다리는 서비스가 존재한다. 그러나 이와 같은 서비스는 사람이 직접 응답을 제공하는 점에서 실시간성이 떨어지고, 서비스의 비용 또한 과다하다는 문제점을 가지고 있다.In order to reduce the time to search for unknown content, private tutoring, a service that asks an instructor or the Internet for unknown content and waits for an answer exists. However, such a service has problems in that real-time performance is poor in that a person directly provides a response, and the cost of the service is also excessive.

또한, 인터넷을 활용하여 정보를 검색하는 방법은 사용자마다 검색식을 구성하는 방식이 달라, 검색 효율을 장담할 수 없다는 문제점이 존재한다. In addition, there is a problem in that search efficiency cannot be guaranteed because the method of constructing a search formula is different for each user in a method of searching for information using the Internet.

이러한 문제를 해결하기 위하여, 한국공개특허 제10-2011-0134909호 등에서 라벨링된 텍스트 문서 데이터 베이스를 검색하는 방법들이 제시되어 있다.In order to solve this problem, methods for searching a labeled text document database are proposed in Korean Patent Application Laid-Open No. 10-2011-0134909 or the like.

그러나, 위와 같은 방법들 또한, 특정 정보를 검색하기 위하여 별도의 검색엔진을 사용하여야 한다는 불편함을 그대로 가지고 있다.However, the above methods also have the inconvenience of using a separate search engine to search for specific information.

본 명세서에서는 대화식 질의 시스템에서 교육 컨텐츠에 관한 학습자 질의를 효과적으로 제시하는 방법을 제공한다.The present specification provides a method for effectively presenting a learner's query regarding educational content in an interactive query system.

상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 전자 장치에 의하여 수행되는 질의 응답 방법은 컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하는 단계; 사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하는 단계; 상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함한다.In order to solve the above problem, a question answering method performed by an electronic device according to an embodiment of the present invention includes generating an embedding vector for each part included in content using a neural network; generating an embedding vector for a user query using the neural network; and determining, as a response to the user query, a portion of the content having an embedding vector value most similar to an embedding vector for the user query.

상기 컨텐츠에 대하여 생성되는 임베딩 벡터는 상기 컨텐츠에 포함된 각 구(phrase)에 대하여 생성되고, 상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 부분은 상기 컨텐츠에 포함된 각 구 단위로 결정될 수 있다.An embedding vector generated for the content is generated for each phrase included in the content, and the part having the embedding vector value most similar to the embedding vector for the user query is for each phrase included in the content. can be decided.

상기 컨텐츠에는 학습 데이터가 교육과정에 따라 순차적으로 분류되어 포함되어 있으며, 상기 각 부분에 대한 임베딩 벡터는 상기 교육 컨텐츠의 분류 순서에 기초하여 결정될 수 있다.The content includes sequentially classified learning data according to a curriculum, and an embedding vector for each part may be determined based on a classification order of the educational content.

상기 사용자 질의에 대한 임베딩 벡터는 상기 사용자 질의 이전에 입력된 사용자 질의에 기초하여 결정될 수 있다.The embedding vector for the user query may be determined based on a user query input before the user query.

상기 사용자 질의는 시계열적으로 입력되며, 현재 사용자 질의에 대한 임베딩 벡터는 상기 현재 사용자 질의 이전에 입력된 이전 사용자 질의를 구성하는 토큰의 벡터 값과 현재 사용자 질의를 구성하는 토큰의 벡터값을 연산하여 계산될 수 있다.The user query is inputted in time series, and the embedding vector for the current user query is calculated by calculating the vector value of the token constituting the previous user query input before the current user query and the vector value of the token constituting the current user query. can be calculated.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 전자 장치에 의하여 수행되는 신경망 훈련 방법은 훈련용 질의를 입력으로 하여 신경망의 제 1 임베딩 벡터를 생성하는 단계; 컨텐츠 중 상기 훈련용 질의의 응답에 대응하는 부분을 입력으로 하여 상기 신경망의 제 2 임베딩 벡터를 생성하는 단계; 및 상기 제 1 임베딩 벡터와 상기 제 2 임베딩 벡터의 유사도가 미리 설정된 값을 초과할 때까지 상기 신경망의 파라미터를 수정하는 단계를 포함한다.In addition, in order to solve the above problem, a neural network training method performed by an electronic device according to an embodiment of the present invention includes generating a first embedding vector of a neural network by receiving a training query as an input; generating a second embedding vector of the neural network by inputting a portion of the content corresponding to the response to the training query; and modifying the parameters of the neural network until a similarity between the first embedding vector and the second embedding vector exceeds a preset value.

상기 컨텐츠에는 학습 데이터가 교육과정에 따라 순차적으로 분류되어 포함되고, 상기 제 2 임베딩 벡터는 상기 컨텐츠에 포함된 구(phrase)에 대하여 생성되고, 상기 제 2 임베딩 벡터는 상기 교육 컨텐츠의 분류 순서에 기초하여 결정되며, 상기 제 1 임베딩 벡터는 상기 훈련용 질의 전체 부분에 기초하여 생성될 수 있다. 상기 제 2 임베딩 벡터는 밀집 벡터 및 희소 벡터를 연산하여 생성될 수 있다.The content includes sequentially classified learning data according to a curriculum, the second embedding vector is generated for a phrase included in the content, and the second embedding vector is in the order of classification of the educational content. Based on the determination, the first embedding vector may be generated based on the entire part of the training query. The second embedding vector may be generated by calculating a dense vector and a sparse vector.

상기 제 2 임베딩 벡터는 상기 구를 구성하는 시작 토큰의 벡터 및 상기 구를 구성하는 종료 토큰의 벡터를 포함할 수 있다.The second embedding vector may include a vector of start tokens constituting the sphere and a vector of end tokens constituting the sphere.

상기 제 2 임베딩 벡터는 상기 시작 토큰과 상기 종료 토큰의 일관성을 나타내는 파라미터를 더 포함할 수 있다.The second embedding vector may further include a parameter indicating consistency between the start token and the end token.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 전자 장치에 의하여 수행되는 질의 응답 방법은 사용자 질의의 질의 유형을 판별하는 단계; 상기 질의 유형이 제 1 유형인 경우 질의의 벡터 유사도에 기반한 검색 결과인 제 1 응답을 생성하는 단계; 상기 질의 유형이 제 2 유형인 경우 질의의 텍스트 유사도에 기반한 검색 결과인 제 2 응답을 생성하는 단계; 및 상기 제 1 응답 및 제 2 응답의 신뢰도 평가 결과에 따라 상기 질의에 대한 응답을 결정하는 단계를 포함하고, 제 1 응답을 생성하는 단계는, 컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하는 단계; 사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하는 단계; 및 상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함한다.In addition, in order to solve the above problem, a method for answering a question performed by an electronic device according to an embodiment of the present invention includes: determining a query type of a user query; generating a first response that is a search result based on the vector similarity of the query when the query type is the first type; generating a second response that is a search result based on the text similarity of the query when the query type is the second type; and determining a response to the query according to the reliability evaluation results of the first response and the second response, and generating the first response includes using an embedding vector for each part included in the content with a neural network. generating using; generating an embedding vector for a user query using the neural network; and determining, as a response to the user query, a portion of the content having an embedding vector value most similar to an embedding vector for the user query.

상기 제 1 유형은 상기 질의 유형이 육하원칙에 대응되는 유형이고, 제 2 유형은 상기 질의 유형이 육하원칙에 대응되지 않는 유형일 수 있다.The first type may be a type in which the query type corresponds to the six-fold rule, and the second type may be a type in which the query type does not correspond to the six-fold rule.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 전자 장치는 프로세서; 및 상기 프로세서에 의하여 실행되는 명령어를 저장하는 메모리를 포함하고, 상기 프로세서는, 컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하고, 사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하며, 상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정한다.In addition, an electronic device according to an embodiment of the present invention for solving the above problem includes: a processor; and a memory for storing instructions executed by the processor, wherein the processor generates an embedding vector for each part included in the content using a neural network, and generates an embedding vector for a user query using the neural network and determining a portion of the content having an embedding vector value most similar to an embedding vector for the user query as a response to the user query.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 컴퓨터에 의하여 실행되는 컴퓨터 프로그램이 기록된 컴퓨터 판독 가능 기록매체는 컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하는 단계; 사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하는 단계; 상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하여 실행시킬 수 있다.In addition, the computer-readable recording medium on which a computer program executed by a computer is recorded according to an embodiment of the present invention for solving the above problem is to generate an embedding vector for each part included in the content using a neural network. step; generating an embedding vector for a user query using the neural network; and determining, as a response to the user query, a portion of the content having an embedding vector value most similar to an embedding vector for the user query.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 컴퓨터에 의하여 실행되는 컴퓨터 프로그램은 컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하는 단계; 사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하는 단계; 상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하여 실행시킬 수 있다.In addition, a computer program executed by a computer according to an embodiment of the present invention for solving the above problem includes generating an embedding vector for each part included in the content using a neural network; generating an embedding vector for a user query using the neural network; and determining, as a response to the user query, a portion of the content having an embedding vector value most similar to an embedding vector for the user query.

본 명세서에서는 대화식 질의 시스템에서 교육 컨텐츠에 관한 학습자 질의를 효과적으로 제시하는 방법을 제공한다.The present specification provides a method for effectively presenting a learner's query regarding educational content in an interactive query system.

도 1은 본 발명의 일 실시 예에 따른 교육 시스템을 도시하는 블록도이다.
도 2는 본 발명의 일 실시 예에 따른 단말과 서버의 구성을 도시하는 블록도이다.
도 3은 본 발명의 일 실시 예에 따른 서버의 구성을 도시하는 블록도이다.
도 4는 본 발명의 일 실시 예에 따른 서버가 사용자 질의에 대한 응답을 제시하는 예를 도시하는 블록도이다.
도 5는 본 발명의 일 실시 예에 따른 서버에 의한 질의 응답 방법을 설명하는 순서도이다.
도 6는 본 발명의 일 실시 예에 따른 신경망을 활용하여 사용자 질의에 대한 응답을 생성하는 방법을 설명하는 순서도이다.
도 7은 본 발명의 일 실시 예에 따른 질의 응답을 수행하기 위한 응답 탐색 신경망을 훈련하는 과정을 설명하는 순서도이다.
1 is a block diagram illustrating an education system according to an embodiment of the present invention.
2 is a block diagram illustrating the configuration of a terminal and a server according to an embodiment of the present invention.
3 is a block diagram illustrating the configuration of a server according to an embodiment of the present invention.
4 is a block diagram illustrating an example in which a server presents a response to a user query according to an embodiment of the present invention.
5 is a flowchart illustrating a method for answering a question by a server according to an embodiment of the present invention.
6 is a flowchart illustrating a method of generating a response to a user query by using a neural network according to an embodiment of the present invention.
7 is a flowchart illustrating a process of training a response search neural network for performing a question and answer according to an embodiment of the present invention.

이하의 내용은 단지 발명의 원리를 예시한다. 그러므로 당업자는 비록 본 명세서에 명확히 설명되거나 도시 되지 않았지만 발명의 원리를 구현하고 발명의 개념과 범위에 포함된 다양한 장치를 발명할 수 있는 것이다. 또한, 본 명세서에 열거된 모든 조건부 용어 및 실시 예들은 원칙적으로, 발명의 개념이 이해되도록 하기 위한 목적으로만 명백히 의도되고, 이와 같이 특별히 열거된 실시 예들 및 상태들에 제한적이지 않는 것으로 이해되어야 한다. The following is merely illustrative of the principles of the invention. Therefore, those skilled in the art can devise various devices that, although not explicitly described or shown herein, embody the principles of the invention and are included in the spirit and scope of the invention. In addition, it should be understood that all conditional terms and examples listed herein are, in principle, expressly intended only for the purpose of understanding the inventive concept and are not limited to the specifically enumerated embodiments and states as such. .

상술한 목적, 특징 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해질 것이며, 그에 따라 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. The above-described objects, features and advantages will become more apparent through the following detailed description in relation to the accompanying drawings, and accordingly, those of ordinary skill in the art to which the invention pertains will be able to easily practice the technical idea of the invention. .

명세서 및 청구범위에서 "제 1", "제 2", "제 3" 및 "제 4" 등의 용어는, 만약 있는 경우, 유사한 구성요소 사이의 구분을 위해 사용되며, 반드시 그렇지는 않지만 특정 순차 또는 발생 순서를 기술하기 위해 사용된다. 그와 같이 사용되는 용어는 여기에 기술된 본 발명의 실시예가, 예컨대, 여기에 도시 또는 설명된 것이 아닌 다른 시퀀스로 동작할 수 있도록 적절한 환경하에서 호환 가능한 것이 이해될 것이다. 마찬가지로, 여기서 방법이 일련의 단계를 포함하는 것으로 기술되는 경우, 여기에 제시된 그러한 단계의 순서는 반드시 그러한 단계가 실행될 수 있는 순서인 것은 아니며, 임의의 기술된 단계는 생략될 수 있고/있거나 여기에 기술되지 않은 임의의 다른 단계가 그 방법에 부가 가능할 것이다. In the specification and claims, terms such as "first," "second," "third," and "fourth," are used, if any, to distinguish between like elements and, if not necessarily, in a specific sequence. or to describe the order of occurrence. It will be understood that the terms so used are interchangeable under appropriate circumstances to enable the embodiments of the invention described herein to operate, for example, in sequences other than those shown or described herein. Likewise, where methods are described herein as comprising a series of steps, the order of those steps presented herein is not necessarily the order in which those steps may be performed, and any described steps may be omitted and/or Any other steps not described may be added to the method.

또한 명세서 및 청구범위의 "왼쪽", "오른쪽", "앞", "뒤", "상부", "바닥", "위에", "아래에" 등의 용어는, 설명을 위해 사용되는 것이며, 반드시 불변의 상대적 위치를 기술하기 위한 것은 아니다. 그와 같이 사용되는 용어는 여기에 기술된 본 발명의 실시예가, 예컨대, 여기에 도시 또는 설명된 것이 아닌 다른 방향으로 동작할 수 있도록 적절한 환경하에서 호환 가능한 것이 이해될 것이다. 여기서 사용된 용어 "연결된"은 전기적 또는 비 전기적 방식으로 직접 또는 간접적으로 접속되는 것으로 정의된다. 여기서 서로 "인접하는" 것으로 기술된 대상은, 그 문구가 사용되는 문맥에 대해 적절하게, 서로 물리적으로 접촉하거나, 서로 근접하거나, 서로 동일한 일반적 범위 또는 영역에 있는 것일 수 있다. 여기서 "일실시예에서"라는 문구의 존재는 반드시 그런 것은 아니지만 동일한 실시예를 의미한다.Also, terms such as "left", "right", "front", "behind", "top", "bottom", "above", "below" in the specification and claims are used for descriptive purposes, It is not necessarily intended to describe an invariant relative position. It will be understood that the terms so used are interchangeable under appropriate circumstances to enable the embodiments of the invention described herein to operate otherwise than, for example, as shown or described herein. As used herein, the term “connected” is defined as being directly or indirectly connected in an electrical or non-electrical manner. Objects described herein as being "adjacent" to one another may be in physical contact with one another, in proximity to one another, or in the same general scope or area as appropriate for the context in which the phrase is used. The presence of the phrase “in one embodiment” herein refers to the same, but not necessarily, embodiment.

또한 명세서 및 청구범위에서 '연결된다', '연결하는', '체결된다', '체결하는', '결합된다', '결합하는' 등과 이런 표현의 다양한 변형들의 지칭은 다른 구성요소와 직접적으로 연결되거나 다른 구성요소를 통해 간접적으로 연결되는 것을 포함하는 의미로 사용된다. In addition, in the specification and claims, references to 'connected', 'connecting', 'fastened', 'fastening', 'coupled', 'coupled', etc., and various variations of these expressions, refer to other elements directly It is used in the sense of being connected or indirectly connected through other components.

또한, 본 명세서에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다.In addition, the suffixes "module" and "part" for components used in this specification are given or used in consideration of ease of writing the specification, and do not have a meaning or role distinct from each other by themselves.

또한 본 명세서에서 사용된 용어들은 실시예를 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 '포함한다(comprise)' 및/또는 '포함하는(comprising)'은 언급된 구성요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.In addition, the terms used herein are for the purpose of describing the embodiments and are not intended to limit the present invention. In this specification, the singular also includes the plural unless specifically stated otherwise in the phrase. As used herein, 'comprise' and/or 'comprising' means that a referenced component, step, operation and/or element is the presence of one or more other components, steps, operations and/or elements. or addition is not excluded.

또한, 발명을 설명함에 있어서 발명과 관련된 공지 기술에 대한 구체적인 설명이 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에 그 상세한 설명을 생략하기로 한다. 이하에는 첨부한 도면을 참조하여 본 발명의 바람직한 실시 예에 대해 상세하게 설명한다.In addition, in the description of the invention, if it is determined that a detailed description of a known technology related to the invention may unnecessarily obscure the gist of the invention, the detailed description thereof will be omitted. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시 예에 따른 교육 시스템을 도시하는 블록도이다. 일 실시 예에 따른 단말(100)은 학습자로부터 입력받은 질의를 서버(200)로 전송하고, 서버(200)로부터 질의에 대한 응답을 수신한다. 단말(100)은 서버(200)로부터 수신한 질의의 응답에 기초하여 사용자의 질의에 대한 답변을 사용자에게 제공한다.1 is a block diagram illustrating an education system according to an embodiment of the present invention. The terminal 100 according to an embodiment transmits a query input from a learner to the server 200 and receives a response to the query from the server 200 . The terminal 100 provides an answer to the user's query to the user based on the query response received from the server 200 .

단말(100)은 일반적으로 사용되는 스마트폰, 타블렛, 컴퓨터와 같은 범용 단말기일 수 있다. 본 발명의 일 실시 예에 따른 단말(100)은 도 2와 같이 프로세서(1), 메모리(2), 통신부(3), 사용자 인터페이스(4) 및 데이터베이스(5)를 포함하여 구성될 수 있다. 메모리(2)에는 본 발명의 일 실시 예에 따른 질의 응답 방법을 수행하기 위하여 단말(100)에 필요한 프로그램이 저장되어 있을 수 있다. 예를 들어, 메모리(2)에는 사용자의 입력을 획득하고, 이에 따른 질의를 생성하여 서버(200)로 전송하는 어플리케이션 프로그램이 저장되어 있을 수 있다. 또한, 메모리(2)에는 학습자의 교육에 필요한 학습 데이터가 교육과정에 따라 저장되어 있을 수 있다.The terminal 100 may be a general-purpose terminal such as a generally used smart phone, tablet, or computer. The terminal 100 according to an embodiment of the present invention may include a processor 1 , a memory 2 , a communication unit 3 , a user interface 4 , and a database 5 as shown in FIG. 2 . The memory 2 may store a program necessary for the terminal 100 in order to perform the question answering method according to an embodiment of the present invention. For example, the memory 2 may store an application program that obtains a user's input, generates a query according to the user's input, and transmits it to the server 200 . In addition, the memory 2 may store learning data necessary for the education of the learner according to the curriculum.

프로세서(1)는 메모리(2)에 저장된 프로그램에 따라 데이터를 처리하여 통신부(3), 사용자 인터페이스(4) 및 데이터베이스(5)를 제어함으로써 본 발명의 일 실시 예에 따른 질의 응답 방법을 수행할 수 있다.The processor 1 processes data according to a program stored in the memory 2 to control the communication unit 3, the user interface 4, and the database 5 to perform the question answering method according to an embodiment of the present invention. can

본 발명의 일 실시 예에 따른 서버(200) 또한 도 2와 같이 프로세서(1), 메모리(2), 통신부(3), 사용자 인터페이스(4) 및 데이터베이스(5)를 포함하여 구성될 수 있다. 메모리(2)에는 본 발명의 일 실시 예에 따른 질의 응답 방법을 수행하기 위하여 서버(200)에 필요한 프로그램이 저장되어 있을 수 있다. 예를 들어, 메모리(2)에는 단말(100)로부터 사용자 질의를 획득하고, 이에 따른 응답을 생성하여 단말(100)로 전송하는 프로그램이 저장되어 있을 수 있다. 이러한 프로그램의 예로, 사용자 질의에 대한 응답을 생성하는 QA엔진 프로그램, 사용자 질의와 그에 대한 응답을 채팅 형식으로 사용자에게 제공하기 위한 챗봇 엔진 프로그램, 사용자 질의에 대한 응답을 제공하기 위한 교육 컨텐츠를 관리하는 교육 컨텐츠 관리 프로그램, 외부 네트워크와 데이터를 주고 받기 위한 인터페이스 모듈 프로그램 등이 포함될 수 있다. 서버(200)의 프로세서(1)는 메모리(2)에 저장된 프로그램에 따라 데이터를 처리하여 통신부(3), 사용자 인터페이스(4) 및 데이터베이스(5)를 제어함으로써 본 발명의 일 실시 예에 따른 질의 응답 방법을 수행할 수 있다.The server 200 according to an embodiment of the present invention may also include a processor 1 , a memory 2 , a communication unit 3 , a user interface 4 , and a database 5 as shown in FIG. 2 . The memory 2 may store a program necessary for the server 200 to perform the question answering method according to an embodiment of the present invention. For example, the memory 2 may store a program for obtaining a user query from the terminal 100 , generating a response according to it, and transmitting it to the terminal 100 . Examples of such programs include a QA engine program that generates responses to user queries, a chatbot engine program that provides user queries and responses to users in a chatting format, and a training content management program that provides responses to user queries. An educational content management program, an interface module program for exchanging data with an external network, etc. may be included. The processor 1 of the server 200 processes data according to the program stored in the memory 2 to control the communication unit 3, the user interface 4, and the database 5, thereby making a query according to an embodiment of the present invention. The response method can be performed.

한편, 본 발명의 일 실시 예에 따른 서버(200)는 도 3과 같이 모듈 단위로 구성될 수도 있다. 서버(200)는 기능단위에 따라 QA엔진(210), 챗봇엔진(220), 데이터베이스(230) 및 인터페이스 모듈(240)으로 구성될 수도 있다.Meanwhile, the server 200 according to an embodiment of the present invention may be configured in a module unit as shown in FIG. 3 . The server 200 may be composed of a QA engine 210 , a chatbot engine 220 , a database 230 , and an interface module 240 according to functional units.

QA엔진(210)은 신경망 모델에 기초하여 사용자 질의에 대응하는 응답을 대규모 문서에서 추출하기 위하여 신경망을 학습시키고 관리할 수 있다. QA 엔진은 대규모 인접이웃 검색을 수행하기 위한 적절한 신경망 모델을 선택하여 운용할 수 있다.The QA engine 210 may train and manage a neural network in order to extract a response corresponding to a user query from a large-scale document based on the neural network model. The QA engine can select and operate an appropriate neural network model for performing a large-scale neighbor search.

QA 엔진은 대상 컨텐츠에서 질의에 대응하는 응답을 추출하기 위하여 대상 컨텐츠의 텍스트에 대한 임베딩 벡터(embedding vector)를 구(phrase)단위로 생성할 수 있다. QA 엔진은 대상 컨텐츠에서 질의에 대응하는 응답을 추출하기 위하여 대상 컨텐츠를 구(phrase)단위로 인덱싱하거나 문서 단위로 인덱싱할 수 있다. QA 엔진은 사용자 질의에 대한 임베딩 벡터를 생성할 수 있다. QA 엔진은 사용자 질의에 대한 임베딩 벡터와, 사용자 질의에 대응하는 응답으로 선택될 수 있는 대상 컨텐츠의 구의 임베딩 벡터가 설정된 기준 보다 높은 유사도(i.e. 코사인 유사도)를 가지도록 신경망을 훈련할 수 있다.The QA engine may generate an embedding vector for the text of the target content in a phrase unit in order to extract a response corresponding to a query from the target content. The QA engine may index target content in a phrase unit or document unit in order to extract a response corresponding to a query from the target content. The QA engine may generate an embedding vector for a user query. The QA engine can train the neural network so that the embedding vector for the user query and the embedding vector of the sphere of the target content that can be selected as a response to the user query have a similarity (i.e. cosine similarity) higher than a set standard.

또한, 일 실시 예에 따른 QA엔진(210)은 BERT(Bidirectional Encoder Representations from Transformers) 모델을 이용함으로써 교육 컨텐츠의 맥락에 기반하여 교육 컨텐츠를 구성하는 구(phrase)의 임베딩 벡터를 생성할 수 있다. 또한, QA엔진(210)은 BERT 모델을 이용하여 사용자 질의 이전의 대화 내역을 맥락에 기반하여 사용자 질의에 대한 임베딩 벡터를 생성할 수 있다. 이로써 QA엔진(210)은 사용자의 연속 대화형 질의-응답 이력에 기초하여 연속적인 응답을 제공할 수 있다.In addition, the QA engine 210 according to an embodiment may generate an embedding vector of a phrase constituting the educational content based on the context of the educational content by using a BERT (Bidirectional Encoder Representations from Transformers) model. Also, the QA engine 210 may generate an embedding vector for the user query based on the context of the conversation history before the user query using the BERT model. Accordingly, the QA engine 210 may provide a continuous response based on the user's continuous interactive question-and-answer history.

챗봇엔진(220)은 단말(100)로부터 수신되는 사용자 입력을 분석하여 사용자 입력에 대한 대답을 단말(100)로 전송한다. 챗봇엔진(220)은 자연어로 구성된 사용자 입력을 식별하기 위한 기본적인 자연어 처리 프로세스를 수행할 수 있다. 예를들어, 챗봇엔진(220)은 자연어로 구성된 사용자 입력에서 조사나 불용어를 제거하는 전처리를 수행하여 토큰을 획득할 수 있다. 그리고 주어진 토큰을 이용하여 질의를 구성하는 키워드와 질의의 유형을 인식할 수 있다.The chatbot engine 220 analyzes the user input received from the terminal 100 and transmits an answer to the user input to the terminal 100 . The chatbot engine 220 may perform a basic natural language processing process for identifying a user input composed of natural language. For example, the chatbot engine 220 may acquire a token by performing pre-processing of removing research or stopwords from a user input composed of natural language. And by using the given token, keywords constituting the query and the type of query can be recognized.

챗봇엔진(220)은 사용자로부터 입력된 사용자 질의와, 챗봇엔진(220)이 단말(100)로 전송한 응답에 따라 구성되는 대화를 분석함으로써 대화의 맥락을 파악할 수 있다. 챗봇엔진(220)은 사용자의 이전 질문에 기초하여 대화의 맥락을 파악하고, 맥락에 근거한 응답을 생성할 수 있다. 예를들어, 챗봇엔진(220)은 QA 엔진(210)으로 대화 내역을 보내고, QA 엔진(210)이 생성한 응답을 단말(100)로 전송할 수 있다.The chatbot engine 220 may understand the context of the conversation by analyzing a conversation formed according to a user query input from the user and a response transmitted by the chatbot engine 220 to the terminal 100 . The chatbot engine 220 may identify the context of the conversation based on the user's previous question and generate a response based on the context. For example, the chatbot engine 220 may send a conversation history to the QA engine 210 , and may transmit a response generated by the QA engine 210 to the terminal 100 .

챗봇엔진(220)은 사용자 입력 중에 포함된 사용자 질의에 대응하는 응답을 생성하기 위하여 QA엔진(210)을 활용하여 신경망에 기반한 제 1 응답을 생성할 수 있다. 또한, 챗봇엔진(220)은 데이터베이스(230)에 저장된 지식베이스의 질의와 답변 쌍에 기초하여 룰베이스에 기반한 제 2 응답을 생성할 수도 있다. 챗봇엔진(220)은 사용자 질의에 대한 적절한 응답을 생성하기 위하여, 제 1 응답과 제 2 응답을 병합하여 단말(100)로 제공할 수 있다. 일 실시 예에서, 챗봇엔진(220)은 제 1 응답과 제 2 응답 중에서 상기 사용자 질의에 대한 답변으로써의 신뢰도가 더 높은 응답을 선택하여 단말(100)로 전송할 수 있다. 일 실시 예에서, 데이터베이스(230)에는 특정 사용자 질의에 대한 제 1 응답과 제 2 응답의 신뢰도 평가 결과가 저장되어 있을 수 있다. 챗봇엔진(220)은 신뢰도 평가 값이 높은 응답을 선택하여 단말(100)로 전송할 수 있다.The chatbot engine 220 may generate a first response based on a neural network by utilizing the QA engine 210 to generate a response corresponding to a user query included in the user input. Also, the chatbot engine 220 may generate a second response based on the rule base based on a pair of questions and answers of the knowledge base stored in the database 230 . The chatbot engine 220 may provide the terminal 100 by merging the first response and the second response in order to generate an appropriate response to the user's query. In an embodiment, the chatbot engine 220 may select a response having a higher reliability as an answer to the user query from among the first response and the second response and transmit it to the terminal 100 . In an embodiment, the database 230 may store reliability evaluation results of the first response and the second response to a specific user query. The chatbot engine 220 may select a response having a high reliability evaluation value and transmit it to the terminal 100 .

일 실시 예에서, 챗봇엔진(220)은 제 1 응답과 제 2 응답의 신뢰도 평가를 위하여, 사용자 질의에 대한 제 1 응답과 제 2 응답을 단말(100)을 통해 사용자에게 제공한 이후, 사용자의 신뢰도 평가 결과를 수신할 수 있다. 이를 위하여, 챗봇엔진(220)은 응답이 포함된 문서의 일 부분을 사용자에게 응답의 근거자료로 제시할 수 있다. 나아가, 도 4와 같이 챗봇엔진(220)은 응답과, 응답이 표현된 문서의 일부분과 함께 해당 응답의 신뢰도 점수를 같이 단말(100)로 전송할 수도 있다.In one embodiment, the chatbot engine 220 provides the first response and the second response to the user's query to the user through the terminal 100 to evaluate the reliability of the first response and the second response, and then Reliability evaluation results may be received. To this end, the chatbot engine 220 may present a part of the document including the response to the user as the basis for the response. Furthermore, as shown in FIG. 4 , the chatbot engine 220 may transmit the response and the reliability score of the corresponding response together with a portion of the document in which the response is expressed to the terminal 100 .

챗봇엔진(220)은 사용자의 신뢰도 평가 결과에 기초하여 사용자 질의에 대한 제 1 응답과 제 2 응답의 신뢰도를 저장할 수 있다. 챗봇엔진(220)은 그 후에 수신되는 사용자 질의(다른 사용자에 의한 질의일 수도 있다)에 대하여 기 저장된 신뢰도 평가 값에 기초하여 응답을 선택할 수 있다.The chatbot engine 220 may store the reliability of the first response and the second response to the user's query based on the user's reliability evaluation result. The chatbot engine 220 may then select a response based on a pre-stored reliability evaluation value for the received user query (which may be a query from another user).

데이터베이스(230)는 서버(200)가 단말(100)에 사용자 질의에 대응하는 응답을 제공하기 위한 컨텐츠를 저장한다. 사용자 질의에 대응하는 컨텐츠는 QA 엔진에 기반하여 선정된 QA 컨텐츠와 질의-답변 대응 테이블에 의하여 선정된 지식 베이스 기반 컨텐츠로 구성될 수 있다.The database 230 stores content for the server 200 to provide a response corresponding to a user's query to the terminal 100 . The content corresponding to the user's query may be composed of QA content selected based on the QA engine and knowledge base-based content selected by the query-answer correspondence table.

인터페이스 모듈(240)은 서버(200)를 제어하기 위한 서버 관리자로부터의 입력을 획득하거나 서버 관리자에게 정보를 제공하기 위한 사용자 인터페이스 모듈과 다른 플랫폼 또는 시스템과 데이터를 교환하기 위한 시스템 인터페이스 모듈로 구성될 수 있다.The interface module 240 may be composed of a user interface module for obtaining an input from the server manager for controlling the server 200 or providing information to the server manager, and a system interface module for exchanging data with another platform or system. can

사용자 인터페이스는 사용자로부터 입력을 받기 위한 키보드, 마우스, 터치스크린, 스피커등이 포함될 수 있으며, 사용자에게 정보를 제공하기 위한 모니터, 스피커, 진동모듈 등이 포함될 수도 있다.The user interface may include a keyboard, a mouse, a touch screen, a speaker, etc. for receiving an input from a user, and may include a monitor, a speaker, a vibration module, etc. for providing information to the user.

시스템 인터페이스는 다른 시스템의 챗봇 플랫폼 또는 음성인식 플랫폼에 접근하여 데이터를 교환하기 위한 처리를 수행하기 위한 프로그램으로 구성될 수 있다. 예를 들어, 시스템 인터페이스는 카카오톡, 구글 홈 & 어시스턴트와 같은 외부 플랫폼을 단말(100)로 취급하여 본 발명에 따른 질의 응답을 수행할 수 있도록 인터페이싱을 수행할 수 있다.The system interface may be configured as a program for performing processing for exchanging data by accessing a chatbot platform or a voice recognition platform of another system. For example, the system interface may perform interfacing so that an external platform such as KakaoTalk, Google Home & Assistant may be treated as the terminal 100 to perform a query and answer according to the present invention.

또한, 시스템 인터페이스는 외부 웹기반 데이터베이스로부터 실시간으로 컨텐츠를 업데이트 받을 수 있도록 인터페이싱을 수행할 수 있다. 예를들어, 시스템 인터페이스는 특정 검색어에 대한 검색 결과를 위키피디아 등으로부터 획득할 수 있도록 인터페이싱을 수행할 수 있다.In addition, the system interface may perform interfacing so that content can be updated in real time from an external web-based database. For example, the system interface may perform interfacing to obtain a search result for a specific search term from Wikipedia or the like.

이하 순서도를 참조하여 본 발명의 일 실시 예에 따른 질의 응답 방법을 설명한다. 도 5는 본 발명의 일 실시 예에 따른 서버(200)에 의한 질의 응답 방법을 설명하는 순서도이다. 먼저, 일 실시 예에 따른 서버(200)는 단말(100)로부터 수신한 질의를 분석하여 질의의 유형을 판별할 수 있다(S510). 서버(200)는 사용자 질의의 유형을 분석하기 위해 의도 분류기를 더 포함하여 구성될 수 있다.Hereinafter, a question answering method according to an embodiment of the present invention will be described with reference to a flowchart. 5 is a flowchart illustrating a method for answering a question by the server 200 according to an embodiment of the present invention. First, the server 200 according to an embodiment may analyze the query received from the terminal 100 to determine the type of the query ( S510 ). The server 200 may be configured to further include an intention classifier to analyze the type of user query.

서버(200)는 의도 분류기를 이용함으로써 사용자 질의에 포함된 키워드에 기반하여 사용자 질의의 유형을 판별할 수 있다. 예를들어, 의도분류기는 육하원칙에 대응하는 키워드인 '누구', '언제', '어디', '무엇', '어떻', '왜'와 같은 토큰이 사용자 질의에 포함된 경우, 해당 사용자 질의는 신경망을 통해 응답이 제공되어야 하는 제 1 유형 질의로 결정할 수 있다. The server 200 may determine the type of the user query based on the keywords included in the user query by using the intention classifier. For example, the intent classifier uses keywords such as 'who', 'when', 'where', 'what', 'how', and 'why', which are keywords corresponding to the six-fold principle, in the user query. may be determined as the first type of query to which a response should be provided through a neural network.

예를 들어, 사용자 질의가 “이순신 장군이 누구야?” 또는 “이순신 장군은 어디서 태어났어?” 와 같은 질의인 경우 제 1 유형 질의로 결정할 수 있다.For example, if a user query is “Who is Admiral Yi Sun-sin?” or “Where was Admiral Yi Sun-sin born?” In the case of a query such as , it can be determined as the first type query.

한편, 의도분류기는 육하원칙에 대응하는 키워드가 사용자 질의에 포함되어 있지 않은 경우 룰베이스에 기초하여 사용자 답변을 제공되어야 하는 제 2 유형 질의로 결정할 수 있다. 예를 들어, 의도분류기는 육하원칙에 대응하는 키워드가 아닌 정의(definition)에 대한 키워드인 '뭐야'와 같은 토큰이 사용자 질의에 포함된 경우, 지식베이스의 질의-답변 테이블에 기반하여 사용자 질의에 포함된 개체명에 대한 검색 결과를 응답으로 제공하는 룰베이스 기반 제 2 유형 질의로 결정할 수 있다. 예를들어, 사용자 질의가 “거북선이 뭐야?”와 같은 질의인 경우 제 2 유형 질의로 결정할 수 있다. On the other hand, the intention classifier may determine the user's answer as the second type of query to be provided based on the rule base when the keyword corresponding to the six-fold principle is not included in the user's query. For example, the intent classifier is included in the user query based on the query-answer table of the knowledge base when a token such as 'what is', which is a keyword for definition rather than a keyword corresponding to the six-fold principle, is included in the user query. It can be determined as a rule-base-based second type query that provides the search result for the object name that has been searched for as a response. For example, if the user query is a query such as “What is a turtle ship?”, it may be determined as the second type of query.

다음으로, 서버(200)는 사용자 질의가 제 1 유형 질의인 경우 QA 엔진으로 생성된 신경망을 이용하여 응답을 생성할 수 있다(S520). 서버(200)는 QA엔진을 이용하여 사용자 질의의 임베딩 벡터를 생성한 후 임베딩 벡터의 유사도 판단에 기초하여 답변을 검색할 수 있다. 이는 뒤에서 도 6을 참조하여 보다 자세히 설명한다.Next, when the user query is the first type of query, the server 200 may generate a response using the neural network generated by the QA engine ( S520 ). The server 200 may generate an embedding vector of a user query using the QA engine, and then search for an answer based on the determination of the similarity of the embedding vector. This will be described in more detail later with reference to FIG. 6 .

다음으로, 서버(200)는 사용자 질의가 제 2 유형 질의인 경우 룰베이스에 기초하여 응답을 생성할 수 있다(S530). 예를들어, 서버(200)는 사용자 질의가 제 2 유형 질의인 경우 지식베이스의 질의-답변 테이블의 대응관계에 따라 사용자 질의에 대한 응답을 생성할 수 있다. 일 실시 예에서, 지식베이스의 질의-답변 테이블의 대응관계는 “IF(키워드) return 응답;” 형식으로 구성될 수 있다.Next, when the user query is the second type of query, the server 200 may generate a response based on the rule base ( S530 ). For example, when the user query is the second type of query, the server 200 may generate a response to the user query according to the correspondence relationship of the query-answer table of the knowledge base. In an embodiment, the correspondence of the query-answer table of the knowledge base is “IF (keyword) return response;” can be of the form.

다음으로, 서버(200)는 생성된 응답에 대한 신뢰도 평가를 거친 후 이를 단말(100)로 제공한다(S540). 일 실시 예에서, 서버(200)는 싱글 레이어 단순 필터를 사용하여 생성된 응답에 비속어와 같이 사용할 수 없는 불용어가 포함된 경우 이를 응답으로 채택하지 않을 수 있다. 다른 실시 예에서, 서버(200)는 생성된 응답과 사용자 질의의 키워드간 신뢰도가 일정 수준 미만인 경우 이를 응답으로 채택하지 않을 수 있다. 생성된 응답과 사용자 질의의 키워드간 신뢰도는 데이터베이스에 미리 저장되어 있을 수 있다.Next, the server 200 provides this to the terminal 100 after the reliability evaluation of the generated response (S540). In an embodiment, the server 200 may not accept the response generated by using the single-layer simple filter as a response when an unusable stopword such as profanity is included in the response. In another embodiment, when the reliability between the generated response and the keyword of the user's query is less than a certain level, the server 200 may not accept it as the response. The reliability between the generated response and the keyword of the user's query may be previously stored in the database.

한편, 일부 실시 예에서, 서버(200)는 사용자 질의의 유형을 판단하지 않고 신경망을 활용한 응답과 룰베이스에 기반한 응답을 모두 생성할 수 있다. 나아가, 서버(200)는 신경망을 활용한 응답 탐색에서 질의와 구(phrase)간의 임베딩 벡터의 유사도가 높은 순으로 복수의 응답을 생성할 수 있다. 또한, 룰베이스 응답 탐색에서도 복수의 응답이 생성될 수 있다. 이러한 경우, 서버(200)는 각 응답에 대한 신뢰도 평가를 수행하고, 평가 결과에 따라 선정된 응답을 단말(100)로 제공할 수 있다. 서버(200)는 사용자 질의에 대하여 복수의 응답이 생성된 경우 그 중 사용자 질의와 관련도가 높은 순서로 미리 설정된 수의 응답을 단말(100)에 제공할 수 있다. 앞서 설명한 바와 같이, 생성된 응답과 사용자 질의의 키워드간 신뢰도는 데이터베이스에 미리 저장되어 있을 수 있다.Meanwhile, in some embodiments, the server 200 may generate both a response using a neural network and a response based on a rule base without determining the type of the user's query. Furthermore, in response search using a neural network, the server 200 may generate a plurality of responses in the order of a high degree of similarity between an embedding vector between a query and a phrase. In addition, a plurality of responses may be generated in the rule base response search. In this case, the server 200 may perform a reliability evaluation for each response, and may provide a response selected according to the evaluation result to the terminal 100 . When a plurality of responses to a user's query are generated, the server 200 may provide a preset number of responses to the terminal 100 in order of high relevance to the user's query among them. As described above, the reliability between the generated response and the keyword of the user's query may be previously stored in the database.

또한, 일 실시 예에서, 사용자 질의와 응답에는 대응되는 교육과목 또는 지도교사의 정보가 매칭되어 데이터베이스에 저장되어 있을 수 있다. 이러한 경우 서버(200)는 사용자 질의와 응답의 지도 교사 또는 교육 과목 종류에 따른 관련도를 평가하여 관련이 높은 응답을 선별하여 사용자에게 응답으로 제공할 수 있다. In addition, according to an embodiment, information of educational subjects or tutors corresponding to user queries and responses may be matched and stored in a database. In this case, the server 200 may select a highly relevant response by evaluating the relevance of the user's query and response according to the type of tutor or education subject, and provide it as a response to the user.

이하 도 6를 참조하여 신경망을 활용하여 응답을 생성하는 방법(S520)을 보다 상세히 설명한다. 도 6는 신경망을 활용하여 사용자 질의에 대한 응답을 생성하는 방법을 설명하는 순서도이다.Hereinafter, a method ( S520 ) of generating a response using a neural network will be described in more detail with reference to FIG. 6 . 6 is a flowchart illustrating a method of generating a response to a user query using a neural network.

먼저, 서버(200)는 교육 컨텐츠를 생성하기 위한 데이터를 획득한다(S610). 일 실시 예에서, 데이터는 교육용 데이터일 수 있다. 서버(200)는 위키피디아와 같은 공개된 대규모 웹기반 데이터베이스에 접근하여 교육 컨텐츠를 생성하기 위한 데이터를 획득할 수 있다. 또는 서버(200)는 교육청이나 교육 컨텐츠를 제공하는 외부 서버로부터 교육 데이터를 획득할 수 있다.First, the server 200 obtains data for generating educational content (S610). In an embodiment, the data may be educational data. The server 200 may acquire data for generating educational contents by accessing a large-scale web-based database such as Wikipedia. Alternatively, the server 200 may acquire education data from an education office or an external server that provides educational content.

다음으로, 서버(200)는 교육 컨텐츠를 생성한다(S620). 서버(200)는 사용자로부터 입력 받은 교육 컨텐츠의 목차에 기초하여, 미리 획득된 교육 데이터를 목차에 따른 항목으로 분류함으로써 교육 컨텐츠를 생성할 수 있다. 또는, 서버(200)는 사용자로부터 입력 받은 교과 과정의 내용을 단락 단위로 입력 받아 목차별로 분류하여 저장함으로써 교육 컨텐츠를 생성할 수 있다. 서버(200)는 데이터가 표 또는 그림인 경우 이에 대한 설명을 텍스트로 입력할 것을 관리자에게 요청하는 요청 메시지를 사용자 인터페이스를 통해 관리자에게 제시할 수 있다.Next, the server 200 generates educational content (S620). The server 200 may generate educational content by classifying pre-obtained education data into items according to the table of contents, based on the table of contents of the educational content input from the user. Alternatively, the server 200 may generate educational content by receiving the content of the curriculum input from the user in units of paragraphs, classifying them by content, and storing them. When the data is a table or a figure, the server 200 may present a request message to the manager through a user interface to request the manager to input a description thereof as text.

서버(200)는 단말(100)과의 대화 내역에서 발생된 질의-응답 사항을 교육 컨텐츠의 목차별로 분류하여 기록할 수 있다. 예를 들어, 도 4의 질문 “정도전이 회의감을 느낀 맹자의 가설은 무엇인가?”와 이에 대하여 응답으로 생성된 대화 내역인 “[성선설] 입니다”는 교육 컨텐츠의 관련 목차에 새롭게 추가될 수 있다.The server 200 may classify and record the question-and-answer items generated in the conversation history with the terminal 100 according to the contents of the educational content. For example, the question “What is the hypothesis of Mencius who felt skeptical about Jeong Do-jeon?” in FIG. 4 and “It is [Seong Seon-seol],” which is a conversation history generated in response to this question, can be newly added to the related table of contents of educational contents. .

일 실시 예에서, 대화 내역은 복수의 사용자에 의하여 생성될 수 있다. 예를 들어, 그룹 채팅방에 챗봇 엔진(220)이 참여하고 있는 경우, 복수의 사용자에 의하여 대화 내역이 생성될 수 있다. 이러한 경우, 그룹 채팅방에서 생성되는 질문-응답 사항이 교육 컨텐츠의 목차별로 분류되어 기록될 수 있다.In an embodiment, the conversation history may be generated by a plurality of users. For example, when the chatbot engine 220 participates in a group chat room, conversation details may be generated by a plurality of users. In this case, the question-answer items generated in the group chat room may be classified and recorded according to the contents of the educational content.

또한, 사용자가 질의한 항목이 교육 컨텐츠의 목차에 존재하지 않는 경우, 해당 항목에 대한 목차가 교육 컨텐츠에 생성될 수 있다. 예를 들어, 사용자가 질의한 항목과 관련되는 과목별 교육 목차가 교육 컨텐츠에 자동으로 편입될 수 있다. 이를 위하여 서버(200)에는 과목별 교육 목차가 저장되어 있을 수 있다.Also, when the item the user has inquired about does not exist in the table of contents of the educational content, a table of contents for the corresponding item may be created in the educational content. For example, an education table of contents for each subject related to the item queried by the user may be automatically incorporated into the education content. To this end, the server 200 may store an educational table of contents for each subject.

또한, 사용자가 질의한 항목이 교육 컨텐츠의 목차에 존재하지 않는 경우, 사용자와 유사한 교육 성향을 가지는 다른 사용자의 교육 컨텐츠내 해당 질의 항목에 대한 목차가 사용자의 교육 컨텐츠의 목차로 자동 편입될 수 있다. 이를 위하여 서버(200)에는 사용자별 교육 성향 정보가 매칭되어 저장되어 있을 수 있다.In addition, when the item the user has inquired about does not exist in the table of contents of the educational content, the table of contents for the corresponding query item in the educational content of other users who have a similar educational tendency to the user may be automatically incorporated into the table of contents of the user's educational content. . To this end, the server 200 may match and store education propensity information for each user.

다음으로, 서버(200)는 신경망을 학습한다(S630). 서버(200)는 KorQuAD 1.0과 같은 한국어 데이터 셋을 이용하여 신경망을 학습할 수 있다. 서버는 사용자 질의와 교육 컨텐츠에 존재하는 구(phrase)가 유사한 임베딩 벡터로 표현될 수 있도록 신경망을 학습한다. 예를 들어 구(phrase)는 “신선한 채소”와 같이 표현되는 명사구일 수 있다.Next, the server 200 learns the neural network (S630). The server 200 may learn the neural network using a Korean data set such as KorQuAD 1.0. The server learns the neural network so that phrases existing in user queries and educational contents can be expressed as embedding vectors similar to each other. For example, a phrase could be a noun phrase expressed like “fresh vegetables”.

본 발명의 일 실시 예에 따른 신경망 모델은 대규모 텍스트 스팬들을 인코딩하고, 가장 가까운 이웃 검색(nearest neighor search)을 수행함으로써 실시간으로 답변을 획득할 수 있는 효과를 제공하기 위하여 밀집 벡터와 희소 벡터를 함께 사용하여 임베딩 벡터를 생성할 수 있다. 밀집 벡터는 구문론적, 의미론적 신호를 표현하기에 효과적이고 희소 벡터는 정밀한 어휘적 정보를 인코딩 하기에 효율적인 특성을 나타낸다.A neural network model according to an embodiment of the present invention encodes large text spans and uses a dense vector and a sparse vector together to provide an effect of obtaining an answer in real time by performing a nearest neighbor search. can be used to create an embedding vector. Dense vectors are effective for expressing syntactic and semantic signals, and sparse vectors are efficient for encoding precise lexical information.

서버(200)는 희소 벡터를 밀집 벡터에 연결하여 독립된 구(phrase)에 대한 임베딩 벡터를 생성할 수 있다. 본 발명의 일실시 예에 따른 신경망 모델은 생성된 교육 컨텐츠의 코퍼스에 있어서 각각 구(phrase) 스팬을 밀집 벡터와 희소 벡터로 표현할 수 있다. 교육 컨텐츠 x에 있어서 각 스팬(i,j)의 임베딩 벡터는 아래와 같이 표현될 수 있다.The server 200 may generate an embedding vector for an independent phrase by connecting the sparse vector to the dense vector. The neural network model according to an embodiment of the present invention may express a sphere span as a dense vector and a sparse vector in the corpus of the generated educational content, respectively. In the educational content x, the embedding vector of each span (i, j) may be expressed as follows.

[수학식 1][Equation 1]

Figure 112019136012872-pat00001
Figure 112019136012872-pat00001

여기서,

Figure 112019136012872-pat00002
는 교육 컨텐츠에서 스팬(i, j)에 대한 밀집 벡터를 나타내고,
Figure 112019136012872-pat00003
는 교육 컨텐츠에서 스팬(i, j)에 대한 희소 벡터를 나타낸다.here,
Figure 112019136012872-pat00002
represents the dense vector for the span (i, j) in the educational content,
Figure 112019136012872-pat00003
denotes a sparse vector for span (i, j) in educational content.

다음으로, 서버(200)는 학습된 신경망을 이용하여 교육 컨텐츠의 각 구(phrase)에 대한 임베딩 벡터를 생성한다(S640). 서버(200)는 각 구에 대하여 미리 임베딩 벡터를 생성하여 두기 때문에, 사용자 질의가 입력되었을 경우 미리 생성된 벡터에 대하여만 벡터 유사도를 비교할 수 있다. 예를들어, 최대 스팬 길이(i.e. 모든 교육 컨텐츠로부터 가능한 모든 스팬들)가 J일 때, 서버(200)는 j-i<J인 모든 i, j 쌍에 대한 텍스트 스팬 임베딩(xi:j)을 미리 계산하여 구 인덱스(phrase index)로 데이터베이스에 저장하고 있을 수 있다.Next, the server 200 generates an embedding vector for each phrase of the educational content using the learned neural network (S640). Since the server 200 generates an embedding vector for each sphere in advance, when a user query is input, the vector similarity can be compared only with respect to the previously generated vector. For example, when the maximum span length (ie all possible spans from all training content) is J, the server 200 pre- prescribes text span embeddings (x i:j ) for all i,j pairs where ji<J. It may be calculated and stored in the database as a phrase index.

일 실시 예에서, 서버(200)는 신경망을 이용하여 밀집 벡터와 희소 벡터로 구성된 임베딩 벡터를 생성할 수 있다. 밀집 벡터는 밀집 벡터 모델을 이용하여 생성된다. 밀집벡터 모델은 컨텍스트에 따른 구의 구문론적 또는 의미론적 정보를 인코딩할 수 있다. 밀집 벡터 di:j는 구의 시작지점에 대응되는 토큰의 벡터와, 종료 지점에 대응되는 토큰의 벡터 및 시작 토큰의 벡터와 종료 토큰의 벡터의 일관성을 측정하는 스칼라값(이하, 코헤런시 스칼라)으로 구성될 수 있다.In an embodiment, the server 200 may generate an embedding vector composed of a dense vector and a sparse vector using a neural network. A dense vector is generated using a dense vector model. The dense vector model can encode syntactic or semantic information of a phrase depending on the context. The dense vector d i:j is a scalar value measuring the consistency of the vector of tokens corresponding to the starting point of the sphere, the vector of tokens corresponding to the ending point, and the vector of starting tokens and ending tokens (hereafter, coherency scalars). ) can be composed of

각 토큰에 대응되는 벡터값은 문맥에 따라 생성되는 점에서, 코헤런시 스칼라는 서로 다른 맥락을 가지는 토큰으로 구성된 구가 응답으로 선택되지 않는 효과를 제공한다. 예를들어, “성장에 도움을 주는 음식은 무엇인가?”라는 질의에 있어서, “계란은 성장에 도움을 준다. 지나친 운동을 하는 것을 바람직 하지 않다. 우유에는 칼슘이 풍부하여 뼈 건강에 도움이 된다”라는 문장에서 시작벡터와 종료 벡터를 각각 모델링 하게 된다면, 시작 토큰과 종료 토큰으로 '계란'과 '우유'가 선택될 수 있다. 그러나 '계란'과 '우유'에 대한 벡터값은 “지나친 운동을 하는 것을 바람직 하지 않다“라는 문장을 구성하는 토큰에 의하여 서로 다른 맥락을 가지게 됨에 따라 코헤런시 스칼라값은 낮은 값을 가지게 된다.Since the vector value corresponding to each token is generated according to the context, the coherency scalar provides the effect that a sphere composed of tokens having different contexts is not selected as a response. For example, in the query “What foods help growth?”, “Eggs help growth. Excessive exercise is not recommended. Milk is rich in calcium, so it is helpful for bone health.” If the start and end vectors are modeled respectively, 'egg' and 'milk' can be selected as the start and end tokens. However, as the vector values for 'egg' and 'milk' have different contexts due to the token constituting the sentence “It is not desirable to exercise excessively”, the coherency scalar value has a low value.

밀집 벡터의 이러한 구성을 획득하기 위하여, 위키피디아와 같은 대형 코퍼스에 대하여 미리 훈련된 BERT-large와 같은 맥락기반 표현법을 활용할 수 있다. BERT(Bidirectional Encoder Representations from Transformers)는 문서 토큰들의 시퀀스 x=x1, …, xn을 대응하는 벡터들의 시퀀스(i.e. 행렬) H=[h1; … ; hn]로 매핑한다. 여기서, n은 입력 시퀀스의 길이이고, d는 히든 스테이지 크기이며, [;]는 수직 연결(vertical contatenation)이다. BERT에 대한 자세한 설명은 Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova의 논문 BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding에 기재되어 있다.To obtain this construction of dense vectors, we can utilize context-based representations such as BERT-large, which are pre-trained on large corpus such as Wikipedia. BERT (Bidirectional Encoder Representations from Transformers) is a sequence of document tokens x=x 1 , … , a sequence of vectors corresponding to x n (ie a matrix) H=[h 1 ; … ; h n ]. Here, n is the length of the input sequence, d is the size of the hidden stage, and [;] is the vertical concatenation. A detailed description of BERT is provided in the paper BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding by Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.

일 예를 들어 보다 자세히 설명한다. 일 실시 예에서, 토큰 인코딩은 네개의 벡터 hi=[h1 i, h2 i, h3 i, h4 i]로 분리되도록 설정할 수 있다. 여기서 [,]는 컬럼단위(column-wise) 연결을 의미한다. 이러한 경우, h1 i로부터 밀집 시작 벡터 ai를 획득하고, h2 j로부터 밀집 시작 벡터 bj를 획득할 수 있다. 최종적으로, h3 i, h4 j의 내적으로부터 코헤런시 스칼라 ck i,j를 획득할 수 있다. 이러한 경우, 내적 결과값은 일관성이 높은 구들에 대하여 보다 높은 값을 나타낸다. 이에 따른 밀집 벡터는 아래와 같이 표현될 수 있다.An example will be described in more detail. In an embodiment, the token encoding may be set to be divided into four vectors h i =[h 1 i, h 2 i, h 3 i, h 4 i ]. Here, [,] means column-wise connection. In this case, a dense start vector a i may be obtained from h 1 i , and a dense start vector b j may be obtained from h 2 j . Finally, a coherency scalar c k i,j can be obtained from the dot product of h 3 i and h 4 j . In this case, the dot product results show higher values for highly consistent spheres. Accordingly, the dense vector can be expressed as follows.

[수학식 2] [Equation 2]

Figure 112019136012872-pat00004
Figure 112019136012872-pat00004

이에 따라 교육 컨텐츠에 포함된 각 구(phrase)에 대한 임베딩 벡터는 상기 교육 컨텐츠의 분류 순서나 교육 컨텐츠내에 나열된 구의 배열에 기초하여 결정될 수 있다.Accordingly, the embedding vector for each phrase included in the educational content may be determined based on the classification order of the educational content or the arrangement of phrases listed in the educational content.

한편, 희소 벡터는 희소 벡터 모델을 이용하여 생성될 수 있다. 서버(200)는 각각의 구에 대하여 희소 벡터 sk i:j를 획득하기 위해 용어 빈도 기반(term frequency based) 인코딩을 사용할 수 있다. 일 실시 예에서, 서버(200)는 교육 컨텐츠에 대하여 n-그램 기반 TF-IDF(Term Frequency - Inverse Document Frequency)를 적용하여 희소 벡터를 생성할 수 있다.Meanwhile, a sparse vector may be generated using a sparse vector model. The server 200 may use a term frequency based encoding to obtain a sparse vector s k i:j for each sphere. In an embodiment, the server 200 may generate a sparse vector by applying an n-gram-based TF-IDF (Term Frequency - Inverse Document Frequency) to the educational content.

한편, 서버(200)는 위키피디아와 같은 외부 데이터 베이스로부터 데이터가 추가된 경우, 추가된 데이터에 대하여도 임베딩 벡터를 구(phrase)단위로 생성할 수 있다.Meanwhile, when data is added from an external database such as Wikipedia, the server 200 may generate an embedding vector for the added data in a phrase unit.

다음으로, 서버(200)는 사용자 질의를 수신한 경우, 사용자 질의에 대한 임베딩 벡터를 생성한다(S650). 서버(200)는 사용자 질의에 대한 임베딩 벡터를 사용자 질의 이전에 입력된 사용자 질의에 기초하여 결정할 수 있다. 예를들어, 사용자 질의는 시계열적으로 입력되며, 현재 사용자 질의에 대한 임베딩 벡터는 상기 현재 사용자 질의 이전에 입력된 이전 사용자 질의를 구성하는 토큰의 벡터 값과 현재 사용자 질의를 구성하는 토큰의 벡터값을 연산하여 계산될 수 있다.Next, when receiving the user query, the server 200 generates an embedding vector for the user query ( S650 ). The server 200 may determine an embedding vector for the user query based on the user query input before the user query. For example, a user query is input in time series, and the embedding vector for the current user query is a vector value of a token constituting a previous user query input before the current user query and a vector value of a token constituting the current user query can be calculated by calculating

예를들어, 서버(200)는 앞서 교육 컨텐츠의 구에 대하여 임베딩 벡터를 생성한 것과 유사한 방식으로, 사용자 질의를 동일한 벡터 공간

Figure 112019136012872-pat00005
에 임베딩하여 사용자 질의에 대한 임베딩 벡터를 생성할 수 있다.For example, the server 200 executes the user query in the same vector space in a similar manner to the previously generated embedding vector for the sphere of educational content.
Figure 112019136012872-pat00005
By embedding in , it is possible to generate an embedding vector for a user query.

사용자 질의에 대한 임베딩 벡터는 사용자 질의를 구성하는 구(phrase)마다 생성될 수도 있지만, 사용자 질의를 구성하는 토큰 전체에 대하여 생성될 수 있다. 예를들어, 사용자 질의에서 불용어와 조사를 제외하는 전처리 후 토큰화된 질의에 대하여 신경망을 적용한 결과 생성된 임베딩 벡터를 사용자 질의에 대하여 생성할 수 있다.The embedding vector for the user query may be generated for each phrase constituting the user query, but may be generated for all tokens constituting the user query. For example, an embedding vector generated as a result of applying a neural network to a tokenized query after preprocessing excluding stopwords and investigations from the user query may be generated for the user query.

밀집 쿼리 벡터를 획득하기 위하여, 우리는 질의를 구성하는 토큰 앞에 첨부되는 스페셜 토큰([CLS] for BERT)을 사용할 수 있다. 예를들어, 질의 q는 [CLS], q1, …, qs로 표현될 수 있다. 이에 따라, 서버(200)는 BERT 인코더의 모든 파라미터를 공유함에도 phrase index에서 밀집 임베딩과 다르게 밀집 쿼리 임베딩을 모델할 수 있다. 즉, 밀집 쿼리 벡터는 아래와 같이 표기될 수 있다.To obtain a dense query vector, we can use a special token ([CLS] for BERT) that is appended to the token constituting the query. For example, the query q is [CLS], q 1 , … , can be expressed as q s . Accordingly, the server 200 can model dense query embedding differently from dense embedding in the phrase index even though all parameters of the BERT encoder are shared. That is, the dense query vector can be expressed as follows.

[수학식 3][Equation 3]

Figure 112019136012872-pat00006
Figure 112019136012872-pat00006

여기서 h'1 1은 (첫번째) 특수 토큰에 대응하는 인코딩이며, 그 외의 파라미터 또한 유사한 방식으로 획득할 수 있다. 희소 쿼리 벡터 s'를 획득하기 위하여, 전체 쿼리에 대하여 앞서 설명한 바와 같이 TF-IDF 임베딩 모델을 적용할 수 있다. Here, h' 1 1 is the encoding corresponding to the (first) special token, and other parameters can be obtained in a similar manner. In order to obtain the sparse query vector s', the TF-IDF embedding model may be applied to the entire query as described above.

다음으로, 서버(200)는 사용자 질의의 임베딩 벡터와 가장 유사한 임베딩 벡터를 가지는 교육 컨텐츠의 구(phrase)를 탐색하고, 탐색된 구(phrase)를 응답으로 생성한다(S660). 서버(200)는 질의에 대한 응답을 표현하는 교육 컨텐츠에서의 구의 위치를 나타내는 i, j 인덱스를 사용자 질의 임베딩 벡터 'q'와 교육 컨텐츠의 각 구에 대한 임베딩 벡터 'xi:j' 사이의 최대 내적을 계산함으로써 획득할 수 있다.Next, the server 200 searches for a phrase of the educational content having an embedding vector most similar to the embedding vector of the user's query, and generates the searched phrase as a response (S660). The server 200 sets the i, j index indicating the position of the sphere in the educational content expressing the response to the query, the user query embedding vector 'q' and the embedding vector 'x i:j ' for each sphere of the educational content. It can be obtained by calculating the maximum dot product between

[수학식 4][Equation 4]

Figure 112019136012872-pat00007
Figure 112019136012872-pat00007

이하 도 7을 참조하여 신경망의 훈련 과정을 보다 상세히 설명한다. 도 7은 본 발명의 일 실시 예에 따른 질의 응답을 수행하기 위한 응답 탐색 신경망을 훈련하는 과정을 설명하는 순서도이다.Hereinafter, a training process of the neural network will be described in more detail with reference to FIG. 7 . 7 is a flowchart illustrating a process of training a response search neural network for performing a question and answer according to an embodiment of the present invention.

먼저, 서버(200)는 텍스트의 구(명사구등)에 대한 임베딩 벡터를 생성하고, 사용자 질의에 대한 임베딩 벡터를 생성한다(S710).First, the server 200 generates an embedding vector for a text phrase (noun phrase, etc.), and generates an embedding vector for a user query (S710).

다음으로 서버(200)는 교육 컨텐츠의 구와 그에 매칭되는 사용자 질의의 임베딩 벡터가 유사한 값을 가지도록 신경망을 학습한다(S620). 유사도는 두 임베딩 벡터의 코사인 유사도를 계산하고, 결과 값이 미리 설정된 기준값 보다 높은지에 따라 결정될 수 있다. 서버(200)는 코사인 유사도의 값이 1에 가까울수록 유사하고, -1에 가까울수록 비유사함을 결정할 수 있다. Next, the server 200 trains the neural network so that the phrase of the educational content and the embedding vector of the user query matching it have similar values ( S620 ). The similarity may be determined according to calculating the cosine similarity of two embedding vectors and whether a result value is higher than a preset reference value. The server 200 may determine that the value of the cosine similarity is similar to 1, and is dissimilar as it is closer to -1.

일 실시 예에서, 서버(200)는 순전파(Forward Propagation)를 수행하여 교육 컨텐츠의 구와 그에 매칭되는 사용자 질의의 임베딩 벡터를 결정할 수 있다. 그리고 서버(200)는 손실 함수(Loss function)를 사용하여 교육 컨텐츠의 구와 그에 매칭되는 사용자 질의의 임베딩 벡터의 코사인 유사도와 기준 값을 비교함으로써 신경망을 구성하는 파라미터의 값을 결정하기 위한 오차값을 결정할 수 있다. 서버(200)는 코사인 유사도 값과 기준값의 오차가 감소하도록 역전파(Backward Propagation)를 사용하여 신경망 모델의 파라미터를 조정할 수 있다. 역전파에 사용되는 옵티마이저(Optimizer)로는 배치경사 하강법, 확률적 경사 하강법 등이 사용될 수 있다.In an embodiment, the server 200 may perform forward propagation to determine a phrase of educational content and an embedding vector of a user query matching the phrase. And the server 200 uses a loss function to compare the cosine similarity of the embedding vector of the user query matching the phrase of the educational content with the reference value to determine the error value for determining the value of the parameter constituting the neural network. can decide The server 200 may adjust the parameters of the neural network model using backward propagation so that the error between the cosine similarity value and the reference value is reduced. As an optimizer used for backpropagation, a batch gradient descent method, a stochastic gradient descent method, or the like may be used.

한편, 서버(200)는 과적합을 막기 위하여 조기종료 또는 드롭아웃을 적용할 수 있다. 일 실시 예에서, 서버(200)는 검증 데이터의 예측값과 실제값 사이의 오차값에 대해 모니터링을 진행하면서, 검증 데이터에 대한 정확도가 지속적으로 낮아짐이 발견된다면 정확도가 낮아지기 전의 에포크(epoch)를 훈련 에포크로 설정함으로써 조기종료를 구현할 수 있다. 또는 서버(200)는, 일정한 기준으로 선택된 노드들을 학습에 사용되지 않는 드롭아웃을 수행함으로써 과적합을 막을 수도 있다. 이로써 서버(200)는 신경망이 특정 노드나 노드의 조합에 의존적으로 변하는 것을 막을 수도 있다.Meanwhile, the server 200 may apply early termination or dropout to prevent overfitting. In an embodiment, the server 200 trains an epoch before the accuracy is lowered if it is found that the accuracy of the verification data is continuously lowered while monitoring the error value between the predicted value and the actual value of the verification data. Early termination can be implemented by setting it as an epoch. Alternatively, the server 200 may prevent overfitting by performing dropout that is not used for learning on nodes selected based on a certain criterion. Accordingly, the server 200 may prevent the neural network from changing dependently on a specific node or combination of nodes.

앞서 설명된 일 실시 예에 따른 질의 응답 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시 예에 따라 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광 기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 플랫폼 식단 관리 서버(10)가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The question answering method according to the embodiment described above may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured according to the embodiment, or may be known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic such as floppy disks. - a hardware platform diet management server 10 specially configured to store and execute magneto-optical media, and program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

앞선 실시예에 대한 설명에서 참조된 도면 각각은 설명의 편의를 위해 도시된 일 실시 예에 불과하며, 각 화면에 표시된 정보들의 항목, 내용과 이미지들은 다양한 형태로 변형되어 표시될 수 있다.Each of the drawings referenced in the description of the previous embodiment is merely an embodiment shown for convenience of description, and items, contents, and images of information displayed on each screen may be modified and displayed in various forms.

본 발명은 도면에 도시된 일 실시 예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시 예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 등록청구범위의 기술적 사상에 의해 정해져야 할 것이다.Although the present invention has been described with reference to an embodiment shown in the drawings, this is merely exemplary, and those of ordinary skill in the art will understand that various modifications and equivalent other embodiments are possible therefrom. Accordingly, the true technical protection scope of the present invention should be determined by the technical spirit of the appended claims.

Claims (15)

전자 장치에 의하여 수행되는 질의 응답 방법에 있어서,
컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하는 단계;
사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하는 단계; 및
상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하고,
상기 컨텐츠는 교육 컨텐츠의 목차에 기반하여 소정의 입력 단위로 분류되어 저장되며,
상기 각 부분에 대한 임베딩 벡터는 상기 교육 컨텐츠의 목차와 상기 소정의 입력 단위에 기반하여 결정되고,
상기 사용자 질의에 대한 응답은 상기 사용자 질의에 대한 지도 교사의 관련도에 기반하여 결정되는 질의 응답 방법.
A method for answering a question performed by an electronic device, the method comprising:
generating an embedding vector for each part included in the content using a neural network;
generating an embedding vector for a user query using the neural network; and
determining, as a response to the user query, a portion of the content having an embedding vector value most similar to an embedding vector for the user query,
The content is classified and stored in a predetermined input unit based on the table of contents of the educational content,
The embedding vector for each part is determined based on the table of contents of the educational content and the predetermined input unit,
A question answering method in which a response to the user's query is determined based on a degree of relevance of a tutor to the user's query.
제 1 항에 있어서,
상기 컨텐츠에 대하여 생성되는 임베딩 벡터는 상기 컨텐츠에 포함된 각 구(phrase)에 대하여 생성되고,
상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 부분은 상기 컨텐츠에 포함된 각 구 단위로 결정되는 질의 응답 방법.
The method of claim 1,
An embedding vector generated for the content is generated for each phrase included in the content,
A portion having an embedding vector value most similar to the embedding vector for the user query is determined for each phrase included in the content.
삭제delete 제 1 항에 있어서,
상기 사용자 질의에 대한 임베딩 벡터는 상기 사용자 질의 이전에 입력된 사용자 질의에 기초하여 결정되는 질의 응답 방법.
The method of claim 1,
An embedding vector for the user query is determined based on a user query input before the user query.
제 4 항에 있어서,
상기 사용자 질의는 시계열적으로 입력되며,
현재 사용자 질의에 대한 임베딩 벡터는 상기 현재 사용자 질의 이전에 입력된 이전 사용자 질의를 구성하는 토큰의 벡터 값과 현재 사용자 질의를 구성하는 토큰의 벡터값을 연산하여 계산되는 질의 응답 방법.
5. The method of claim 4,
The user query is inputted in time series,
The embedding vector for the current user query is calculated by calculating a vector value of a token constituting a previous user query input before the current user query and a vector value of a token constituting the current user query.
삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 전자 장치에 의하여 수행되는 질의 응답 방법에 있어서,
사용자 질의의 질의 유형을 판별하는 단계;
상기 질의 유형이 제 1 유형인 경우 질의의 벡터 유사도에 기반한 검색 결과인 제 1 응답을 생성하는 단계;
상기 질의 유형이 제 2 유형인 경우 질의의 텍스트 유사도에 기반한 검색 결과인 제 2 응답을 생성하는 단계; 및
상기 제 1 응답 및 제 2 응답의 신뢰도 평가 결과에 따라 상기 질의에 대한 응답을 결정하는 단계를 포함하고,
제 1 응답을 생성하는 단계는,
컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하는 단계;
사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하는 단계; 및
상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하고,
상기 컨텐츠는 교육 컨텐츠의 목차에 기반하여 소정의 입력 단위로 분류되어 저장되며,
상기 각 부분에 대한 임베딩 벡터는 상기 교육 컨텐츠의 목차와 상기 소정의 입력 단위에 기반하여 결정되고,
상기 사용자 질의에 대한 응답은 상기 사용자 질의에 대한 지도 교사의 관련도에 기반하여 결정되는 질의 응답 방법.
A question answering method performed by an electronic device, the method comprising:
determining a query type of a user query;
generating a first response that is a search result based on the vector similarity of the query when the query type is the first type;
generating a second response that is a search result based on the text similarity of the query when the query type is the second type; and
determining a response to the query according to the reliability evaluation results of the first response and the second response;
Generating the first response comprises:
generating an embedding vector for each part included in the content using a neural network;
generating an embedding vector for a user query using the neural network; and
determining, as a response to the user query, a portion of the content having an embedding vector value most similar to an embedding vector for the user query,
The content is classified and stored in a predetermined input unit based on the table of contents of the educational content,
The embedding vector for each part is determined based on the table of contents of the educational content and the predetermined input unit,
A question answering method in which a response to the user's query is determined based on a degree of relevance of a tutor to the user's query.
제 11 항에 있어서,
상기 제 1 유형은 상기 질의 유형이 육하원칙에 대응되는 유형이고, 제 2 유형은 상기 질의 유형이 육하원칙에 대응되지 않는 유형인 질의 응답 방법.
12. The method of claim 11,
In the first type, the query type is a type corresponding to the six-fold principle, and the second type is a type in which the query type does not correspond to the six-fold principle.
프로세서; 및
상기 프로세서에 의하여 실행되는 명령어를 저장하는 메모리를 포함하고,
상기 프로세서는,
컨텐츠에 포함된 각 부분에 대한 임베딩 벡터를 신경망을 이용하여 생성하고,
사용자 질의에 대한 임베딩 벡터를 상기 신경망을 이용하여 생성하며,
상기 사용자 질의에 대한 임베딩 벡터와 가장 유사한 임베딩 벡터 값을 가지는 상기 컨텐츠의 부분을 상기 사용자 질의에 대한 응답으로 결정하고,
상기 컨텐츠는 교육 컨텐츠의 목차에 기반하여 소정의 입력 단위로 분류되어 저장되며,
상기 각 부분에 대한 임베딩 벡터는 상기 교육 컨텐츠의 목차와 상기 소정의 입력 단위에 기반하여 결정되고,
상기 사용자 질의에 대한 응답은 상기 사용자 질의에 대한 지도 교사의 관련도에 기반하여 결정되는 전자장치.
processor; and
a memory for storing instructions executed by the processor;
The processor is
An embedding vector for each part included in the content is generated using a neural network,
An embedding vector for a user query is generated using the neural network,
determining a portion of the content having an embedding vector value most similar to an embedding vector for the user query as a response to the user query,
The content is classified and stored in a predetermined input unit based on the table of contents of the educational content,
The embedding vector for each part is determined based on the table of contents of the educational content and the predetermined input unit,
The electronic device in which the response to the user's query is determined based on a degree of relevance of a tutor to the user's query.
제 1 항의 질의 응답 방법을 실행시키는, 컴퓨터에 의하여 실행되는, 컴퓨터 프로그램이 기록된 컴퓨터 판독 가능 기록 매체.
A computer-readable recording medium in which a computer program is recorded, which is executed by a computer for executing the question-and-answer method of claim 1 .
제 1 항의 질의 응답 방법을 실행시키는, 컴퓨터로 읽을 수 있는 저장매체에 저장된, 컴퓨터 프로그램.
A computer program, stored in a computer-readable storage medium, that executes the question and answer method of claim 1 .
KR1020190179110A 2019-12-31 2019-12-31 A method and apparatus for question-answering on educational contents in interactive query system KR102334583B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190179110A KR102334583B1 (en) 2019-12-31 2019-12-31 A method and apparatus for question-answering on educational contents in interactive query system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190179110A KR102334583B1 (en) 2019-12-31 2019-12-31 A method and apparatus for question-answering on educational contents in interactive query system

Publications (2)

Publication Number Publication Date
KR20210085728A KR20210085728A (en) 2021-07-08
KR102334583B1 true KR102334583B1 (en) 2021-12-06

Family

ID=76893984

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190179110A KR102334583B1 (en) 2019-12-31 2019-12-31 A method and apparatus for question-answering on educational contents in interactive query system

Country Status (1)

Country Link
KR (1) KR102334583B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102640798B1 (en) 2023-08-25 2024-02-28 망고클라우드 주식회사 Method and apparatus for providing chatbot service for corporate

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886435B (en) * 2021-12-08 2022-03-18 国能大渡河大数据服务有限公司 Information query method and system based on recurrent neural network
KR102498540B1 (en) * 2022-02-21 2023-02-13 주식회사 천재교과서 Learning system using contents structure
KR102552401B1 (en) * 2023-01-26 2023-07-06 (주)액션파워 Method for question-answering based on asr
KR102655228B1 (en) * 2023-08-25 2024-04-08 주식회사 튜터러스랩스 Learner-tailored math tutoring dialogue service system and method
KR102641137B1 (en) * 2023-12-14 2024-02-28 주식회사 예랑 Method, device, and system for providing inquiry and response to output data of artificial intelligence model-based space technology

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102055899B1 (en) * 2017-09-28 2019-12-16 한국과학기술원 System and method for retrieving documents using context
KR102034646B1 (en) * 2017-12-20 2019-10-22 주식회사 솔트룩스 Automatic Question-Answering system having mutiple Question-Answering modules

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
김은주 외 2인, 질의 · 응답 자동 검색을 지원하는 웹 기반 학습 시스템의 설계 및 구현, 컴퓨터교육학회 논문지 12(2), 2009.3, 33-45페이지.
이우인, 질의응답 시스템에서 처음 보는 단어의 효율적인 단어 임베딩 기법, 서울대학교 대학원, 석사학위 논문, 2016.6. 1부.*

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102640798B1 (en) 2023-08-25 2024-02-28 망고클라우드 주식회사 Method and apparatus for providing chatbot service for corporate

Also Published As

Publication number Publication date
KR20210085728A (en) 2021-07-08

Similar Documents

Publication Publication Date Title
KR102334583B1 (en) A method and apparatus for question-answering on educational contents in interactive query system
US10325517B2 (en) Systems and methods for extracting keywords in language learning
US11514809B2 (en) Educational and content recommendation management system
CN110929098A (en) Video data processing method and device, electronic equipment and storage medium
Tan et al. Drill-down: Interactive retrieval of complex scenes using natural language queries
US11545042B2 (en) Personalized learning system
CN116541493A (en) Interactive response method, device, equipment and storage medium based on intention recognition
CN101739852B (en) Speech recognition-based method and device for realizing automatic oral interpretation training
Ye et al. A sentiment based non-factoid question-answering framework
Chavula et al. Intercomprehension in retrieval: User perspectives on six related scarce resource languages
KR20220037059A (en) A method and apparatus for question-answering using multiple similarity determination for query vectors
Sonia et al. Automatic question-answer generation from video lecture using neural machine translation
KR20220037064A (en) A method and apparatus for question-answering using a paraphraser model
Thomason Continually improving grounded natural language understanding through human-robot dialog
Nothdurft et al. Application of verbal intelligence in dialog systems for multimodal interaction
Hsu et al. Exam Keeper: Detecting Questions with Easy-to-Find Answers
Prabowo et al. A Trustworthy Automated Short-Answer Scoring System Using a New Dataset and Hybrid Transfer Learning Method
Maslim et al. A Trustworthy Automated Short-Answer Scoring System Using a New Dataset and Hybrid Transfer Learning Method
CN117251536A (en) Robot interaction method, device, equipment and storage medium
CN116994578A (en) Audio detection method, device, equipment, storage medium and product
Abdul-Kader An investigation on question answering for an online feedable Chatbot
KR20220037065A (en) A method and apparatus for generating a paraphraser model for question-answering
CN115965083A (en) Knowledge inference method, knowledge inference device, electronic equipment and storage medium
Barnard Sequential Structure

Legal Events

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