KR102655808B1 - A method and apparatus for question-answering using a paraphraser model - Google Patents

A method and apparatus for question-answering using a paraphraser model Download PDF

Info

Publication number
KR102655808B1
KR102655808B1 KR1020220134621A KR20220134621A KR102655808B1 KR 102655808 B1 KR102655808 B1 KR 102655808B1 KR 1020220134621 A KR1020220134621 A KR 1020220134621A KR 20220134621 A KR20220134621 A KR 20220134621A KR 102655808 B1 KR102655808 B1 KR 102655808B1
Authority
KR
South Korea
Prior art keywords
query
similar
user
similarity
vector
Prior art date
Application number
KR1020220134621A
Other languages
Korean (ko)
Other versions
KR20220145318A (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 KR1020220134621A priority Critical patent/KR102655808B1/en
Publication of KR20220145318A publication Critical patent/KR20220145318A/en
Priority to KR1020240045321A priority patent/KR20240049526A/en
Application granted granted Critical
Publication of KR102655808B1 publication Critical patent/KR102655808B1/en

Links

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/332Query formulation
    • G06F16/3322Query formulation using system suggestions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)

Abstract

본 명세서는 사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계; 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 유사 질의를 선정하는 단계; 및 상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하는 전자 장치에 의하여 수행되는 검색 방법을 개시한다.This specification includes the steps of generating a user query vector for a user query; selecting a similar query based on a similarity analysis result with the user query vector; and determining a response to the similar query as a response to the user query.

Description

페러프레이저 모델을 이용한 질의 응답 검색 방법 및 검색 장치{A method and apparatus for question-answering using a paraphraser model}Question-answering search method and search apparatus using a paraphraser model {A method and apparatus for question-answering using a paraphraser model}

본 발명은 사용자 질의에 대한 응답을 검색하여 사용자에게 제시하는 방법에 관한 것이다.The present invention relates to a method of retrieving and presenting a response to a user inquiry to the user.

검색엔진이 사용자 질의에 대하여 답변을 제공하기 위한 방법으로 사용자가 입력한 사용자 질의를 구성하는 텍스트 정보에 기초하여 데이터베이스를 검색한 결과를 제공하는 방식이 널리 사용되고 있다.As a method for search engines to provide answers to user queries, a method of providing database search results based on text information that constitutes the user query entered by the user is widely used.

그러나, 사용자 마다 질의를 표현하는 방식이 상이한 점에 있어서, 텍스트 정보에 기초하여 사용자 질의에 대한 검색 결과를 제공하는 방식은 검색의 숙련도에 따라 검색 결과가 달라지게 된다.However, since the way of expressing a query is different for each user, the method of providing search results for a user's query based on text information causes search results to vary depending on the search skill.

이러한 문제를 해결하기 위하여, 한국공개특허 제10-2011-0134909호 등에서 텍스트 문서들이나 사용자 질문에 언어적 분석을 수행함으로써 의미적 라벨링을 실시하고, 의미적으로 라벨링된 사용자 질문에 관련된 텍스트를 찾기 위해 라벨링된 텍스트 문서 데이터 베이스를 검색하는 방법들이 제시되어 있다.To solve this problem, semantic labeling is performed by performing linguistic analysis on text documents or user questions in Korea Patent Publication No. 10-2011-0134909, etc., and to find text related to the semantically labeled user question. Methods for searching a database of labeled text documents are presented.

그러나, 위와 같은 방법은 사용자 요청에 대응되는 응답을 찾기 위하여 대량의 텍스트 문서 데이터베이스를 검색하여야 하며, 텍스트 문서 데이터베이스의 크기가 증가할수록 검색시간이 증가한다는 문제점을 가지고 있다. However, the above method has the problem that a large text document database must be searched to find a response corresponding to a user request, and the search time increases as the size of the text document database increases.

공개특허공보 제10-2011-0134909호(2011.12.15.)Publication of Patent No. 10-2011-0134909 (December 15, 2011)

본 명세서에서는 페러프레이저를 이용하여 사용자 질의에 대한 응답을 효율적으로 검색하는 방안을 제시하고자 한다.In this specification, we would like to propose a method for efficiently searching responses to user queries using paraphrase.

상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 전자 장치에 의하여 수행되는 검색 방법은 사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계; 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 유사 질의를 선정하는 단계; 및 상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함한다.A search method performed by an electronic device according to an embodiment of the present invention to solve the above problem includes generating a user query vector for a user query; selecting a similar query based on a similarity analysis result with the user query vector; and determining a response to the similar query as a response to the user query.

상기 검색 방법은 상기 사용자 질의 벡터와의 유사도에 기초하여 유사 질의 후보를 선정하는 단계를 더 포함하고, 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 유사 질의를 선정하는 단계는, 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계를 포함할 수 있다.The search method further includes selecting a similar query candidate based on similarity with the user query vector, and selecting a similar query candidate based on a similarity analysis result with the user query vector includes: It may include selecting a similar query from among the similar query candidates based on the similarity analysis result.

상기 유사 질의 후보는 제 1 유사도 분석 모델에 의하여 상기 사용자 질의 벡터와의 유사도에 기초하여 선정되고, 상기 유사 질의는 제 2 유사도 분석 모델에 의하여 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 선정되며, 상기 제 1 유사도 분석 모델과 상기 제 2 유사도 분석 모델은 서로 상이한 분석모델일 수 있다.The similar query candidate is selected based on similarity with the user query vector by a first similarity analysis model, and the similar query is selected based on a similarity analysis result with the user query vector by a second similarity analysis model, , the first similarity analysis model and the second similarity analysis model may be different analysis models.

상기 제 2 유사도 분석 모델은 제 1 학습 데이터와 제 2 학습 데이터를 이용하여 학습되며, 상기 제 1 학습 데이터는 제 1 질의 쌍과 상기 제 1 질의 쌍이 유사함을 나타내는 레이블로 구성되고, 상기 제 2 학습 데이터는 제 2 질의 쌍과 상기 제 2 질의 쌍이 비유사함을 나타내는 레이블로 구성될 수 있다.The second similarity analysis model is trained using first training data and second training data, and the first training data consists of a first query pair and a label indicating that the first query pair is similar, and the second The learning data may consist of a second query pair and a label indicating that the second query pair is dissimilar.

상기 전자 장치는 데이터베이스를 포함하고, 상기 데이터베이스에는 질의와 상기 질의에 대한 질의 벡터가 연관되어 저장될 수 있다.The electronic device may include a database, and the database may store a query and a query vector for the query in association with the query.

상기 사용자 질의 벡터와의 유사도에 기초하여 유사 질의 후보를 선정하는 단계는, 상기 사용자 질의 벡터와의 유사도가 미리 설정된 기준 보다 높은 질의 벡터와 연관된 질의를 상기 유사 질의 후보로 선정하는 단계를 포함할 수 있다.The step of selecting a similar query candidate based on the similarity with the user query vector may include selecting a query associated with a query vector whose similarity with the user query vector is higher than a preset standard as the similar query candidate. there is.

상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계는, 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보에 속한 후보 질의의 유사도 순위를 결정하는 단계; 및 상기 유사도 순위에 따라 미리 결정된 수의 후보 질의를 유사 질의로 선정하는 단계를 포함할 수 있다.The step of selecting a similar query from among the similar query candidates based on the similarity analysis result with the user query vector includes determining a similarity rank of candidate queries belonging to the similar query candidates based on the similarity analysis result with the user query vector. steps; and selecting a predetermined number of candidate queries as similar queries according to the similarity ranking.

상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계는, 상기 유사 질의와 상기 유사 질의에 대한 응답이 상기 유사도 순위에 따라 사용자에게 제공되도록 상기 사용자 질의에 대한 응답을 생성하는 단계를 포함할 수 있다.Determining the response to the similar query as a response to the user query includes generating a response to the user query such that the similar query and the response to the similar query are provided to the user according to the similarity ranking. can do.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 검색 장치는 프로세서; 및 상기 프로세서에 의하여 실행되는 명령어를 저장하는 메모리를 포함하고, 상기 프로세서는 상기 명령어를 수행하는 것에 의하여, 사용자 질의에 대한 사용자 질의 벡터를 생성하고, 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 유사 질의를 선정하며, 상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정한다.In addition, a search device according to an embodiment of the present invention to solve the above problem includes a processor; and a memory storing instructions executed by the processor, wherein the processor generates a user query vector for a user query by executing the instruction, and based on a result of analysis of similarity with the user query vector. A similar query is selected, and the response to the similar query is determined as a response to the user query.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 컴퓨터로 읽을 수 있는 저장매체에 저장된 컴퓨터 프로그램은 사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계; 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 유사 질의를 선정하는 단계; 및 상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함한다.In addition, a computer program stored in a computer-readable storage medium according to an embodiment of the present invention for solving the above problem includes generating a user query vector for a user query; selecting a similar query based on a similarity analysis result with the user query vector; and determining a response to the similar query as a response to the user query.

