KR20220037059A - A method and apparatus for question-answering using multiple similarity determination for query vectors - Google Patents

A method and apparatus for question-answering using multiple similarity determination for query vectors Download PDF

Info

Publication number
KR20220037059A
KR20220037059A KR1020200119559A KR20200119559A KR20220037059A KR 20220037059 A KR20220037059 A KR 20220037059A KR 1020200119559 A KR1020200119559 A KR 1020200119559A KR 20200119559 A KR20200119559 A KR 20200119559A KR 20220037059 A KR20220037059 A KR 20220037059A
Authority
KR
South Korea
Prior art keywords
query
similar
similarity
vector
user
Prior art date
Application number
KR1020200119559A
Other languages
Korean (ko)
Inventor
김동환
권유경
이주관
이은정
성길제
Original Assignee
주식회사 포티투마루
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 포티투마루 filed Critical 주식회사 포티투마루
Priority to KR1020200119559A priority Critical patent/KR20220037059A/en
Publication of KR20220037059A publication Critical patent/KR20220037059A/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/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • 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/338Presentation of query results
    • 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
    • G06N3/0454
    • 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)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention discloses a question-answering method performed by an electronic apparatus. The method comprises: a step of generating a user query vector for a user query; a step of transmitting the user query vector to a server; a step of receiving similar query candidates selected based on a similarity with the user query vector from the server; a step of selecting a similar query from the similar query candidates based on an analysis result of the similarity with the user query vector; and a step of determining an answer for the similar query as an answer for the user query.

Description

질의 벡터에 대한 다중 유사도 판단을 이용한 검색 방법 및 검색 장치{A method and apparatus for question-answering using multiple similarity determination for query vectors}A search method and apparatus for question-answering using multiple similarity determination for query vectors

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

인터넷을 활용하여 정보를 검색하기 위하여 검색 엔진이 사용되고 있다. 검색엔진이 사용자 질의에 대하여 답변을 제공하기 위한 방법으로 사용자가 입력한 사용자 질의를 구성하는 텍스트 정보에 기초하여 데이터베이스를 검색한 결과를 제공하는 방식이 널리 사용되고 있다.Search engines are being used to search for information using the Internet. As a method for a search engine to provide an answer to a user's query, a method of providing a database search result based on text information constituting a user query input by a user is widely used.

그러나, 사용자 질의를 구성하는 텍스트 정보에 기초하여 사용자 질의에 대한 검색 결과를 제공하는 방식은 사용자가 입력한 질의와 데이터베이스에 저장된 질의-응답쌍에서의 질의의 표현 방식이 상이하면 검색 엔진이 검색결과로 도출하지 못한다는 문제점이 존재한다.However, in the method of providing search results for a user query based on text information constituting the user query, if the expression method of the query in the query-response pair stored in the database is different from the query input by the user, the search engine returns the search result There is a problem that it cannot be derived with .

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

그러나, 위와 같은 방법은 사용자 요청에 대응되는 응답을 찾기 위하여 대량의 텍스트 문서 데이터베이스를 검색하여야 하며, 텍스트 문서 데이터베이스의 크기가 증가할수록 검색시간이 증가한다는 문제점을 가지고 있다. However, the above method has a problem in that a large amount of 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.

본 명세서에서는 질의 벡터에 대한 다중 유사도 판단을 통해 사용자 질의에 대한 응답을 효율적으로 검색하는 방안을 제시하고자 한다.In this specification, it is intended to propose a method of efficiently searching for a response to a user's query through multiple similarity determinations with respect to a query vector.

상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 전자 장치에 의하여 수행되는 검색 방법은 사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계; 상기 사용자 질의 벡터를 서버로 전송하는 단계; 상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계; 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계; 및 상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함한다.In order to solve the above problem, a search method performed by an electronic device according to an embodiment of the present invention includes generating a user query vector for a user query; transmitting the user query vector to a server; receiving, from the server, a similar query candidate selected based on the similarity with the user query vector; selecting a similar query from among the similar query candidates 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 similar query candidate may be determined based on a similarity between a query vector stored in the server and a user query vector transmitted from the electronic device to the server.

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

