KR20230152629A - Method, system, and computer readable record medium for generating reformulated query - Google Patents

Method, system, and computer readable record medium for generating reformulated query Download PDF

Info

Publication number
KR20230152629A
KR20230152629A KR1020230142993A KR20230142993A KR20230152629A KR 20230152629 A KR20230152629 A KR 20230152629A KR 1020230142993 A KR1020230142993 A KR 1020230142993A KR 20230142993 A KR20230142993 A KR 20230142993A KR 20230152629 A KR20230152629 A KR 20230152629A
Authority
KR
South Korea
Prior art keywords
query
model
processor
generating
cache
Prior art date
Application number
KR1020230142993A
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 KR1020230142993A priority Critical patent/KR20230152629A/en
Publication of KR20230152629A publication Critical patent/KR20230152629A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2452Query translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • G06F16/24566Recursive queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/51Translation evaluation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • 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/0455Auto-encoder networks; Encoder-decoder 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
    • 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
    • G06N3/096Transfer learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

재구성된 질의를 생성하기 위한 방법, 시스템, 및 컴퓨터 판독가능한 기록 매체가 개시된다. 질의 생성 방법은, 원본 질의에 대하여 BERT(Bidirectional Encoder Representations from Transformer) 기반 기계번역 모델을 이용한 질의 재구성(query reformulation)을 통해 제1 질의 후보를 생성하는 단계; 및 상기 제1 질의 후보 중 적어도 일부를 검색 질의로 선정하는 단계를 포함한다.A method, system, and computer-readable recording medium for generating a reconstructed query are disclosed. The query generation method includes generating a first query candidate through query reformulation using a BERT (Bidirectional Encoder Representations from Transformer)-based machine translation model for the original query; and selecting at least some of the first query candidates as a search query.

Description

재구성된 질의를 생성하기 위한 방법, 시스템, 및 컴퓨터 판독가능한 기록 매체{METHOD, SYSTEM, AND COMPUTER READABLE RECORD MEDIUM FOR GENERATING REFORMULATED QUERY}Method, system, and computer readable recording medium for generating a reformulated query {METHOD, SYSTEM, AND COMPUTER READABLE RECORD MEDIUM FOR GENERATING REFORMULATED QUERY}

아래의 설명은 최적의 검색 결과를 제공하기 위한 질의 재구성(query reformulation, 'QR'이라 칭함) 기술에 관한 것이다.The explanation below is about query reformulation (referred to as 'QR') technology to provide optimal search results.

사용자는 검색 엔진과 같은 사이트를 통해 소기의 정보를 얻기 위해 검색을 수행할 수 있다. 사용자는 사용자 단말을 통해 검색 엔진의 질의 입력창에 질의를 입력하고 질의에 대해 출력되는 검색 결과를 확인함으로써 소기의 정보를 획득할 수 있다.A user may perform a search to obtain desired information through a site such as a search engine. The user can obtain the desired information by entering a query in the query input window of the search engine through the user terminal and checking the search results output for the query.

질의-텀(term) 매칭 기반 검색 시스템에서는 사용자의 질의와 유사한 의미의 재구성된(reformulated) 질의들을 추가하여 최적의 검색 결과를 제공할 수 있는 질의 재구성 기술이 사용되고 있다.In query-term matching-based search systems, query reformulation technology is used to provide optimal search results by adding reformulated queries with similar meaning to the user's query.

예컨대, 한국공개특허 제10-2011-0007743호(공개일 2011년 01월 25일)에는 통계 데이터에 기초하여 오탈자 질의로 판단된 사용자 질의에 대해 전체 질의 단위 또는 단어 단위에 따라 교정할 수 있는 기술이 개시되어 있다.For example, Korea Patent Publication No. 10-2011-0007743 (published on January 25, 2011) provides a technology that can correct user queries judged to be typos based on statistical data according to the entire query unit or word unit. This is disclosed.

SMT(statistical machine translation) 모델과 함께 BERT(Bidirectional Encoder Representations from Transformer) 모델을 추가로 이용하여 사용자 질의에 대한 QR 후보를 생성할 수 있는 방법과 시스템을 제공한다.We provide a method and system for generating QR candidates for user queries by additionally using the BERT (Bidirectional Encoder Representations from Transformer) model along with the SMT (statistical machine translation) model.

컴퓨터 장치에서 실행되는 질의 생성 방법에 있어서, 상기 컴퓨터 장치는 메모리에 포함된 컴퓨터 판독가능한 명령들을 실행하도록 구성된 적어도 하나의 프로세서를 포함하고, 상기 질의 생성 방법은, 상기 적어도 하나의 프로세서에 의해, 원본 질의에 대하여 인공지능 모델을 이용한 질의 재구성(query reformulation)을 통해 질의 후보를 생성하는 단계; 및 상기 적어도 하나의 프로세서에 의해, 상기 질의 후보 중 적어도 일부를 검색 질의로 선정하는 단계를 포함하고, 상기 질의 후보를 생성하는 단계는, 인퍼런스된 질의 후보가 저장된 캐시(cache)를 참조하여 상기 캐시에서 상기 원본 질의에 대응되는 상기 질의 후보를 찾는 단계; 상기 캐시에 상기 원본 질의에 대응되는 상기 질의 후보가 없는 경우, 상기 원본 질의에 대해 상기 인공지능 모델을 이용하여 인퍼런스를 수행하여 상기 인퍼런스 결과를 상기 캐시에 삽입하는 단계를 포함하는 질의 생성 방법을 제공한다.In a query generation method executed on a computer device, the computer device includes at least one processor configured to execute computer-readable instructions included in a memory, and the query generation method includes, by the at least one processor, an original A step of generating query candidates through query reformulation using an artificial intelligence model for the query; and selecting at least some of the query candidates as a search query by the at least one processor, wherein the step of generating the query candidates refers to a cache in which the inferred query candidates are stored. finding the query candidate corresponding to the original query in the cache; When there is no query candidate corresponding to the original query in the cache, a query comprising performing inference on the original query using the artificial intelligence model and inserting the inference result into the cache Provides a creation method.

일 측면에 따르면, 상기 생성하는 단계는, 트랜스포머(transformer) 모델의 인코더 부분을 BERT 모델로 교체한 기계번역 모델인 상기 인공지능 모델을 통해 상기 질의 후보를 생성할 수 있다.According to one aspect, the generating step may generate the query candidate through the artificial intelligence model, which is a machine translation model that replaces the encoder part of the transformer model with the BERT model.

다른 측면에 따르면, 단위 시간 당 최대 인퍼런스 수와 최대 UQPS(unique query per second) 중 적어도 하나에 기초하여 실시간으로 질의를 처리하기 위한 서빙 장비 수가 산정될 수 있다.According to another aspect, the number of serving devices for processing queries in real time may be calculated based on at least one of the maximum number of inferences per unit time and the maximum unique query per second (UQPS).