본 발명은 사용자 질의와 유사한 질의에 대한 검색 결과를 사용자에게 제시하는 효과를 제공한다. 나아가, 본 발명은 검색 장치가 페러프레이즈 모델을 이용하여 사용자 질의에 유사도가 높은 질의를 선정하고, 선정된 질의의 응답을 제공함으로써 유사질의에 의한 답변을 보다 정확하게 제공할 수 있는 효과를 제공한다.The present invention provides the effect of presenting search results for queries similar to the user's query to the user. Furthermore, the present invention provides the effect of enabling a search device to more accurately provide answers to similar queries by using a paraphrase model to select a query with high similarity to the user's query and providing a response to the selected query.

도 1a는 본 발명의 일 실시 예에 따른 단말에 의하여 수행되는 검색 방법을 설명하는 순서도이다.
도 1b는 본 발명의 일 실시 예에 따른 검색 시스템을 도시하는 블록도이다.
도 2 및 도 3은 본 발명의 일 실시 예에 따른 단말과 서버를 도시하는 블록도이다.
도 4는 본 발명의 일 실시 예에 따른 검색 방법을 설명하는 순서도이다.
도 5 및 도 6은는 신경망을 학습하여 분석모델을 생성하는 과정을 설명하는 예를 도시하는 도면이다.
도 7은 자연어로 표현된 사용자 질의를 임베딩하여 벡터로 생성하는 예를 도시하는 도면이다.
도 8은 인코더를 생성하기 위한 신경망 학습 과정을 나타낸다.
도 9는 샴 신경망의 개념을 설명하는 도면이다.
도 10은 본 발명의 일 실시 예에 따른 분석 모델 생성 장치가 페러프레이즈 모델을 생성하는 방법을 설명하는 순서도이다.
도 11은 서버의 벡터기반 검색 방법을 설명하는 도면이다.
1A is a flowchart explaining a search method performed by a terminal according to an embodiment of the present invention.
Figure 1B is a block diagram illustrating a search system according to an embodiment of the present invention.
2 and 3 are block diagrams showing a terminal and a server according to an embodiment of the present invention.
Figure 4 is a flowchart explaining a search method according to an embodiment of the present invention.
Figures 5 and 6 are diagrams illustrating examples of the process of creating an analysis model by learning a neural network.
Figure 7 is a diagram showing an example of generating a vector by embedding a user query expressed in natural language.
Figure 8 shows the neural network learning process for generating an encoder.
Figure 9 is a diagram explaining the concept of a Siamese neural network.
Figure 10 is a flowchart explaining how the analysis model generation device generates a paraphrase model according to an embodiment of the present invention.
Figure 11 is a diagram explaining the vector-based search method of the server.

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

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

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

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

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

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

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

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

도 1a는 본 발명의 일 실시 예에 따른 단말(100)에 의하여 수행되는 검색 방법을 설명하는 순서도이다. 먼저, 단말(100)은 사용자 질의를 획득하고, 사용자 질의에 대한 사용자 질의 벡터를 생성한다(S10), 다음으로, 단말(100)은 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 유사질의를 선정한다(S20). 다음으로, 단말(100)은 유사 질의의 응답을 사용자 질의에 대한 응답으로 결정한다(S30). 다음으로, 단말(100)은 사용자 질의에 대한 응답을 생성한다(S40).FIG. 1A is a flowchart explaining a search method performed by the terminal 100 according to an embodiment of the present invention. First, the terminal 100 obtains a user query and creates a user query vector for the user query (S10). Next, the terminal 100 selects a similar query based on the similarity analysis result with the user query vector. Do it (S20). Next, the terminal 100 determines the response to the similar query as the response to the user query (S30). Next, the terminal 100 generates a response to the user inquiry (S40).

도 1b는 본 발명의 일 실시 예에 따른 검색 시스템을 도시하는 블록도이다. 일 실시 예에 따른 검색 시스템은 사용자 단말(100)과 검색 서버(200)로 구성된다. 이하에서는 설명의 편의를 위하여 사용자 단말(100)을 단말(100)로 약칭하고, 검색 서버(200)를 서버(200)로 약칭한다.Figure 1B is a block diagram illustrating a search system according to an embodiment of the present invention. A search system according to an embodiment consists of a user terminal 100 and a search server 200. Hereinafter, for convenience of explanation, the user terminal 100 is abbreviated as terminal 100, and the search server 200 is abbreviated as server 200.

일 실시 예에 따른 단말(100)은 서버(200)로 질의를 전송하고, 서버(200)로부터 질의에 대한 응답을 수신한다. 단말(100)은 서버(200)로부터 수신한 질의의 응답에 기초하여 사용자의 질의에 대한 답변을 제공한다.The terminal 100 according to one embodiment transmits a query 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 inquiry based on the inquiry response received from the server 200.

서버(200)는 키워드 기반으로 엘라스틱 서치를 수행하는 검색엔진일 수 있다. 일 실시 예에서 서버(200)는 벡터 기반으로 유사 질의를 검색할 수도 있다. 이를 통해, 서버(200)는 사용자 질의와 유사도가 높은 질의를 선정하여 단말(100)에 제공할 수 있다. 서버(200)가 일차적으로 사용자 질의에 대한 유사 질의 후보군을 선정하고, 단말(100)이 서버(200)가 제공한 유사 질의 후보군에 속한 질의에 대한 유사도 평가를 수행함으로써, 단말(100)은 사용자 질의와 유사한 유사 질의를 선정하기 위하여, 사용자 질의와 유사도를 분석해야 하는 질의의 개수를 일정 범위로 제한할 수 있다.The server 200 may be a search engine that performs elastic search based on keywords. In one embodiment, the server 200 may search for similar queries based on vectors. Through this, the server 200 can select a query with high similarity to the user query and provide it to the terminal 100. The server 200 primarily selects a similar query candidate group for the user query, and the terminal 100 performs a similarity evaluation on queries belonging to the similar query candidate group provided by the server 200, so that the terminal 100 allows the user to In order to select similar queries similar to the query, the number of queries whose similarity to the user query must be analyzed can be limited to a certain range.

도 2는 본 발명의 일 실시 예에 따른 단말(100)을 도시하는 블록도이다. 본 발명의 일 실시 예에 따른 단말(100)은 인코더(110), 페러프레이저(120), 유사 질의 선정부(130), 질의 답변부(140) 및 데이터베이스(150)로 구성될 수 있다.Figure 2 is a block diagram showing a terminal 100 according to an embodiment of the present invention. The terminal 100 according to an embodiment of the present invention may be composed of an encoder 110, a paraphraser 120, a similar question selection unit 130, a question answering unit 140, and a database 150.

인코더(110)는 자연어로 표현된 사용자 질의에 대응하는 임베딩 벡터(embedding vector)를 생성한다. 임베딩 벡터는 자연어로 표현된 사용자 질의의 구조와 의미를 나타내는 벡터이다. 인코더(110)는 신경망으로 구성될 수 있으며, 임베딩 벡터를 생성하기 위해 학습된 신경망 모델일 수 있다.The encoder 110 generates an embedding vector corresponding to a user query expressed in natural language. An embedding vector is a vector that represents the structure and meaning of a user query expressed in natural language. The encoder 110 may be composed of a neural network and may be a neural network model learned to generate an embedding vector.

페러프레이저(120)는 자연어로 표현된 복수의 질의에 대한 유사도를 분석하는 유사도 분석 모델이다. 페러프레이저(120)는 두개의 자연어 질의를 입력으로 받아, 질의의 유사도 값을 출력으로 제공한다. 예를들어, 페러프레이저(120)는 두개의 질의를 벡터화 하고, 각 질의에 대한 벡터의 유클리드 공간에서의 거리 또는 코사인 유사도에 기초하여 유사도 값을 결정할 수 있다. 페러프레이저(120)는 자연어로 표현된 질의를 벡터화 하기 위하여 인코더(110)를 포함하여 구성될 수도 있다. 페러프레이저(120)는 신경망으로 구성될 수 있으며, 질의간의 유사도를 결정하기 위하여 학습된 신경망 모델일 수 있다.Paraphraser 120 is a similarity analysis model that analyzes the similarity of multiple queries expressed in natural language. The paraphraser 120 receives two natural language queries as input and provides the similarity value of the queries as output. For example, the paraphraser 120 can vectorize two queries and determine a similarity value based on the distance or cosine similarity in Euclidean space of the vectors for each query. The paraphraser 120 may be configured to include an encoder 110 to vectorize a query expressed in natural language. The paraphraser 120 may be composed of a neural network and may be a neural network model learned to determine similarity between queries.