상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계는, 상기 유사 질의 후보의 벡터와 상기 사용자 질의 벡터 간의 유사도를 유사도 분석 모델을 이용하여 판단하는 단계를 포함하고, 상기 유사도 분석 모델은 샴 신경망을 이용하여 학습될 수 있다.Selecting a similar query from among the similar query candidates based on the similarity analysis result with the user query vector includes determining the similarity between the vector of the similar query candidate and the user query vector using a similarity analysis model. and the similarity analysis model may be trained using a Siamese neural network.

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

상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계는, 상기 유사 질의 후보에 대응되는 질의의 응답을 수신하는 단계를 포함할 수 있다.Receiving the similar query candidate selected based on the degree of similarity with the user query vector from the server may include receiving a query response corresponding to the similar query candidate.

상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계는, 상기 유사 질의 후보의 벡터와 상기 사용자 질의 벡터와의 유사도를 수신하는 단계를 포함할 수 있다.Receiving the similar query candidate selected based on the similarity with the user query vector from the server may include receiving a similarity between the vector of the similar query candidate and the user query vector.

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

상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계는, 상기 유사 질의 후보에 대응되는 질의의 응답을 수신하는 단계를 포함할 수 있다.Receiving the similar query candidate selected based on the degree of similarity with the user query vector from the server may include receiving a query response corresponding to the similar query candidate.

본 발명의 일 실시 예에 따른 전자 장치에 의하여 수행되는 검색 방법은 상기 선정된 유사 질의를 상기 서버로 전송하는 단계; 및 상기 유사 질의의 응답을 상기 서버로부터 수신하는 단계를 더 포함할 수 있다.A search method performed by an electronic device according to an embodiment of the present invention includes: transmitting the selected similar query to the server; and receiving a response to the similar query from the server.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 검색장치는 프로세서; 및 상기 프로세서에 의하여 실행되는 명령어를 저장하는 메모리를 포함하고, 상기 프로세서는 상기 명령어를 수행하는 것에 의하여, 사용자 질의에 대한 사용자 질의 벡터를 생성하고, 상기 사용자 질의 벡터를 서버로 전송하고, 상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하고, 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하며, 상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정할 수 있다.In addition, a search apparatus according to an embodiment of the present invention for solving the above problem includes: a processor; and a memory for storing instructions to be executed by the processor, wherein the processor generates a user query vector for a user query by executing the instruction, transmits the user query vector to a server, and the user A similar query candidate selected based on the similarity with the query vector is received from the server, a similar query is selected from among the similar query candidates based on the similarity analysis result with the user query vector, and the response to the similar query is received from the server. It can be decided in response to user queries.

또한, 상기한 문제를 해결하기 위한 본 발명의 일 실시 예에 따른 컴퓨터로 읽을 수 있는 저장매체에 저장된 컴퓨터 프로그램은 사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계; 상기 사용자 질의 벡터를 서버로 전송하는 단계; 상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계; 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계; 및 상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함할 수 있다.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 the steps of: generating a user query vector for a user query; transmitting the user query vector to a server; receiving, from the server, a similar query candidate selected based on the similarity with the user query vector; selecting a similar query from among the similar query candidates 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.

본 발명은 사용자 질의와 유사한 질의에 대한 검색 결과를 사용자에게 제시하는 효과를 제공한다. 나아가, 본 발명은 검색 서버가 유사질의를 1차적으로 선정하고, 검색 단말이 2차적으로 유사질의의 유사도를 검증함으로써 유사질의를 효율적으로 선정할 수 있는 효과를 제공한다.The present invention provides an effect of presenting a search result for a query similar to the user's query to the user. Furthermore, the present invention provides an effect that similar queries can be efficiently selected by the search server first selecting similar queries and the search terminal secondarily verifying the similarity of similar queries.

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

이하의 내용은 단지 발명의 원리를 예시한다. 그러므로 당업자는 비록 본 명세서에 명확히 설명되거나 도시 되지 않았지만 발명의 원리를 구현하고 발명의 개념과 범위에 포함된 다양한 장치를 발명할 수 있는 것이다. 또한, 본 명세서에 열거된 모든 조건부 용어 및 실시 예들은 원칙적으로, 발명의 개념이 이해되도록 하기 위한 목적으로만 명백히 의도되고, 이와 같이 특별히 열거된 실시 예들 및 상태들에 제한적이지 않는 것으로 이해되어야 한다. 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 are not necessarily used in a specific sequence, if any. 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 including 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 elements.