또 다른 측면에 따르면, 상기 생성하는 단계는, MLM(masked language model)과 NSP(next sentence prediction)를 이용한 사전-훈련(pre-training) 기법으로 학습된 상기 인공지능 모델을 통해 상기 질의 후보를 생성할 수 있다.According to another aspect, the generating step generates the query candidate through the artificial intelligence model learned through a pre-training technique using a masked language model (MLM) and next sentence prediction (NSP). can do.

또 다른 측면에 따르면, 상기 질의 생성 방법은, 상기 적어도 하나의 프로세서에 의해, 상기 원본 질의에 대하여 통계적 기계번역(statistical machine translation) 모델을 이용한 질의 재구성을 통해 다른 질의 후보를 생성하는 단계를 더 포함하고, 상기 선정하는 단계는, 각 모델을 통한 예측 확률을 기준으로 상기 질의 후보와 상기 다른 질의 후보 중에서 일부를 상기 검색 질의로 선정할 수 있다.According to another aspect, the query generation method further includes generating, by the at least one processor, another query candidate through query reconstruction using a statistical machine translation model for the original query. In the selection step, some of the query candidates and the other query candidates may be selected as the search query based on the prediction probability through each model.

상기 질의 생성 방법을 컴퓨터에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록 매체를 제공한다.Provided is a computer-readable recording medium on which a program for executing the query generation method on a computer is recorded.

컴퓨터 장치에 있어서, 메모리에 포함된 컴퓨터 판독가능한 명령들을 실행하도록 구성된 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 원본 질의에 대하여 인공지능 모델을 이용한 질의 재구성을 통해 질의 후보를 생성하는 과정; 및 상기 질의 후보 중 적어도 일부를 검색 질의로 선정하는 과정을 처리하고, 상기 적어도 하나의 프로세서는, 인퍼런스된 질의 후보가 저장된 캐시를 참조하여 상기 캐시에서 상기 원본 질의에 대응되는 상기 질의 후보를 찾고, 상기 캐시에 상기 원본 질의에 대응되는 상기 질의 후보가 없는 경우, 상기 원본 질의에 대해 상기 인공지능 모델을 이용하여 인퍼런스를 수행하여 상기 인퍼런스 결과를 상기 캐시에 삽입하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.A computer device comprising: at least one processor configured to execute computer-readable instructions included in a memory, wherein the at least one processor generates a query candidate through query reconstruction using an artificial intelligence model for an original query. procedure; And processing a process of selecting at least some of the query candidates as a search query, wherein the at least one processor refers to a cache in which the inferred query candidates are stored and selects the query candidates corresponding to the original query from the cache. and, if there is no query candidate corresponding to the original query in the cache, perform inference using the artificial intelligence model for the original query and insert the inference result into the cache. Provides computer devices that

본 발명의 실시예들에 따르면, SMT 모델과 함께 BERT 모델을 추가로 이용하여 사용자 질의에 대한 QR 후보를 생성함으로써 QR 품질과 검색 품질을 향상시킬 수 있다.According to embodiments of the present invention, QR quality and search quality can be improved by generating QR candidates for user queries by additionally using the BERT model along with the SMT model.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.
도 3은 본 발명의 일실시예에 따른 컴퓨터 장치가 수행할 수 있는 방법의 예를 도시한 순서도이다.
도 4는 본 발명의 일실시예에 있어서 QR 생성을 위한 멀티 QR 생성 모델의 예시를 도시한 것이다.
도 5 내지 도 9는 본 발명의 일실시예에 있어서 QR 생성을 위한 SMT 모델의 예시를 도시한 것이다.
도 10 내지 도 11은 본 발명의 일실시예에 있어서 QR 생성을 위한 BERT 기반 기계번역 모델의 예시를 도시한 것이다.
도 12는 본 발명의 일실시예에 있어서 실시간 서비스를 위한 BERT 서빙 시스템의 예시를 도시한 것이다.
도 13은 본 발명의 일실시예에 있어서 캐시 기반 BERT 서빙 시스템 구조의 예시를 도시한 것이다.
1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
Figure 2 is a block diagram showing an example of a computer device according to an embodiment of the present invention.
Figure 3 is a flowchart showing an example of a method that can be performed by a computer device according to an embodiment of the present invention.
Figure 4 shows an example of a multi-QR generation model for QR generation in an embodiment of the present invention.
Figures 5 to 9 show examples of SMT models for QR generation in one embodiment of the present invention.
Figures 10 and 11 show an example of a BERT-based machine translation model for QR generation in an embodiment of the present invention.
Figure 12 shows an example of a BERT serving system for real-time service in one embodiment of the present invention.
Figure 13 shows an example of a cache-based BERT serving system structure in one embodiment of the present invention.

이하, 본 발명의 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings.

본 발명의 실시예들에 따른 질의 생성 시스템은 적어도 하나의 컴퓨터 장치에 의해 구현될 수 있으며, 본 발명의 실시예들에 따른 질의 생성 방법은 질의 생성 시스템에 포함되는 적어도 하나의 컴퓨터 장치를 통해 수행될 수 있다. 이때, 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 질의 생성 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 질의 생성 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The query generation system according to embodiments of the present invention may be implemented by at least one computer device, and the query generation method according to embodiments of the present invention is performed through at least one computer device included in the query generation system. It can be. At this time, the computer program according to an embodiment of the present invention may be installed and driven in the computer device, and the computer device may perform the query generation method according to the embodiment of the present invention under the control of the driven computer program. . The above-described computer program can be combined with a computer device and stored in a computer-readable recording medium to execute the query generation method on the computer.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다. 또한, 도 1의 네트워크 환경은 본 실시예들에 적용 가능한 환경들 중 하나의 예를 설명하는 것일 뿐, 본 실시예들에 적용 가능한 환경이 도 1의 네트워크 환경으로 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment in FIG. 1 shows an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170. Figure 1 is an example for explaining the invention, and the number of electronic devices or servers is not limited as in Figure 1. In addition, the network environment in FIG. 1 only explains one example of environments applicable to the present embodiments, and the environment applicable to the present embodiments is not limited to the network environment in FIG. 1.

복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 내비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 도 1에서는 전자 기기(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기(110)는 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 컴퓨터 장치들 중 하나를 의미할 수 있다.The plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices. Examples of the plurality of electronic devices 110, 120, 130, and 140 include smart phones, mobile phones, navigation devices, computers, laptops, digital broadcasting terminals, Personal Digital Assistants (PDAs), and Portable Multimedia Players (PMPs). ), tablet PC, etc. For example, in FIG. 1, the shape of a smartphone is shown as an example of the electronic device 110. However, in embodiments of the present invention, the electronic device 110 actually communicates with other devices through the network 170 using a wireless or wired communication method. It may refer to one of various physical computer devices capable of communicating with electronic devices 120, 130, 140 and/or servers 150, 160.