유사 질의 선정부(130)는 페러프레이저(120)에 의하여 획득된 유사도에 따라 사용자 질의와 유사한 질의를 선정한다. 그리고 사용자 질의와 유사한 순서에 따라 유사 질의의 유사도 등급을 결정한다.The similar query selection unit 130 selects a query similar to the user query according to the degree of similarity obtained by the paraphraser 120. Then, the similarity level of similar queries is determined according to the order of similarity to the user query.

질의 답변부(140)는 사용자로부터 사용자 질의를 획득한다. 그리고 질의 답변부(140)는 사용자 질의에 대한 답변을 사용자에게 제공한다. 질의 답변부(140)는 입력된 사용자 질의와 그에 대한 답변이 데이터베이스(150)에 저장되어 있는 경우, 입력된 사용자 질의에 대한 답변을 사용자에게 제공한다. 한편, 질의 답변부(140)는 입력된 사용자 질의가 데이터베이스(150)에 저장되어 있지 않는 경우, 유사 질의 선정부(130)에 의하여 선정된 유사도 등급에 따라 미리 설정된 기준에 따른 유사도 등급에 해당하는 유사 질의의 답변을 사용자의 답변으로 사용자에게 제공할 수 있다.The question answering unit 140 obtains a user inquiry from the user. And the question answering unit 140 provides answers to user inquiries to the user. If the input user query and the answer thereto are stored in the database 150, the question answering unit 140 provides the user with an answer to the input user query. Meanwhile, if the input user query is not stored in the database 150, the question answering unit 140 provides a similarity level according to a preset standard according to the similarity level selected by the similar question selection unit 130. Answers to similar questions can be provided to the user as the user's answer.

한편, 본 발명의 일 실시 예에 따른 단말(100)과 서버(200)는 도 3과 같이 프로세서(101), 메모리(102), 통신부(103), 사용자 인터페이스(104) 및 데이터베이스(105)를 포함하여 구성될 수도 있다. 메모리(102)에는 본 발명의 일 실시 예에 따른 검색 방법의 동작을 수행하는 프로그램이 저장되어 있을 수 있다. 메모리(102)에는 인코더(110) 및 페러프레이저(120)를 구현하기 위하여 학습된 신경망 모델이 저장되어 있을 수 있다. 프로세서(101)는 메모리(102)에 저장된 프로그램과 신경망 모델에 따라 데이터를 처리하여 통신부(103), 사용자 인터페이스(104) 및 데이터베이스(105)를 제어함으로써 본 발명의 일 실시 예에 따른 검색 방법을 수행할 수 있다.Meanwhile, the terminal 100 and the server 200 according to an embodiment of the present invention include a processor 101, a memory 102, a communication unit 103, a user interface 104, and a database 105, as shown in FIG. 3. It may be configured to include. The memory 102 may store a program that performs the operation of a search method according to an embodiment of the present invention. The memory 102 may store a neural network model learned to implement the encoder 110 and the paraphraser 120. The processor 101 processes data according to the program and neural network model stored in the memory 102 and controls the communication unit 103, user interface 104, and database 105 to perform a search method according to an embodiment of the present invention. It can be done.

이하 본 발명의 일 실시 예에 따른 검색 방법을 설명한다. 도 4는 본 발명의 일 실시 예에 따른 검색 방법을 설명하는 순서도이다. 단말(100)은 사용자 입력에 기반하여 사용자의 질의를 획득한다(S110). 단말(100)은 키보드나 터치패드를 통하여 입력되는 사용자의 텍스트 입력 또는 사용자의 발화에 의한 음성입력으로 사용자 질의를 획득할 수 있다. 사용자 질의는 자연어로 표현되는 문장일 수 있다.Hereinafter, a search method according to an embodiment of the present invention will be described. Figure 4 is a flowchart explaining a search method according to an embodiment of the present invention. The terminal 100 obtains the user's inquiry based on the user input (S110). The terminal 100 can obtain the user's inquiry through the user's text input through a keyboard or touchpad or voice input through the user's speech. The user query may be a sentence expressed in natural language.

다음으로, 단말(100)은 자연어로 표현되는 사용자 질의를 벡터화 한다(S120). 단말(100)은 인코더(110)를 사용하여 사용자 질의를 벡터표현으로 변환하여 사용자 질의 벡터를 생성할 수 있다. 다음으로, 단말(100)은 서버(200)로 사용자 질의 벡터를 전송한다(S130).Next, the terminal 100 vectorizes the user query expressed in natural language (S120). The terminal 100 can generate a user query vector by converting the user query into a vector representation using the encoder 110. Next, the terminal 100 transmits the user query vector to the server 200 (S130).

서버(200)는 단말(100)로부터 수신한 사용자 질의 벡터를 이용하여 유사 질의를 검색한다(S140). 서버(200)는 서버(200)의 데이터베이스에 저장된 질의 중에서 사용자 질의 벡터와 동일하거나 유사한 벡터를 가지는 질의를 검색한다. 보다 상세히, 서버(200)의 데이터베이스에는 질의와 질의에 대한 응답이 연관되어 저장되어 있을 수 있다. 예를 들어, 데이터베이스에는 (질의, 응답) 쌍이 저장되어 있을 수 있다. 또한, 데이터베이스에는 질의와 질의에 대한 벡터가 연관되어 저장되어 있을 수 있다. 예를 들어, 데이터베이스에는 (질의, 응답, 질의 벡터) 쌍이 저장되어 있을 수 있다.The server 200 searches for similar queries using the user query vector received from the terminal 100 (S140). The server 200 searches for a query having the same or similar vector as the user query vector among queries stored in the database of the server 200. In more detail, the query and the response to the query may be stored in association in the database of the server 200. For example, a (query, response) pair may be stored in a database. Additionally, a query and a vector for the query may be stored in association with each other in the database. For example, pairs (query, response, query vector) may be stored in a database.

서버(200)는 유사한 벡터를 가지는 질의를 검색하기 위하여 유클리드 공간에서 사용자 질의 벡터와 일정 거리 내에 위치하는 벡터를 유사한 벡터로 결정할 수 있다. 또는 서버(200)는 코사인 유사도에 기초하여 유사도를 결정할 수도 있다. 서버(200)는 유사 질의 검색 결과를 이용하여 유사 질의 후보군을 생성한다. 유사 질의 후보군은 질의로만 구성되거나, 질의와 응답 및 벡터 중 적어도 하나를 포함하여 구성될 수 있다. 또한, 유사 질의 후보군에는 후보군에 속한 질의 별로 사용자 질의 벡터와의 유사도 값이 더 포함될 수 있다. 나아가, 유사 질의 후보군에는 후보군에 속한 질의 간의 유사도 순서가 더 포함될 수도 있다. 서버(200)는 생성된 유사 질의 후보군을 단말(100)로 전송한다(S150).In order to search for queries with similar vectors, the server 200 may determine vectors located within a certain distance from the user query vector in Euclidean space as similar vectors. Alternatively, the server 200 may determine the similarity based on cosine similarity. The server 200 generates a group of similar query candidates using the similar query search results. The similar query candidate group may consist of only queries or may include at least one of a question, a response, and a vector. Additionally, the similar query candidate group may further include a similarity value with the user query vector for each query in the candidate group. Furthermore, the similar query candidate group may further include the order of similarity between queries belonging to the candidate group. The server 200 transmits the generated similar query candidate group to the terminal 100 (S150).

다음으로, 단말(100)은 서버(200)로부터 수신한 유사 질의 후보군 정보를 이용하여 유사 질의를 선정한다(S160). 단말(100)은 유사 질의 후보군에 속한 질의 중에서 사용자 질의와 유사한 질의를 선정할 수 있다. 단말(100)은 페러프레이저(120)를 이용하여 유사 질의 후보군에 속한 질의 각각과 입력된 사용자 질의의 유사도를 결정할 수 있다. 단말(100)은 가장 높은 유사도를 가지는 질의를 유사 질의로 선정할 수 있다. 또는, 단말(100)은 유사도가 높은 순으로 유사 질의 후보군에 속한 질의를 등급화함으로써 등급별로 유사 질의를 선정할 수도 있다. 페러프레이저(120)에 의한 유사도 분석 방법은 서버(200)에 의하여 수행되는 유사도 분석 방법과 다른 방법일 수 있다. 예를 들어, 페러프레이저(120)의 유사도 분석 모델은 서버(200)의 유사도 분석 모델과 다른 분석모델일 수 있으며, 신경망 모델로 구성될 경우 모델의 구성이나 은닉계층을 구성하는 변수의 값이 서로 다를 수 있다.Next, the terminal 100 selects a similar query using the similar query candidate information received from the server 200 (S160). The terminal 100 may select a query similar to the user query from among queries belonging to the similar query candidate group. The terminal 100 may use the paraphraser 120 to determine the degree of similarity between each query belonging to the similar query candidate group and the input user query. The terminal 100 can select the query with the highest similarity as the similar query. Alternatively, the terminal 100 may select similar queries by grade by grading the queries belonging to the similar query candidate group in descending order of similarity. The similarity analysis method performed by the paraphraser 120 may be different from the similarity analysis method performed by the server 200. For example, the similarity analysis model of the paraphraser 120 may be a different analysis model from the similarity analysis model of the server 200, and when it is composed of a neural network model, the values of variables constituting the model configuration or hidden layer are different from each other. can be different.