또한, 본 명세서에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다.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 a search system according to an embodiment of the present invention. The terminal 100 according to an 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 query based on the response to the query 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 an embodiment, the server 200 may search for a similar query based on a vector. Through this, the server 200 may select a query having a high degree of similarity to the user query and provide it to the terminal 100 . The server 200 primarily selects a similar query candidate group for a user query, and the terminal 100 performs a similarity evaluation on a query belonging to the similar query candidate group provided by the server 200, so that the terminal 100 is the user In order to select a similar query similar to a query, the number of queries to be analyzed for similarity with a user query may be limited to a certain range.

도 2는 본 발명의 일 실시 예에 따른 단말(100)을 도시하는 블록도이다. 본 발명의 일 실시 예에 따른 단말(100)은 인코더(110), 페러프레이저(120), 유사 질의 선정부(130), 질의 답변부(140) 및 데이터베이스(150)로 구성될 수 있다.2 is a block diagram illustrating the terminal 100 according to an embodiment of the present invention. The terminal 100 according to an embodiment of the present invention may include an encoder 110 , a parafraser 120 , a similar query selecting unit 130 , a query 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 representing the structure and meaning of a user query expressed in natural language. The encoder 110 may be configured as a neural network, and may be a neural network model trained to generate an embedding vector.

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

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

질의 답변부(140)는 사용자로부터 사용자 질의를 획득한다. 그리고 질의 답변부(140)는 사용자 질의에 대한 답변을 사용자에게 제공한다. 질의 답변부(140)는 입력된 사용자 질의와 그에 대한 답변이 데이터베이스(150)에 저장되어 있는 경우, 입력된 사용자 질의에 대한 답변을 사용자에게 제공한다. 한편, 질의 답변부(140)는 입력된 사용자 질의가 데이터베이스(150)에 저장되어 있지 않는 경우, 유사 질의 선정부(130)에 의하여 선정된 유사도 등급에 따라 미리 설정된 기준에 따른 유사도 등급에 해당하는 유사 질의의 답변을 사용자의 답변으로 사용자에게 제공할 수 있다.The query answering unit 140 obtains a user query from the user. In addition, the query answering unit 140 provides an answer to the user's query to the user. The query answering unit 140 provides the user with an answer to the inputted user's query when the inputted user's query and its answer are stored in the database 150 . On the other hand, when the input user query is not stored in the database 150, the query answering unit 140 corresponds to the similarity level according to a preset criterion according to the similarity level selected by the similar query selecting unit 130. An answer to a similar query may 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)를 제어함으로써 본 발명의 일 실시 예에 따른 검색 방법을 수행할 수 있다.On the other hand, the terminal 100 and the server 200 according to an embodiment of the present invention, as shown in FIG. 3 , the processor 101 , the memory 102 , the communication unit 103 , the user interface 104 , and the database 105 . It may consist of including. A program for performing the operation of the search method according to an embodiment of the present invention may be stored in the memory 102 . A neural network model trained to implement the encoder 110 and the parafraser 120 may be stored in the memory 102 . The processor 101 controls the communication unit 103, the user interface 104, and the database 105 by processing data according to the program and the neural network model stored in the memory 102, thereby performing a search method according to an embodiment of the present invention. can be done

이하 본 발명의 일 실시 예에 따른 검색 방법을 설명한다. 도 4는 본 발명의 일 실시 예에 따른 검색 방법을 설명하는 순서도이다. 단말(100)은 사용자 입력에 기반하여 사용자의 질의를 획득한다(S110). 단말(100)은 키보드나 터치패드를 통하여 입력되는 사용자의 텍스트 입력 또는 사용자의 발화에 의한 음성입력으로 사용자 질의를 획득할 수 있다. 사용자 질의는 자연어로 표현되는 문장일 수 있다.Hereinafter, a search method according to an embodiment of the present invention will be described. 4 is a flowchart illustrating a search method according to an embodiment of the present invention. The terminal 100 obtains a user's query based on the user input (S110). The terminal 100 may obtain a user query through a user's text input input through a keyboard or a touch pad or a voice input by the user's utterance. The user query may be a sentence expressed in a 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 may 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 a similar query 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 from among the queries stored in the database of the server 200 . In more detail, the database of the server 200 may store a query and a response to the query in association. For example, (question, response) pairs may be stored in the database. In addition, the database may store a query and a vector for the query in association. For example, (question, response, query vector) pairs may be stored in the database.