통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and may include not only a communication method utilizing a communication network that the network 170 may include (for example, a mobile communication network, wired Internet, wireless Internet, and a broadcast network), but also short-range wireless communication between devices. For example, the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). , may include one or more arbitrary networks such as the Internet. Additionally, the network 170 may include any one or more of network topologies including a bus network, star network, ring network, mesh network, star-bus network, tree or hierarchical network, etc. Not limited.

서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(150)는 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 목적하는 서비스(일례로, 검색 서비스)를 제공하는 시스템일 수 있다.Each of the servers 150 and 160 is a computer device or a plurality of computers that communicate with a plurality of electronic devices 110, 120, 130, 140 and a network 170 to provide commands, codes, files, content, services, etc. It can be implemented with devices. For example, the server 150 may be a system that provides a desired service (for example, a search service) to a plurality of electronic devices 110, 120, 130, and 140 connected through the network 170.

도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 기기들(110, 120, 130, 140) 각각이나 서버들(150, 160) 각각은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있다.Figure 2 is a block diagram showing an example of a computer device according to an embodiment of the present invention. Each of the plurality of electronic devices 110, 120, 130, and 140 described above or each of the servers 150 and 160 may be implemented by the computer device 200 shown in FIG. 2.

이러한 컴퓨터 장치(200)는 도 2에 도시된 바와 같이, 메모리(210), 프로세서(220), 통신 인터페이스(230) 그리고 입출력 인터페이스(240)를 포함할 수 있다. 메모리(210)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(210)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(200)에 포함될 수도 있다. 또한, 메모리(210)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(210)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(210)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(230)를 통해 메모리(210)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(170)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(200)의 메모리(210)에 로딩될 수 있다.As shown in FIG. 2, this computer device 200 may include a memory 210, a processor 220, a communication interface 230, and an input/output interface 240. The memory 210 is a computer-readable recording medium and may include a non-permanent mass storage device such as random access memory (RAM), read only memory (ROM), and a disk drive. Here, non-perishable large-capacity recording devices such as ROM and disk drives may be included in the computer device 200 as a separate permanent storage device that is distinct from the memory 210. Additionally, an operating system and at least one program code may be stored in the memory 210. These software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210. Such separate computer-readable recording media may include computer-readable recording media such as floppy drives, disks, tapes, DVD/CD-ROM drives, and memory cards. In another embodiment, software components may be loaded into the memory 210 through the communication interface 230 rather than a computer-readable recording medium. For example, software components may be loaded into memory 210 of computer device 200 based on computer programs installed by files received over network 170.

프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processor 220 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input/output operations. Commands may be provided to the processor 220 by the memory 210 or the communication interface 230. For example, processor 220 may be configured to execute received instructions according to program code stored in a recording device such as memory 210.

통신 인터페이스(230)는 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (eg, the storage devices described above) through the network 170. For example, a request, command, data, file, etc. generated by the processor 220 of the computer device 200 according to a program code stored in a recording device such as memory 210 is transmitted to the network ( 170) and can be transmitted to other devices. Conversely, signals, commands, data, files, etc. from other devices may be received by the computer device 200 through the communication interface 230 of the computer device 200 via the network 170. Signals, commands, data, etc. received through the communication interface 230 may be transmitted to the processor 220 or memory 210, and files, etc. may be stored in a storage medium (as described above) that the computer device 200 may further include. It can be stored as a permanent storage device).

입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250)는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다.The input/output interface 240 may be a means for interfacing with the input/output device 250. For example, input devices may include devices such as a microphone, keyboard, or mouse, and output devices may include devices such as displays and speakers. As another example, the input/output interface 240 may be a means for interfacing with a device that integrates input and output functions, such as a touch screen. The input/output device 250 may be configured as a single device with the computer device 200.

또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Additionally, in other embodiments, computer device 200 may include fewer or more components than those of FIG. 2 . However, there is no need to clearly show most prior art components. For example, the computer device 200 may be implemented to include at least some of the input/output devices 250 described above, or may further include other components such as a transceiver, a database, etc.

이하에서는 재구성된 질의를 생성하기 위한 방법 및 시스템의 구체적인 실시예를 설명하기로 한다.Hereinafter, specific embodiments of a method and system for generating a reconstructed query will be described.

본 실시예들은 질의-텀 매칭 기반 검색 서비스에 적용하기 위한 QR 기술에 관한 것이다. QR을 번역 문제로 보고 기계번역 모델을 이용하여 검색에 적합한 질의로 변환하는 것이다. 특히, 본 실시예에서는 SMT 모델과 BERT 모델이 결합된 번역 모델을 통해 사용자 질의에 대하여 재구성된 질의(이하, 'QR 후보'라 칭함)를 생성할 수 있다.These embodiments relate to QR technology for application to a query-term matching based search service. The goal is to view QR as a translation problem and use a machine translation model to convert it into a query suitable for search. In particular, in this embodiment, a reconstructed query (hereinafter referred to as a 'QR candidate') can be generated for the user query through a translation model that combines the SMT model and the BERT model.

도 3은 본 발명의 일실시예에 따른 컴퓨터 장치가 수행할 수 있는 방법의 예를 도시한 흐름도이다.Figure 3 is a flowchart showing an example of a method that can be performed by a computer device according to an embodiment of the present invention.

본 실시예에 따른 컴퓨터 장치(200)는 클라이언트를 대상으로 클라이언트 상에 설치된 전용 어플리케이션이나 컴퓨터 장치(200)와 관련된 웹/모바일 사이트 접속을 통해 검색 서비스를 제공할 수 있다. 컴퓨터 장치(200)에는 컴퓨터로 구현된 질의 생성 시스템이 구성될 수 있다. 일례로, 질의 생성 시스템은 독립적으로 동작하는 프로그램 형태로 구현되거나, 혹은 특정 어플리케이션의 인-앱(in-app) 형태로 구성되어 상기 특정 어플리케이션 상에서 동작이 가능하도록 구현될 수 있다.The computer device 200 according to this embodiment can provide a search service to clients through a dedicated application installed on the client or through access to a web/mobile site related to the computer device 200. The computer device 200 may be configured with a query generation system implemented on a computer. For example, the query generation system may be implemented in the form of a program that operates independently, or may be implemented in the form of an in-app of a specific application so that it can operate on the specific application.

컴퓨터 장치(200)의 프로세서(220)는 도 3에 따른 질의 생성 방법을 수행하기 위한 구성요소로서 적어도 하나 이상의 구성요소를 포함할 수 있다. 실시예에 따라 프로세서(220)의 구성요소들은 선택적으로 프로세서(220)에 포함되거나 제외될 수도 있다. 또한, 실시예에 따라 프로세서(220)의 구성요소들은 프로세서(220)의 기능의 표현을 위해 분리 또는 병합될 수도 있다.The processor 220 of the computer device 200 may include at least one component for performing the query generation method according to FIG. 3 . Depending on the embodiment, components of the processor 220 may be selectively included in or excluded from the processor 220. Additionally, depending on the embodiment, components of the processor 220 may be separated or merged to express the functions of the processor 220.