다음으로, 단말(100)은 선정된 유사 질의에 따라 응답을 제공한다(S170). 단말(100)은 가장 높은 유사도를 가지는 유사 질의에 대응되는 응답을 사용자가 입력한 사용자 질의에 대한 응답으로 제공할 수 있다. 또는, 단말(100)은 유사 질의의 등급에 따라, 유사 질의 후보군에 속한 질의에 대응되는 응답을 사용자가 입력한 사용자 질의에 대한 응답으로 제공할 수도 있다.Next, the terminal 100 provides a response according to the selected similar query (S170). The terminal 100 may provide a response corresponding to a similar query with the highest degree of similarity as a response to a user query entered by the user. Alternatively, the terminal 100 may provide a response corresponding to a query belonging to a candidate group of similar queries as a response to the user query entered by the user, depending on the level of the similar query.

단말(100)은 유사 질의 후보군에 대한 응답을 서버(200)로부터 모두 수신하는 것이 아니라 선정된 유사 질의에 대한 응답 만을 서버(200)로부터 수신할 수 있다. 이는, 유사 질의 후보군에 응답 정보가 포함되어 있지 않으며, 단말(100)이 응답정보가 필요한 유사 질의를 서버(200)로 전송하고, 유사 질의의 응답을 서버로부터 수신함으로써, 유사 질의에 대한 응답만을 서버(200)로부터 전송 받는 것으로 구현될 수 있다. 이로써, 단말(100)과 서버(200)간의 트래픽을 줄일 수도 있다.The terminal 100 may not receive all responses to similar query candidates from the server 200, but may only receive responses to selected similar queries from the server 200. This means that the similar query candidate group does not include response information, and the terminal 100 transmits a similar query requiring response information to the server 200 and receives a response to the similar query from the server, thereby only providing a response to the similar query. It can be implemented by receiving transmission from the server 200. As a result, traffic between the terminal 100 and the server 200 can be reduced.

유사 질의는 사용자 질의와 의미가 다른 질의일 수도 있다. 예를 들어, 사용자가 “시청까지 얼마야?”라는 질의를 입력하였을 경우, 단말(100)은 유사 질의로 '시청까지 도달하기 위한 소요시간 얼마야', '시청까지 가기 위한 거리가 얼마야?' 또는 '시청까지 도달하기 위한 교통비 얼마야?'와 같은 유사 질의를 선정할 수 있다. 또한, '시청까지 도달하기 소요시간 얼마야?'라는 유사 질의의 경우 '자가용으로 시청까지 도달하기 위한 교통비 얼마야?', '대중교통으로 시청까지 도달하기 위한 교통비 얼마야?' 또는 '걸어서 시청까지 도달하기 위한 교통비 얼마야?'와 같은 유사 질의가 존재할 수도 있다.A similar query may be a query that has a different meaning from the user query. For example, when a user inputs the query “How much does it take to get to City Hall?”, the terminal 100 asks similar questions such as “How much time does it take to get to City Hall?” and “How much is the distance to get to City Hall?” ' Alternatively, you can select a similar query such as 'How much does it cost to travel to City Hall?' Additionally, in the case of similar queries such as ‘How much time does it take to reach City Hall?’, ‘How much is the transportation cost to reach City Hall by private car?’, ‘How much is the transportation cost to reach City Hall by public transportation?’ Or, similar queries may exist, such as 'How much does it cost to travel to City Hall on foot?'

이러한 경우 유사 질의에 대한 답변만을 사용자에게 제공하는 경우 사용자는 다른 의미에 대한 응답을 사용자가 입력한 질의에 대한 답변으로 오해할 수도 있다. 이에 따라, 단말(100)은 유사 질의에 대응되는 응답을 사용자에게 제공하는 경우, 유사 질의와 함께 유사 질의에 대한 응답을 사용자에게 제공할 수도 있다.In this case, if only answers to similar queries are provided to the user, the user may misunderstand the response with a different meaning as an answer to the query entered by the user. Accordingly, when the terminal 100 provides the user with a response corresponding to a similar query, the terminal 100 may provide the user with a response to the similar query along with the similar query.

한편, 도 4를 참조한 설명에서 S130단계는 단말(100)이 서버(200)로 사용자 질의 벡터가 아닌 사용자 질의 자체를 전송함으로써 수행될 수도 있다. 이러한 경우 서버(200)는 인코더를 이용하여 사용자 질의에 대한 사용자 질의 벡터를 생성할 수 있다. 그리고, S140 단계에서 서버(200)는 생성된 사용자 질의 벡터를 이용함으로써 유사 질의를 검색할 수 있다.Meanwhile, in the description referring to FIG. 4, step S130 may be performed by the terminal 100 transmitting the user query itself rather than the user query vector to the server 200. In this case, the server 200 may generate a user query vector for the user query using an encoder. Then, in step S140, the server 200 can search for similar queries by using the generated user query vector.

이하 도면을 참조하여 각 단계를 보다 상세히 설명한다. 본 발명의 일 실시 예에 따른 단말(100)과 서버(200)는 자연어를 분석하여 질의를 벡터화 하고, 질의 간의 유사도를 벡터차원에서 분석하기 위하여 학습된 신경망 모델을 저장할 수 있다. 일 실시 예에 따른 신경망 모델은 적용 분야 또는 장치의 연산 능력에 따라 동작할 수 있는 규모로 생성될 수 있다.Each step will be described in more detail below with reference to the drawings. The terminal 100 and the server 200 according to an embodiment of the present invention can analyze natural language to vectorize queries and store a learned neural network model to analyze the similarity between queries at the vector level. A neural network model according to one embodiment may be created at a scale that can operate depending on the application field or the computing power of the device.

일 실시 예에서, 신경망 모델은 딥 러닝 모델일 수 있다. 딥 러닝 모델은 복수의 히든 레이어로 구축될 수 있다. 레이어에 속한 노드들은 노드간의 연결 관계에 따라 데이터를 주고 받을 수 있다. 본 발명의 일 실시 예에 따른 단말(100)과 서버(200)는 DNN(Deep Neural Network), RNN(Recurrent Neural Network), BRDNN(Bidirectional RecurrentDeep Neural Network) 등을 학습시켜 분석모델을 생성하고, 생성된 분석모델을 사용하여 일 실시 예에 따른 방법을 수행할 수 있다.In one embodiment, the neural network model may be a deep learning model. Deep learning models can be built with multiple hidden layers. Nodes belonging to a layer can send and receive data according to the connection relationship between nodes. The terminal 100 and the server 200 according to an embodiment of the present invention generate and generate an analysis model by learning a Deep Neural Network (DNN), a Recurrent Neural Network (RNN), and a Bidirectional RecurrentDeep Neural Network (BRDNN). The method according to one embodiment can be performed using the analysis model.

도 5는 신경망을 학습하여 분석모델을 생성하는 과정을 설명하는 순서도이다. 일 실시 예에 따른 인코더(110)와 페러프레이저(120)는 도 5에 따른 분석 모델 생성 방법에 따라 분석 모델 생성 장치에 의하여 생성될 수 있다. 먼저, 분석 모델 생성 장치는 학습데이터를 획득한다(S210). 학습데이터는 생성하고자 하는 분석 모델에 따라 설정될 수 있다.Figure 5 is a flowchart explaining the process of creating an analysis model by learning a neural network. The encoder 110 and the paraphraser 120 according to one embodiment may be created by an analysis model generating device according to the analysis model generation method according to FIG. 5. First, the analysis model creation device acquires learning data (S210). Learning data can be set according to the analysis model to be created.

다음으로, 분석 모델 생성 장치는 획득된 학습데이터를 이용하여 신경망을 학습시킨다(S220). 도 6을 참조하여 보다 상세히 설명한다. 분석 모델 생성 장치는 생성하고자 하는 분석 모델에 따라 신경망 모델을 설정하고, 순전파(Forward Propagation)를 수행하여 예측값을 결정할 수 있다. 그리고 분석 모델 생성 장치는 손실 함수(Loss function)를 사용하여 예측값과 실제값을 비교함으로써 변수의 값을 결정하기 위한 오차값을 결정할 수 있다. 장치는 예측값과 실제값의 오차가 감소하도록 역전파(Backward Propagation)를 사용하여 신경망 모델의 변수값을 조정할 수 있다. 역전파에 사용되는 옵티마이저(Optimizer)로는 배치경사 하강법, 확률적 경사 하강법 등이 사용될 수 있다.Next, the analysis model creation device trains a neural network using the acquired training data (S220). This will be described in more detail with reference to FIG. 6. The analysis model creation device can set a neural network model according to the analysis model to be created and determine the predicted value by performing forward propagation. And the analysis model creation device can determine the error value for determining the value of the variable by comparing the predicted value and the actual value using a loss function. The device can adjust the variable values of the neural network model using backward propagation so that the error between the predicted value and the actual value is reduced. As an optimizer used in backpropagation, batch gradient descent, stochastic gradient descent, etc. can be used.