서버(200)는 유사한 벡터를 가지는 질의를 검색하기 위하여 유클리드 공간에서 사용자 질의 벡터와 일정 거리 내에 위치하는 벡터를 유사한 벡터로 결정할 수 있다. 또는 서버(200)는 코사인 유사도에 기초하여 유사도를 결정할 수도 있다. 서버(200)는 유사 질의 검색 결과를 이용하여 유사 질의 후보군을 생성한다. 유사 질의 후보군은 질의로만 구성되거나, 질의와 응답 및 벡터 중 적어도 하나를 포함하여 구성될 수 있다. 또한, 유사 질의 후보군에는 후보군에 속한 질의 별로 사용자 질의 벡터와의 유사도 값이 더 포함될 수 있다. 나아가, 유사 질의 후보군에는 후보군에 속한 질의 간의 유사도 순서가 더 포함될 수도 있다. 서버(200)는 생성된 유사 질의 후보군을 단말(100)로 전송한다(S150).In order to search for a query having a similar vector, the server 200 may determine a vector located within a predetermined distance from the user query vector in the Euclidean space as a similar vector. Alternatively, the server 200 may determine the similarity based on the cosine similarity. The server 200 generates a similar query candidate group by using the similar query search result. The similar query candidate group may consist of only a query or may include at least one of a query, a response, and a vector. Also, the similarity query candidate group may further include a similarity value with the user query vector for each query belonging to the candidate group. Furthermore, the similarity query candidate group may further include an 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 by using the similar query candidate group information received from the server 200 ( S160 ). The terminal 100 may select a query similar to the user query from among the queries belonging to the similar query candidate group. The terminal 100 may determine the similarity between each query belonging to the similar query candidate group and the input user query by using the parafraser 120 . The terminal 100 may select a query having the highest similarity as a similar query. Alternatively, the terminal 100 may select a similar query for each grade by grading the queries belonging to the similar query candidate group in the order of the highest similarity. The similarity analysis method by the parafraser 120 may be different from the similarity analysis method performed by the server 200 . For example, the similarity analysis model of the Parafraser 120 may be a different analysis model from the similarity analysis model of the server 200, and in the case of a neural network model, the values of variables constituting the model configuration or the 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 having the highest similarity as a response to a user query input by the user. Alternatively, the terminal 100 may provide a response corresponding to a query belonging to a similar query candidate group as a response to a user query input by the user according to the similar query level.

단말(100)은 유사 질의 후보군에 대한 응답을 서버(200)로부터 모두 수신하는 것이 아니라 선정된 유사 질의에 대한 응답 만을 서버(200)로부터 수신할 수 있다. 이는, 유사 질의 후보군에 응답 정보가 포함되어 있지 않으며, 단말(100)이 응답정보가 필요한 유사 질의를 서버(200)로 전송하고, 유사 질의의 응답을 서버로부터 수신함으로써, 유사 질의에 대한 응답만을 서버(200)로부터 전송 받는 것으로 구현될 수 있다. 이로써, 단말(100)과 서버(200)간의 트래픽을 줄일 수도 있다.The terminal 100 may not receive all responses to the similar query candidate group from the server 200 , but only the responses to the selected similar query from the server 200 . In this case, response information is not included in the similar query candidate group, 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 responding to the similar query. It may be implemented by receiving transmission from the server 200 . Accordingly, traffic between the terminal 100 and the server 200 may be reduced.

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

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

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

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

일 실시 예에서, 신경망 모델은 딥 러닝 모델일 수 있다. 딥 러닝 모델은 복수의 히든 레이어로 구축될 수 있다. 레이어에 속한 노드들은 노드간의 연결 관계에 따라 데이터를 주고 받을 수 있다. 본 발명의 일 실시 예에 따른 단말(100)과 서버(200)는 DNN(Deep Neural Network), RNN(Recurrent Neural Network), BRDNN(Bidirectional RecurrentDeep Neural Network) 등을 학습시켜 분석모델을 생성하고, 생성된 분석모델을 사용하여 일 실시 예에 따른 방법을 수행할 수 있다.In an embodiment, the neural network model may be a deep learning model. A deep learning model 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 an analysis model by learning a deep neural network (DNN), a recurrent neural network (RNN), a bidirectional recurrent deep neural network (BRDNN), etc. The method according to an embodiment may be performed using the analyzed model.

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

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

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