이러한 프로세서(220) 및 프로세서(220)의 구성요소들은 도 3의 질의 생성 방법이 포함하는 단계들(S310 내지 S330)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다. 예를 들어, 프로세서(220) 및 프로세서(220)의 구성요소들은 메모리(210)가 포함하는 운영체제의 코드와 적어도 하나의 프로그램의 코드에 따른 명령(instruction)을 실행하도록 구현될 수 있다.The processor 220 and its components may control the computer device 200 to perform steps S310 to S330 included in the query generation method of FIG. 3. For example, the processor 220 and its components may be implemented to execute instructions according to the code of an operating system included in the memory 210 and the code of at least one program.

여기서, 프로세서(220)의 구성요소들은 컴퓨터 장치(200)에 저장된 프로그램 코드가 제공하는 명령에 따라 프로세서(220)에 의해 수행되는 서로 다른 기능들(different functions)의 표현들일 수 있다.Here, the components of the processor 220 may be expressions of different functions performed by the processor 220 according to instructions provided by program codes stored in the computer device 200.

프로세서(220)는 컴퓨터 장치(200)의 제어와 관련된 명령이 로딩된 메모리(210)로부터 필요한 명령을 읽어들일 수 있다. 이 경우, 상기 읽어들인 명령은 프로세서(220)가 이후 설명될 단계들(S310 내지 S330)을 실행하도록 제어하기 위한 명령을 포함할 수 있다.The processor 220 may read necessary instructions from the memory 210 where instructions related to controlling the computer device 200 are loaded. In this case, the read command may include a command for controlling the processor 220 to execute steps S310 to S330 that will be described later.

이후 설명될 단계들(S310 내지 S330)은 도 3에 도시된 순서와 다른 순서로 수행될 수 있으며, 단계들(S310 내지 S330) 중 일부가 생략되거나 추가의 과정이 더 포함될 수 있다.Steps S310 to S330, which will be described later, may be performed in an order different from the order shown in FIG. 3, and some of the steps S310 to S330 may be omitted or additional processes may be included.

도 3을 참조하면, 단계(S310)에서 프로세서(220)는 기계번역 모델인 SMT 모델을 이용하여 사용자 질의를 재구성함으로써 제1 QR 후보군을 생성할 수 있다. 프로세서(220)는 병렬 말뭉치 학습 데이터로 학습된 SMT 모델을 통해 제1 QR 후보군을 생성할 수 있다.Referring to FIG. 3, in step S310, the processor 220 may generate a first QR candidate group by reconstructing the user query using the SMT model, which is a machine translation model. The processor 220 may generate a first QR candidate group through an SMT model learned with parallel corpus training data.

단계(S320)에서 프로세서(220)는 BERT 기반 기계번역 모델을 이용하여 사용자 질의를 재구성함으로써 제2 QR 후보군을 생성할 수 있다. SMT 모델의 경우 빠른 번역 속도로 많은 QR 후보를 생성할 수 있는 반면에, 맥락을 고려하는 번역이 부족하다는 단점이 있다. 이를 보완하기 위해 BERT 모델을 QR에 적용하는 것으로, 분류 모델인 BERT 모델의 경우 SMT와 달리 단어의 의미를 이해하여 맥락을 반영한 자연스러운 번역이 가능하다. BERT 모델은 더 깊은 언어 이해를 위해 MLM(masked language model)과 NSP(next sentence prediction)를 이용한 사전-훈련(pre-training) 기법으로 학습될 수 있다.In step S320, the processor 220 may generate a second QR candidate group by reconstructing the user query using a BERT-based machine translation model. While the SMT model can generate many QR candidates at a fast translation speed, it has the disadvantage of lacking translation that takes context into account. To complement this, the BERT model is applied to QR. Unlike SMT, the BERT model, a classification model, understands the meaning of words and enables natural translation that reflects the context. The BERT model can be learned using pre-training techniques using MLM (masked language model) and NSP (next sentence prediction) for deeper language understanding.

단계(S330)에서 프로세서(220)는 사용자 질의에 대응되는 검색 결과를 제공하기 위해 SMT 모델과 BERT 기반 기계번역 모델을 통한 번역 점수에 기초하여 제1 QR 후보군과 제2 QR 후보군 중 적어도 일부를 검색 질의로 선정할 수 있다. 예를 들어, 프로세서(220)는 각 기계번역 모델을 통한 예측 확률을 기준으로 상위 일정 개수나 일정 비율의 QR 후보를 실제 검색 질의로 사용할 수 있다.In step S330, the processor 220 searches at least a portion of the first QR candidate group and the second QR candidate group based on the translation score through the SMT model and the BERT-based machine translation model to provide a search result corresponding to the user query. You can select by query. For example, the processor 220 may use the top certain number or certain percentage of QR candidates as an actual search query based on the prediction probability through each machine translation model.

프로세서(220)는 검색 질의를 선정하는 과정에서 제2 QR 후보군의 번역 점수에 제1 QR 후보군보다 높은 가중치를 적용할 수 있다. 실시예에 따라서는 번역 점수를 기준으로 상위 일정 개수나 일정 비율의 QR 후보를 검색 질의로 선정할 때 제2 QR 후보군에서 제1 QR 후보군보다 많은 개수나 비율의 QR 후보를 선정하는 것 또한 가능하다. 또한, 프로세서(220)는 검색 결과를 제공함에 있어 제2 QR 후보군에 대응되는 검색 결과를 제1 QR 후보군의 검색 결과보다 상위에 노출시키는 것 또한 가능하다.In the process of selecting a search query, the processor 220 may apply a higher weight to the translation score of the second QR candidate group than that of the first QR candidate group. Depending on the embodiment, when selecting a certain number or percentage of QR candidates based on the translation score through a search query, it is also possible to select a greater number or percentage of QR candidates from the second QR candidate group than the first QR candidate group. . Additionally, when providing search results, the processor 220 may also expose search results corresponding to the second QR candidate group higher than the search results of the first QR candidate group.

도 4에 도시한 바와 같이, 프로세서(220)는 멀티 모델 구조로서 SMT 모델(410)과 BERT 기반 기계번역 모델(420)을 포함할 수 있다. 프로세서(220)는 사용자 질의(40)에 대하여 SMT 모델(410)을 이용한 재구성을 통해 제1 QR 후보군(401)을 생성할 수 있고, 아울러 BERT 기반 기계번역 모델(420)을 이용한 재구성을 통해 제2 QR 후보군(402)을 생성할 수 있다.As shown in FIG. 4, the processor 220 has a multi-model structure and may include an SMT model 410 and a BERT-based machine translation model 420. The processor 220 can generate the first QR candidate group 401 through reconstruction using the SMT model 410 for the user query 40, and can also generate the first QR candidate group 401 through reconstruction using the BERT-based machine translation model 420. 2 QR candidate group 402 can be generated.