신경망의 학습이 진행된 후에, 분석 모델 생성 장치는 신경망이 유효한 분석 결과를 도출하는지를 확인하기 위하여 테스트 데이터를 획득하고(S230), 획득된 테스트 데이터를 이용하여 신경망을 테스트한다(S240). 테스트 데이터는 입력값과 그에 따른 실제값으로 구성될 수 있다. 분석 모델 생성 장치는 테스트 데이터의 입력값을 신경망에 적용한 결과인 예측값이 테스트 데이터의 실제값으로부터 허용 오차범위내의 오차값을 가지는 경우 신경망의 학습을 종료하고, 학습된 신경망을 분석 모델로 사용할 수 있다(S250). 한편, 분석 모델 생성 장치는 테스트 데이터의 입력에 따른 예측값과 실제값의 오차값이 허용 오차범위를 벗어나는 경우 신경망의 학습을 지속할 수 있다.After learning of the neural network progresses, the analysis model creation device acquires test data to check whether the neural network produces valid analysis results (S230) and tests the neural network using the acquired test data (S240). Test data may consist of input values and corresponding actual values. The analysis model creation device terminates learning of the neural network when the predicted value, which is the result of applying the input value of the test data to the neural network, has an error value within the tolerance range from the actual value of the test data, and can use the learned neural network as an analysis model. (S250). Meanwhile, the analysis model generation device can continue learning the neural network when the error value between the predicted value and the actual value according to the input of test data is outside the tolerance range.

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

이하, 인코더(110)가 수행하는 질의의 벡터화 방법을 설명한다. 인코더(110)는 도 7과 같이 자연어로 표현된 사용자 질의를 임베딩하여 벡터로 생성할 수 있다. 본 발명의 일 실시 예에 따른 인코더(110)는 신경망을 이용하여 생성된 벡터 생성 모델로써, 질의를 입력으로 하여 질의에 대응하는 벡터값을 출력할 수 있다. 일 실시 예에 따른 인코더(110)는 BOW(Bag of Words), TF-IDF, Doc2Vec, Text Embedding Encoder, Word2Vec과 같은 모델일 수 있다.Hereinafter, a method of vectorizing a query performed by the encoder 110 will be described. The encoder 110 can generate a vector by embedding a user query expressed in natural language, as shown in FIG. 7. The encoder 110 according to an embodiment of the present invention is a vector generation model created using a neural network, and can take a query as input and output a vector value corresponding to the query. The encoder 110 according to one embodiment may be a model such as Bag of Words (BOW), TF-IDF, Doc2Vec, Text Embedding Encoder, or Word2Vec.

도 8은 인코더(110)를 생성하기 위한 신경망 학습 과정을 나타낸다. 분석 모델 생성 장치는 전처리된 학습데이터(S310)를 이용하여 DNN 또는 RNN 모델과 같은 신경망 모델을 학습시키고(S320), 학습된 모델을 테스트함으로써(S330, S340) 인코더(110) 모델을 생성할 수 있다(S350).Figure 8 shows the neural network learning process for generating the encoder 110. The analysis model generation device can generate an encoder 110 model by training a neural network model such as a DNN or RNN model (S320) using preprocessed learning data (S310) and testing the learned model (S330, S340). There is (S350).

예를 들어, 분석 모델 생성 장치는 인코더(110)를 생성하기에 앞서 학습데이터를 전처리 할 수 있다. 분석 모델 생성 장치는 질의에 대한 토큰화를 수행하여 단어를 추출할 수 있다. 일 실시 예에서 분석 모델 생성 장치는 스페이스, 콜론, 콤마 등을 기준으로 토큰화를 수행할 수 있다. 추가적으로 분석 모델 생성 장치는 형태소 분석, 불용어 제거 등을 거쳐 전처리를 수행할 수 있다.For example, the analysis model creation device may preprocess learning data prior to generating the encoder 110. The analysis model creation device can extract words by performing tokenization on the query. In one embodiment, the analysis model creation device may perform tokenization based on spaces, colons, commas, etc. Additionally, the analysis model generation device can perform preprocessing through morpheme analysis and stop word removal.

다음으로, 일 실시 예에서, 분석 모델 생성 장치는 CBOW(Continuous Bag of Words)를 적용하여 Word2Vec 모델을 학습시켜 나갈 수 있다. 분석 모델 생성 장치는 주변 단어의 원-핫 벡터에 따른 스코어 벡터와 중심 단어의 원-핫 벡터를 손실함수인 크로스 엔트로피(cross-entropy) 함수에 적용하고, 손실함수의 값이 0에 가까워지도록 학습과정을 진행하여 신경망의 변수를 수정함으로써 인코더(110) 모델을 생성할 수 있다.Next, in one embodiment, the analysis model creation device may learn the Word2Vec model by applying CBOW (Continuous Bag of Words). The analysis model generator applies the score vector according to the one-hot vector of the surrounding words and the one-hot vector of the center word to the cross-entropy function, which is a loss function, and learns so that the value of the loss function approaches 0. The encoder 110 model can be created by proceeding with the process and modifying the variables of the neural network.

이하, 페러프레이저(120)가 수행하는 질의 쌍의 유사도 결정 방법을 설명한다. 페러프레이저(120)는 질의 쌍으로 이루어진 입력에 대하여 질의 쌍의 유사도를 출력하는 페러프레이즈 모델이다. 분석 모델 생성 장치는 신경망 모델을 학습시켜 페러프레이즈 모델을 구축할 수 있다. 신경망 모델은 CNN, DNN, RNN 등일 수 있다.Hereinafter, a method for determining the similarity of a query pair performed by the paraphraser 120 will be described. The paraphrase 120 is a paraphrase model that outputs the similarity of a query pair for an input consisting of a query pair. The analysis model creation device can build a paraphrase model by learning a neural network model. The neural network model may be CNN, DNN, RNN, etc.

일 실시 예에 따른 페러프레이즈 모델은 앞서 설명한 인코더(110)를 이용하여 질의의 벡터표현을 획득할 수 있다. 페러프레이즈 모델은 벡터 유사도를 평가함으로써 두개의 질의간의 유사도를 평가할 수 있다. 예를 들어, 페러프레이즈 모델은 질의의 벡터 표현을 생성하고, 유클리드 공간에서의 두 질의 벡터 간의 거리를 계산함으로써 두개의 질의간의 유사도를 평가할 수 있다. 페러프레이즈 모델은 두개의 질의 벡터의 거리가 가까운 만큼 유사하다고 결정할 수 있다. The paraphrase model according to one embodiment can obtain a vector representation of the query using the encoder 110 described above. The paraphrase model can evaluate the similarity between two queries by evaluating vector similarity. For example, the paraphrase model can generate a vector representation of the query and evaluate the similarity between two queries by calculating the distance between the two query vectors in Euclidean space. The paraphrase model can determine that two query vectors are similar to the extent that their distances are close.

다른 실시 예에서, 페러프레이즈 모델은 두개의 질의의 벡터 표현간의 코사인 유사도를 계산함으로써 유사도를 평가할 수도 있다. 페러프레이즈 모델은 코사인 유사도의 값이 1에 가까울수록 유사하고, -1에 가까울수록 비유사함을 결정할 수 있다. In another embodiment, the paraphrase model may evaluate similarity by calculating the cosine similarity between vector representations of two queries. The paraphrase model can determine that the closer the cosine similarity value is to 1, the more similar it is, and the closer it is to -1, the more dissimilar it is.

한편, 위와 같은 방식으로 질의의 유사도를 분석하는 경우 질문의 형태는 유사하지만 일부 단어의 변경으로 전혀 다른 내용의 질의를 구성하는 경우에도 질의가 서로 유사하다고 분석될 수 있다. 예를 들어, '여기에서 시청까지 교통비가 얼마야?'라는 질의와, '여기에서 시청까지 거리가 얼마야?'라는 질의는 '교통비'와 '거리가'라는 단어 외에는 동일한 단어로 구성되어 있어서 앞서 설명한 유사도 분석 방법으로는 유사한 질의인 것으로 결정될 수 있다.On the other hand, when analyzing the similarity of queries in the above manner, the questions can be analyzed as similar even if the form of the question is similar but the query has completely different content due to changes in some words. For example, the query ‘How much is the transportation cost from here to City Hall?’ and the query ‘How far is it from here to City Hall?’ are composed of the same words except for the words ‘transportation cost’ and ‘distance’. Using the similarity analysis method described above, it can be determined that the queries are similar.