한편, 분석 모델 생성 장치는 과적합을 막기 위하여 조기종료 또는 드롭아웃을 적용할 수 있다. 일 실시 예에서, 분석 모델 생성 장치는 검증 데이터의 예측값과 실제값 사이의 오차값에 대해 모니터링을 진행하면서, 검증 데이터에 대한 정확도가 지속적으로 낮아짐이 발견된다면 정확도가 낮아지기 전의 에포크(epoch)를 훈련 에포크로 설정함으로써 조기종료를 구현할 수 있다. 또는 장치는, 일정한 기준으로 선택된 노드들을 학습에 사용되지 않는 드롭아웃을 수행함으로써 과적합을 막을 수도 있다. 이로써 장치는 신경망이 특정 노드나 노드의 조합에 의존적으로 변하는 것을 막을 수 있다.Meanwhile, the analysis model generating apparatus may apply early termination or dropout in order to prevent overfitting. In an embodiment, the apparatus for generating an analysis model 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 device may prevent overfitting by performing dropout of nodes that are not used for learning based on a certain criterion. In this way, the device can prevent the neural network from changing dependently 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 vectorization method of a query performed by the encoder 110 will be described. The encoder 110 may 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 generated using a neural network, and may receive a query as an input and output a vector value corresponding to the query. The encoder 110 according to an 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).8 shows a neural network learning process for generating the encoder 110 . The analysis model generation device trains a neural network model such as a DNN or RNN model using the preprocessed training data (S310) (S320), and tests the trained model (S330, S340) to generate the encoder 110 model. There is (S350).

예를 들어, 분석 모델 생성 장치는 인코더(110)를 생성하기에 앞서 학습데이터를 전처리 할 수 있다. 분석 모델 생성 장치는 질의에 대한 토큰화를 수행하여 단어를 추출할 수 있다. 일 실시 예에서 분석 모델 생성 장치는 스페이스, 콜론, 콤마 등을 기준으로 토큰화를 수행할 수 있다. 추가적으로 분석 모델 생성 장치는 형태소 분석, 불용어 제거 등을 거쳐 전처리를 수행할 수 있다.For example, the analysis model generating apparatus may pre-process the training data before generating the encoder 110 . The analysis model generating apparatus may extract words by tokenizing the query. In an embodiment, the analysis model generating apparatus may perform tokenization based on a space, a colon, a comma, or the like. Additionally, the analysis model generating apparatus may perform preprocessing through morpheme analysis, removal of stopwords, and the like.

다음으로, 일 실시 예에서, 분석 모델 생성 장치는 CBOW(Continuous Bag of Words)를 적용하여 Word2Vec 모델을 학습시켜 나갈 수 있다. 분석 모델 생성 장치는 주변 단어의 원-핫 벡터에 따른 스코어 벡터와 중심 단어의 원-핫 벡터를 손실함수인 크로스 엔트로피(cross-entropy) 함수에 적용하고, 손실함수의 값이 0에 가까워지도록 학습과정을 진행하여 신경망의 변수를 수정함으로써 인코더(110) 모델을 생성할 수 있다.Next, in an embodiment, the apparatus for generating an analysis model may learn a Word2Vec model by applying a continuous bag of words (CBOW). The analysis model generating device applies the score vector according to the one-hot vector of the surrounding word and the one-hot vector of the central 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 generated by modifying the parameters of the neural network by proceeding with the process.

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

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

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

한편, 위와 같은 방식으로 질의의 유사도를 분석하는 경우 질문의 형태는 유사하지만 일부 단어의 변경으로 전혀 다른 내용의 질의를 구성하는 경우에도 질의가 서로 유사하다고 분석될 수 있다. 예를 들어, '여기에서 시청까지 교통비가 얼마야?'라는 질의와, '여기에서 시청까지 거리가 얼마야?'라는 질의는 '교통비'와 '거리가'라는 단어 외에는 동일한 단어로 구성되어 있어서 앞서 설명한 유사도 분석 방법으로는 유사한 질의인 것으로 결정될 수 있다.Meanwhile, in the case of analyzing the similarity of the queries in the above manner, the queries may be analyzed to be similar to each other even if the queries are similar in form but have completely different contents by changing some words. For example, the query 'How much is the transportation cost from here to the city hall?' and the query 'What is the distance from here to the city hall?' The similarity analysis method described above may determine that the query is similar.

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

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

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

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

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