SMT 모델(410)의 구조는 도 5와 같다.The structure of the SMT model 410 is shown in FIG. 5.

도 5를 참조하면, SMT 모델(410)은 통계적인 확률로 번역 결과를 제공하는 것으로, 번역 모델(translation model)(501)과 언어 모델(language model)(502)을 포함한다.Referring to FIG. 5, the SMT model 410 provides translation results with statistical probability and includes a translation model 501 and a language model 502.

번역 모델(501)은 소스 언어(source language)를 목적 언어(target language)로 변환하는 것으로, 소스 문장과 목적 문장이 쌍으로 구성된 병렬 말뭉치 학습 데이터가 필요하다.The translation model 501 converts a source language into a target language, and requires parallel corpus learning data consisting of pairs of source and target sentences.

번역 모델(501)은 얼라인먼트 모델(alignment model)과 어휘 번역 모델(lexical translation model)로 구성되며, 도 6에 도시한 바와 같이 얼라인먼트(601)를 추출할 수 있다.The translation model 501 consists of an alignment model and a lexical translation model, and the alignment 601 can be extracted as shown in FIG. 6.

언어 모델(502)은 문장의 확률을 예측하는 것으로, 목적 언어에 대한 학습 데이터가 필요하다. 도 7을 참조하면, 'where are we going'이라는 연속된 단어들이 주어질 때, 'where' 다음에 'are'이 올 확률, 'where are' 다음에 'we'가 올 확률 등을 계산하는 것이다.The language model 502 predicts the probability of a sentence and requires training data for the target language. Referring to Figure 7, when consecutive words such as 'where are we going' are given, the probability of 'are' coming after 'where' and the probability of 'we' coming after 'where are' are calculated.

SMT 모델(410)은 번역 모델(501)과 언어 모델(502)을 결합하여 통계적인 번역 결과를 만들 수 있다.The SMT model 410 can generate statistical translation results by combining the translation model 501 and the language model 502.

상기한 SMT 모델(410)을 적용한 QR 시스템은 도 8과 같다.A QR system applying the above-mentioned SMT model 410 is shown in FIG. 8.

병렬 말뭉치 사전으로부터 얼라인먼트 모델과 어휘 번역 모델로 구성된 번역 모델(501), 그리고 언어 모델(502)을 학습할 수 있다.A translation model (501) consisting of an alignment model and a vocabulary translation model, and a language model (502) can be learned from the parallel corpus dictionary.

도 8을 참조하면, SMT 모델(410)을 적용한 QR 시스템은 토큰화 과정(morphological tokenization), 디코딩 과정(SMT decoder), 결과 생성 과정(N best QR result), 휴리스틱 로직(heuristic logic)을 거쳐 원본 질의(original query)인 소스 질의를 목적 질의(target query)로 변환함으로써 재구성된 질의, 즉 제1 QR 후보군(401)을 생성할 수 있다.Referring to FIG. 8, the QR system applying the SMT model 410 goes through a tokenization process (morphological tokenization), a decoding process (SMT decoder), a result generation process (N best QR result), and heuristic logic to obtain the original By converting the source query, which is an original query, into a target query, a reconstructed query, that is, the first QR candidate group 401, can be created.

예를 들어, 도 9에 도시한 바와 같이 SMT 모델(410)을 적용한 QR 시스템은 원본 질의인 사용자 질의(901)로 '네이버 무료 글씨체'가 주어지는 경우, '네이버', '무료', '글씨체'와 같이 토큰화한 다음, 디코딩 과정과 결과 생성 과정을 거쳐 사용자 질의(901)에 대한 QR 후보군(902)으로서 '네이버 무료 글꼴', '네이버 무료 서체', '네이버 공짜 폰트'를 생성할 수 있다.For example, as shown in Figure 9, the QR system applying the SMT model 410, when 'Naver free font' is given as the user query 901, which is the original query, 'Naver', 'free', and 'font' After tokenization as follows, through the decoding process and result generation process, 'Naver free font', 'Naver free font', and 'Naver free font' can be generated as QR candidates (902) for user inquiry (901). .

SMT 모델(410)을 적용한 QR 시스템은 문맥을 언어 모델(502)에 의존하는 한계가 있어 딥러닝 대비 맥락을 고려하는 번역이 부족하다는 단점이 있다.The QR system applying the SMT model (410) has the limitation of relying on the language model (502) for context, so it has the disadvantage of lacking translation that takes context into account compared to deep learning.

본 실시예에서는 SMT 모델(410)의 품질 한계를 개선하기 위해 BERT 기반 기계번역 모델(420)을 이용한 QR 시스템을 추가할 수 있다.In this embodiment, a QR system using the BERT-based machine translation model 420 can be added to improve the quality limit of the SMT model 410.

*도 10은 BERT 모델 구조를 도시한 것이다.*Figure 10 shows the BERT model structure.

도 10을 참조하면, BERT 모델(1000)은 주어진 문장을 입력으로 받아 입력 임베딩 레이어(input embedding layer)(1001)를 통해 토큰 단위로 먼저 임베딩한 후 트랜스포머 레이어(transformer layer)(1002)를 거쳐 토큰의 위치 정보를 고려한 인코딩으로 문맥을 표현하는(contextual representation) 구조로 이루어진다.Referring to FIG. 10, the BERT model (1000) receives a given sentence as input and first embeds it in token units through an input embedding layer (1001) and then tokens through a transformer layer (1002). It consists of a contextual representation structure with encoding that takes into account location information.

트랜스포머 레이어(1002)는 CNN이나 RNN과 같은 모델 대신, 셀프-어텐션(self-attention) 모델로 이루어지며, BERT 모델(1000)은 트랜스포머의 인코더와 디코더 중 인코더를 사용하여 언어를 임베딩한다.The transformer layer (1002) is composed of a self-attention model instead of a model such as CNN or RNN, and the BERT model (1000) embeds a language using an encoder among the transformer's encoder and decoder.

트랜스포머 모델의 인코더 부분을 BERT 모델(1000)로 교체함으로써 QR 시스템에 적용하기 위한 BERT 기반 기계번역 모델(420)을 구축할 수 있다.By replacing the encoder part of the transformer model with the BERT model (1000), a BERT-based machine translation model (420) can be built for application to the QR system.

BERT 기반 기계번역 모델(420)을 적용한 QR 시스템은 도 11과 같다.The QR system applying the BERT-based machine translation model 420 is shown in Figure 11.