이와 같이, 페러프레이저(120)는 질의에 포함되는 단어가 유사하지만 의미적으로는 다른 내용을 가지는 질의들이 서로 비유사 함을 식별할 수 있어야 한다. 일 실시 예에 따른 페러프레이즈 모델은 샴 신경망(siamnese neural network)을 이용하며 지도학습(Supervised Learning)으로 학습될 수 있다. In this way, the paraphraser 120 must be able to identify that queries containing similar words but different semantic content are dissimilar to each other. The paraphrase model according to one embodiment uses a Siamese neural network and can be learned through supervised learning.

도 9는 샴 신경망의 개념을 설명하는 도면이다. 샴 신경망은 동일한 신경망으로 구성된다. 분석 모델 생성 장치는 서로 같은 의미의 질의가 입력될 경우 유사한 벡터가 결과값으로 생성되고, 서로 다른 의미의 질의가 입력될 경우 비유사한 벡터가 결과값으로 생성되도록, 샴 신경망을 구성하는 변수를 변경하여 나가면서 신경망을 학습시킴으로써 페러프레이즈 모델을 생성할 수 있다. 그리하여, 페러프레이저(120)는 질의마다 생성되는 벡터값의 유사도를 분석하여 양 질의의 유사도를 결정할 수 있다. 여기서, 벡터의 유사도는 유클리드 공간에서의 거리 근접성 또는 코사인 유사도의 값이 1에 얼마나 가까운지에 기초하여 판단될 수 있다.Figure 9 is a diagram explaining the concept of a Siamese neural network. Siamese neural networks are composed of identical neural networks. The analysis model generation device changes the variables that make up the Siamese neural network so that when queries with the same meaning are input, similar vectors are generated as result values, and when queries with different meanings are input, dissimilar vectors are generated as result values. By training the neural network as you go, you can create a paraphrase model. Thus, the paraphraser 120 can determine the similarity of both queries by analyzing the similarity of vector values generated for each query. Here, the similarity of the vectors may be determined based on distance proximity in Euclidean space or how close the cosine similarity value is to 1.

도 10은 본 발명의 일 실시 예에 따른 분석 모델 생성 장치가 페러프레이즈 모델을 생성하는 방법을 설명하는 순서도이다. 이하의 설명에서는 학습 데이터를 구성하는 질의는 텍스트로 표현된 것으로 설명되나, 실시 예에 따라서는 학습 데이터를 구성서는 질의는 앞서 설명된 인코더에 의하여 벡터로 표현된 것일 수도 있다.Figure 10 is a flowchart explaining how the analysis model generation device generates a paraphrase model according to an embodiment of the present invention. In the following description, the query constituting the learning data is described as being expressed as text, but depending on the embodiment, the query constituting the learning data may be expressed as a vector by the encoder described above.

본 발명의 일 실시 예에 따른 분석 모델 생성 장치는 유사한 단어와 구조로 구성되어 문장의 형식이 유사하고, 질의의 의미 또한 유사한 질의들로 구성된 제 1 학습데이터를 생성한다(410). 제 1 학습 데이터에는 질의 쌍과 함께 해당 질의들은 유사한 의미를 가진다는 레이블 또한 포함될 수 있다. 예를 들어, 페러프레이즈 모델의 학습을 위한 학습 데이터는 질의의 쌍과 질의 쌍의 유사도 레이블로 구성될 수 있다. 예를 들어, 학습 데이터는 (제 1 질의, 제 2 질의)로 구성되는 질의쌍과 질의쌍의 유사도 점수로 구성될 수 있다.The analysis model generation device according to an embodiment of the present invention generates first learning data composed of queries that are composed of similar words and structures, have similar sentence formats, and have similar meanings (410). The first learning data may also include a pair of queries and a label indicating that the queries have similar meanings. For example, training data for learning a paraphrase model may consist of a query pair and a similarity label for the query pair. For example, the learning data may consist of a query pair consisting of (first query, second query) and a similarity score of the query pair.

다음으로, 분석 모델 생성 장치는 제 1 학습데이터를 이용하여 신경망의 학습을 수행한다(S420). 분석 모델 생성 장치는 학습 진행 경과에 따라 테스트 데이터를 사용하여 학습 정도를 체크하고 과적합이 발생하기 시작할 경우 학습을 중단할 수 있다.Next, the analysis model generating device performs learning of the neural network using the first learning data (S420). The analysis model creation device can check the degree of learning using test data according to the progress of learning and stop learning when overfitting begins to occur.

다음으로, 분석 모델 생성 장치는 유사한 단어와 구조로 구성되어 문장의 형식이 유사하지만, 질의의 의미가 서로 같지 않은 질의들로 구성된 제 2 학습데이터를 생성한다(430). 제 2 학습 데이터에는 질의 쌍과 함께 해당 질의들은 유사한 의미를 가지지 않는다는 레이블 또한 포함될 수 있다.Next, the analysis model generation device generates second learning data consisting of queries that are composed of similar words and structures and have similar sentence formats, but the meanings of the queries are not the same (430). The second learning data may also include a label indicating that the queries do not have similar meanings along with the query pair.

다음으로, 분석 모델 생성 장치는 제 2 학습데이터를 이용하여 신경망의 학습을 수행한다(S440). 분석 모델 생성 장치는 학습 진행 경과에 따라 테스트 데이터를 사용하여 학습 정도를 체크하고 과적합이 발생하기 시작할 경우 학습을 중단할 수 있다.Next, the analysis model generating device performs learning of the neural network using the second learning data (S440). The analysis model creation device can check the degree of learning using test data according to the progress of learning and stop learning when overfitting begins to occur.

한편, S420 단계와 S440단계에서의 신경망 학습은 서로 다른 레이블을 가진 학습 데이터로 수행된다. 분석 모델 생성 장치는 학습의 효율을 높이기 위하여 제 1 학습 데이터와 제 2 학습 데이터를 섞음으로써 S420 단계와 S440 단계의 구분없이 신경망을 학습시킬 수 있다. 분석 모델 생성 장치는 예측값과 결과값 간의 오차값을 결정하기 위해 삼중항 손실함수 등을 사용할 수 있다.Meanwhile, neural network learning in steps S420 and S440 is performed with learning data with different labels. The analysis model generator can train the neural network without distinguishing between steps S420 and S440 by mixing first and second learning data to increase learning efficiency. The analytical model creation device may use a triplet loss function, etc. to determine the error value between the predicted value and the result value.

다음으로, 분석 모델 생성 장치는 위와 같이 학습된 신경망에 테스트 데이터를 입력한다. 분석 모델 생성 장치는 테스트 데이터에 대하여 오차범위 내의 예측값을 발생시키는 경우, 학습된 신경망을 페러프레이즈 모델로써 사용할 수 있음을 결정할 수 있다(S450).Next, the analysis model creation device inputs test data into the learned neural network as above. If the analysis model generating device generates a predicted value within the error range for the test data, it may determine that the learned neural network can be used as a paraphrase model (S450).

이하, 서버(200)의 벡터기반 검색 방법을 설명한다. 본 발명의 일 실시 예에 따른 서버(200)는 질의와 응답으로 구성된 질의 응답 쌍을 데이터베이스에 저장하고 있을 수 있으며, 질의에 대한 벡터표현인 질의 벡터 또한 질의와 응답과 함께 데이터베이스에 저장하고 있을 수 있다. 예를 들어, 서버(200)의 데이터베이스에는 (질의, 응답, 질의벡터)의 쌍이 저장되어 있을 수 있다. 질의벡터를 생성하기 위해 앞서 설명된 인코더가 사용될 수 있다. 서버(200)는 앞서 설명된 인코더를 이용하여 질의에 대한 질의 벡터를 생성할 수 있다.Hereinafter, the vector-based search method of the server 200 will be described. The server 200 according to an embodiment of the present invention may store a question-and-answer pair consisting of a query and a response in a database, and may also store a query vector, which is a vector representation of the query, in the database along with the query and response. there is. For example, a pair of (query, response, query vector) may be stored in the database of the server 200. The encoder described above can be used to generate the query vector. The server 200 may generate a query vector for the query using the encoder described above.

도 11을 참조하여 서버(200)의 벡터기반 검색 방법을 보다 상세히 설명한다. 서버(200)는 질의를 전처리할 수 있다(S510). 일 실시 예에서 모든 대문자는 소문자로 변환될 수 있다. 불용어는 제거될 수 있다. 예를 들어, a, an, the와 같은 불용어는 제거될 수 있다. 이와 함께 형태소 분석과정을 거칠 수 있다.Referring to FIG. 11, the vector-based search method of the server 200 will be described in more detail. The server 200 may preprocess the query (S510). In one embodiment, all uppercase letters may be converted to lowercase letters. Stop words can be eliminated. For example, stop words such as a, an, and the can be removed. In addition, you can go through a morphological analysis process.