다음으로, 분석 모델 생성 장치는 유사한 단어와 구조로 구성되어 문장의 형식이 유사하지만, 질의의 의미가 서로 같지 않은 질의들로 구성된 제 2 학습데이터를 생성한다(430). 제 2 학습 데이터에는 질의 쌍과 함께 해당 질의들은 유사한 의미를 가지지 않는다는 레이블 또한 포함될 수 있다.Next, the analysis model generating apparatus generates second learning data composed of queries that are composed of similar words and structures and have similar sentence forms, but have different meanings of the queries ( 430 ). The second training 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 apparatus performs learning of the neural network using the second learning data (S440). The apparatus for generating an analysis model may check the degree of learning by using the test data as the learning progress progresses, and may stop learning when overfitting starts to occur.

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

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

이하, 서버(200)의 벡터기반 검색 방법을 설명한다. 본 발명의 일 실시 예에 따른 서버(200)는 질의와 응답으로 구성된 질의 응답 쌍을 데이터베이스에 저장하고 있을 수 있으며, 질의에 대한 벡터표현인 질의 벡터 또한 질의와 응답과 함께 데이터베이스에 저장하고 있을 수 있다. 예를 들어, 서버(200)의 데이터베이스에는 (질의, 응답, 질의벡터)의 쌍이 저장되어 있을 수 있다. 질의벡터를 생성하기 위해 앞서 설명된 인코더가 사용될 수 있다. 서버(200)는 앞서 설명된 인코더를 이용하여 질의에 대한 질의 벡터를 생성할 수 있다.Hereinafter, a 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 query response pair consisting of a query and a response in the database, and a query vector, which is a vector expression for a query, may also be stored in the database together with the query and response. there is. For example, a pair of (question, response, and 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 a query using the encoder described above.

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

다음으로, 서버(200)는 질의를 벡터화 한다(S520). 벡터화를 위해 앞서 설명한 인코더(110) 모델이 사용될 수 있다. 장치는 인코더(110) 모델을 사용하여 질의의 벡터값을 생성할 수 있다.Next, the server 200 vectorizes the query (S520). For vectorization, the previously described encoder 110 model may be used. The device may use the encoder 110 model to generate the vector value 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 queries.

이로써, 서버(200)는 질의 벡터에 기초하여 질의 검색을 수행할 수 있다(S540). 예를 들어, 서버(200)는 사용자가 입력한 질의의 텍스트에 기초하여 동일한 질의를 검색하거나, 텍스트에 기반하여 유사한 키워드가 포함된 질의를 검색결과로 제시할 수도 있다.Accordingly, the server 200 may 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 input by the user, or may present a query including a similar keyword based on the text as a search result.

또한, 서버(200)는 사용자가 입력한 질의를 벡터화하고, 생성된 벡터에 기초하여 데이터베이스를 검색하여 동일한 또는 유사한 벡터값을 가지는 질의를 사용자에게 제시할 수도 있다. 벡터의 유사도는 유클리드 공간에서의 거리 또는 코사인 유사도로 판단될 수 있다.In addition, the server 200 may vectorize a query input by the user, search a database based on the generated vector, and present a query having the same or similar vector value to the user. The similarity of vectors may be determined as a 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 a pair of a query having the same or similar vector value and a response thereof to the terminal 100 .

앞서 설명된 일 실시 예에 따른 검색 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시 예에 따라 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광 기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 플랫폼 식단 관리 서버(10)가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The search method according to an 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 (12)

전자 장치에 의하여 수행되는 검색 방법에 있어서,
사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계;
상기 사용자 질의 벡터를 서버로 전송하는 단계;
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계;
상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계; 및
상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하는 검색 방법.
A search method performed by an electronic device, comprising:
generating a user query vector for the user query;
transmitting the user query vector to a server;
receiving, from the server, a similar query candidate selected based on the similarity with the user query vector;
selecting a similar query from among the similar query candidates based on a similarity analysis result with the user query vector; and
and determining a response to the similar query as a response to the user query.
제 1 항에 있어서,
상기 유사 질의 후보는 상기 서버에 저장된 질의의 벡터와 상기 전자 장치로부터 상기 서버로 전송된 사용자 질의 벡터간의 유사도에 기초하여 결정되는 검색방법.
The method of claim 1,
The similar query candidate is determined based on a similarity between a query vector stored in the server and a user query vector transmitted from the electronic device to the server.
제 1 항에 있어서,
상기 유사 질의 후보는 제 1 유사도 분석 모델에 의하여 상기 사용자 질의 벡터와의 유사도에 기초하여 상기 서버에서 선정되고,
상기 유사 질의는 제 2 유사도 분석 모델에 의하여 상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 전자 장치에서 선정되며,
상기 제 1 유사도 분석 모델과 상기 제 2 유사도 분석 모델은 서로 상이한 분석모델인 검색 방법.
The method of claim 1,
The similarity query candidate is selected by the server based on the similarity with the user query vector by a first similarity analysis model;
The similarity query is selected by the electronic device based on a similarity analysis result with the user query vector by a second similarity analysis model;
and the first similarity analysis model and the second similarity analysis model are different analysis models.
제 1 항에 있어서,
상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계는,
상기 유사 질의 후보의 벡터와 상기 사용자 질의 벡터 간의 유사도를 유사도 분석 모델을 이용하여 판단하는 단계를 포함하고,
상기 유사도 분석 모델은 샴 신경망을 이용하여 학습된 검색 방법.
The method of claim 1,
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 the degree of similarity between the vector of the similarity query candidate and the user query vector using a similarity analysis model;
The similarity analysis model is a search method learned using a Siamese neural network.
제 4 항에 있어서,
상기 유사도 분석 모델은 제 1 학습 데이터와 제 2 학습 데이터를 이용하여 학습되며,
상기 제 1 학습 데이터는 제 1 질의 쌍과 상기 제 1 질의 쌍이 유사함을 나타내는 레이블로 구성되고,
상기 제 2 학습 데이터는 제 2 질의 쌍과 상기 제 2 질의 쌍이 비유사함을 나타내는 레이블로 구성된 검색 방법.
5. The method of claim 4,
The similarity analysis model is trained using the first training data and the second training data,
The first training data consists of a first query pair and a label indicating that the first query pair is similar,
The second training data includes a second query pair and a label indicating that the second query pair is dissimilar.
제 1 항에 있어서,
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계는,
상기 유사 질의 후보에 대응되는 질의의 응답을 수신하는 단계를 포함하는 검색 방법.
The method of claim 1,
Receiving a similar query candidate selected based on the similarity with the user query vector from the server,
and receiving a query response corresponding to the similar query candidate.
제 1 항에 있어서,
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계는,
상기 유사 질의 후보의 벡터와 상기 사용자 질의 벡터와의 유사도를 수신하는 단계를 포함하는 검색 방법.
The method of claim 1,
Receiving a similar query candidate selected based on the similarity with the user query vector from the server,
and receiving a degree of similarity between the vector of the similar query candidate and the user query vector.
제 1 항에 있어서,
상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계는,
상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보에 속한 후보 질의의 유사도 순위를 결정하는 단계; 및
상기 유사도 순위에 따라 미리 결정된 수의 후보 질의를 유사 질의로 선정하는 단계를 포함하는 검색 방법.
The method of claim 1,
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 ranking of a candidate query belonging to the similar query candidate based on a similarity analysis result with the user query vector; and
and selecting a predetermined number of candidate queries as similar queries according to the similarity ranking.
제 1 항에 있어서,
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계는,
상기 유사 질의 후보에 대응되는 질의의 응답을 수신하는 단계를 포함하는 검색 방법.
The method of claim 1,
Receiving a similar query candidate selected based on the similarity with the user query vector from the server,
and receiving a query response corresponding to the similar query candidate.
제 1 항에 있어서,
상기 선정된 유사 질의를 상기 서버로 전송하는 단계; 및
상기 유사 질의의 응답을 상기 서버로부터 수신하는 단계를 더 포함하는 검색 방법.
The method of claim 1,
transmitting the selected similar query to the server; and
The search method further comprising the step of receiving a response to the similar query from the server.
프로세서; 및
상기 프로세서에 의하여 실행되는 명령어를 저장하는 메모리를 포함하고,
상기 프로세서는 상기 명령어를 수행하는 것에 의하여,
사용자 질의에 대한 사용자 질의 벡터를 생성하고,
상기 사용자 질의 벡터를 서버로 전송하고,
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하고,
상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하며,
상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 검색 장치.
processor; and
a memory for storing instructions executed by the processor;
By executing the instruction, the processor
create a user query vector for the user query,
sending the user query vector to the server;
receiving a similar query candidate selected based on the similarity with the user query vector from the server;
selecting a similar query from among the similar query candidates based on the similarity analysis result with the user query vector;
a search device for determining a response to the similar query as a response to the user query.
사용자 질의에 대한 사용자 질의 벡터를 생성하는 단계;
상기 사용자 질의 벡터를 서버로 전송하는 단계;
상기 사용자 질의 벡터와의 유사도에 기초하여 선정된 유사 질의 후보를 상기 서버로부터 수신하는 단계;
상기 사용자 질의 벡터와의 유사도 분석 결과에 기초하여 상기 유사 질의 후보 중에서 유사 질의를 선정하는 단계; 및
상기 유사 질의의 응답을 상기 사용자 질의에 대한 응답으로 결정하는 단계를 포함하여 실행시키는 컴퓨터에 의하여 실행되는 컴퓨터 프로그램이 기록된 컴퓨터 판독 가능 기록 매체.
generating a user query vector for the user query;
transmitting the user query vector to a server;
receiving, from the server, a similar query candidate selected based on the similarity with the user query vector;
selecting a similar query from among the similar query candidates based on a similarity analysis result with the user query vector; and
A computer-readable recording medium recording a computer program that is executed by a computer, including determining a response to the similar query as a response to the user's query.
KR1020200119559A 2020-09-17 2020-09-17 A method and apparatus for question-answering using multiple similarity determination for query vectors KR20220037059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200119559A KR20220037059A (en) 2020-09-17 2020-09-17 A method and apparatus for question-answering using multiple similarity determination for query vectors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200119559A KR20220037059A (en) 2020-09-17 2020-09-17 A method and apparatus for question-answering using multiple similarity determination for query vectors

Publications (1)

Publication Number Publication Date
KR20220037059A true KR20220037059A (en) 2022-03-24

Family

ID=80935664

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200119559A KR20220037059A (en) 2020-09-17 2020-09-17 A method and apparatus for question-answering using multiple similarity determination for query vectors

Country Status (1)

Country Link
KR (1) KR20220037059A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024046459A1 (en) * 2022-09-02 2024-03-07 深圳忆海原识科技有限公司 Model management apparatus and hierarchical system for neural network operation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024046459A1 (en) * 2022-09-02 2024-03-07 深圳忆海原识科技有限公司 Model management apparatus and hierarchical system for neural network operation

Similar Documents

Publication Publication Date Title
CN110196901B (en) Method and device for constructing dialog system, computer equipment and storage medium
CA3055379C (en) Automated tool for question generation
JP7232831B2 (en) Retrieval of corroborative evidence for complex answers
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
Mazumder et al. Towards a continuous knowledge learning engine for chatbots
Kumar et al. A review on chatbot design and implementation techniques
CN113282711B (en) Internet of vehicles text matching method and device, electronic equipment and storage medium
KR20240049526A (en) A method and apparatus for question-answering using a paraphraser model
US11288265B2 (en) Method and apparatus for building a paraphrasing model for question-answering
Rahman et al. NLP-based automatic answer script evaluation
US20210165800A1 (en) Method and apparatus for question-answering using a paraphrasing model
Vekariya et al. A novel approach for semantic similarity measurement for high quality answer selection in question answering using deep learning methods
KR20220037059A (en) A method and apparatus for question-answering using multiple similarity determination for query vectors
Piasecki et al. Wordnet-based evaluation of large distributional models for polish
CN117076608A (en) Script event prediction method and device for integrating external event knowledge based on text dynamic span
Ye et al. A sentiment based non-factoid question-answering framework
KR102434294B1 (en) A method apparatus, and system for generating a paraphraser model for question-answering
KR20210053539A (en) Apparatus and method for estimation of patent novelty
EP3828730A1 (en) A method and apparatus for question-answering using similarity measures for question vectors
KR20220037060A (en) A method and apparatus for question-answering using a database consist of query vectors
Raju et al. Sentence Similarity-A State of Art Approaches
Luo Automatic short answer grading using deep learning
Amur et al. State-of-the-Art: Assessing Semantic Similarity in Automated Short-Answer Grading Systems
Tanev Learning textologies: Networks of linked word clusters

Legal Events

Date Code Title Description
E601 Decision to refuse application
E601 Decision to refuse application
E801 Decision on dismissal of amendment