분류 모델인 BERT 모델은 다양한 언어 처리나 정보 검색 분야에 적용되면서 매우 높은 성능을 보여주고 있다. 번역 모델을 통해 QR 후보를 생성하기 위한 QR 시스템은 도 11에 도시한 바와 같이 트랜스포머 모델로서 입력 질의 이해를 위한 인코더(1110)와, QR 후보 생성을 위한 디코더(1120)로 구성될 수 있으며, 이때 인코더(1110) 부분을 BERT 모델(1000)로 교체할 수 있다.The BERT model, a classification model, is showing very high performance when applied to various language processing and information retrieval fields. As shown in FIG. 11, the QR system for generating QR candidates through a translation model is a transformer model and may be composed of an encoder 1110 for understanding input queries and a decoder 1120 for generating QR candidates. The encoder (1110) part can be replaced with the BERT model (1000).

인코더(1110)는 BERT 모델(1000)을 이용하여 원본 질의인 사용자 질의(1101)를 심도 깊게 이해할 수 있으며, 단어의 의미를 이해하여 맥락을 반영한 자연스러운 번역이 가능하다. 디코더(1120)는 트랜스포머 모델의 디코더로서 사용자 질의(1101)에 대한 QR 후보군(1102)을 생성할 수 있다.The encoder 1110 can deeply understand the user query 1101, which is the original query, using the BERT model 1000, and understands the meaning of words to enable natural translation that reflects the context. The decoder 1120 is a transformer model decoder and can generate a QR candidate group 1102 for the user query 1101.

예를 들어, 도 11에 도시한 바와 같이 BERT 기반 기계번역 모델(420)을 적용한 QR 시스템은 사용자 질의(1101)로 '10대 여성 음악 순위'가 주어지는 경우, BERT 모델(1000)을 이용한 더 깊은 언어 이해를 통해 사용자 질의(1101)에 대한 QR 후보군(1102)으로서 '10대 여자 음악 순위', '10대 여자 노래 순위', '10대 여자 음악 랭킹', '10대 여성 음악 랭킹'을 생성할 수 있다.For example, as shown in Figure 11, the QR system applying the BERT-based machine translation model (420) provides a deeper query using the BERT model (1000) when 'top 10 female music rankings' is given as a user query (1101). Through language understanding, 'Top 10 female music rankings', 'Top 10 female song rankings', 'Top 10 female music rankings', and 'Top 10 female music rankings' are created as QR candidates (1102) for user queries (1101). can do.

따라서, 프로세서(220)는 멀티 QR 생성 모델로서 SMT 모델(410)과 함께 BERT 기반 기계번역 모델(420)을 이용하여 최적의 검색 결과를 제공하기 위한 QR 후보를 생성할 수 있다.Accordingly, the processor 220 can generate QR candidates to provide optimal search results using the BERT-based machine translation model 420 along with the SMT model 410 as a multi-QR generation model.

BERT 기반 기계번역 모델(420)의 경우 모델 사이즈가 커서 실시간 서비스에서 성능을 보장하기 어려운 문제가 있다.In the case of the BERT-based machine translation model (420), the model size is large, making it difficult to guarantee performance in real-time services.

도 12를 참조하면, 프로세서(220)는 BERT 기반 기계번역 모델(420)의 응답속도 문제를 극복하기 위해 캐시(cache) 기반 BERT 서빙 시스템(1230)을 더 포함할 수 있다. BERT 서빙 시스템(1230)은 BERT 기반 기계번역 모델(420)의 인퍼런스된 QR 결과를 캐시에 저장하는 방식을 적용할 수 있다.Referring to FIG. 12, the processor 220 may further include a cache-based BERT serving system 1230 to overcome the response speed problem of the BERT-based machine translation model 420. The BERT serving system 1230 can apply a method of storing the inferred QR results of the BERT-based machine translation model 420 in a cache.

일반적으로 QR은 통합 검색에서 질의가 들어올 때 각 컬렉션 별 검색에 앞서 수행되기 때문에 QR의 응답속도가 느려지는 만큼 통합 검색의 응답 속도가 느려지게 된다. 이를 해결하기 위해 캐시 서버를 추가하여 BERT 기반 기계번역 모델(420)의 인퍼런스된 QR 결과를 캐시 서버에 저장하여 사용하는 방식을 적용할 수 있다.Generally, QR is performed before the search for each collection when a query comes in from integrated search, so the response speed of integrated search slows down as QR's response speed slows down. To solve this, it is possible to apply a method of adding a cache server and storing and using the inferred QR results of the BERT-based machine translation model 420 in the cache server.

도 13은 본 발명의 일실시예에 있어서 BERT 서빙 시스템 구조의 예시를 도시한 것이다.Figure 13 shows an example of the BERT serving system structure in one embodiment of the present invention.

도 13을 참조하면, BERT 서빙 시스템(1230)은 캐시 서버(1301), NMT(Neural Machine Translation) 프로듀서(1302), 큐(Queue)(1303), 및 NMT 컨슈머(1304)를 포함할 수 있다.Referring to FIG. 13, the BERT serving system 1230 may include a cache server 1301, a Neural Machine Translation (NMT) producer 1302, a queue 1303, and an NMT consumer 1304.

NMT 프로듀서(1302)는 사용자 질의가 입력될 때 캐시 서버(1301)를 참조하여 사용자 질의에 대응되는 QR 후보를 찾아 그 결과를 반환하는 역할을 한다.When a user query is input, the NMT producer 1302 refers to the cache server 1301 to find a QR candidate corresponding to the user query and returns the result.

한편, NMT 프로듀서(1302)는 캐시 서버(1301)에 사용자 질의에 대응되는 QR 결과가 없는 경우 큐(1303)에 사용자 질의를 삽입한다. 연속으로 동일 질의가 입력되는 경우 큐(1303)에 중복된 질의가 들어갈 수 있기 때문에 캐시 서버(1301)에 빈 값을 삽입한다. 캐시 서버(1301)에 삽입된 빈 값은 임시로 일정 시간(예를 들어, 1시간) 유지할 수 있다.Meanwhile, the NMT producer 1302 inserts the user query into the queue 1303 when there is no QR result corresponding to the user query in the cache server 1301. When the same query is input continuously, duplicate queries may be entered in the queue 1303, so an empty value is inserted into the cache server 1301. Empty values inserted into the cache server 1301 may be temporarily maintained for a certain period of time (eg, 1 hour).

큐(1303)는 카프카(Kafka)와 같은 메시지 큐 역할을 하는 것으로, NMT 프로듀서(1302)로부터 수신된 질의를 유지하고 있다가 NMT 컨슈머(1304)로 전달할 수 있다.The queue 1303 functions as a message queue like Kafka, and can maintain queries received from the NMT producer 1302 and then transfer them to the NMT consumer 1304.

NMT 컨슈머(1304)는 큐(1303)로부터 질의 목록을 받아서 BERT 기반 기계번역 모델(420)를 이용하여 QR 후보에 대한 인퍼런스를 수행할 수 있다. NMT 컨슈머(1304)는 BERT 기반 기계번역 모델(420)의 QR 후보에 대한 인퍼런스 결과를 캐시 서버(1301)에 삽입한다. 캐시 서버(1301) 상에 인퍼런스된 QR 결과는 일정 시간(예를 들어, 1일) 단위로 업데이트될 수 있다.The NMT consumer 1304 can receive a query list from the queue 1303 and perform inference on QR candidates using the BERT-based machine translation model 420. The NMT consumer (1304) inserts the inference result for the QR candidate of the BERT-based machine translation model (420) into the cache server (1301). QR results inferred on the cache server 1301 may be updated on a regular basis (eg, 1 day).