다음으로, 서버(200)는 질의를 벡터화 한다(S520). 벡터화를 위해 앞서 설명한 인코더(110) 모델이 사용될 수 있다. 장치는 인코더(110) 모델을 사용하여 질의의 벡터값을 생성할 수 있다.Next, the server 200 vectorizes the query (S520). The encoder 110 model described above can be used for vectorization. The device may use the encoder 110 model to generate vector values of the query.

다음으로, 서버(200)는 데이터베이스에 벡터를 추가한다(S530). 이에 따라, 데이터베이스에 질의, 응답 및 질의에 대한 벡터값이 포함될 수 있다.Next, the server 200 adds the vector to the database (S530). Accordingly, the database may include queries, responses, and vector values for the queries.

이로써, 서버(200)는 질의 벡터에 기초하여 질의 검색을 수행할 수 있다(S540). 예를 들어, 서버(200)는 사용자가 입력한 질의의 텍스트에 기초하여 동일한 질의를 검색하거나, 텍스트에 기반하여 유사한 키워드가 포함된 질의를 검색결과로 제시할 수도 있다.Accordingly, the server 200 can perform a query search based on the query vector (S540). For example, the server 200 may search for the same query based on the text of the query entered by the user, or may present queries containing similar keywords as search results based on the text.

또한, 서버(200)는 사용자가 입력한 질의를 벡터화하고, 생성된 벡터에 기초하여 데이터베이스를 검색하여 동일한 또는 유사한 벡터값을 가지는 질의를 사용자에게 제시할 수도 있다. 벡터의 유사도는 유클리드 공간에서의 거리 또는 코사인 유사도로 판단될 수 있다.Additionally, the server 200 may vectorize the query entered by the user, search the database based on the generated vector, and present a query with the same or similar vector value to the user. Vector similarity can be judged by distance or cosine similarity in Euclidean space.

한편, 서버(200)는 단말(100)로부터 벡터값을 입력 받을 수도 있다. 이러한 경우, 서버(200)는 입력 받은 벡터값에 기초하여 데이터베이스를 검색하여 동일한 또는 유사한 벡터값을 가지는 질의와 그의 응답의 쌍을 단말(100)로 제공할 수 있다.Meanwhile, the server 200 may receive a vector value from the terminal 100. In this case, the server 200 may search the database based on the input vector value and provide the terminal 100 with a pair of queries and responses having the same or similar vector values.

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

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

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

Claims (9)

전자 장치에 의하여 수행되는 검색 방법에 있어서,
사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계;
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 적어도 하나의 유사 질의 후보를 포함하는 유사 질의 후보군을 획득하는 단계-상기 유사 질의 후보는 제1 유사도 분석 모델을 통하여, 서버의 데이터베이스에 포함된 질의 응답 쌍에 포함된 질의 벡터와 상기 사용자 질의 벡터 간의 유사도를 분석하고, 제1 유사도 분석 결과에 기초하여 선택되며, 상기 유사 질의 후보군은 유사 질의 후보, 유사 질의 후보에 대응되는 질의 벡터, 및 질의 벡터와 상기 사용자 질의 벡터 간의 유사도 값이 포함됨-;
제2 유사도 분석 모델을 통하여 상기 사용자 질의 벡터와 상기 유사 질의 후보군에 포함된 유사 질의 후보에 대응되는 질의 벡터 간의 유사도를 분석하고, 제2 유사도 분석 결과에 기초하여 유사 질의를 결정하는 단계; 및
상기 유사 질의에 대한 응답을 상기 서버로부터 수신하는 단계;
상기 수신한 유사 질의에 대한 응답에 기초하여, 상기 사용자 질의에 대한 응답을 결정하는 단계; 및
상기 결정된 응답을 사용자에게 제공하는 단계를 포함하되,
상기 제1 유사도 분석 모델과 상기 제2 유사도 분석 모델은 신경망 모델의 구성이 서로 다르고,
상기 제2 유사도 분석 모델은 제1 학습 데이터와 제2 학습 데이터를 이용하여 학습되고,
상기 제1 학습 데이터는 제1 질의 쌍과 상기 제1 질의 쌍이 유사함을 나타내는 레이블로 구성되고, 상기 제1 질의 쌍은 유사한 단어와 구조로 구성되어 문장의 형식이 서로 유사하고, 각 질의의 의미가 서로 유사한 질의들로 구성되며,
상기 제2 학습 데이터는 제2 질의 쌍과 상기 제2 질의 쌍이 비유사함을 나타내는 레이블로 구성되고, 상기 제2 질의 쌍은 유사한 단어와 구조로 구성되어 문장의 형식이 서로 유사하지만, 각 질의의 의미가 서로 다른 질의들로 구성되는,
검색 방법.
In a search method performed by an electronic device,
generating a user query vector for a user query;
Obtaining a group of similar query candidates including at least one similar query candidate selected based on similarity to the user query vector - the similar query candidates are selected as query responses included in the database of the server through a first similarity analysis model. The similarity between the query vector included in the pair and the user query vector is analyzed and selected based on the first similarity analysis result, and the similar query candidate group includes a similar query candidate, a query vector corresponding to the similar query candidate, and a query vector. Includes similarity values between the user query vectors;
Analyzing the similarity between the user query vector and a query vector corresponding to a similar query candidate included in the similar query candidate group through a second similarity analysis model, and determining a similar query based on the second similarity analysis result; and
Receiving a response to the similar query from the server;
determining a response to the user query based on responses to the received similar query; and
Including providing the determined response to the user,
The first similarity analysis model and the second similarity analysis model have different neural network model configurations,
The second similarity analysis model is learned using first training data and second training data,
The first learning data consists of a first query pair and a label indicating that the first query pair is similar, the first query pair is composed of similar words and structures, so that the sentence format is similar to each other, and the meaning of each query consists of similar queries,
The second learning data consists of a second query pair and a label indicating that the second query pair is dissimilar, and the second query pair is composed of similar words and structures so that the sentence format is similar to each other, but the meaning of each query is similar. consists of different queries,
How to search.
제1 항에 있어서,
상기 유사 질의 후보군은,
유클리드 공간에서의 상기 사용자 질의 벡터로부터 미리 결정된 거리 내에 위치하는 데이터베이스에 포함된 질의 벡터를 상기 유사 질의 후보로 결정함으로써 획득된,
검색 방법.
According to claim 1,
The above similar query candidates are:
Obtained by determining as the similar query candidate a query vector contained in a database located within a predetermined distance from the user query vector in Euclidean space,
How to search.
제1 항에 있어서,
상기 유사 질의 후보군은,
상기 사용자 질의 벡터와 상기 데이터베이스에 포함된 질의 벡터 간의 코사인 유사도에 기초하여 획득된,
검색 방법.
According to claim 1,
The above similar query candidates are:
Obtained based on cosine similarity between the user query vector and the query vector included in the database,
How to search.
제1 항에 있어서,
상기 결정된 응답을 사용자에게 제공하는 단계는,
상기 결정된 응답 및 상기 결정된 응답에 대응하는 유사 질의를 함께 사용자에게 제공하는 단계를 더 포함하는,
검색 방법.
According to claim 1,
The step of providing the determined response to the user is,
Further comprising providing the user with the determined response and a similar query corresponding to the determined response,
How to search.
제1 항에 있어서,
상기 전자 장치는 데이터베이스를 포함하고,
상기 데이터베이스에는 질의와 상기 질의에 대한 질의 벡터가 연관되어 저장되어 있는,
검색 방법.
According to claim 1,
The electronic device includes a database,
In the database, a query and a query vector for the query are stored in association.
How to search.
제1 항에 있어서,
상기 유사 질의 후보군은,
상기 사용자 질의 벡터와의 유사도가 미리 설정된 기준 보다 높은 질의 벡터와 연관된 질의를 상기 유사 질의 후보로 결정함으로써 획득된,
검색 방법.
According to claim 1,
The above similar query candidates are:
Obtained by determining a query associated with a query vector whose similarity with the user query vector is higher than a preset standard as the similar query candidate,
How to search.
제1 항에 있어서,
상기 유사 질의를 결정하는 단계는,
상기 유사 질의 후보에 대응되는 질의 벡터와 상기 사용자 질의 벡터 간의 제2 유사도 분석 결과에 기초하여 상기 유사 질의 후보군에 속한 유사 질의 후보의 유사도 순위를 결정하는 단계; 및
상기 유사도 순위에 따라 미리 결정된 수의 유사 질의 후보를 유사 질의로 선정하는 단계를 포함하는,
검색 방법.
According to claim 1,
The step of determining the similar query is,
determining a similarity ranking of similar query candidates belonging to the similar query candidate group based on a second similarity analysis result between the query vector corresponding to the similar query candidate and the user query vector; and
Comprising the step of selecting a predetermined number of similar query candidates according to the similarity ranking as a similar query,
How to search.
프로세서; 및
상기 프로세서에 의하여 실행되는 명령어를 저장하는 메모리를 포함하고,
상기 프로세서는 상기 명령어를 수행하는 것에 의하여,
사용자 질의에 대한 사용자 질의 벡터를 생성하고,
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 적어도 하나의 유사 질의 후보-상기 유사 질의 후보는 제1 유사도 분석 모델을 통하여, 서버의 데이터베이스에 포함된 질의 응답 쌍에 포함된 질의 벡터와 상기 사용자 질의 벡터 간의 유사도를 분석하고, 제1 유사도 분석 결과에 기초하여 선택됨-를 포함하는 유사 질의 후보군-상기 유사 질의 후보군은 유사 질의 후보, 유사 질의 후보에 대응되는 질의 벡터, 및 질의 벡터와 상기 사용자 질의 벡터 간의 유사도 값이 포함됨-을 획득하고,
제2 유사도 분석 모델을 통하여 상기 사용자 질의 벡터와 상기 유사 질의 후보군에 포함된 유사 질의 후보에 대응되는 질의 벡터 간의 유사도를 분석하고, 제2 유사도 분석 결과에 기초하여 유사 질의를 결정하고,
상기 유사 질의에 대한 응답을 상기 서버로부터 수신하고,
상기 수신한 유사 질의에 대한 응답에 기초하여, 상기 사용자 질의에 대한 응답을 결정하고,
상기 결정된 응답을 사용자에게 제공하되,
상기 제1 유사도 분석 모델과 상기 제2 유사도 분석 모델은 신경망 모델의 구성이 서로 다르고,
상기 제2 유사도 분석 모델은 제1 학습 데이터와 제2 학습 데이터를 이용하여 학습되고,
상기 제1 학습 데이터는 제1 질의 쌍과 상기 제1 질의 쌍이 유사함을 나타내는 레이블로 구성되고, 상기 제1 질의 쌍은 유사한 단어와 구조로 구성되어 문장의 형식이 서로 유사하고, 각 질의의 의미가 서로 유사한 질의들로 구성되며,
상기 제2 학습 데이터는 제2 질의 쌍과 상기 제2 질의 쌍이 비유사함을 나타내는 레이블로 구성되고, 상기 제2 질의 쌍은 유사한 단어와 구조로 구성되어 문장의 형식이 서로 유사하지만, 각 질의의 의미가 서로 다른 질의들로 구성되는,
검색 장치.
processor; and
Includes a memory that stores instructions executed by the processor,
By executing the instruction, the processor
Generate a user query vector for the user query,
At least one similar query candidate selected based on similarity to the user query vector - the similar query candidate is selected through a first similarity analysis model, and the query vector included in the question-answer pair included in the database of the server and the user query The similarity between vectors is analyzed and selected based on the first similarity analysis result, and the similar query candidate group includes a similar query candidate, a query vector corresponding to the similar query candidate, and a query vector and the user query vector. The similarity value between the two is included - to obtain,
Analyzing the similarity between the user query vector and a query vector corresponding to a similar query candidate included in the similar query candidate group through a second similarity analysis model, and determining a similar query based on the second similarity analysis result,
Receiving a response to the similar query from the server,
Based on the response to the received similar query, determine a response to the user query,
Provide the above-determined response to the user,
The first similarity analysis model and the second similarity analysis model have different neural network model configurations,
The second similarity analysis model is learned using first training data and second training data,
The first learning data consists of a first query pair and a label indicating that the first query pair is similar, the first query pair is composed of similar words and structures, so that the sentence format is similar to each other, and the meaning of each query consists of similar queries,
The second learning data consists of a second query pair and a label indicating that the second query pair is dissimilar, and the second query pair is composed of similar words and structures so that the sentence format is similar to each other, but the meaning of each query is similar. consists of different queries,
Search device.
컴퓨터에 제1 항 내지 제7 항 중 어느 한 항에 따른 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium recording a program for executing the method according to any one of claims 1 to 7 on a computer.
KR1020220134621A 2020-09-17 2022-10-19 A method and apparatus for question-answering using a paraphraser model KR102655808B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020220134621A KR102655808B1 (en) 2020-09-17 2022-10-19 A method and apparatus for question-answering using a paraphraser model
KR1020240045321A KR20240049526A (en) 2020-09-17 2024-04-03 A method and apparatus for question-answering using a paraphraser model

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020200119565A KR102457985B1 (en) 2020-09-17 2020-09-17 A method and apparatus for question-answering using a paraphraser model
KR1020220134621A KR102655808B1 (en) 2020-09-17 2022-10-19 A method and apparatus for question-answering using a paraphraser model

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020200119565A Division KR102457985B1 (en) 2020-09-17 2020-09-17 A method and apparatus for question-answering using a paraphraser model

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020240045321A Division KR20240049526A (en) 2020-09-17 2024-04-03 A method and apparatus for question-answering using a paraphraser model

