Method and apparatus for retrieving a document
Patent Information
- Application Number
- KR1020220155113
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-11-18
Smart Images

Figure 112022123082127-PAT00002_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to a document search method and a document search device for searching for documents according to a user's request. Furthermore, the present invention relates to a document summarization method and a document summarization device for summarizing the contents of searched documents. Background Technology
[0003] There was a problem in that users spent a significant amount of time manually searching for relevant materials and verifying results to find the desired content when preparing documents such as reports. To address this issue, research on technology that searches for related documents based on user requests and provides summaries of the desired content is gaining attention.
[0004] Text matching search has traditionally been used as a method for searching documents. However, text matching-based search has limitations in that its performance is overly dependent on whether identical or similar words exist between the user query and the target document, and it requires continuous design and management by NLP and search experts. Deep learning-based search is being researched to complement this text matching method. However, for deep learning-based search to perform well, there are currently various constraints, such as the need for sufficient context in the user query, the requirement of high-performance machines, and the need for continuous model updating and reinforcement learning.
[0005] Meanwhile, methods for summarizing and providing documents are broadly composed of extractive summarization and generative summarization. Extractive summarization involves extracting phrases from a document; while it offers the advantages of being relatively easy and fast, it has the disadvantage of not being able to extract natural-sounding sentences. On the other hand, generative summarization generates new sentences based on the content of the document, offering the advantage of providing relatively natural-sounding summaries. However, conventional document summarization technology has been limited by being heavily skewed toward generating summaries based on extractive summarization.
[0006] Accordingly, there is a need for the development of a new document search method and document device to search for documents by combining the advantages of text matching-based search and deep learning-based search, and a new document summarization method and document summarization device to provide summaries based on generation summaries. The problem to be solved
[0008] The problem that the present invention aims to solve is to provide a document search method and a document search device for searching documents by combining the advantages of text matching-based search and deep learning-based search.
[0009] The problem that the present invention aims to solve is to provide a document summarization method and a document summarization device for searching for relevant documents based on a user query and generating a summary that summarizes the content desired by the user within the searched documents.
[0010] The problem that the present invention aims to solve is to provide a document summarization method and a document summarization device for training a document summarization model to generate a generation summary-based summary and an extraction summary-based summary.
[0011] The problems that the present invention aims to solve are not limited to those described above, and problems not mentioned will be clearly understood by those skilled in the art from this specification and the attached drawings. means of solving the problem
[0013] A document search method according to one embodiment of the present application may include: a step of obtaining a user search query; a step of calculating a sentence-unit user query vector from the user search query and obtaining a first document candidate group based on the similarity between the calculated user query vector and the embedding vector of a document stored in a search database; a step of obtaining a second document candidate group based on the similarity between the text included in the user search query and the text of a document stored in the search database; and a step of determining a document to be summarized based on the first document candidate group and the second document candidate group.
[0014] A document search device according to one embodiment of the present application comprises: a transmitting and receiving unit configured to receive a user search query; and a processor configured to search for a document to be summarized from a plurality of documents in a search database from the user search query. The processor may be configured to acquire a user search query, compute a sentence-unit user query vector from the user search query, acquire a first document candidate group based on the similarity between the computed user query vector and the embedding vector of a document stored in the search database, acquire a second document candidate group based on the similarity between the text included in the user search query and the text of a document stored in the search database, and determine the document to be summarized based on the first document candidate group and the second document candidate group.
[0015] The means for solving the problem of the present invention are not limited to the means for solving the problem described above, and unmentioned means for solving the problem will be clearly understood by those skilled in the art from this specification and the attached drawings. Effects of the invention
[0017] According to a document search method and document search device according to one embodiment of the present application, by combining vector-based search and text matching-based search, the effect of maintaining search quality while reducing computational load can be provided.
[0018] According to a document search method and document search device according to one embodiment of the present application, by performing sentence-to-sentence vector search, the effect of increasing the performance and accuracy of the vector search can be provided.
[0019] According to a document summarization method and document summarization device according to one embodiment of the present application, a user can perform document work more efficiently and quickly by performing document work based on a relatively natural generated summary result.
[0020] According to the document summarization method and document summarization device according to the embodiment of the present application, a generated summary-based summary and an extracted summary-based summary can be provided simultaneously.
[0021] According to the document summarization method and document summarization device of the embodiment of the present application, by training a document summarization model capable of providing generation summarization and extraction summarization functions using only a training data set for generation summarization, the effect of simultaneously providing generation summarization-based summaries and extraction summarization-based summaries can be provided.
[0022] The effects of the present invention are not limited to the effects described above, and unmentioned effects will be clearly understood by those skilled in the art from this specification and the accompanying drawings. Brief explanation of the drawing
[0024] FIG. 1 is a schematic diagram illustrating a document summarization device according to one embodiment of the present application. FIG. 2 is a diagram illustrating the operation of searching for a document to be summarized from a user search query of a document summarization device according to one embodiment of the present application. FIG. 3 is a diagram illustrating an aspect of extracting a primary document candidate group from a user query (or user search query) of a search module according to one embodiment of the present application. FIG. 4 is a diagram illustrating one aspect of determining a document to be summarized from a primary document candidate group of a search ranking adjustment module according to one embodiment of the present application. FIG. 5 is a diagram illustrating the operation of generating a summary through a document summary model of a document summary device according to one embodiment of the present application. FIG. 6 is a flowchart illustrating a document search method and a document summary method according to one embodiment of the present application. FIG. 7 is a flowchart illustrating the steps for extracting a summary target document according to one embodiment of the present application. FIG. 8 is a flowchart illustrating the step of obtaining a first document candidate group according to one embodiment of the present application. FIG. 9 is a flowchart illustrating the step of obtaining a second document candidate group according to one embodiment of the present application. FIG. 10 is a flowchart illustrating the steps for determining a document to be summarized according to one embodiment of the present application. FIG. 11 is a flowchart illustrating the step of obtaining a summary based on a generated summary from an extracted summary target document according to one embodiment of the present application. FIG. 12 is a diagram illustrating a training dataset for training a document summary model according to one embodiment of the present application. FIG. 13 is a diagram illustrating one aspect of training a document summary model according to one embodiment of the present application. Specific details for implementing the invention
[0025] The aforementioned objectives, features, and advantages of the present application will become more apparent from the following detailed description in conjunction with the accompanying drawings. However, as the present application is subject to various modifications and may have various embodiments, specific embodiments are illustrated in the drawings and described in detail below.
[0026] Throughout the specification, identical reference numbers generally represent identical components. Additionally, components with identical functions within the same scope of concept appearing in the drawings of each embodiment are described using the same reference numeral, and redundant descriptions thereof are omitted.
[0027] If it is determined that a detailed description of known functions or configurations related to this application could unnecessarily obscure the essence of this application, such detailed description is omitted. Furthermore, numbers used in the description of this specification (e.g., First, Second, etc.) are merely identifiers to distinguish one component from another.
[0028] Furthermore, the suffixes "module" and "part" for components used in the following embodiments are assigned or used interchangeably solely for the ease of drafting the specification, and do not inherently possess distinct meanings or roles.
[0029] In the following examples, singular expressions include plural expressions unless the context clearly indicates otherwise.
[0030] In the following embodiments, terms such as "include" or "have" mean that the features or components described in the specification are present, and do not preclude the possibility that one or more other features or components may be added.
[0031] In the drawings, the size of components may be exaggerated or reduced for convenience of explanation. For example, the size and thickness of each component shown in the drawings are arbitrarily depicted for convenience of explanation, and the present invention is not necessarily limited to what is illustrated.
[0032] Where an embodiment can be implemented differently, the order of a particular process may be performed differently from the order described. For example, two processes described consecutively may be performed substantially simultaneously or proceed in the reverse order of the description.
[0033] In the following embodiments, when components are described as being connected, the case includes not only instances where the components are directly connected but also instances where components are indirectly connected by interposing them in between.
[0034] For example, when it is stated in this specification that components, etc. are electrically connected, it includes not only cases where the components, etc. are directly electrically connected, but also cases where components, etc. are interposed in between and are indirectly electrically connected.
[0035] A document search method according to one embodiment of the present application may include: a step of obtaining a user search query; a step of calculating a sentence-unit user query vector from the user search query and obtaining a first document candidate group based on the similarity between the calculated user query vector and the embedding vector of a document stored in a search database; a step of obtaining a second document candidate group based on the similarity between the text included in the user search query and the text of a document stored in the search database; and a step of determining a document to be summarized based on the first document candidate group and the second document candidate group.
[0036] According to one embodiment of the present application, the step of obtaining the first document candidate group may further include: calculating a first similarity score between the user query vector and a sentence vector extracted from a passage of a document stored in the search database; calculating a second similarity score between the user query vector and a sentence vector summarizing the passage of a document stored in the search database; calculating a third similarity score between the user query vector and a question vector generated from a passage stored in the search database through a generation model; and calculating a first weighted score based on the first similarity score, the second similarity score, and the third similarity score, and determining the first document candidate group based on the calculated first weighted score.
[0037] According to one embodiment of the present application, the step of obtaining the second document candidate group may further include: calculating a first score representing the similarity between the user search query and the passage stored in the search database through phrase matching; calculating a second score representing the similarity between the keyword word included in the core query information containing the keyword word of the user search query extracted through a user query analysis module and the keyword word included in the passage stored in the search database; calculating a third score representing the similarity between the user search query and the passage stored in the search database through shingle matching; and calculating a second weighted score based on the first score, the second score, and the third score, and determining the second document candidate group based on the calculated second weighted score.
[0038] According to one embodiment of the present application, the step of determining the document to be summarized may further include: a step of obtaining documents included in the first document candidate group and documents included in the second document candidate group as a primary document candidate group; and a step of selecting the document to be summarized from the primary document candidate group by analyzing the similarity between the content of the candidate documents included in the primary document candidate group and the user search query through a search ranking adjustment module.
[0039] According to one embodiment of the present application, the search ranking adjustment module may be configured to calculate a fourth similarity score representing the semantic similarity between the candidate documents included in the primary document candidate group and the user search query using a trained Cross-Encoder type deep learning model.
[0040] According to one embodiment of the present application, the search ranking adjustment module may be configured to calculate a fifth similarity score between the core query information extracted from the user search query and the keyword words included in the candidate documents included in the primary document candidate group using a BM25F score calculation algorithm.
[0041] According to one embodiment of the present application, the step of selecting the document to be summarized may further include: calculating a weighted summation similarity score of each candidate document included in the primary document candidate group based on the fourth similarity score and the fifth similarity score; adjusting the ranking of the candidate documents included in the primary document candidate group based on the weighted summation similarity score; and determining the document to be summarized based on the adjusted ranking.
[0042] According to one embodiment of the present application, a computer-readable recording medium may be provided that records a program for executing the document search method on a computer.
[0043] A document search device according to one embodiment of the present application comprises: a transmitting and receiving unit configured to receive a user search query; and a processor configured to search for a document to be summarized from a plurality of documents in a search database from the user search query. The processor may be configured to acquire a user search query, compute a sentence-unit user query vector from the user search query, acquire a first document candidate group based on the similarity between the computed user query vector and the embedding vector of a document stored in the search database, acquire a second document candidate group based on the similarity between the text included in the user search query and the text of a document stored in the search database, and determine the document to be summarized based on the first document candidate group and the second document candidate group.
[0044] A document summarization method according to one embodiment of the present application comprises: a step of extracting a document to be summarized based on a user search query; a step of obtaining a document summarization model that has completed training; and a step of inputting the document to be summarized into the document summarization model that has completed training, obtaining a first summary vector through a first output layer of the document summarization model that has completed training, and obtaining a summary based on a generated summary based on the first summary vector; wherein the document summarization model is trained based on a training dataset composed of a document original and generated summary correct answer information, and may be trained to obtain the document original through an input layer and output output data approximated by the generated summary correct answer information based on the difference between the output data output through the first output layer of the document summarization model and the generated summary correct answer information.
[0045] According to one embodiment of the present application, the step of obtaining a summary based on the generated summary further comprises the step of obtaining a second summary vector through a second output layer of the document summary model that has completed training, and obtaining a summary based on the second summary vector; wherein the document summary model may be trained to output the extracted summary vector through the second output layer of the document summary model using an extracted summary vector determined by calculating the similarity between the generated summary correct answer information and each sentence included in the original document.
[0046] According to one embodiment of the present application, the step of extracting the document to be summarized may further include: a step of obtaining the user search query; a step of calculating a sentence-unit vector from the user search query and obtaining a first document candidate group based on the similarity between the calculated vector and the embedding vector of the document stored in the search database; a step of extracting core query information from the user search query through a user query analysis module and obtaining a second document candidate group based on the similarity between the extracted core query information and the keyword information of the document stored in the search database; and a step of determining the document to be summarized based on the first document candidate group and the second document candidate group.
[0047] According to one embodiment of the present application, the step of determining the document to be summarized may further include: a step of obtaining documents included in the first document candidate group and documents included in the second document candidate group as a primary document candidate group; and a step of selecting the document to be summarized from the primary document candidate group by analyzing the similarity between the content of the candidate documents included in the primary document candidate group and the user search query through a search ranking adjustment module.
[0048] According to one embodiment of the present application, the search ranking adjustment module may be configured to receive a candidate document included in the primary document candidate group and a user search query, calculate a similarity score related to semantic similarity between the candidate document and the user search query, adjust the ranking of the candidate document included in the primary document candidate group based on the calculated similarity score, and select the document to be summarized from the primary document candidate group based on the adjusted ranking.
[0049] According to one embodiment of the present application, a computer-readable recording medium may be provided that records a program for executing the document summarization method on a computer.
[0050] A document summarization device according to one embodiment of the present application includes a processor configured to extract a document to be summarized based on a user search query, obtain a document summarization model that has been trained, input the document to be summarized into the document summarization model that has been trained, obtain a first summary vector through a first output layer of the document summarization model that has been trained, and obtain a summary based on a generated summary based on the first summary vector, wherein the document summarization model is trained based on a training dataset composed of a document original and generated summary correct answer information, and may be trained to obtain the document original through an input layer and output output data approximated by the generated summary correct answer information based on the difference between the output data output through the first output layer of the document summarization model and the generated summary correct answer information.
[0052] Hereinafter, with reference to FIGS. 1 to 13, a document search method, a document summarization method, and a document summarization device (or document search device, hereinafter referred to as a document summarization device) according to one embodiment of the present application will be described. In this specification, it is described as searching for a 'document' and summarizing a 'document'. However, this is merely for convenience of explanation, and the meaning of searching for a document and summarizing a document as described in this specification should be interpreted as encompassing searching for and summarizing at least a part of a document, including passages contained in the document.
[0053] FIG. 1 is a schematic diagram illustrating a document summary device (1000) according to one embodiment of the present application.
[0054] A document summary device (1000) according to one embodiment of the present application may include a transmitting and receiving unit (1010), a memory (1020), and a processor (1030).
[0055] The transmitting and receiving unit (1010) of the document summarizing device (1000) can communicate with any external device (or external server), including a database where the original data source is stored or a user device. For example, the document summarizing device (1000) can receive a user search query input through a user device via the transmitting and receiving unit (1010). For example, the document summarizing device (1000) can receive original data from a database where the original data source is stored and build a search database based on the original data. For example, the document summarizing device (1000) can transmit the generated summary to any external device, including a user device.
[0056] The document summarizing device (1000) can connect to a network and transmit and receive various data through the transmitting and receiving unit (1010). The transmitting and receiving unit (1010) may include a wired type and a wireless type. Since the wired type and the wireless type each have their own advantages and disadvantages, the document summarizing device (1000) may be equipped with both wired and wireless types depending on the case. Here, in the case of the wireless type, communication methods of the WLAN (Wireless Local Area Network) series, such as Wi-Fi, can be mainly used. Alternatively, in the case of the wireless type, cellular communication, such as LTE or 5G series communication methods, can be used. However, wireless communication protocols are not limited to the examples described above, and it is possible to use any appropriate wireless type of communication method. In the case of the wired type, LAN (Local Area Network) or USB (Universal Serial Bus) communication are representative examples, and other methods are also possible.
[0057] The memory (1020) of the document summary device (1000) can store various information. Various data can be stored in the memory (1020) temporarily or semi-permanently. Examples of memory (1020) may include a hard disk drive (HDD), a solid state drive (SSD), flash memory, ROM (Read-Only Memory), and RAM (Random Access Memory). The memory (1020) may be provided in a form that is embedded in the document summary device (1000) or in a detachable form. The memory (1020) may store various data necessary for the operation of the document summary device (1000), including an operating system (OS) for operating the document summary device (1000) and a program for operating each component of the document summary device (1000).
[0058] The processor (1030) can control the overall operation of the document summarization device (1000). For example, the processor (1030) can control the overall operation of the document summarization device (1000), including operations to extract or search for documents to be summarized based on a user search query to be summarized, and operations to obtain or generate a summary from the extracted documents to be summarized. Specifically, the processor (1030) can load and execute a program for the overall operation of the document summarization device (1000) from the memory (1020). The processor (1030) can be implemented as an Application Processor (AP), a Central Processing Unit (CPU), a Microcontroller Unit (MCU), or a similar device depending on hardware, software, or a combination thereof. In this case, hardware-wise, it may be provided in the form of an electronic circuit that processes electrical signals to perform control functions, and software-wise, it may be provided in the form of a program or code that drives the hardware circuit.
[0059] A document summarization device (1000) according to one embodiment of the present application can search a search database based on a user search query and extract a document candidate group including at least one document. Furthermore, the document summarization device (1000) can determine a document to be summarized from the extracted document candidate group through a similarity analysis between the content of the document included in the extracted document candidate group and the user search query. In this regard, it will be described in more detail with reference to FIGS. 2, 6 to 10.
[0060] A document summarization device (1000) according to one embodiment of the present application can perform an operation of summarizing a document to be summarized. For example, the document summarization device (1000) can perform an operation of generating a summary from a document to be summarized using a document summarization model that has completed training. Meanwhile, the document summarization model that has completed training according to one embodiment of the present application is characterized by being configured to simultaneously generate a generated summary and an extracted summary based on the document to be summarized. In this regard, it will be described in more detail with reference to FIGS. 5, 11 to 13.
[0062] Hereinafter, a document search method, a document summarization method, and a document summarization device according to one embodiment of the present application will be described in more detail with reference to FIGS. 2 and FIGS. 5.
[0063] FIG. 2 is a diagram illustrating the operation of searching for a document to be summarized from a user search query of a document summarization device (1000) according to one embodiment of the present application.
[0064] A document summarization device (1000) according to one embodiment of the present application can perform the operation of constructing a search database (1100) using an original data source. Specifically, the document summarization device (1000) can acquire an original data source and perform indexing on each document itself included in the original data source and / or vectorization on the content included in each document. For example, the document summarization device (1000) can construct a search database using the original data source through an ETL technique.
[0065] Specifically, the document summarization device (1000) may be implemented to segment each document included in the original data source into passage units of a single topic. For example, the document summarization device (1000) may segment each document into passage units by recognizing the section title and paragraph of each document through a document understanding model capable of structuring and extracting documents. For example, the document summarization device (1000) may segment each document into passage units through a paragraph extraction algorithm or a sentence extraction algorithm.
[0066] Furthermore, the document summarizing device (1000) can perform text encoding in segmented passage units. Specifically, the document summarizing device (1000) can convert the text contained in the passage into a dense vector to obtain semantic information of the text. For example, the document summarizing device (1000) can convert passage vectors (or sentence vectors) having a dense vector form by encoding the text in passage units through a pre-trained language model (e.g., BERT) or a model in which the pre-trained language model is tuned with training data of a specific domain (e.g., legal domain, financial domain, etc.). Additionally, the document summarizing device (1000) can store the converted vector in a search database (1100). The vector stored in the search database (1100) can be used for searching by the search module (1300) to be described later.
[0067] Furthermore, the document summarizing device (1000) can perform text analysis in the form of segmented passages. Specifically, the document summarizing device (1000) can analyze the text contained in the segmented passages to obtain type information of the passages, obtain domain information of the passages, or extract keywords of the passages. Furthermore, the document summarizing device (1000) can analyze the text contained in the segmented passages to extract core sentences of the passages, generate sentence-unit questions from the passages through a generative model, or generate a summary that summarizes the passages in sentence units. Additionally, the document summarizing device (1000) can store the text analysis results (e.g., type information of the passages, domain information of the passages, keywords of the passages, core sentences of the passages, sentence-unit questions, and / or sentence-unit summaries, etc.) in a search database (1100). At this time, the text analysis results stored in the search database (1100) can be used for searching by the search module (1300) described later. For example, the keywords of a passage can be utilized for text matching-based searching by comparing them with key query information extracted from a user search query. For example, the key sentence of a passage, a sentence-unit question generated from the passage, and / or a sentence-unit summary can be utilized for searching by comparing them with a sentence-unit user query, and the search performance can be enhanced by performing a sentence-to-sentence search. Meanwhile, FIG. 2 describes that the embedding vector of each document, the keywords of the passage, and the key sentence of the passage are stored in the search database (1100). However, it is not limited thereto, and the search module (1300) can be implemented to calculate the aforementioned embedding vector, keywords of the passage, and key sentence of the passage from the passage of each document stored in the search database (1100).
[0068] Furthermore, the document summarization device (1000) can distinguish and store each document included in the original data source as the original, extracted passage, embedding vector (e.g., passage vector, sentence vector), and / or meta information, and perform the operation of indexing to a search engine.
[0069] A document summarization device (1000) according to one embodiment of the present application may obtain a user search query (or may be referred to as a user query) from a user device. At this time, the document summarization device (1000) may perform an operation to analyze the form of the user query through a user query analysis module (1200). For example, the user query analysis module (1200) may extract information such as the length, number of tokens, and / or morphemes of the user query, and determine whether the user query is in the form of a query (e.g., a sentence form (e.g., a question), a phrase form (e.g., a table of contents of a report), and / or a paragraph form based on the extracted information.
[0070] Furthermore, the document summarizing device (1000) can analyze a user search query to classify the domain of the user search query or extract key query information representing the key feature of the user search query from the user search query. Specifically, the document summarizing device (1000) can extract key query information related to the domain, intent, and / or keywords of the user search query by analyzing the natural language characteristics of the user search query through the user query analysis module (1200). Furthermore, the document summarizing device (1000) can transmit the user search query, the domain of the user search query, and / or the extracted key query information to the search module (1300). Furthermore, the user query analysis module (1200) of the document summarizing device (1000) according to one embodiment of the present application can convert the user search query into a dense vector and transmit the converted dense vector to the search module (1300).
[0071] Meanwhile, there may be cases where the user search query is ambiguous or short. In such cases, the document summarization device (1000) according to one embodiment of the present application may perform an operation to expand the user search query. Specifically, if the user search query is not recognized or if the user search query is determined to be ambiguous, the user query analysis module (1200) of the document summarization device (1000) may use a generation model to generate a question to be provided to the user in order to refine the user search query based on the user search query. Furthermore, the document summarization device (1000) may be configured to transmit the generated question to a user terminal, obtain the user search query received from the user terminal in response to the generated question, and search for documents in the search database (1100) based on the obtained user search query.
[0072] A document summarization device (1000) according to one embodiment of the present application can search a search database (1100) based on a user search query and obtain a group of document candidates.
[0073] For example, the search module (1300) of the document summarizing device (1000) can search for documents related to a user search query in the search database (1100) through text matching-based search. For example, the search module (1300) of the document summarizing device (1000) can search for documents related to a user search query in the search database (1100) through text matching-based search including keyword-based search, phrase matching search, and / or Shingle matching search. For example, the search module (1300) can extract documents corresponding to indexes (or keywords) related to the core query information as a document candidate group based on core query information extracted through the user query analysis module (1200) and indexes (or keywords) of documents in the search database (1100). For example, the search module (1300) can calculate a score for the relevance between the core query information and indexes (or keywords) of documents in the search database (1100) and obtain documents corresponding to a predetermined rank as a document candidate group. The details regarding obtaining document candidates through text matching-based search will be explained in more detail in Fig. 3.
[0074] As another example, the search module (1300) of the document summarization device (1000) can search for documents related to a user search query in the search database (1100) through vector search using a deep learning model. Specifically, the search module (1300) can calculate the similarity between a vector extracted from a user search query and an embedding vector of each sentence included in a document stored in the search database (1100) through a deep learning model (e.g., a deep learning model in the form of a Bi-Encoder or a Cross-Encoder), and can extract a document candidate group based on the calculated similarity. For example, the search module (1300) can calculate a score for the similarity between vector information corresponding to the user search query and the embedding vector of a document stored in the search database, and obtain documents containing embedding vectors corresponding to a predetermined rank as a document candidate group. The details regarding obtaining a document candidate group through vector search using a deep learning model will be explained in more detail in FIG. 3.
[0075] As another example, the search module (1300) of the document summarizing device (1000) can search for documents related to a user search query in the search database (1100) using a hybrid search technique that combines the aforementioned text matching-based search and vector search utilizing a deep learning model. More specifically, the search module (1300) of the document summarizing device (1000) can obtain a document candidate group based on a relevance score (or similarity score) calculated based on the aforementioned text matching-based search and a similarity score calculated based on vector search utilizing a deep learning model. Specifically, the search module (1300) can obtain documents as document candidates by summing the relevance verification and similarity scores, and the summed score falling within a predetermined rank. The details regarding obtaining document candidates through the hybrid search technique will be explained in more detail in FIG. 3.
[0076] Meanwhile, a search module (1300) according to one embodiment of the present application may be configured to search the search database (1100) by applying a Full Scan method, which is a method of performing a search on all search targets, or a Nearest Neighbors operation method that considers the cost of similarity comparison operations between vectors, depending on how many search targets there are in the search database (1100).
[0077] A document summarization device (1000) according to one embodiment of the present application can perform the operation of adjusting the search ranking of documents included in a document candidate group and determining a document to be summarized from the documents included in the document candidate group according to the adjusted search ranking. Specifically, the search ranking adjustment module (1400) of the document summarization device (1000) can measure the similarity between a document included in the document candidate group and a user search query through a deep learning model and adjust the search ranking of the document included in the document candidate group based on the measured similarity. For example, the search ranking adjustment module (1400) can input the user search query and the document included in the document candidate group into a Transformer Fine-tune model (e.g., a BERT model, or a Cross-Encoder) to analyze the user search query and the document in semantic units, and adjust the search ranking of the document included in the document candidate group by measuring the similarity between the keywords of the user search query and the document, and / or the similarity between the user query vector corresponding to the user search query and the sentence unit vector included in the document. Furthermore, the search ranking adjustment module (1400) can determine the documents to be summarized based on the adjusted search ranking. The detailed operation of the search ranking adjustment module (1400) will be described in more detail in relation to FIG. 4.
[0078] Meanwhile, in FIG. 2, it is described that a database storing original data sources is provided outside the document summarizing device (1000), and a search database (1100) is included in the document summarizing device (1000). However, this is merely an example, and as needed, the database storing original data sources may be configured integrally with the document summarizing device (1000), or the search database (1100) may be configured separately from the document summarizing device (1000).
[0079] FIG. 3 is a diagram illustrating an aspect of extracting a primary document candidate group from a user query (or user search query) of a search module (1300) according to one embodiment of the present application.
[0080] A search module (1300) of a document summarization device (1000) according to one embodiment of the present application may be configured to perform an operation of extracting a primary document candidate based on a user query (or user search query) through a hybrid search in which deep learning-based vector search and text matching-based search are combined.
[0081] Specifically, the search module (1300) can obtain a user query vector computed from a user query (or user search query) and obtain a passage stored in the search database (1100). At this time, the search module (1300) can compute the similarity between the user query vector and the passage by utilizing deep learning techniques. For example, the search module (1300) can input a vector corresponding to a sentence extracted from the user query vector and the passage into a deep learning model in the form of a Bi-Encoder, and analyze the similarity between the user query vector and the vector corresponding to the sentence extracted from the passage through the Bi-Encoder to obtain a similarity score between the user query vector and the vector corresponding to the sentence extracted from the passage. For instance, the search module (1300) can extract a core sentence of the passage from the passage and compute a first similarity score between the vector corresponding to the extracted core sentence and the user query vector. For example, the search module (1300) can calculate a second similarity score between a vector corresponding to a sentence summarizing a passage and a user query vector. For example, the search module (1300) can generate a question from the passage through a generation model and calculate a third similarity score between a vector corresponding to a generated sentence and a user query vector. At this time, the search module (1300) can calculate a first weighted score (weighted score 1 in FIG. 3) based on the first similarity score, the second similarity score, and the third similarity score, and can obtain a first document candidate group including Top-k documents from a plurality of passages stored in the search database (1100) based on the calculated first weighted score. According to one embodiment of the present application, the search performance can be enhanced by converting a user query in sentence form and a passage stored in the search database (1100) into sentence form, performing sentence-to-sentence vector search, and calculating the first weighted score.Meanwhile, if there are few documents related to the user query vector (e.g., documents corresponding to the domain of the user query stored in the search database (1100)), the search module (1300) can analyze the similarity between the passages stored in the search database (1100) and the user query vector by utilizing a Bruete Force search technique. On the other hand, if there are many documents related to the user query vector (e.g., documents corresponding to the domain of the user query stored in the search database (1100)), the search module (1300) can analyze the similarity between the passages stored in the search database (1100) and the user query vector by utilizing an Approximate Nearest Neighbor (ANN) algorithm.
[0082] Furthermore, the search module (1300) can analyze the similarity (or relevance) between a user query (or user search query) and a passage stored in the search database (1100) by utilizing text matching-based search. For example, the search module (1300) can calculate a first score indicating the similarity (or relevance) between the user query and the passage through a phrase matching method (e.g., by utilizing the Elasticsearch match phrase technique). For example, the search module (1300) can calculate a second score indicating the similarity (or relevance) between the user query and the passage based on the degree of matching between the core query information containing keyword word information of the user query extracted from the user query (or user search query) and the words included in the passage. For example, the search module (1300) can calculate a third score indicating the similarity (or relevance) between the user query and the passage through a shingle search technique. At this time, the search module (1300) calculates a second weighted score (weighted score 2 of FIG. 3) based on the first score, the second score, and the third score, and can obtain a second document candidate group including Top-k documents from a plurality of passages stored in the search database (1100) based on the calculated second weighted score.
[0083] Furthermore, the search module (1300) can obtain documents included in the first document candidate group extracted through vector search and documents included in the second document candidate group extracted through text matching-based search as the first document candidate group. At this time, some of the documents included in the first document candidate group and some of the documents included in the second document candidate group may overlap.
[0084] Meanwhile, although not illustrated in FIG. 3, a search module (1300) according to one embodiment of the present application may be configured to limit the search targets based on domain information that is pre-classified for each document of the user query (or user search query) and / or the search database (1100) in order to improve search quality and search speed.
[0085] FIG. 4 is a diagram illustrating one aspect of determining a document to be summarized from a primary document candidate group of a search ranking adjustment module (1400) according to one embodiment of the present application.
[0086] A search ranking adjustment module (1400) of a document summary device (1000) according to one embodiment of the present application can perform an operation of adjusting the similarity ranking (or relevance ranking) between a document included in a primary document candidate group and a user query.
[0087] For example, the search ranking adjustment module (1400) can more precisely analyze the similarity between a passage of a document included in the primary document candidate group and a user query using a pre-trained Cross-Encoder. For instance, the search ranking adjustment module (1400) inputs a passage of a document included in the primary document candidate group (e.g., a sentence extracted from the passage) and a user query into a pre-trained Cross-Encoder, and obtains a first similarity score between the user query and the document included in the primary document candidate group through the Cross-Encoder. Since the Cross-Encoder is pre-trained to receive training data consisting of sentence pairs and predict the similarity score between the first sentence and the second sentence included in the sentence pairs, it can calculate a first similarity score representing the similarity (or relevance) between the user query (e.g., sentence form) and the sentence included in the passage of the document included in the first document candidate group (or the sentence extracted from the passage) based on the user query and the document included in the first document candidate group.
[0088] Furthermore, the search ranking adjustment module (1400) can analyze the similarity between a user query and a passage included in a document included in the primary document candidate group based on keywords. For example, the search ranking adjustment module (1400) can analyze the similarity between a keyword included in a user query and a keyword included in a passage included in each document included in the primary document candidate group by using the BM25F score algorithm. More specifically, the search ranking adjustment module (1400) can obtain a second similarity score that indicates the similarity (or relevance) between the keyword word of the user query and the document included in the primary document candidate group by comparing the core query information containing keyword word information extracted from the user query with the keyword word information included in the passage included in the document included in the primary document candidate group using the BM25F score algorithm.
[0089] Furthermore, the search ranking adjustment module (1400) may be configured to calculate a weighted sum similarity score based on a first similarity score calculated through the aforementioned Cross-Encoder and a second similarity score analyzed for similarity based on keywords. At this time, the search ranking adjustment module (1400) may determine the document to be summarized based on the weighted sum similarity score. For example, the search ranking adjustment module (1400) may be configured to determine the document corresponding to Top 1 (or Top n) among the documents included in the primary document candidate group as the document to be summarized in order of highest weighted sum similarity score.
[0090] A search module (1300) according to one embodiment of the present application can analyze the similarity between a user query vector and passages included in documents stored in a search database (1100) using a Bi-Encoder type deep learning model that has been trained as described above. The Bi-Encoder type deep learning model can be trained by tuning a pre-trained language model (PLM, e.g., BERT model, etc.). Here, the language model can be pre-trained to analyze the correlation between words using training data composed of words of a specific domain (e.g., legal domain, financial domain, etc.). At this time, the document summarizing device (1000) can perform the operation of training a Bi-Encoder type deep learning model for the purpose of searching for similar documents by measuring the similarity between texts. For example, the document summarizing device (1000) can train a Bi-Encoder type deep learning model using Contrastive Learning. Specifically, the document summarization device (1000) can train a Bi-Encoder type deep learning model to output a prediction value such that the distance becomes closer for positive samples of the training data (i.e., pairs of samples with a similarity level above a certain level), or that the distance becomes farther for negative samples of the training data (i.e., pairs of samples with a similarity level below a certain level). The trained Bi-Encoder type deep learning model can analyze the similarity between a user query vector and an embedding vector of a search target document based on the distance between a vector corresponding to an input sentence and a semantic vector of a document in a search database (1100) that has been pre-calculated and stored.
[0091] A search ranking adjustment module (1400) according to one embodiment of the present application can analyze the similarity between a user query and a passage included in a document stored in a search database (1100) using a deep learning model in the form of a Cross-Encoder that has been trained as described above. The deep learning model in the form of a Cross-Encoder can also be obtained by tuning a pre-trained language model (PLM, e.g., BERT model, etc.), similar to the deep learning model in the form of a Bi-Encoder described above. Specifically, the document summarization device (1000) can train a deep learning model in the form of a Cross-Encoder for the purpose of searching for similar documents by measuring the similarity between a first sentence and a second sentence using training data that includes a sentence pair composed of a first sentence and a second sentence. Specifically, the document summarization device (1000) may be configured to input training data consisting of a first sentence and a second sentence into a deep learning model in the form of a Cross-Encoder, and to train the deep learning model in the form of a Cross-Encoder to predict a similarity score between the first sentence and the second sentence.
[0092] Meanwhile, the training data may include a sentence pair consisting of a first sentence corresponding to a question and a second sentence corresponding to an answer. For example, the training data may include a sentence pair consisting of a first sentence corresponding to a title and a second sentence corresponding to a question. For example, the training data may include a sentence pair consisting of a first sentence corresponding to a question and a second sentence corresponding to a duplicate question. For example, the training data may include a sentence pair consisting of a first sentence corresponding to a title and a second sentence corresponding to an abstract. For example, the training data may include a sentence pair consisting of a first sentence corresponding to a query and a second sentence corresponding to a relevant passage (e.g., a passage included in a document clicked by the user). However, the training data described above is merely an example, and in order to achieve the purpose of analyzing similarity between texts, a deep learning model in the form of a Cross-Encoder may be trained using training data consisting of pairs of arbitrary text data that can be paired.
[0093] Meanwhile, in FIGS. 2 to 4, it was explained that the deep learning model in the form of a Cross-Encoder, which has been trained, is used to analyze the similarity between the documents included in the primary document candidate group and the user query in relation to the search ranking adjustment module (1400). However, this is only for convenience of explanation, and the deep learning model in the form of a Cross-Encoder, which has been trained, may be implemented to be used by the search module (1300) to extract documents containing passages similar to the user query included in the search database (1100) as needed.
[0094] FIG. 5 is a diagram illustrating the operation of generating a summary through a document summary model of a document summary device (1000) according to one embodiment of the present application.
[0095] A document summarization device (1000) according to one embodiment of the present application can generate a first summary based on a generated summary and / or a second summary based on an extracted summary from a document to be summarized.
[0096] For example, a document summarizing device (1000) can generate a first summary based on a generated summary from a document to be summarized through a document summarizing model that has been trained. Specifically, the document summarizing device (1000) can be configured to input a vector (e.g., W1, W2, Wn, etc. in FIG. 5) obtained by converting sentences included in the document to be summarized on a sentence-by-sentence basis into an encoder of a document summarizing model that has been trained, extract a feature vector through the encoder, and obtain a first summary vector (e.g., W1', W2', Wn', etc. in FIG. 5) from the feature vector through a decoder. At this time, the document summarizing device (1000) can generate a first summary based on a generated summary from the first summary vector. Since the document summarization model is trained to output output data by using a training dataset consisting of a document source and a generated summary answer (generated summary answer information), such that the vector corresponding to the sentence included in the document source is approximated to the summary vector corresponding to the sentence included in the generated summary answer, it can output a generation-based summary (or a first summary vector for generating a generation-based summary) from the document to be summarized.
[0097] For example, a document summarizing device (1000) can generate a second summary based on an extracted summary from a document to be summarized through a document summarizing model that has been trained. Specifically, the document summarizing device (1000) may be configured to input a vector (e.g., W1, W2, Wn, etc. in FIG. 5) obtained by converting sentences included in the document to be summarized on a sentence-by-sentence basis into an encoder of the document summarizing model that has been trained, and to obtain a second summary vector (e.g., W1, W2, Wn, etc. in FIG. 5) through the output layer of the encoder. At this time, the document summarizing device (1000) may determine an extracted summary vector (e.g., W1, Wn in FIG. 5) for generating a second summary from among the second summary vectors, extract sentences of the document to be summarized (e.g., sentence 1, sentence n in FIG. 5) based on the determined extracted summary vector, and generate a second summary based on the extracted sentences. The document summarization model can be implemented to compare the similarity between the sentences included in the generated summary correct answer of the training dataset and the sentences included in the original document, determine the second summary vector corresponding to the sentences with relatively high similarity as the extracted summary vector (e.g., W1, Wn in FIG. 5), and generate the second summary based on the sentences (e.g., sentence 1, sentence n) corresponding to the determined extracted summary vector.
[0098] The method for generating a summary and the details of training a document summary model for generating a summary will be described in more detail in FIGS. 11 to 13.
[0100] Hereinafter, a document search method, a document summarization method, and a method for learning a document summarization model according to an embodiment of the present application will be described in more detail with reference to FIGS. 6 to 13. In describing the document search method, the document summarization method, and the method for learning a document summarization model according to an embodiment of the present application, some embodiments that overlap with the content previously described in relation to FIGS. 2 to 5 may be omitted. However, this is merely for the convenience of explanation and should not be interpreted as being limited thereto.
[0101] FIG. 6 is a flowchart illustrating a document search method and a document summary method according to one embodiment of the present application.
[0102] A document summarization method according to one embodiment of the present application may include a step (S1000) of extracting a document to be summarized based on a user search query and a step (S2000) of obtaining a summary based on a generated summary from the extracted document to be summarized through a document summarization model that has been trained.
[0103] In the step (S1000) of extracting documents to be summarized based on a user search query, the document summarizing device (1000) can search a search database based on the user search query to determine a document candidate group containing at least one document. Furthermore, in the step (S1000) of extracting documents to be summarized based on a user search query, the document summarizing device (1000) can determine documents to be summarized from among the extracted document candidate group through similarity analysis between the content of the documents included in the extracted document candidate group and the user search query. The details regarding the extraction of documents to be summarized will be described in more detail in FIGS. 7 to 10.
[0104] In the step (S2000) of obtaining a summary based on a generated summary from an extracted document to be summarized through a document summary model that has been trained, the document summary device (1000) inputs the extracted document to be summarized into the document summary model that has been trained, obtains a first summary vector through the document summary model, and can generate a first summary based on a generated summary based on the first summary vector. The details regarding the acquisition of the summary will be described in more detail in FIGS. 11 to 13.
[0105] FIG. 7 is a flowchart illustrating the step (S1000) of extracting a summary target document according to one embodiment of the present application.
[0106] A step (S1000) of extracting a document to be summarized according to one embodiment of the present application may further include a step (S1100) of obtaining a user search query, a step (S1200) of obtaining a first document candidate group based on the similarity between the calculated vector and the embedding vector of a document stored in a search database (1100), a step (S1300) of obtaining a second document candidate group based on the similarity between the text included in the user search query and the text of a document stored in a search database, and a step (S1400) of determining a document to be summarized based on the first document candidate group and the second document candidate group.
[0107] In the step of obtaining a user search query (S1100), the document summarization device (1000) may obtain a user search query requesting a search for a document from a user device through a transmitting and receiving unit (1010). Here, the user search query may be used in the sense of encompassing information for searching in any appropriate form, including sentences in keyword form or natural language form, and vector form.
[0108] In the step (S1200) of calculating a sentence-unit vector from a user search query and obtaining a first document candidate group based on the similarity between the calculated vector and the embedding vector of a document stored in the search database (1100), the document summarizing device (1000) can search for documents related to the user search query in the search database (1100) through vector search.
[0109] FIG. 8 is a flowchart illustrating the step (S1200) of obtaining a first document candidate group according to one embodiment of the present application.
[0110] A step (S1200) of obtaining a first document candidate group according to one embodiment of the present application may further include: a step (S1210) of calculating a first similarity score between a user query vector and a sentence vector extracted from a passage of a document stored in a search database; a step (S1220) of calculating a second similarity score between a user query vector and a sentence vector summarizing a passage of a document stored in a search database; a step (S1230) of calculating a third similarity score between a question vector generated from a passage stored in a search database through a generation model and a user query vector; and a step (S1240) of calculating a first weighted score based on the first similarity score, the second similarity score, and the third similarity score, and determining a first document candidate group based on the calculated first weighted score.
[0111] Specifically, in the step of obtaining the first document candidate group (S1200), the search module (1300) may be configured to input a user query vector and a sentence vector obtained from a passage of a document stored in a search database into a deep learning model in the form of a trained Bi-Encoder.
[0112] For example, the search module (1300) can extract a key sentence from a passage of a document stored in the search database (1100) and calculate a first similarity score between a user query vector and a sentence vector corresponding to the extracted key sentence through a trained Bi-Encoder type deep learning model. (S1210)
[0113] For example, the search module (1300) can calculate a second similarity score between a sentence vector corresponding to a sentence summarizing passages of documents stored in the search database (1100) and a user query vector. (S1220)
[0114] For example, the search module (1300) can generate a sentence-shaped question from a passage of a document stored in the search database (1100) through a generation model, and calculate a third similarity score between a sentence vector corresponding to the generated query and a user query vector. (S1230)
[0115] Furthermore, the search module (1300) can calculate a first weighted score based on a first similarity score, a second similarity score, and a third similarity score, and obtain a first document candidate group including Top-k documents from a plurality of passages stored in the search database (1100) based on the calculated first weighted score. (S1240)
[0116] Referring again to FIG. 7, a document search method according to one embodiment of the present application may include a step (S1300) of obtaining a second document candidate group based on the similarity between the text included in a user search query and the text of a document stored in a search database (1100). In the step (S1300) of obtaining a second document candidate group, the search module (1300) may calculate a score representing the similarity between the text included in the user search query and the text of a document stored in a search database through a text matching-based search, and obtain a second document candidate group based on the calculated score.
[0117] FIG. 9 is a flowchart illustrating the step (S1300) of obtaining a second document candidate group according to one embodiment of the present application.
[0118] A step (S1300) of obtaining a second document candidate group according to one embodiment of the present application may further include: a step (S1310) of calculating a first score representing the similarity between a user search query and a passage stored in a search database through phrase matching; a step (S1320) of calculating a second score representing the similarity between key query information including keyword words of a user search query extracted through a user query analysis module and keyword words included in a passage stored in a search database; a step (S1330) of calculating a third score representing the similarity between a user search query and a passage stored in a search database through shingle matching; and a step (S1340) of calculating a second weighted score based on the first score, the second score, and the third score, and determining a second document candidate group based on the calculated second weighted score.
[0119] Referring again to FIG. 7, in the step (S1400) of determining a document to be summarized based on a first document candidate group and a second document candidate group, the search module (1300) of the document summarization device (1000) can determine a document to be summarized based on a first document candidate group obtained through step S1200 and a second document candidate group obtained through step S1300. For example, the search module (1300) can determine a document to be summarized by summing a similarity score calculated based on the vector search of step S1200 and a relevance score calculated based on the keyword-based search of step S1300, and the summed score corresponding to a predetermined rank.
[0120] Meanwhile, according to one embodiment of the present application, a document summarization device (1000) may be implemented to adjust the search ranking of documents included in the first and second document candidate groups and to determine the document to be summarized based on the adjusted search ranking.
[0121] FIG. 10 is a flowchart illustrating the step (S1400) of determining a document to be summarized according to one embodiment of the present application.
[0122] A step (S1400) of determining a document to be summarized according to one embodiment of the present application may further include a step (S1410) of obtaining documents included in a first document candidate group and documents included in a second document candidate group as a first document candidate group, and a step (S1420) of selecting a document to be summarized from the first document candidate group by analyzing the similarity between the content of the candidate documents included in the first document candidate group and the user search query through a search ranking adjustment module (1400).
[0123] In the step (S1410) of obtaining documents included in the first document candidate group and documents included in the second document candidate group as a primary document candidate group, the search ranking adjustment module (1400) of the document summary device (1000) can obtain a primary document candidate group that includes documents included in the first document candidate group searched through vector search and documents included in the second document candidate group searched through keyword search.
[0124] In the step (S1420) of selecting a document to be summarized from a primary document candidate group by analyzing the similarity between the content of a candidate document included in a primary document candidate group and a user search query through a search ranking adjustment module (1400), the document summarizing device (1000) can adjust the search ranking of candidate documents included in a primary document candidate group through the search ranking adjustment module (1400), and determine a document to be summarized from the candidate documents included in the primary document candidate group according to the adjusted search ranking.
[0125] For example, the search ranking adjustment module (1400) can measure the similarity between a candidate document included in the primary document candidate group and a user search query through a deep learning model and adjust the search ranking of the candidate document included in the primary document candidate group based on the measured similarity. For instance, the search ranking adjustment module (1400) can calculate a similarity score representing the semantic similarity between the candidate document and the user search query from the candidate document included in the primary document candidate group and the user search query using a trained Cross-Encoder type deep learning model.
[0126] For example, the search ranking adjustment module (1400) can calculate a similarity score between key query information extracted from a user search query and keyword words included in candidate documents included in the primary document candidate group using the BM25F score calculation algorithm.
[0127] At this time, the search ranking adjustment module (1400) calculates a weighted sum similarity score for each candidate document included in the primary document candidate group based on a similarity score calculated using a trained Cross-Encoder type deep learning model and a similarity score calculated using a BM25F score calculation algorithm, and can adjust the ranking of the candidate documents included in the primary document candidate group based on the weighted sum similarity score. Furthermore, the search ranking adjustment module (1400) can be configured to determine the document to be summarized based on the adjusted ranking.
[0128] FIG. 11 is a flowchart illustrating the step (S2000) of obtaining a summary based on a generated summary from an extracted summary target document according to one embodiment of the present application.
[0129] A step (S2000) of obtaining a summary based on a generated summary from an extracted summary target document according to one embodiment of the present application may further include a step (S2100) of inputting a summary target document into an input layer of a document summary model that has completed training, a step (S2200) of obtaining a first summary vector through a first output layer of the document summary model and generating a summary based on a generated summary based on the first summary vector, and a step (S2300) of obtaining a second summary vector through a second output layer of the document summary model and generating a summary based on an extracted summary based on the second summary vector.
[0130] In the step (S2100) of inputting a document to be summarized into the input layer of a document summary model that has been trained, the document summary device (1000) may acquire a document summary model that has been trained. Here, acquiring a document summary model that has been trained means acquiring arbitrary data for properly executing the document summary model, including computational information, structural information, hierarchy information, and / or parameter information of the document summary model that has been trained. Furthermore, the document summary device (1000) may input the document to be summarized extracted through step S1000 into the input layer of the document summary model that has been trained. Specifically, the document summary device (1000) may input a vector (Wi) obtained by converting the sentences included in the document to be summarized on a sentence-by-sentence basis into the input layer of the document summary model that has been trained.
[0131] Meanwhile, a document summarization model according to one embodiment of the present application may be composed of an encoder and a decoder. The encoder may extract a feature vector from a vector (Wi) corresponding to each sentence included in the document to be summarized. At this time, the decoder may be configured to output a summary vector (Wi') for generating a summary based on the generated summary from the feature vector. Meanwhile, the encoder according to one embodiment of the present application may be in the form of a bidirectional encoder capable of learning context, and the decoder may be in the form of an autoregressive decoder capable of learning the causality between the previous context and the subsequent sequence.
[0132] Specifically, the document summarization device (1000) can input a vector (Wi) obtained by converting sentences included in the document to be summarized into sentence units into the input layer of the encoder of the document summarization model that has completed training.
[0133] In the step (S2200) of obtaining a first summary vector through the first output layer of a document summary model and generating a summary based on the first summary vector, the document summary device (1000) can obtain a first summary vector (Wi') corresponding to a sentence vector (Wi) included in the document to be summarized through the first output layer of the document summary model. Specifically, the document summary device (1000) can obtain the first summary vector (Wi') through the first output layer of the decoder of the document summary model. At this time, the document summary device (1000) can generate a first summary based on the generation summary from the first summary vector. As described below, the document summarization model is trained to output output data such that it approximates the summary vector (Wi') corresponding to the sentence (Si') included in the generated summary answer from the vector (Wi) corresponding to the sentence (Si') included in the generated summary answer, using a training dataset consisting of a document source and a generated summary answer, so that it can output a summary based on the generated summary (or a first summary vector for generating a summary based on the generated summary) from the document to be summarized.
[0134] In the step (S2300) of obtaining a second summary vector through the second output layer of the document summary model and generating a summary based on an extraction summary based on the second summary vector, the document summary device (1000) can obtain a second summary vector (Wi) corresponding to a sentence vector (Wi) included in the document to be summarized through the second output layer of the document summary model. Specifically, the document summary device (1000) can obtain a first summary vector (Wi') through the second output layer of the encoder of the document summary model. At this time, the document summary device (1000) can generate a second summary based on an extraction summary from the second summary vector. At this time, the document summary device (1000) can determine an extraction summary vector for generating the second summary from among the second summary vectors, extract sentences of the document to be summarized based on the determined extraction summary vector, and generate a second summary based on the extracted sentences. As described below, the document summarization model can be implemented to compare the similarity between the sentences included in the generated summary correct answer of the training dataset and the sentences included in the original document, determine a second summary vector corresponding to the sentences with relatively high similarity as an extracted summary vector, and generate a second summary based on the extracted summary based on the sentences corresponding to the determined extracted summary vector.
[0136] Hereinafter, with reference to FIGS. 12 and FIGS. 13, a method for learning a document summary model and a training data set for training a document summary model according to one embodiment of the present application will be described in more detail.
[0137] FIG. 12 is a diagram illustrating a training dataset for training a document summary model according to one embodiment of the present application.
[0138] A training data set for training a document summarization model may consist of a document source and a generated summary correct answer. The document source may consist of at least one sentence (e.g., sentence 1 (S1), sentence 2 (S2), and sentence N (Sn) of FIG. 12), and the generated summary correct answer is a correct answer that generates and summarizes the document source, and may consist of at least one sentence (e.g., summary sentence 1 (S1') and summary sentence N (Sn') of FIG. 12).
[0139] Meanwhile, although Figure 12 illustrates that the training dataset is configured in the form of sentences, this is merely an example for the convenience of explanation, and the training dataset may also be configured in the form of vectors in which each sentence of the original document and the generated summary answer is vectorized.
[0140] FIG. 13 is a diagram illustrating one aspect of training a document summary model according to one embodiment of the present application.
[0141] A document summarization device (1000) according to one embodiment of the present application can train a document summarization model based on the aforementioned training data set. Specifically, the document summarization device (1000) may be configured to input vectors (e.g., vector 1 (W1) corresponding to sentence 1 (S1) of FIG. 13, vector 2 (W2) corresponding to sentence 2 (S2) of FIG. 13, vector N (Wn)) which are vectorized from each sentence of the original document included in the training data set (e.g., sentence 1 (S1), sentence 2 (S2), sentence N (Sn) of FIG. 13) into the input layer of the document summarization model. At this time, the encoder of the document summarization model extracts feature vectors from each vector, and the decoder of the document summarization model can output output data in the form of a vector based on the feature vectors through the first output layer. At this time, the document summarization device (1000) can train a document summarization model based on output data and vectors that vectorize each summary sentence of the generated summary correct answer of the training data set (e.g., summary sentence 1 (S1'), summary sentence N (Sn') of FIG. 13) (e.g., summary vector 1 (W1') corresponding to summary sentence 1 (S1') of FIG. 13, summary vector N (Wn') corresponding to summary sentence N). Specifically, the document summarization device (1000) can update the parameters of the document summarization model to output output data that approximates the summary vector (or summary sentence) of the generated summary correct answer based on the difference between the summary vector (or summary sentence) of the generated summary correct answer and the output data.
[0142] Furthermore, a document summarization device (1000) according to one embodiment of the present application can train a document summarization model to output a summary vector for generating a summary based on extraction summary. Referring again to FIG. 12, the document summarization device (1000) can determine an extraction summary vector (e.g., W1, Wn in FIG. 12) for generating a summary based on extraction summary by analyzing the similarity between the original document of the training dataset used to generate a summary based on generation summary and the correct answer of the generated summary. For example, the document summarizing device (1000) can analyze the similarity between the sentence (Si') of the generated summary answer and the sentence (Si) of the original document, and determine the vector (W1) corresponding to the sentence 1 (S1) of the original document that has a relatively high similarity to the summary sentence 1 (S1') of the generated summary answer and the vector (Wn) corresponding to the sentence N (Sn) of the original document that has a high similarity to the summary sentence N (Sn') of the generated summary answer as the extracted summary vector (W1, Wn of FIG. 12).
[0143] At this time, the document summarization device (1000) can train the document summarization model so that the document summarization model outputs an extracted summary vector (or a sentence corresponding to the extracted summary vector) through a second output layer. For example, the document summarization device (1000) can train the document summarization model so that the document summarization model outputs an extracted summary vector (e.g., W1, Wn) or a sentence corresponding to the extracted summary vector (e.g., sentence 1 (S1) corresponding to W1, sentence 2 (Sn) corresponding to Wn) through the second output layer of the encoder.
[0144] According to one embodiment of the present application, a document summarization model that has completed training can generate a first summary vector for generating a summary based on a generated summary and a second summary vector for generating a summary based on an extracted summary, based on a document to be summarized. A document summarization device (1000) can generate a summary based on a generated summary based on the first summary vector and generate a summary based on an extracted summary based on the second summary vector. A document summarization method and a document summarization device according to one embodiment of the present application can be applied to providing a summary of any report. Specifically, paragraphs or documents related to each title or keyword of the report can be searched first, and a summary can be generated for the searched paragraphs or documents, and the generated summary can be matched to the part corresponding to the table of contents of the report to provide a summary of the report.
[0145] Furthermore, the document summarization method and document summarization device according to one embodiment of the present application may be applied to providing a news curation function. Specifically, the document summarization method and document summarization device according to one embodiment of the present application may be applied to a service that generates a summary of news corresponding to a specific category selected by a user and provides a link to the original news along with the generated summary, or a service that searches for related news and generates a summary of the searched news when a user searches for news in natural language form.
[0146] According to a document search method and document search device according to one embodiment of the present application, by combining vector-based search and text matching-based search, the effect of maintaining search quality while reducing computational load can be provided.
[0147] According to a document search method and document search device according to one embodiment of the present application, by performing sentence-to-sentence vector search, the effect of increasing the performance and accuracy of the vector search can be provided.
[0148] According to the document summarization method and document summarization device of the embodiment of the present application, a summary based on generational summarization and a summary based on extractional summarization can be provided simultaneously. Specifically, according to the document summarization method and document summarization device of the embodiment of the present application, by training a document summarization model capable of providing generational summarization functions and extractional summarization functions using only a training data set for generational summarization, the effect of providing a summary based on generational summarization and a summary based on extractional summarization can be provided simultaneously.
[0149] Various operations of the document summary device (1000) described above may be stored in the memory (1020) of the document summary device (1000), and the processor (1030) of the document summary device (1000) may be provided to perform the operations stored in the memory (1020).
[0150] The features, structures, effects, etc. described in the embodiments above are included in at least one embodiment of the present invention and are not necessarily limited to only one embodiment. Furthermore, the features, structures, effects, etc. exemplified in each embodiment may be combined or modified and implemented in other embodiments by a person skilled in the art to which the embodiments belong. Accordingly, details regarding such combinations and modifications should be interpreted as being included within the scope of the present invention.
[0151] Furthermore, although the embodiments have been described above, this is merely illustrative and does not limit the invention. Those skilled in the art will understand that various modifications and applications not exemplified above are possible within the scope of the essential characteristics of the embodiments. In other words, each component specifically shown in the embodiments may be modified and implemented. Differences related to such modifications and applications should be interpreted as being included within the scope of the invention as defined in the appended claims.
Claims
Claim 1 A method for a document search device to search for documents based on a user search query comprises: a step of obtaining a user search query; a step of calculating a sentence-unit user query vector from the user search query and obtaining a first document candidate group based on the similarity between the calculated user query vector and the embedding vector of a document stored in a search database; a step of obtaining a second document candidate group based on the similarity between the text included in the user search query and the text of the document stored in the search database; and a step of determining a document to be summarized based on the first document candidate group and the second document candidate group; wherein the step of obtaining the first document candidate group comprises: a step of extracting a core sentence of a passage of the document stored in the search database from the passage of the document; a step of calculating a first similarity score between the user query vector and a sentence vector corresponding to the core sentence extracted from the passage of the document stored in the search database; and a step of calculating a second similarity score between the user query vector and a sentence vector summarizing the passage of the document stored in the search database. A document search method comprising: a step of generating a question from a passage of a document stored in a search database through a generation model; a step of calculating a third similarity score between a question vector corresponding to the question generated from the passage of a document stored in the search database and a user query vector; a step of calculating a first weighted score based on the first similarity score, the second similarity score, and the third similarity score; and a step of determining a first document candidate group based on the calculated first weighted score. Claim 2 delete Claim 3 A document search method according to claim 1, wherein the step of obtaining the second document candidate group further comprises: a step of calculating a first score representing the similarity between the user search query and the passage stored in the search database through phrase matching; a step of calculating a second score representing the similarity between the keyword word included in the core query information containing the keyword word of the user search query extracted through a user query analysis module and the keyword word included in the passage stored in the search database; a step of calculating a third score representing the similarity between the user search query and the passage stored in the search database through shingle matching; and a step of calculating a second weighted score based on the first score, the second score, and the third score, and determining the second document candidate group based on the calculated second weighted score. Claim 4 A document search method according to claim 3, wherein the step of determining the document to be summarized further comprises: a step of obtaining documents included in the first document candidate group and documents included in the second document candidate group as a primary document candidate group; and a step of selecting the document to be summarized from the primary document candidate group by analyzing the similarity between the content of the candidate documents included in the primary document candidate group and the user search query through a search ranking adjustment module. Claim 5 A document search method according to claim 4, wherein the search ranking adjustment module is configured to calculate a fourth similarity score representing the semantic similarity between the candidate document and the user search query from the candidate document included in the primary document candidate group and the user search query using a trained Cross-Encoder type deep learning model. Claim 6 A document search method according to claim 5, wherein the search ranking adjustment module is configured to calculate a fifth similarity score between the core query information extracted from the user search query and the keyword words included in the candidate documents included in the primary document candidate group using the BM25F score calculation algorithm. Claim 7 A document search method according to claim 6, wherein the step of selecting the document to be summarized further comprises: a step of calculating a weighted summation similarity score of each candidate document included in the primary document candidate group based on the fourth similarity score and the fifth similarity score; a step of adjusting the ranking of candidate documents included in the primary document candidate group based on the weighted summation similarity score; and a step of determining the document to be summarized based on the adjusted ranking. Claim 8 A computer-readable recording medium having a program stored on it for executing a method according to any one of claims 1 and 3 through 7 on a computer. Claim 9 A document search device comprising: a transmitting and receiving unit configured to receive a user search query; A processor configured to search for a document to be summarized from a plurality of documents in a search database from the user search query; wherein the processor is configured to acquire a user search query, compute a sentence-unit user query vector from the user search query, acquire a first document candidate group based on the similarity between the computed user query vector and the embedding vector of a document stored in the search database, acquire a second document candidate group based on the similarity between the text included in the user search query and the text of a document stored in the search database, and determine the document to be summarized based on the first document candidate group and the second document candidate group; acquiring the first document candidate group comprises extracting a core sentence of a passage of the document stored in the search database from the passage of the document, computing a first similarity score between the user query vector and a sentence vector corresponding to the core sentence extracted from the passage of the document stored in the search database, and computing a second similarity score between the user query vector and a sentence vector summarizing the passage of the document stored in the search database. A document search device comprising: generating a question from a passage of a document stored in the search database through a generation model; calculating a third similarity score between a question vector corresponding to the question generated from the passage of a document stored in the search database and a user query vector; calculating a first weighted score based on the first similarity score, the second similarity score, and the third similarity score; and determining the first document candidate group based on the calculated first weighted score.
Citation Information
Patent Citations
Absorbent article with leg cuffs
US20200107972A1
KR1020200172512A