프로세서(220)는 실시간으로 쌓이는 질의를 처리하기 위해 필요한 서빙 장비 수를 산정할 수 있다. 프로세서(220)는 실시간으로 입력되는 질의들을 단위 시간(예를 들어, 1초) 내에 처리할 수 있도록 BERT 서빙 시스템(1230)을 구성하는 장비 수를 결정할 수 있다.The processor 220 can calculate the number of serving devices needed to process queries accumulating in real time. The processor 220 may determine the number of devices constituting the BERT serving system 1230 so that queries input in real time can be processed within a unit time (eg, 1 second).

일례로, 프로세서(220)는 단위 시간 당 최대 인퍼런스 수와 최대 UQPS(unique query per second)에 기초하여 서빙 장비 수를 산정할 수 있다. 1개의 질의에 대한 인퍼런스를 n번 수행하는 것보다 n개의 질의를 배치(batch)로 묶어 처리하는 것이 유리하다. 예를 들어, 1초 처리량(16개의 질의)으로 UQPS 1,500을 처리하기 위해서는 대략 94개(1500/16=93.75)의 모델 서버 컨테이너가 필요하다.For example, the processor 220 may calculate the number of serving devices based on the maximum number of inferences per unit time and the maximum unique query per second (UQPS). It is more advantageous to process n queries in a batch than to perform inference for one query n times. For example, to process 1,500 UQPS with 1 second throughput (16 queries), approximately 94 (1500/16=93.75) model server containers are required.

따라서, 본 실시예에서는 모델 사이즈가 크고 응답 속도가 느린 BERT 모델을 QR 시스템에 적용하기 위해 캐시 기반 서빙 플랫폼을 사용함으로써 실시간 서비스를 보장할 수 있다.Therefore, in this embodiment, real-time service can be guaranteed by using a cache-based serving platform to apply the BERT model, which has a large model size and slow response speed, to the QR system.

캐시 기반 서빙 플랫폼을 사용하는 것 이외에도 BERT 모델의 파라미터를 줄이기 위해 레이어를 3개로 낮추고 모델 압축을 위한 지식 증류(knowledge distillation) 기법을 적용하여 성능을 최적화하는 것 또한 가능하다.In addition to using a cache-based serving platform, it is also possible to optimize performance by reducing the parameters of the BERT model by lowering the layers to three and applying knowledge distillation techniques for model compression.

이처럼 본 발명의 실시예들에 따르면, SMT 모델과 함께 BERT 모델을 추가로 이용하여 사용자 질의에 대한 QR 후보를 생성함으로써 QR 품질과 검색 품질을 향상시킬 수 있다.As such, according to embodiments of the present invention, QR quality and search quality can be improved by generating QR candidates for user queries by additionally using the BERT model along with the SMT model.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The device described above may be implemented with hardware components, software components, and/or a combination of hardware components and software components. For example, the devices and components described in the embodiments include a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), and a programmable logic unit (PLU). It may be implemented using one or more general-purpose or special-purpose computers, such as a logic unit, microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include a plurality of processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. The software and/or data may be embodied in any type of machine, component, physical device, computer storage medium or device for the purpose of being interpreted by or providing instructions or data to the processing device. there is. Software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 이때, 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수 개의 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 어플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. At this time, the medium may continuously store a computer-executable program, or temporarily store it for execution or download. In addition, the medium may be a variety of recording or storage means in the form of a single or several pieces of hardware combined. It is not limited to a medium directly connected to a computer system and may be distributed over a network. Examples of media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, And there may be something configured to store program instructions, including ROM, RAM, flash memory, etc. Additionally, examples of other media include recording or storage media managed by app stores that distribute applications, sites or servers that supply or distribute various other software, etc.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited examples and drawings, various modifications and variations can be made by those skilled in the art from the above description. For example, the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents of the claims also fall within the scope of the claims described below.

Claims (7)

컴퓨터 장치에서 실행되는 질의 생성 방법에 있어서,
상기 컴퓨터 장치는 메모리에 포함된 컴퓨터 판독가능한 명령들을 실행하도록 구성된 적어도 하나의 프로세서를 포함하고,
상기 질의 생성 방법은,
상기 적어도 하나의 프로세서에 의해, 원본 질의에 대하여 인공지능 모델을 이용한 질의 재구성(query reformulation)을 통해 질의 후보를 생성하는 단계; 및
상기 적어도 하나의 프로세서에 의해, 상기 질의 후보 중 적어도 일부를 검색 질의로 선정하는 단계
를 포함하고,
상기 질의 후보를 생성하는 단계는,
인퍼런스된 질의 후보가 저장된 캐시(cache)를 참조하여 상기 캐시에서 상기 원본 질의에 대응되는 상기 질의 후보를 찾는 단계;
상기 캐시에 상기 원본 질의에 대응되는 상기 질의 후보가 없는 경우, 상기 원본 질의에 대해 상기 인공지능 모델을 이용하여 인퍼런스를 수행하여 상기 인퍼런스 결과를 상기 캐시에 삽입하는 단계
를 포함하는 질의 생성 방법.
In a query generation method executed on a computer device,
The computer device includes at least one processor configured to execute computer-readable instructions contained in a memory,
The query creation method is:
Generating, by the at least one processor, a query candidate through query reformulation using an artificial intelligence model for the original query; and
Selecting at least some of the query candidates as a search query by the at least one processor
Including,
The step of generating the query candidate is,
Referring to a cache storing inferenced query candidates and finding the query candidate corresponding to the original query in the cache;
If there is no query candidate corresponding to the original query in the cache, performing inference using the artificial intelligence model for the original query and inserting the inference result into the cache
A query creation method including.
제1항에 있어서,
상기 생성하는 단계는,
트랜스포머(transformer) 모델의 인코더 부분을 BERT 모델로 교체한 기계번역 모델인 상기 인공지능 모델을 통해 상기 질의 후보를 생성하는 것
을 특징으로 하는 질의 생성 방법.
According to paragraph 1,
The generating step is,
Generating the query candidate through the artificial intelligence model, which is a machine translation model that replaces the encoder part of the transformer model with the BERT model.
A query creation method characterized by .
제1항에 있어서,
단위 시간 당 최대 인퍼런스 수와 최대 UQPS(unique query per second) 중 적어도 하나에 기초하여 실시간으로 질의를 처리하기 위한 서빙 장비 수가 산정되는 것
을 특징으로 하는 질의 생성 방법.
According to paragraph 1,
The number of serving devices to process queries in real time is calculated based on at least one of the maximum number of inferences per unit time and the maximum UQPS (unique query per second).
A query creation method characterized by .
제1항에 있어서,
상기 생성하는 단계는,
MLM(masked language model)과 NSP(next sentence prediction)를 이용한 사전-훈련(pre-training) 기법으로 학습된 상기 인공지능 모델을 통해 상기 질의 후보를 생성하는 것
을 특징으로 하는 질의 생성 방법.
According to paragraph 1,
The generating step is,
Generating the query candidates through the artificial intelligence model learned using a pre-training technique using MLM (masked language model) and NSP (next sentence prediction).
A query creation method characterized by .
제1항에 있어서,
상기 질의 생성 방법은,
상기 적어도 하나의 프로세서에 의해, 상기 원본 질의에 대하여 통계적 기계번역(statistical machine translation) 모델을 이용한 질의 재구성을 통해 다른 질의 후보를 생성하는 단계
를 더 포함하고,
상기 선정하는 단계는,
각 모델을 통한 예측 확률을 기준으로 상기 질의 후보와 상기 다른 질의 후보 중에서 일부를 상기 검색 질의로 선정하는 것
을 특징으로 하는 질의 생성 방법.
According to paragraph 1,
The query creation method is:
Generating, by the at least one processor, another query candidate through query reconstruction using a statistical machine translation model for the original query.
It further includes,
The selection step is,
Selecting some of the query candidates and the other query candidates as the search query based on the prediction probability through each model.
A query creation method characterized by .
제1항 내지 제5항 중 어느 한 항의 질의 생성 방법을 컴퓨터에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록 매체.A computer-readable recording medium on which a program for executing the query generation method of any one of claims 1 to 5 on a computer is recorded. 컴퓨터 장치에 있어서,
메모리에 포함된 컴퓨터 판독가능한 명령들을 실행하도록 구성된 적어도 하나의 프로세서
를 포함하고,
상기 적어도 하나의 프로세서는,
원본 질의에 대하여 인공지능 모델을 이용한 질의 재구성을 통해 질의 후보를 생성하는 과정; 및
상기 질의 후보 중 적어도 일부를 검색 질의로 선정하는 과정
을 처리하고,
상기 적어도 하나의 프로세서는,
인퍼런스된 질의 후보가 저장된 캐시를 참조하여 상기 캐시에서 상기 원본 질의에 대응되는 상기 질의 후보를 찾고,
상기 캐시에 상기 원본 질의에 대응되는 상기 질의 후보가 없는 경우, 상기 원본 질의에 대해 상기 인공지능 모델을 이용하여 인퍼런스를 수행하여 상기 인퍼런스 결과를 상기 캐시에 삽입하는 것
을 특징으로 하는 컴퓨터 장치.
In computer devices,
At least one processor configured to execute computer readable instructions contained in memory
Including,
The at least one processor,
A process of generating query candidates through query reconstruction using an artificial intelligence model for the original query; and
The process of selecting at least some of the above query candidates as a search query
Process it,
The at least one processor,
Refer to the cache where the inferenced query candidate is stored and find the query candidate corresponding to the original query in the cache,
If there is no query candidate corresponding to the original query in the cache, performing inference using the artificial intelligence model for the original query and inserting the inference result into the cache
A computer device characterized by a.
KR1020230142993A 2021-01-26 2023-10-24 Method, system, and computer readable record medium for generating reformulated query KR20230152629A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020230142993A KR20230152629A (en) 2021-01-26 2023-10-24 Method, system, and computer readable record medium for generating reformulated query

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210010757A KR102595235B1 (en) 2021-01-26 2021-01-26 Method, system, and computer readable record medium for generating reformulated query
KR1020230142993A KR20230152629A (en) 2021-01-26 2023-10-24 Method, system, and computer readable record medium for generating reformulated query

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020210010757A Division KR102595235B1 (en) 2021-01-26 2021-01-26 Method, system, and computer readable record medium for generating reformulated query

Publications (1)

Publication Number Publication Date
KR20230152629A true KR20230152629A (en) 2023-11-03

Family

ID=82845780

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020210010757A KR102595235B1 (en) 2021-01-26 2021-01-26 Method, system, and computer readable record medium for generating reformulated query
KR1020230142993A KR20230152629A (en) 2021-01-26 2023-10-24 Method, system, and computer readable record medium for generating reformulated query

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020210010757A KR102595235B1 (en) 2021-01-26 2021-01-26 Method, system, and computer readable record medium for generating reformulated query

Country Status (1)

Country Link
KR (2) KR102595235B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102583818B1 (en) * 2022-09-14 2023-10-04 주식회사 글로랑 Method for sampling process of personality test using question and answer network representing group of respondents based on bert

Also Published As

Publication number Publication date
KR20220107737A (en) 2022-08-02
KR102595235B1 (en) 2023-10-30

Similar Documents

Publication Publication Date Title
CN110192210B (en) Construction and processing of computational graphs for dynamically structured machine learning models
US20230100376A1 (en) Text sentence processing method and apparatus, computer device, and storage medium
CN109885842B (en) Processing text neural networks
KR101754473B1 (en) Method and system for automatically summarizing documents to images and providing the image-based contents
CN116702737B (en) Document generation method, device, equipment, storage medium and product
CN111241851A (en) Semantic similarity determination method and device and processing equipment
US20210279042A1 (en) Neural code completion via re-ranking
CN110678882A (en) Selecting answer spans from electronic documents using machine learning
KR20230152629A (en) Method, system, and computer readable record medium for generating reformulated query
CN111898379A (en) Slot filling model training method and natural language understanding model
US20190164085A1 (en) Method of and server for converting categorical feature value into a numeric representation thereof and for generating a split value for the categorical feature
US11822893B2 (en) Machine learning models for detecting topic divergent digital videos
CN114490926A (en) Method and device for determining similar problems, storage medium and terminal
CN113408292A (en) Semantic recognition method and device, electronic equipment and computer-readable storage medium
KR102541806B1 (en) Method, system, and computer readable record medium for ranking reformulated query
CN116644180A (en) Training method and training system for text matching model and text label determining method
CN116662538A (en) Text abstract generation method, device, equipment and medium based on multitask learning
US11755671B2 (en) Projecting queries into a content item embedding space
Lamons et al. Python Deep Learning Projects: 9 projects demystifying neural network and deep learning models for building intelligent systems
CN114330296A (en) New word discovery method, device, equipment and storage medium
CN113704466A (en) Text multi-label classification method and device based on iterative network and electronic equipment
Fernandes et al. Lightweight context-based web-service composition model for mobile devices
KR20240048799A (en) Document recommendation method, computer device, and computer program to enhance embedding of title words using body words
KR102441854B1 (en) Method and apparatus for general sentiment analysis service
CN117591666B (en) Abstract extraction method for bridge management and maintenance document

Legal Events

Date Code Title Description
A107 Divisional application of patent