Publications (2)

Publication Number Publication Date
KR20220145318A KR20220145318A (en) 2022-10-28
KR102655808B1 true KR102655808B1 (en) 2024-04-08

Family

ID=80935673

Family Applications (3)

Application Number Title Priority Date Filing Date
KR1020200119565A KR102457985B1 (en) 2020-09-17 2020-09-17 A method and apparatus for question-answering using a paraphraser model
KR1020220134621A KR102655808B1 (en) 2020-09-17 2022-10-19 A method and apparatus for question-answering using a paraphraser model
KR1020240045321A KR20240049526A (en) 2020-09-17 2024-04-03 A method and apparatus for question-answering using a paraphraser model

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020200119565A KR102457985B1 (en) 2020-09-17 2020-09-17 A method and apparatus for question-answering using a paraphraser model

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020240045321A KR20240049526A (en) 2020-09-17 2024-04-03 A method and apparatus for question-answering using a paraphraser model

Country Status (1)

Country Link
KR (3) KR102457985B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102612538B1 (en) * 2023-09-18 2023-12-12 김대훈 Search enhancement method and device based on artificial neural network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102439590A (en) 2009-03-13 2012-05-02 发明机器公司 System and method for automatic semantic labeling of natural language texts
KR102146031B1 (en) * 2017-11-23 2020-08-28 주식회사 케이티 Chatbot system based on multi-domain and method for providing chatbot service
KR102137809B1 (en) * 2018-09-19 2020-07-24 네이버 주식회사 Method of providing automatic answer
CN110582761B (en) * 2018-10-24 2023-05-30 创新先进技术有限公司 Smart customer service based on vector propagation model on click graph

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
김시형 외 2인, 생성 기반 질의응답 채팅 시스템 구현을 위한 지식임베딩 기법, 정보과학회논문지 45(2), 2018.2, 134-140페이지. 1부.*

Also Published As

Publication number Publication date
KR20220037064A (en) 2022-03-24
KR102457985B1 (en) 2022-10-31
KR20240049526A (en) 2024-04-16
KR20220145318A (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN110196901B (en) Method and device for constructing dialog system, computer equipment and storage medium
Iyer et al. Learning a neural semantic parser from user feedback
CN110377916B (en) Word prediction method, word prediction device, computer equipment and storage medium
CN111475623A (en) Case information semantic retrieval method and device based on knowledge graph
KR20190133931A (en) Method to response based on sentence paraphrase recognition for a dialog system
US20230237084A1 (en) Method and apparatus for question-answering using a database consist of query vectors
CN112069295B (en) Similar question recommendation method and device, electronic equipment and storage medium
KR20240049526A (en) A method and apparatus for question-answering using a paraphraser model
Rei et al. Auxiliary objectives for neural error detection models
CN113282711B (en) Internet of vehicles text matching method and device, electronic equipment and storage medium
CN112328800A (en) System and method for automatically generating programming specification question answers
CN117149984B (en) Customization training method and device based on large model thinking chain
Derici et al. Question analysis for a closed domain question answering system
Nassiri et al. Arabic L2 readability assessment: Dimensionality reduction study
CN114218379A (en) Intelligent question-answering system-oriented method for attributing questions which cannot be answered
US11288265B2 (en) Method and apparatus for building a paraphrasing model for question-answering
US20210165800A1 (en) Method and apparatus for question-answering using a paraphrasing model
CN113361252B (en) Text depression tendency detection system based on multi-modal features and emotion dictionary
Arbaaeen et al. Natural language processing based question answering techniques: A survey
KR20220037059A (en) A method and apparatus for question-answering using multiple similarity determination for query vectors
CN115658845A (en) Intelligent question-answering method and device suitable for open-source software supply chain
KR102434294B1 (en) A method apparatus, and system for generating a paraphraser model for question-answering
Karpagam et al. Deep learning approaches for answer selection in question answering system for conversation agents
CN113157932B (en) Metaphor calculation and device based on knowledge graph representation learning
Nguyen et al. A model of convolutional neural network combined with external knowledge to measure the question similarity for community question answering systems

Legal Events

Date Code Title Description
A107 Divisional application of patent
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant