KR102649429B1 - Method and system for extracting information from semi-structured documents - Google Patents

Method and system for extracting information from semi-structured documents Download PDF

Info

Publication number
KR102649429B1
KR102649429B1 KR1020210070404A KR20210070404A KR102649429B1 KR 102649429 B1 KR102649429 B1 KR 102649429B1 KR 1020210070404 A KR1020210070404 A KR 1020210070404A KR 20210070404 A KR20210070404 A KR 20210070404A KR 102649429 B1 KR102649429 B1 KR 102649429B1
Authority
KR
South Korea
Prior art keywords
type
category
words
tokens
token
Prior art date
Application number
KR1020210070404A
Other languages
Korean (ko)
Other versions
KR20220142901A (en
Inventor
황원석
임진영
김기욱
서민준
이현지
Original Assignee
네이버 주식회사
라인웍스 가부시키가이샤
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 네이버 주식회사, 라인웍스 가부시키가이샤 filed Critical 네이버 주식회사
Priority to JP2022062744A priority Critical patent/JP7453731B2/en
Publication of KR20220142901A publication Critical patent/KR20220142901A/en
Application granted granted Critical
Publication of KR102649429B1 publication Critical patent/KR102649429B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 문서로부터 정보를 추출하는 방법 및 시스템에 관한 것이다. 본 발명은 대상 문서에 대한 OCR(Optical character recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 단계, 상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계 및 상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 단계를 포함하고, 상기 복수의 토큰을 배열하는 단계에서는, 상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 상기 복수의 토큰을 배열하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법을 제공할 수 있다.The present invention relates to a method and system for extracting information from documents. The present invention includes the steps of performing OCR (Optical character recognition) on a target document, extracting a plurality of words and location information for each of the plurality of words, and generating a plurality of tokens corresponding to each of the plurality of words. and arranging the plurality of tokens so that the data structure between the plurality of words included in the target document is reflected, and in the arranging of the plurality of tokens, the meaning of the plurality of words and the plurality of words are included. A method of extracting information from a semi-structured document can be provided, characterized by arranging the plurality of tokens using location information for each word.

Description

반정형 문서로부터 정보를 추출하는 방법 및 시스템{METHOD AND SYSTEM FOR EXTRACTING INFORMATION FROM SEMI-STRUCTURED DOCUMENTS}Method and system for extracting information from semi-structured documents {METHOD AND SYSTEM FOR EXTRACTING INFORMATION FROM SEMI-STRUCTURED DOCUMENTS}

본 발명은 문서로부터 정보를 추출하는 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for extracting information from documents.

인공지능의 사전적 의미는, 인간의 학습능력과 추론능력, 지각능력, 자연언어의 이해능력 등을 컴퓨터 프로그램으로 실현한 기술이라 할 수 있다. 이러한 인공지능은 머신러닝에 인간의 뇌를 모방한 신경망 네트워크를 더한 딥러닝으로 인하여 비약적인 발전을 이루었다.The dictionary meaning of artificial intelligence is a technology that realizes human learning ability, reasoning ability, perception ability, and natural language understanding ability through computer programs. This artificial intelligence has made rapid progress due to deep learning, which adds a neural network that mimics the human brain to machine learning.

딥러닝(deep learning)이란, 컴퓨터가 인간처럼 판단하고 학습할 수 있도록 하고, 이를 통해 사물이나 데이터를 군집화하거나 분류하는 기술로서, 최근에는 텍스트 데이터 뿐만 아니라 영상 데이터에 대한 분석까지 가능해져, 매우 다양한 산업분야에 적극적으로 활용되고 있다.Deep learning is a technology that enables computers to judge and learn like humans, and to cluster or classify objects or data. Recently, it has become possible to analyze not only text data but also video data, enabling a wide variety of applications. It is actively used in industrial fields.

이러한, 인공지능의 발달로 사무자동화(office automation) 분야에 있어서도 다양한 자동화가 이루어지고 있다. 특히, 사무자동화 분야에서는 종이(paper)에 인쇄된 콘텐츠를 인공지능을 활용한 영상 데이터 분석 기술에 기반하여 데이터화 하는데 많은 노력을 기울이고 있다. 그 일환으로서, 사무자동화 분야에서는 종이 문서를 이미지화 하여, 이미지에 포함된 콘텐츠를 분석하는 이미지 분석 기술(또는 영상 데이터에 대한 분석 기술)을 통하여, 문서에 포함된 콘텐츠를 데이터화하고 있으며, 이 경우 문서에 포함된 콘텐츠의 타입에 맞게 이미지를 분석하는 기술이 필요하다.With the development of artificial intelligence, various automations are being implemented in the office automation field. In particular, in the field of office automation, much effort is being made to convert content printed on paper into data based on video data analysis technology using artificial intelligence. As part of this, in the office automation field, paper documents are converted into images and the content contained in the document is converted into data through image analysis technology (or video data analysis technology) that analyzes the content contained in the image. In this case, the document Technology is needed to analyze images according to the type of content included.

예를 들어, 영수증(receipt)을 포함하는 문서를 데이터화 하는 경우, 영수증의 형식, 영수증 내에 포함된 텍스트의 내용 및 영수증에 포함된 텍스트의 위치 등과 같이, 영수증을 둘러싼 다양한 요소들에 대한 정확한 분석이 필요하다.For example, when converting a document containing a receipt into data, an accurate analysis of various elements surrounding the receipt, such as the format of the receipt, the content of the text included in the receipt, and the location of the text included in the receipt, is required. need.

이에, 이미지에 포함된 정보를 전자 장비에서 처리할 수 있는 형태의 데이터로 가공하기 위한 다양한 기술들이 개발되고 있다. 예를 들어, 대한민국 등록특허 제10-1181209호에서는 OCR 데이터베이스를 구축하는 방법이 개시되어 있다. Accordingly, various technologies are being developed to process information contained in images into data that can be processed by electronic equipment. For example, Republic of Korea Patent No. 10-1181209 discloses a method of building an OCR database.

그러나, 현재까지 개발된 방법은 사람이 경험적으로 정한 규칙에 따라 데이터를 분류하는 수준이므로, 대상 문서에 포함된 데이터의 구조 및 텍스트 데이터 간의 관계성까지 정확하게 재현할 수 있는 어플리케이션의 개발이 계속적으로 필요하다.However, since the methods developed to date are at the level of classifying data according to rules established empirically by humans, there is a continued need for the development of applications that can accurately reproduce the structure of the data contained in the target document and the relationships between text data. do.

본 발명은, 대상 문서에 포함된 복수의 단어 간의 데이터 구조를 반영하여 대상 문서로부터 정보를 추출하는 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for extracting information from a target document by reflecting the data structure between a plurality of words included in the target document.

나아가, 본 발명은 대상 문서에서 데이터를 추출하는 기계학습 모델에 대한 훈련이 용이한 형태의 데이터로 대상 문서로부터 데이터를 추출하는 방법 및 시스템을 제공한다.Furthermore, the present invention provides a method and system for extracting data from a target document in a form that facilitates training of a machine learning model that extracts data from the target document.

구체적으로, 본 발명은 대상 문서에서 데이터를 추출하는 기계학습 모델의 정확도를 판단하는데 활용되는 학습 데이터 및 기계학습 모델로부터 출력되는 데이터의 형식을 사람이 가공하기 용이한 형태로 구현함으로써, 기계학습 모델의 정확도를 판단하는데 소요되는 시간 및 비용을 절감할 수 있도록 하는 데이터 추출 방법 및 시스템을 제공한다. Specifically, the present invention implements the format of the learning data used to determine the accuracy of a machine learning model that extracts data from a target document and the data output from the machine learning model in a form that is easy for humans to process, thereby creating a machine learning model. Provides a data extraction method and system that reduces the time and cost required to determine the accuracy of.

나아가, 본 발명은 대상 문서에 포함된 데이터 간의 관계성을 제공할 수 있는 데이터 추출 방법 및 시스템을 제공하기 위한 것이다.Furthermore, the present invention is intended to provide a data extraction method and system that can provide relationships between data included in target documents.

위에서 살펴본 과제를 해결하기 위하여, 본 발명은 대상 문서에 대한 OCR(Optical character recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 단계, 상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계 및 상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 단계를 포함하고, 상기 복수의 토큰을 배열하는 단계에서는, 상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 상기 복수의 토큰을 배열하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법을 제공할 수 있다.In order to solve the problems described above, the present invention performs OCR (Optical character recognition) on a target document, extracting a plurality of words and location information for each of the plurality of words, corresponding to each of the plurality of words. generating a plurality of tokens and arranging the plurality of tokens so that a data structure between the plurality of words included in the target document is reflected, and in the step of arranging the plurality of tokens, the plurality of tokens are A method of extracting information from a semi-structured document can be provided, characterized by arranging the plurality of tokens using the meaning of the word and location information for each of the plurality of words.

또한, 본 발명은 대상 문서에 대한 OCR(Optical character recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 OCR부, 상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하고, 상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 제어부를 포함하고, 상기 제어부는, 상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 상기 복수의 토큰을 배열하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 시스템을 제공할 수 있다.In addition, the present invention includes an OCR unit that performs OCR (Optical character recognition) on a target document to extract a plurality of words and location information for each of the plurality of words, and a plurality of tokens corresponding to each of the plurality of words. and a control unit that generates and arranges the plurality of tokens so that a data structure between the plurality of words included in the target document is reflected, wherein the control unit determines the meaning of the plurality of words and each of the plurality of words. It is possible to provide a system for extracting information from a semi-structured document, characterized by arranging the plurality of tokens using location information.

또한, 본 발명은 전자기기에서 하나 이상의 프로세스에 의하여 실행되며, 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램으로서, 상기 프로그램은, 대상 문서에 대한 OCR(Optical character recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 단계, 상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계 및 상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 단계를 수행하도록 하는 명령어들을 포함하고, 상기 복수의 토큰을 배열하는 단계에서는, 상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 상기 복수의 토큰을 배열하는 것을 특징으로 하는 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램을 제공할 수 있다.In addition, the present invention is a program that is executed by one or more processes in an electronic device and can be stored in a computer-readable recording medium, wherein the program performs OCR (Optical character recognition) on the target document, Extracting a word and location information for each of the plurality of words, generating a plurality of tokens corresponding to each of the plurality of words, and reflecting a data structure between the plurality of words included in the target document, Includes instructions for performing the step of arranging a plurality of tokens, and in the step of arranging the plurality of tokens, using the meaning of the plurality of words and location information for each of the plurality of words, the plurality of tokens It is possible to provide a program that can be stored in a computer-readable recording medium, characterized by arranging .

위에서 살펴본 것과 같이, 본 발명은 대상 문서에서 추출된 상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 생성된 토큰 및 생성된 토큰의 배열을 이용하여, 대상 문서에 포함된 복수의 단어 간의 데이터 구조가 반영된 데이터를 생성할 수 있다. As seen above, the present invention uses the meaning of the plurality of words extracted from the target document and the location information for each of the plurality of words, and includes the generated token in the target document by using the generated token and the arrangement of the generated token. Data that reflects the data structure between multiple words can be generated.

또한, 본 발명에 따른 정보 추출 모델의 기계학습은 정보 추출 모델로부터 출력된 복수의 토큰의 정확도를 산출함으로써 수행된다. 상기 출력된 토큰들은 단어들 간의 관련성이 완전히 반영된 데이터가 아니므로, 상기 정보 추출 모델의 정확도를 산출하기 위한 학습 데이터 생성이 용이 해진다. Additionally, machine learning of the information extraction model according to the present invention is performed by calculating the accuracy of a plurality of tokens output from the information extraction model. Since the output tokens are not data that completely reflects the relationship between words, it becomes easy to generate learning data to calculate the accuracy of the information extraction model.

구체적으로, 학습 데이터 생성 시 기 정해진 룰(토큰 생성 룰)에 따라 일정한 순서로 배열된 토큰을 생성한 후, 정보 추출 모델에서 출력된 토큰들과 비교하는 작업을 통해, 정보 추출 모델의 정확도를 판단하고, 상기 정보 추출 모델의 정확도를 향상시키기 위한 방향으로 정보 추출 모델에 대한 훈련을 진행할 수 있게 된다. 이에 따라, 정보 추출 모델의 기계학습을 위한 학습 데이터를 생성하는데 소요되는 시간이 크게 단축될 수 있다.Specifically, when generating learning data, tokens arranged in a certain order are generated according to predetermined rules (token generation rules), and then the accuracy of the information extraction model is determined by comparing them with the tokens output from the information extraction model. And, training on the information extraction model can be carried out in the direction of improving the accuracy of the information extraction model. Accordingly, the time required to generate learning data for machine learning of the information extraction model can be greatly reduced.

도 1은 본 발명에 따른 정보 추출 시스템을 설명하기 위한 개념도이다.
도 2는 본 발명에 따른 정보 추출 방법을 설명하기 위한 순서도이다.
도 3은 본 발명에 정보 추출 모델을 설명하기 위한 개념도이다.
도 4는 본 발명에 따른 정보 추출 모델로부터 출력된 데이터를 트리(tree)화 한 모습을 나타내는 개념도이다.
도 5는 본 발명에 따른 정보 추출 모델의 기계학습 방법을 나타내는 개념도이다.
도 6은 본 발명에 따른 정보 추출 모델로부터 출력된 데이터의 정확도를 산출하는 모습을 나타내는 개념도이다.
도 7은 종래 정보 추출을 위한 기계학습 방법을 나타내는 개념도이다.
1 is a conceptual diagram illustrating an information extraction system according to the present invention.
Figure 2 is a flowchart for explaining the information extraction method according to the present invention.
Figure 3 is a conceptual diagram for explaining the information extraction model in the present invention.
Figure 4 is a conceptual diagram showing the data output from the information extraction model according to the present invention converted into a tree.
Figure 5 is a conceptual diagram showing a machine learning method for an information extraction model according to the present invention.
Figure 6 is a conceptual diagram showing calculating the accuracy of data output from the information extraction model according to the present invention.
Figure 7 is a conceptual diagram showing a conventional machine learning method for information extraction.

이하, 첨부된 도면을 참조하여 본 명세서에 개시된 실시 예를 상세히 설명하되, 도면 부호에 관계없이 동일하거나 유사한 구성요소에는 동일한 참조 번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 이하의 설명에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다. 또한, 본 명세서에 개시된 실시 예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 명세서에 개시된 실시 예의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 첨부된 도면은 본 명세서에 개시된 실시 예를 쉽게 이해할 수 있도록 하기 위한 것일 뿐, 첨부된 도면에 의해 본 명세서에 개시된 기술적 사상이 제한되지 않으며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. Hereinafter, embodiments disclosed in the present specification will be described in detail with reference to the accompanying drawings. However, identical or similar components will be assigned the same reference numbers regardless of drawing symbols, and duplicate descriptions thereof will be omitted. The suffixes “module” and “part” for components used in the following description are given or used interchangeably only for the ease of preparing the specification, and do not have distinct meanings or roles in themselves. Additionally, in describing the embodiments disclosed in this specification, if it is determined that detailed descriptions of related known technologies may obscure the gist of the embodiments disclosed in this specification, the detailed descriptions will be omitted. In addition, the attached drawings are only for easy understanding of the embodiments disclosed in this specification, and the technical idea disclosed in this specification is not limited by the attached drawings, and all changes included in the spirit and technical scope of the present invention are not limited. , should be understood to include equivalents or substitutes.

제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되지는 않는다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms containing ordinal numbers, such as first, second, etc., may be used to describe various components, but the components are not limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is said to be "connected" or "connected" to another component, it is understood that it may be directly connected to or connected to the other component, but that other components may exist in between. It should be. On the other hand, when it is mentioned that a component is “directly connected” or “directly connected” to another component, it should be understood that there are no other components in between.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. Singular expressions include plural expressions unless the context clearly dictates otherwise.

본 출원에서, "포함한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.In this application, terms such as “comprise” or “have” are intended to designate the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, but are not intended to indicate the presence of one or more other features. It should be understood that this does not exclude in advance the possibility of the existence or addition of elements, numbers, steps, operations, components, parts, or combinations thereof.

앞서 살펴본 것과 같이, 인공지능의 발달로 다양한 형태로 사무자동화(office automation)가 이루어지고 있으며, 업무의 효율을 위하여, 종이 문서에 포함된 일정한 형태의 정보를, 종이 문서에 포함된 형식 그대로 디지털화(데이터화) 해야 하는 니즈가 점차적으로 높아지고 있다.As seen above, office automation is being implemented in various forms due to the development of artificial intelligence, and for work efficiency, certain types of information contained in paper documents are digitized in the format contained in the paper documents ( The need for data conversion is gradually increasing.

예를 들어, 도 1에 도시된 영수증(領收證, receipt)과 같은 문서는 매장명, 매장 주소, 주문 상품명, 주문 상품 수량, 주문 금액 등 판매자 및 소비자와 관련된 복수의 범주(Category)를 포함하고 있으며, 데이터의 효율적인 처리를 위해 종이 문서에 포함된 데이터를 동일 범주끼리 연관 지어 전산화할 필요가 있다. For example, a document such as a receipt shown in Figure 1 includes multiple categories related to sellers and consumers, such as store name, store address, ordered product name, ordered product quantity, and order amount. In order to process data efficiently, it is necessary to computerize the data contained in paper documents by linking them to the same categories.

본 명세서에서 “범주”란 정의된 분류 내에서 임의의 수준에 있는 항목을 의미한다. 특정 범주에 속하는 데이터와 다른 범주에 속하는 데이터를 기준은 절대적인 것은 아니며, 범주를 규정하는 임의의 규칙에 따라 달라질 수 있다. 이러한 규칙은 종이 문서와 종이 문서를 디지털화 한 데이터에 다르게 적용될 수 있다.As used herein, “category” means an item at any level within a defined classification. The standards for data belonging to a specific category and data belonging to another category are not absolute and may vary depending on arbitrary rules defining the categories. These rules may apply differently to paper documents and data digitized from paper documents.

예를 들어, 종이 문서로 이루어진 특정 영수증은 “매장명”, “매장 주소”, “주문 상품 이름”, “주문 상품 수량”, “주문 상품 금액”이라는 다섯 개의 범주를 포함할 수 있으나, 상기 종이 문서에 포함된 데이터를 디지털화 할 때, “매장”, “주문 상품” 이라는 두 개의 범주로 축소될 수 있다. For example, a particular receipt consisting of a paper document may include five categories: “Store Name,” “Store Address,” “Order Product Name,” “Order Quantity,” and “Order Product Amount.” When digitizing the data contained in documents, it can be reduced to two categories: “Store” and “Ordered Products.”

한편, 본 명세서에서는 특정 범주의 속성을 나타내는 단어를 제1타입의 제1타입 단어로 분류한다. 예를 들어, 제1타입 단어는 범주에 속한 데이터의 상위 개념을 정의하는 단어(“매장명: “, “수량: “, “매장 주소”) 등을 포함할 수 있다. Meanwhile, in this specification, words representing attributes of a specific category are classified as first type words. For example, type 1 words may include words that define higher-level concepts of data belonging to the category (“store name: “, “quantity: “, “store address”), etc.

한편, 본 명세서에서는 특정 범주의 값을 나타내는 단어를 제2타입의 제2타입 단어로 분류한다. 예를 들어, 제2타입 단어는 범주에 속한 데이터(“Happy store”, “105 h-street”, “Carrot”)일 수 있다. 본 명세서에서는 상기 제1타입으로 분류된 제1타입 단어는 “필드명”, 제2타입으로 분류된 제2타입 단어는 “필드값”으로 지칭될 수 있다. Meanwhile, in this specification, words representing values of a specific category are classified as type 2 words. For example, type 2 words may be categorical data (“Happy store”, “105 h-street”, “Carrot”). In this specification, a first type word classified as the first type may be referred to as a “field name”, and a second type word classified as the second type may be referred to as a “field value.”

한편, 기계에서 처리 가능한 형식의 데이터 관점에서 상기 제1타입 단어는 “속성(key)”으로 지칭될 수 있고, 상기 제2타입 단어는 “값(value)”으로 지칭될 수 있다. Meanwhile, from the perspective of data in a format that can be processed by a machine, the first type word may be referred to as an “attribute (key)” and the second type word may be referred to as a “value.”

상술한 용어 정의에 따르면, 영수증과 같은 종이 문서는 동일 범주에 포함된 “속성-값” 쌍의 데이터를 포함할 수 있다. 다만, 이에 한정되지 않고, 종이 영수증과 같은 종이 문서는 특정 범주에 대하여는 필드명 없이 필드값만 포함할 수 있다. 이 경우, 종이 문서에서 상기 필드명은 생략되었을 뿐, 생략된 필드명에 대응되는 필드값은 필드명과 관련된 의미를 포함하고 있다. According to the above definition of terms, paper documents such as receipts may contain data of “attribute-value” pairs contained in the same category. However, the document is not limited to this, and paper documents such as paper receipts may include only field values without field names for specific categories. In this case, the field name is simply omitted from the paper document, and the field value corresponding to the omitted field name contains the meaning related to the field name.

한편, 종이 문서는 필드값 없이 필드명만 포함할 수 있다. 이 경우, 특정 항목에 할당된 값이 존재하지 않는 것이며, 특정 항목에 할당된 값이 존재하지 않더라도, 종이 문서에 상기 특정 항목이 존재할 수 있다.Meanwhile, paper documents can only contain field names without field values. In this case, the value assigned to the specific item does not exist, and even if the value assigned to the specific item does not exist, the specific item may exist in the paper document.

이하, 상술한 용어 정의를 바탕으로 본 발명에 대하여 구체적으로 설명한다. Hereinafter, the present invention will be described in detail based on the above-mentioned definitions of terms.

상술한 종이 문서는 종의 문서에 포함된 동일 범주의 데이터 간의 연관성을 유지하며, 기계가 이해 가능한 데이터로 변환될 수 있다. The above-described paper document maintains the relationship between data of the same category included in the document and can be converted into machine-understandable data.

일 실시 예에 있어서, 광학식 문자판독장치(Optical Character Reader, OCR)를 이용하여 종이 문서에 포함된 단어를 추출할 수 있다. 영수증과 같이 복수의 범주의 데이터를 포함하는 문서의 경우, 추출된 단어에 대한 파싱(parsing) 과정을 거쳐 무관계 하게 디지털화된 단어를 동일 범주 별로 분류할 수 있다. 이에 따라, 복수의 속성-값 쌍을 포함하는 데이터가 형성될 수 있다.In one embodiment, words included in a paper document can be extracted using an optical character reader (OCR). In the case of documents containing data of multiple categories, such as receipts, unrelated digitized words can be classified into the same category through a parsing process for the extracted words. Accordingly, data including a plurality of attribute-value pairs can be formed.

기계학습을 통해 OCR을 통해 무관계하게 디지털화된 단어들이 소정 데이터 구조를 가지도록 하고자 하는 연구가 계속되고 있다. 도 7을 참조하면, 종래 정보 추출 모델은 대상 문서(10)에 대한 OCR(711)을 통해 대상 문서(10)로부터 복수의 단어들 및 위치 정보를 추출하고, 이에 기반하여 직렬화 모델(Serializer, 712)을 통해, 추출된 단어들의 일부를 직렬화하고, 태깅 모델(Tagging model, 713)을 통해 직렬화된 텍스트의 범주를 분류하고, Tag2parse 모델(714)을 통해 파싱(parsing)을 수행하였다. Research is continuing to use machine learning to ensure that unrelated digitized words have a certain data structure through OCR. Referring to FIG. 7, the conventional information extraction model extracts a plurality of words and location information from the target document 10 through OCR 711 for the target document 10, and based on this, creates a serialization model (Serializer, 712). ), some of the extracted words were serialized, the categories of the serialized text were classified through the tagging model (713), and parsing was performed through the Tag2parse model (714).

이후, 정규화 모델(parse normalizer, 715)를 통해 JSON 형태의 데이터를 생성한다.Afterwards, data in JSON format is generated through a normalization model (parse normalizer, 715).

종래 정보 추출 모델의 훈련은, Tag2parse 모델(714)로부터 출력된 데이터와 원본 데이터 간의 오차를 산출하여, 오차를 최소화하는 방향으로 진행되었다. 이때, 상기 오차 산출을 위해서는 원본 데이터(이하, 학습 데이터)를 생성해야 한다. 원본 데이터는 대상 문서(10)에 포함된 단어들 각각에 대한 주석을 표시(721)하고, 대상 문서(10)에 포함된 텍스트 조각들을 직렬화(722)하고 태깅 모델(723)을 통해 단어들 간의 파싱을 수행함으로써 생성된다. 상술한 과정은 모두 인간의 작업을 통해 진행되므로, 기계 학습을 위한 학습 데이터 생성에는 매우 많은 시간이 소요된다.Training of the conventional information extraction model was conducted in the direction of minimizing the error by calculating the error between the data output from the Tag2parse model 714 and the original data. At this time, in order to calculate the error, original data (hereinafter referred to as learning data) must be generated. The original data displays annotations for each of the words included in the target document 10 (721), serializes the text fragments included in the target document 10 (722), and uses a tagging model (723) to connect the words. Generated by performing parsing. Since the above-described processes are all performed through human work, generating training data for machine learning takes a very long time.

본 발명은 상술한 학습 데이터 생성에 소요되는 시간을 단축시켜, 정보 추출 모델의 기계학습에 소모되는 비용을 최소화할 수 있는 정보 추출 시스템 및 방법을 제공한다.The present invention provides an information extraction system and method that can minimize the cost of machine learning of an information extraction model by shortening the time required to generate the above-described learning data.

본 발명은, 대상 문서에 포함된 복수의 단어 간의 데이터 구조를 반영하여 대상 문서로부터 데이터를 추출하는 시스템을 제공한다. The present invention provides a system for extracting data from a target document by reflecting the data structure between a plurality of words included in the target document.

이하에서는, 대상 문서에서 데이터를 추출하는 시스템에 대하여 첨부된 도면과 함께 보다 구체적으로 살펴본다. Below, we will look at the system for extracting data from the target document in more detail along with the attached drawings.

도 1은 본 발명에 따른 정보 추출 시스템을 설명하기 위한 개념도이다.1 is a conceptual diagram illustrating an information extraction system according to the present invention.

본 발명에 따른 정보 추출 시스템(100)은 어플리케이션 또는 소프트웨어의 형태로 구현될 수 있다. 본 발명에 정보 추출 시스템(100)의 소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능과 같은 실시 예들은 별도의 소프트웨어 모듈들로 구현될 수 있다. 소프트웨어 모듈들 각각은 본 명세서에서 설명되는 하나 이상의 기능 및 작동을 수행할 수 있다. The information extraction system 100 according to the present invention may be implemented in the form of an application or software. According to the software implementation of the information extraction system 100 of the present invention, embodiments such as procedures and functions described in this specification may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein.

본 발명에 따른 소프트웨어적인 구현은 도 1에 도시된 정보 추출 시스템(100)에 의하여 구현되며, 이하에서는 정보 추출 시스템(100)의 구성에 대하여 보다 구체적으로 살펴본다.The software implementation according to the present invention is implemented by the information extraction system 100 shown in FIG. 1, and the configuration of the information extraction system 100 will be looked at in more detail below.

본 발명에 따른 정보 추출 시스템(100)은 이미지에 대한 OCR을 통해 OCR 데이터를 생성할 수 있다. 본 명세서에서 OCR 데이터는 이미지로부터 추출된 텍스트 및 추출된 텍스트에 대응되는 위치 정보를 포함할 수 있다. 여기서, 상기 위치 정보는 추출된 텍스트의 이미지(또는 종이 문서) 내 위치를 정의한다.The information extraction system 100 according to the present invention can generate OCR data through OCR on images. In this specification, OCR data may include text extracted from an image and location information corresponding to the extracted text. Here, the location information defines the location of the extracted text within the image (or paper document).

여기에서, 이미지는 종이 문서를 스캔한 것에 의하여 획득되는 이미지이거나, 기타 다른 다양한 방법으로 획득된 이미지일 수 있다.Here, the image may be an image obtained by scanning a paper document, or may be an image obtained through various other methods.

한편, 도 1에 도시된 것과 같이, 본 발명에 따른 정보 추출 시스템(100)은 통신부(110), 저장부(120), OCR부(130) 및 제어부(140) 중 적어도 하나를 포함할 수 있다.Meanwhile, as shown in FIG. 1, the information extraction system 100 according to the present invention may include at least one of a communication unit 110, a storage unit 120, an OCR unit 130, and a control unit 140. .

통신부(110)는 종이 문서를 스캔한 이미지(10)를 수신하는 수단으로서, 통신부, 스캔부 및 입력부 중 적어도 하나를 포함하여 구성되거나, 기타 이미지(10)를 수신할 수 있는 수단으로 이루어질 수 있다. The communication unit 110 is a means for receiving an image 10 obtained by scanning a paper document, and may include at least one of a communication unit, a scanning unit, and an input unit, or may be comprised of other means capable of receiving the image 10. .

정보 추출 시스템(100)은 통신부(110)를 통해 수신한 이미지(10)를 이용하여 데이터를 추출할 수 있다. The information extraction system 100 may extract data using the image 10 received through the communication unit 110.

다음으로 저장부(120)는, 본 발명에 따른 다양한 정보를 저장하도록 이루어질 수 있다. 저장부(120)의 종류는 매우 다양할 수 있으며, 적어도 일부는, 외부 서버(150, 클라우드 서버 및 데이터베이스(database: DB) 중 적어도 하나)를 의미할 수 있다. 즉, 저장부(120)는 본 발명과 관련된 정보가 저장되는 공간이면 충분하며, 물리적인 공간에 대한 제약은 없는 것으로 이해될 수 있다. Next, the storage unit 120 can be configured to store various information according to the present invention. The types of storage unit 120 may be very diverse, and at least some of them may refer to an external server 150, at least one of a cloud server and a database (DB). In other words, the storage unit 120 is sufficient as a space where information related to the present invention is stored, and it can be understood that there are no restrictions on physical space.

저장부(120)에는 i) 종이 문서를 스캔한 이미지(10) 및 이와 관련된 데이터, ii) 정보 추출 모델의 기계학습에 활용되는 학습 데이터, iii) 추출된 데이터 중 적어도 하나가 저장될 수 있다. The storage unit 120 may store at least one of i) a scanned paper document image 10 and data related thereto, ii) learning data used for machine learning of an information extraction model, and iii) extracted data.

저장부(120)에는 상술한 범주와 관련된 정보가 저장되어 있을 수 있다. 구체적으로, 범주와 관련된 정보는 범주에 대한 개념적인 정보, 범주에 대응되는 범주명을 나타내는 텍스트 및 범주에 대응되는 값을 정의하는 정보가 저장될 수 있다. The storage unit 120 may store information related to the above-mentioned categories. Specifically, the information related to the category may store conceptual information about the category, text indicating the category name corresponding to the category, and information defining the value corresponding to the category.

여기서, 범주명은 필드명, 범주에 대응되는 속성으로도 지칭될 수 있다.Here, the category name may also be referred to as a field name or an attribute corresponding to the category.

한편, 범주에 대응되는 값은 범주에 속하는 적어도 하나의 텍스트를 포함할 수 있다. Meanwhile, a value corresponding to a category may include at least one text belonging to the category.

한편, 상기 범주와 관련된 정보는 본 발명에 따른 정보 추출 모델에 대한 훈련이 이루어짐에 따라 업데이트 될 수 있다. 구체적으로, 정보 추출 모델에 대한 훈련이 진행됨에 따라, 저장부(120)에 정의된 범주의 개수가 증가될 수 있으며, 범주와 관련된 정보는 범주에 대한 개념적인 정보, 범주에 대응되는 범주명을 나타내는 텍스트 및 범주에 대응되는 값을 정의하는 정보 중 적어도 하나가 업데이트 될 수 있다.Meanwhile, the information related to the category can be updated as the information extraction model according to the present invention is trained. Specifically, as training for the information extraction model progresses, the number of categories defined in the storage unit 120 may increase, and information related to the category includes conceptual information about the category and the category name corresponding to the category. At least one of the information defining the value corresponding to the representing text and category may be updated.

다음으로, OCR(Optical Character Reader, 130)부는 이미지(10)에 포함된 콘텐츠를 인식하는 수단으로서, 다양한 콘텐츠 인식 알고리즘 중 적어도 하나를 통하여 이미지(10)에 포함된 콘텐츠를 인식할 수 있다. OCR부(130)는 인공지능에 기반한 알고리즘을 이용하여, 콘텐츠를 인식할 수 있다. 여기에서 콘텐츠는 텍스트(문자)를 포함할 수 있다.Next, the OCR (Optical Character Reader, 130) unit is a means for recognizing content included in the image 10, and can recognize content included in the image 10 through at least one of various content recognition algorithms. The OCR unit 130 can recognize content using an algorithm based on artificial intelligence. Here, the content may include text (characters).

OCR부는, 이미지에 포함된 텍스트 및 텍스트의 위치 정보를 추출할 수 있다. 여기에서, 텍스트의 위치 정보는 이미지(10) 내에서 텍스트가 어디에 위치하는지에 대한 정보를 포함할 수 있다.The OCR unit can extract text included in the image and location information of the text. Here, the location information of the text may include information about where the text is located within the image 10.

다음으로 제어부(140)는 본 발명과 관련된 정보 추출 시스템(100)의 전반적인 동작을 제어하도록 이루어질 수 있다. 제어부(140)는 인공지능 알고리즘을 처리 가능한 프로세서(processor, 또는 인공지능 프로세서)를 포함할 수 있다. 제어부(140)는 딥러닝 알고리즘에 기반하여, 이미지(10)로부터 텍스트를 인식하고, 인식된 텍스트에 대한 정보 추출을 수행할 수 있다. Next, the control unit 140 may control the overall operation of the information extraction system 100 related to the present invention. The control unit 140 may include a processor (or artificial intelligence processor) capable of processing artificial intelligence algorithms. The control unit 140 may recognize text from the image 10 and extract information about the recognized text based on a deep learning algorithm.

나아가, 제어부(140)는 정보 추출을 하기 위한 작업 영역을 제공하며, 이러한 작업 영역은 정보 추출을 수행하거나, 정보 추출을 위한 기계 학습을 수행하기 위한 “사용자 환경” 또는 “사용자 인터페이스”라고도 명명될 수 있다.Furthermore, the control unit 140 provides a work area for information extraction, and this work area may also be called a “user environment” or “user interface” for performing information extraction or machine learning for information extraction. You can.

이러한 작업 영역은 전자기기의 디스플레이부 상에 출력(또는 제공)될 수 있다. 나아가, 제어부(140)는 전자기기에 구비된 또는 전자기기와 연동하는 사용자 입력부(예를 들어, 터치 스크린, 마우스 등)를 통해 수신되는 사용자 입력에 근거하여, 정보 추출을 수행하거나, 정보 추출을 위한 기계 학습을 수행을 수행할 수 있다.This work area can be output (or provided) on the display unit of the electronic device. Furthermore, the control unit 140 performs information extraction or extracts information based on user input received through a user input unit (e.g., touch screen, mouse, etc.) provided in or linked to the electronic device. Machine learning can be performed for this purpose.

한편, 본 발명에서 작업 영역이 출력되는 전자기기의 종류에는 특별한 제한이 없으며, 본 발명에 따른 어플리케이션이 구동이 가능하기만 하면 된다. 예를 들어, 전자기기는, 스마트폰(smart phone), 휴대폰, 태블릿 PC, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 스마트 미러(smart mirror) 및 스마트 TV(smart TV) 중 적어도 하나가 될 수 있다.Meanwhile, in the present invention, there is no particular limitation on the type of electronic device on which the work area is output, as long as the application according to the present invention can be driven. For example, electronic devices include smart phones, mobile phones, tablet PCs, computers, laptops, digital broadcasting terminals, PDAs (Personal Digital Assistants), PMPs (Portable Multimedia Players), smart mirrors, and smart devices. It can be at least one TV (smart TV).

본 발명에서는, 전자기기 또는 전자기기에 구비되는 디스플레이부, 사용자 입력부에 대하여 별도의 도면 부호를 부여하지 않는다. 그러나, 본 발명에서 설명되는 작업 영역은 전자기기의 디스플레이부에 출력되며, 사용자 입력은 전자기기에 구비되거나, 전자기기와 연동하는 사용자 입력부를 통하여 수신됨은 당업자에게 자명할 것이다.In the present invention, separate reference numerals are not assigned to electronic devices or display units and user input units provided in electronic devices. However, it will be apparent to those skilled in the art that the work area described in the present invention is output on the display unit of the electronic device, and user input is received through a user input unit provided in the electronic device or linked to the electronic device.

이하에서는, 상술한 정보 추출 시스템을 이용하여 정보 추출을 수행하는 방법에 대하여 보다 구체적으로 살펴본다. 특히, 이하에서는, 순서도와 함께, 정보 추출 방법에 대하여 먼저 살펴보도록 한다.Below, we will look in more detail at how to perform information extraction using the above-described information extraction system. In particular, below, we will first look at the information extraction method along with the flow chart.

도 2는 본 발명에 따른 정보 추출 방법을 설명하기 위한 순서도이고, 도 3은 본 발명에 정보 추출 모델을 설명하기 위한 개념도이고, 도 4는 본 발명에 따른 정보 추출 모델로부터 출력된 데이터를 트리(tree)화 한 모습을 나타내는 개념도이다. Figure 2 is a flowchart for explaining the information extraction method according to the present invention, Figure 3 is a conceptual diagram for explaining the information extraction model according to the present invention, and Figure 4 is a tree (tree) of data output from the information extraction model according to the present invention. This is a conceptual diagram showing a tree-like appearance.

본 발명에 따른 정보 추출 방법에서는, 대상 문서에 대한 OCR(Optical Character Recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 단계가 진행된다(S110). In the information extraction method according to the present invention, a step is performed to extract a plurality of words and location information for each of the plurality of words by performing OCR (Optical Character Recognition) on the target document (S110).

여기서, 대상 문서란 정보 추출 대상이 되는 종이 문서 또는 종이 문서에 대한 이미지일 수 있다. 앞서, 살펴본 것과 같이, 종이 문서에 대한 이미지(10)는 다양한 루트를 통하여 수신될 수 있다.Here, the target document may be a paper document or an image of the paper document that is the target of information extraction. As previously discussed, the image 10 for a paper document may be received through various routes.

OCR 데이터는 이미지에 포함된 텍스트 및 텍스트의 위치 정보를 포함할 수 있다. OCR data may include text included in the image and location information of the text.

OCR 데이터에 포함된 기 설정된 기준에 따라 상기 OCR 데이터에 포함된 텍스트가 복수의 텍스트 조각(text segment)으로 구분될 수 있다.The text included in the OCR data may be divided into a plurality of text segments according to preset standards included in the OCR data.

일 실시 예에 있어서, 텍스트 조각은 어절 단위로 구분되거나, 텍스트의 위치 정보에 기반하여 인접한 복수의 텍스트들이 하나의 텍스트 조각으로 구분될 수 있다. In one embodiment, a text fragment may be divided into word units, or a plurality of adjacent texts may be divided into one text fragment based on location information of the text.

텍스트 조각을 구분하는 과정에서 복수의 텍스트 조각이 하나로 통합되거나, 하나의 텍스트 조각이 복수개의 텍스트 조각으로 분리될 수 있다. 예를 들어, 도 1의 이미지(10)로부터 추출된 텍스트 “105 h-street”는 두 개의 텍스트 조각(“105” 및 “h-street”)으로 구분된 후, 하나의 텍스트 조각(“105 h-street”)으로 합쳐질 수 있다. 다른 예를 들어, 도 1의 이미지(10)로부터 추출된 “Happy store”는 하나의 텍스트 조각 “Happy store”로 구분된 후, 복수의 텍스트 조각(“Happy” 및 “store”)으로 분리될 수 있다.In the process of classifying text fragments, multiple text fragments may be integrated into one, or one text fragment may be separated into multiple text fragments. For example, the text “105 h-street” extracted from image 10 in Figure 1 is divided into two text fragments (“105” and “h-street”) and then divided into one text fragment (“105 h -street”). For another example, “Happy store” extracted from image 10 in FIG. 1 can be divided into one text piece “Happy store” and then separated into multiple text pieces (“Happy” and “store”). there is.

제어부(140)는 텍스트의 위치 정보에 기반하여 텍스트 조각을 통합하거나, 분리할 수 있다. 제어부(140)가 텍스트 조각을 통합하거나, 분리하는 모델은 기계학습을 통해 생성될 수 있으나, 이에 한정되는 것은 아니다.The control unit 140 may integrate or separate text pieces based on the location information of the text. The model by which the control unit 140 integrates or separates text pieces may be created through machine learning, but is not limited to this.

상술한 과정을 통해, 복수의 단어가 추출될 수 있다. Through the above-described process, multiple words can be extracted.

한편, 추출된 복수의 단어별로 위치 정보가 매칭될 수 있다. 여기서, 추출된 단어에 대응되는 위치 정보는 대상 문서 상의 위치 정보일 수 있다. 구체적으로, 상기 위치 정보는 상기 대상 문서의 이미지 상의 일 지점을 기준점으로 하고, 상기 기준점에 대한 2차원 좌표 정보를 포함할 수 있다. Meanwhile, location information may be matched for each of the plurality of extracted words. Here, location information corresponding to the extracted word may be location information on the target document. Specifically, the location information may use a point on the image of the target document as a reference point and include two-dimensional coordinate information about the reference point.

상술한 바와 같이, 상기 위치 정보는 상대 좌표일 수 있으며, 상기 위치 정보를 이용하여 추출된 복수의 단어간 거리가 산출될 수 있다.As described above, the location information may be relative coordinates, and the distance between a plurality of extracted words may be calculated using the location information.

복수의 단어들 각각에 대한 위치 정보는 복수의 단어들 간의 관련성을 판단하는데 활용될 수 있다. 이에 대하여는 후술한다. Location information for each of a plurality of words can be used to determine the relationship between the plurality of words. This will be described later.

다음으로, 상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계가 수행된다(S120).Next, a step of generating a plurality of tokens corresponding to each of the plurality of words is performed (S120).

상기 복수의 토큰은 세 가지 타입 중 어느 하나로 생성될 수 있다. 먼저, 복수의 토큰 타입 중 제1 및 제2타입에 대하여 설명한다.The plurality of tokens may be generated as one of three types. First, the first and second types among the plurality of token types will be described.

복수의 토큰은 범주의 속성을 갖는 제1 타입의 제1 타입 토큰 및 상기 범주의 값에 해당하는 데이터 속성을 갖는 제2 타입의 제2 타입 토큰 중 어느 하나의 타입을 가질 수 있다. The plurality of tokens may have either a first type token having a category attribute and a second type token having a data attribute corresponding to a value of the category.

상기 제1 및 제2타입에 대응되는 토큰은 대상 문서로부터 추출된 복수의 단어 각각의 의미에 기반하여 생성될 수 있다. Tokens corresponding to the first and second types may be generated based on the meaning of each of a plurality of words extracted from the target document.

일 실시 예에 있어서, 상기 복수의 단어들은, 상기 복수의 단어 각각의 의미 및 상기 대상 문서 상에서의 복수의 단어 각각에 대한 위치 정보에 근거하여, 상기 복수의 단어들을 상기 범주의 속성을 갖는 제1타입에 대응되는 제1 타입 단어 및 상기 데이터의 속성을 갖는 제2타입 단어 중 적어도 하나로 분류된다. In one embodiment, the plurality of words are, based on the meaning of each of the plurality of words and positional information for each of the plurality of words in the target document, the plurality of words having the attribute of the category. It is classified into at least one of a first type word corresponding to the type and a second type word having the properties of the data.

상기 분류 과정은 인공지능 모델을 통해 수행될 수 있다. 인공지능 모델은 상기 기 정의된 복수의 범주를 기준으로 상기 복수의 단어들 각각이 어느 범주에 속하는 단어인지 판단하고, 상기 복수의 단어들 각각 “속성”(제1타입)인지 “값”(제2타입)인지 판단한다. The classification process can be performed through an artificial intelligence model. The artificial intelligence model determines which category each of the plurality of words belongs to based on the plurality of predefined categories, and determines whether each of the plurality of words is an “attribute” (type 1) or a “value” (type 1). Type 2).

복수의 단어들 중 제1타입으로 분류된 제1타입 단어들 각각에 대응되는 제1타입 토큰이 생성되며, 복수의 단어들 중 제2타입으로 분류된 제2타입 단어들 각각에 대응되는 제2타입 토큰이 생성된다. A first type token is generated corresponding to each of the first type words classified as the first type among the plurality of words, and a second type token corresponding to each of the second type words classified as the second type among the plurality of words is generated. A type token is created.

상기 제1타입의 제1타입 토큰은 범주의 속성을 정의하는 토큰으로, 범주명(필드명, 범주의 속성)을 나타내는 텍스트를 포함할 수 있다. 제1타입의 제1타입 토큰에 포함된 텍스트는 기 저장된 범주와 관련된 정보에 포함된 범주명일 수 있다. 여기서, 특정 제1타입 토큰에 포함된 텍스트는 상기 특정 제1타입 토큰 생성에 기반이 된 제1타입 단어와 동일하지 않을 수 있다. The first type token of the first type is a token that defines the attributes of a category and may include text indicating the category name (field name, category attribute). The text included in the first type token may be a category name included in information related to a previously stored category. Here, the text included in a specific first type token may not be the same as the first type word on which the specific first type token was created.

예를 들어, 도 3을 참조하면, 제1타입으로 분류된 단어 “품명”에 기반하여 생성되는 제1타입 토큰은 “품명”을 포함하지 않고, 텍스트 “name”을 포함한다. For example, referring to FIG. 3, the first type token generated based on the word “product name” classified as the first type does not include “product name” but includes the text “name”.

상기 제2타입의 제2타입 토큰은 대상 문서로부터 추출된 단어 자체일 수 있다.The second type of second type token may be the word itself extracted from the target document.

예를 들어, 도 3을 참조하면, 제2타입으로 분류된 단어 “Happy”에 대응되는 제2타입 토큰은 텍스트 “Happy” 자체일 수 있다.For example, referring to FIG. 3, the second type token corresponding to the word “Happy” classified as type 2 may be the text “Happy” itself.

한편, 특정 제1타입 토큰은 제2타입 단어의 의미에 기반하여 생성될 수 있다. 구체적으로, 복수의 단어 중 제2 타입으로 분류된 제2 타입 단어가 속하는 범주 각각에 대한 제1 타입 토큰을 생성이 생성될 수 있다. Meanwhile, a specific first type token may be generated based on the meaning of a second type word. Specifically, a first type token may be generated for each category to which the second type word classified as the second type among the plurality of words belongs.

일 실시 예에 있어서, 상기 복수의 단어 중 특정 범주의 범주 값 해당하는 특정 제2타입 단어가 존재하고, 상기 특정 범주에 해당하는 단어가 존재하지 않는 경우, 상기 특정 범주의 범주 값에 해당하는 상기 특정 제2타입 단어에 근거하여, 상기 특정 범주에 대응되는 특정 제1타입 토큰이 생성될 수 있다. In one embodiment, if a specific second type word corresponding to a category value of a specific category exists among the plurality of words, and a word corresponding to the specific category does not exist, the word corresponding to the category value of the specific category exists. Based on a specific second type word, a specific first type token corresponding to the specific category may be generated.

예를 들어, 도 3을 참조하면, 대상 문서(10)에는 “매장명” 범주의 속성에 대응되는 단어가 존재하지 않는다. 본 발명은 대상 문서(10)에서 추출된 제2타입의 단어 “Happy”, “Store”(11)의 의미에 기반하여 기 정의된 복수의 범주 중 “매장명” 범주를 특정하고, “매장명” 범주에 대응되는 제1타입 토큰을 생성할 수 있다.For example, referring to FIG. 3, there is no word corresponding to the attribute of the “store name” category in the target document 10. The present invention specifies the “store name” category among a plurality of predefined categories based on the meaning of the second type words “Happy” and “Store” (11) extracted from the target document (10), and “store name” ” You can create a type 1 token corresponding to the category.

상술한 바와 같이, 본 발명은 대상 문서에 범주의 속성을 지칭하는 단어가 존재하지 않더라도, 제2타입 단어의 실질적인 의미에 기반하여, 대상 문서에 포함된 범주를 특정한다. As described above, the present invention specifies the category included in the target document based on the actual meaning of the second type word even if there is no word indicating the attribute of the category in the target document.

일 실시 예에 있어서, 도 3을 참조하면, 대상 문서(10)에서 복수의 단어들(“Happy”, “store”, “105 h-street”, “주문번호:”, “20210520011”, “품명”, “수량”, “금액”, “Carrot”, “3”, “2997”, “tomato”, “2”, “1000”)이 추출된다. In one embodiment, referring to Figure 3, in the target document 10, a plurality of words (“Happy”, “store”, “105 h-street”, “Order number:”, “20210520011”, “Product name ”, “Quantity”, “Amount”, “Carrot”, “3”, “2997”, “tomato”, “2”, “1000”) are extracted.

한편, 추출된 단어 중 일부(“품명”, “수량”, “금액”, “주문번호:”)는 제1타입의 단어로 분류되며, 나머지 일부(“Happy”, “store”, “105 h-street”, “20210520011”, “Carrot”, “3”, “2997”, “tomato”, “2”, “1000”, “20210520011”)은 제2타입의 단어로 분류될 수 있다.Meanwhile, some of the extracted words (“Product Name”, “Quantity”, “Amount”, “Order Number:”) are classified as Type 1 words, and some of the remaining words (“Happy”, “store”, “105 h -street”, “20210520011”, “Carrot”, “3”, “2997”, “tomato”, “2”, “1000”, “20210520011”) can be classified as type 2 words.

이후, 추출된 단어들 각각의 의미에 기반하여, 기 정의된 복수의 범주 중 복수의 단어들 각각에 대응되는 일부 범주가 특정된다. 구체적으로, 추출된 단어들의 의미에 기반하여 “store”, “name”(“store” 범주의 하위 범주), “address”, “item”, “list”, “menu”, “name”(“menu” 범주의 하위 범주), “count”, “price” 범주가 특정될 수 있다.Afterwards, based on the meaning of each of the extracted words, some categories corresponding to each of the plurality of words among the plurality of predefined categories are specified. Specifically, based on the meaning of the extracted words, “store”, “name” (a subcategory of the “store” category), “address”, “item”, “list”, “menu”, “name” (“menu” ” category’s subcategories), “count”, and “price” categories can be specified.

이후, “address”, “item”, “list”, “menu”, “name”(“menu” 범주의 하위 범주), “count”, “price” 범주 각각에 대응되는 제1타입의 토큰이 생성되고, 제2타입의 단어로 분류된 단어들에 대응되는 제2타입의 토큰이 생성된다.Afterwards, the first type of token corresponding to each of the “address”, “item”, “list”, “menu”, “name” (subcategories of the “menu” category), “count”, and “price” categories is generated. And, second-type tokens corresponding to words classified as second-type words are generated.

한편, 대상 문서에서 추출하고자 하는 데이터 중 사용자에게 불필요한 범주의 데이터는 데이터 추출 시 삭제하도록 설정될 수 있다. 사용자는 사용자에게 불필요한 데이터의 범주를 사전에 설정하고, 해당 범주의 데이터에 대한 토큰이 생성되지 않도록 설정할 수 있다. 기 설정된 범주에 속하는 단어(“주문번호:”, “20210520011”)는 삭제될 수 있다.Meanwhile, among the data to be extracted from the target document, data in categories that are unnecessary to the user can be set to be deleted when data is extracted. Users can set categories of data that are unnecessary to the user in advance and set tokens not to be created for data in those categories. Words that fall into pre-set categories (“Order number:”, “20210520011”) may be deleted.

일 실시 예에 있어서, 도 3에 도시된 표를 참조하면, 제1 및 제2타입의 단어로 분류된 복수의 단어들에 기반하여, 복수의 토큰(Output token, 320)이 생성될 수 있다. 복수의 토큰은 시간 흐름(t, 310)에 따라 순차적으로 생성될 수 있다.In one embodiment, referring to the table shown in FIG. 3, a plurality of tokens (Output tokens, 320) may be generated based on a plurality of words classified as first and second type words. A plurality of tokens may be generated sequentially according to the flow of time (t, 310).

상기 복수의 토큰은 제3타입의 제3타입 토큰을 포함할 수 있다. 제3타입의 토큰에 대하여는 후술한다. The plurality of tokens may include a third type of third type token. The third type of token will be described later.

다음으로, 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 단계가 진행된다(S130).Next, a step of arranging the plurality of tokens is performed so that the data structure between the plurality of words included in the target document is reflected (S130).

대상 문서에 포함된 복수의 단어들은 소정 데이터 구조를 가질 수 있다. 데이터 구조란 복수의 단어들의 특성 및 단어들 간의 관계를 논리적 관점에서 나타낸 구조로, 데이터 구조의 종류는 리스트, 배열, 트리, 그래프, 큐 및 스택 중 적어도 하나를 포함할 수 있으나 이에 한정되지 않는다. A plurality of words included in the target document may have a certain data structure. A data structure is a structure that represents the characteristics of a plurality of words and the relationships between words from a logical perspective. Types of data structures may include, but are not limited to, at least one of a list, array, tree, graph, queue, and stack.

예를 들어, 도 1에서 설명한 대상 문서(10)는 “매장명” 범주, “매장주소” 범주, “주문상품명” 범주, “주문 수량” 범주 및 “주문 금액” 범주를 포함하는 데이터 구조를 가진다. 다만, 대상 문서(10)에 대응되는 데이터 구조는 절대적인 것은 아니며, 대상 문서(10)에 대한 데이터 구조는 데이터 구조를 정의하는 방식에 따라 달라질 수 있다.For example, the target document 10 described in Figure 1 has a data structure that includes the “Store Name” category, “Store Address” category, “Order Product Name” category, “Order Quantity” category, and “Order Amount” category. . However, the data structure corresponding to the target document 10 is not absolute, and the data structure for the target document 10 may vary depending on the method of defining the data structure.

본 명세서에서 복수의 토큰을 배열하는 단계는 대상 문서에 포함된 복수의 단어 간의 데이터 구조와 동일한 구조의 데이터를 생성하도록 구현되거나, 대상 문서에 포함된 복수의 단어 간의 데이터 구조가 기 설정된 방식에 따라 변형된 구조의 데이터를 생성하도록 구현될 수 있다. In this specification, the step of arranging a plurality of tokens is implemented to generate data with the same structure as the data structure between the plurality of words included in the target document, or the data structure between the plurality of words included in the target document is implemented according to a preset method. It can be implemented to generate data with a modified structure.

예를 들어, 도 1에서 설명한 대상 문서(10)는 “매장명” 범주, “매장주소” 범주, “주문상품명” 범주, “주문 수량” 범주 및 “주문 금액” 범주를 포함하는 데이터 구조를 가지며, 본 발명에 따른 토큰 배열 단계는 “매장명” 범주 및 “매장주소” 범주의 상위 범주인 “매장” 범주, “매장” 범주의 하위 개념인 “매장명” 범주 및 “매장주소” 범주, 서로 연관된 “주문상품명” 범주, “주문 수량” 범주 및 “주문 금액” 범주를 포함하는 데이터 구조를 가지는 데이터가 구현되도록 수행될 수 있다. For example, the target document 10 described in Figure 1 has a data structure that includes the “Store Name” category, “Store Address” category, “Order Product Name” category, “Order Quantity” category, and “Order Amount” category. , The token arrangement step according to the present invention is the “Store” category, which is the upper category of the “Store Name” category and the “Store Address” category, and the “Store Name” category and “Store Address” category, which are lower concepts of the “Store” category. Data may be implemented to have a data structure including the associated “Order Product Name” category, “Order Quantity” category, and “Order Amount” category.

상술한 바와 같이, 본 발명은 대상 문서(10)에 포함된 범주의 상위 개념의 범주를 새롭게 정의하거나, 서로 다른 범주의 데이터가 서로 연관되도록 할 수 있다. As described above, the present invention can newly define the category of a higher-level concept of the category included in the target document 10, or allow data of different categories to be related to each other.

복수의 토큰을 배열하는 단계에서는 상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 상기 복수의 토큰이 순차적으로 배열된다. In the step of arranging a plurality of tokens, the plurality of tokens are sequentially arranged using the meaning of the plurality of words and location information for each of the plurality of words.

상기 복수의 토큰을 배열하는 단계는 반드시 복수의 토큰이 모두 생성된 후 진행될 필요는 없다. 본 발명은 상기 복수의 토큰 중 일부가 생성된 상태에서, 생성된 토큰을 배열한 후, 추가적으로 토큰을 생성하는 방식으로도 수행될 수 있다. The step of arranging the plurality of tokens does not necessarily need to be performed after all the plurality of tokens are generated. The present invention can also be performed by arranging the generated tokens while some of the plurality of tokens are generated, and then generating additional tokens.

일 실시 예에 있어서, 본 발명은 하나의 토큰이 생성될 때마다, 생성된 토큰을 배열하는 방식으로 수행될 수 있다.In one embodiment, the present invention can be performed by arranging the generated tokens each time one token is generated.

이하, 복수의 토큰을 배열하는 방법에 대하여 구체적으로 설명한다.Hereinafter, a method of arranging a plurality of tokens will be described in detail.

제2 타입으로 분류된 특정 제2 타입 단어가 속하는 제1범주에 대응되는 제1타입 토큰과 상기 특정 제2타입 단어에 대응되는 제2타입 토큰은 순차적으로 배열될 수 있다. The first type token corresponding to the first category to which the specific second type word classified as the second type belongs and the second type token corresponding to the specific second type word may be arranged sequentially.

일 실시 예에 있어서, 동일한 범주인 제1범주에 대응되는 제1타입 토큰과 제2타입 토큰은 순차적으로 배열될 수 있다. 본 명세서에서는 설명의 편의를 위하여, 제1타입 토큰이 제2타입 토큰보다 선행하여 배열되는 실시 예를 설명하지만, 이에 한정되지 않고, 제2타입 토큰이 제1타입 토큰 보다 선행하여 배열될 수 있다. In one embodiment, first type tokens and second type tokens corresponding to the first category, which is the same category, may be arranged sequentially. In this specification, for convenience of explanation, an embodiment in which the first type token is arranged before the second type token is described, but the present invention is not limited to this, and the second type token may be arranged before the first type token. .

다른 일 실시 예에 있어서, 하나의 토큰이 생성될 때마다, 생성된 토큰을 배열하는 방식으로 토큰 배열이 진행되는 경우, 먼저 배열되는 토큰이 나중에 배열되는 토큰보다 먼저 생성될 수 있다.In another embodiment, when token arrangement is performed by arranging the generated tokens every time one token is generated, tokens arranged first may be generated before tokens arranged later.

한편, 상기 제1범주에 속하는 특정 제2타입 단어는 복수 개일 수 있다. 이 경우, 복수개의 상기 특정 제2 타입 단어 각각에 대응되는 복수개의 제2 타입 토큰이 순차적으로 배열된다. Meanwhile, there may be a plurality of specific second type words belonging to the first category. In this case, a plurality of second type tokens corresponding to each of the plurality of specific second type words are sequentially arranged.

이때, 순차적으로 배열된 상기 복수개의 제2 타입 토큰의 배열 순서는, 복수개의 상기 특정 제2 타입 단어 각각의 의미 및 상기 대상 문서 상의 위치 정보에 근거하여, 결정될 수 있다.At this time, the arrangement order of the plurality of sequentially arranged second type tokens may be determined based on the meaning of each of the plurality of specific second type words and location information on the target document.

예를 들어, 도 3을 참조하면, 생성된 토큰들(320) 중 제2타입의 토큰인 “Happy” 토큰과 “store” 토큰은 “[name]” 토큰에 이어 순차적으로 배열되며, 상기 두 개의 제2타입의 토큰 각각의 단어에 기반하여 “Happy” 토큰이 선행하여 배열되며, “store” 토큰이 “Happy” 토큰 다음에 배열된다.For example, referring to Figure 3, among the generated tokens 320, the second type tokens, “Happy” token and “store” token, are arranged sequentially following the “[name]” token, and the two Based on each word of the second type of token, the “Happy” token is arranged first, and the “store” token is arranged after the “Happy” token.

상술한 바와 같이, 본 발명은 대상 문서로부터 추출된 단어의 크기를 최소화함으로써, 대상 문서의 형태가 변형되거나 일부분이 소실됨에 따라 텍스트 간의 상대적 위치가 불규칙하게 되는 경우에도, 단어들의 의미에 기반하여 높은 정확도로 정보를 추출할 수 있도록 한다.As described above, the present invention minimizes the size of words extracted from the target document, so that even when the relative position between texts becomes irregular as the shape of the target document is transformed or part of it is lost, a high Enables information to be extracted with accuracy.

한편, 서로 다른 범주에 속하는 제1타입의 토큰은 순차적으로 배열된다. 구체적으로, 상기 제1범주에 대응되는 제1타입 토큰과, 상기 제1 범주와 다른 제2 범주에 대응되는 제1 타입 토큰이 순차적으로 배열된다. Meanwhile, tokens of the first type belonging to different categories are arranged sequentially. Specifically, a first type token corresponding to the first category and a first type token corresponding to a second category different from the first category are sequentially arranged.

이때, 상기 제1범주에 대응되는 제1타입 토큰과 상기 제2 범주에 대응되는 제2 타입 토큰 사이에는 상기 제1 범주 및 상기 제2 범주 각각에 대응되는 토큰들을 구분하기 위한 제3 타입의 제3 타입 토큰이 배열될 수 있다. At this time, between the first type token corresponding to the first category and the second type token corresponding to the second category, there is a third type of token to distinguish the tokens corresponding to each of the first category and the second category. 3 type tokens can be arranged.

일 실시 예에 있어서, 제1 범주에 속하는 토큰이 제1타입 토큰만 존재(대상 문서에로부터 속성에 대응되는 단어만 추출되고, 값에 대응되는 단어는 추출되지 않은 경우)하는 경우, 제3타입 토큰은 제1타입 토큰에 연속하여 배열된다.In one embodiment, when only type 1 tokens exist (when only words corresponding to attributes are extracted from the target document and words corresponding to values are not extracted), tokens belonging to the first category are type 3. The tokens are arranged consecutively to the first type token.

다른 일 실시 예에 있어서, 제1범주에 속하는 토큰이 제1타입 토큰과 하나의 제2타입 토큰인 경우, 제1 범주에 대응되는 제1 타입 토큰이 가장 첫 번째로 배열되고, 제1타입 토큰에 연속하여 제2타입 토큰이 배열될 수 있다. 제3타입 토큰은 제2타입 토큰에 연속하여 배열된다. In another embodiment, when the tokens belonging to the first category are a first type token and one second type token, the first type token corresponding to the first category is arranged first, and the first type token The second type token may be arranged in succession. The third type tokens are arranged consecutively to the second type tokens.

다른 일 실시 예에 있어서, 제1범주에 속하는 토큰이 제1타입 토큰과 복수의 제2타입 토큰인 경우, 상기 제1 범주에 대응되는 제1 타입 토큰이 가장 첫번째로 배열되고, 상기 제1 범주에 대응되는 제1 타입 토큰과 연속하여 상기 특정 제2 타입 단어에 대응되는 복수의 제2 타입 토큰을 순차적으로 배열되며, 상기 특정 제2 타입 단어에 대응되는 제2 타입 토큰 중 마지막으로 배열된 특정 제2 타입 토큰에 연속하여 상기 제3 타입 토큰 배열될 수 있다.In another embodiment, when the token belonging to the first category is a first type token and a plurality of second type tokens, the first type token corresponding to the first category is arranged first, and the first type token is arranged first, and the first type token corresponding to the first category is arranged first. A plurality of second type tokens corresponding to the specific second type word are sequentially arranged in succession with the corresponding first type token, and a specific second type token corresponding to the specific second type word is arranged last. The third type token may be arranged consecutively to the second type token.

상술한 바와 같이, 상기 제3타입의 토큰은 특정 범주에 속하는 적어도 하나의 토큰 중 가장 마지막 순서로 배열될 수 있다.As described above, the third type of token may be arranged in the last order among at least one token belonging to a specific category.

대상 문서(10)로부터, 추출된 복수의 단어들 각각의 의미에 기반하여, 기 정의된 복수의 범주 중 복수의 단어들 각각에 대응되는 범주가 특정될 수 있다. 기 정의된 복수의 범주 중 상기 특정된 범주가 정의하는 개념보다 상위 개념의 범주가 존재하는 경우, 상기 상위 개념의 범주가 복수의 단어들 각각에 대응되는 범주로 특정될 수 있다.Based on the meaning of each of the plurality of words extracted from the target document 10, a category corresponding to each of the plurality of words among the plurality of predefined categories may be specified. If, among a plurality of predefined categories, there is a category of a higher concept than the concept defined by the specified category, the category of the higher concept may be specified as a category corresponding to each of a plurality of words.

상술한 상위 개념의 범주는 특정 카테고리의 상위 카테고리로 이해될 수 있다. 본 명세서에서, 특정 범주에 대한 상위 개념의 범주를 상위 범주라 지칭하고, 상기 상위 범주의 하위 개념의 범주를 하위 범주라 지칭한다. 상기 표현은 상대적인 표현이므로, 특정 범주를 기준으로 활용될 수 있다.The category of the above-mentioned superordinate concept can be understood as a supercategory of a specific category. In this specification, the category of a higher-level concept for a specific category is referred to as a higher-level category, and the category of a lower-level concept of the higher-level category is referred to as a lower level category. Since the above expression is a relative expression, it can be used based on a specific category.

예를 들어, 상기 제1범주의 상위 개념에 대응되는 범주가 존재하는 경우, 상기 상위 개념에 대응되는 범주는 제3범주로 특정될 수 있다. 이 경우, 상기 제1범주는 상기 제3범주의 하위 범주라 지칭될 수 있고, 상기 제3범주는 상기 제1범주의 상위 범주라 지칭될 수 있다.For example, if there is a category corresponding to a higher-level concept of the first category, the category corresponding to the higher-level concept may be specified as a third category. In this case, the first category may be referred to as a lower category of the third category, and the third category may be referred to as a higher category of the first category.

상기 상위 개념의 범주보다 상위 개념의 범주가 기 정의된 경우, 상기 상위 개념의 범주보다 상위 개념의 범주도 복수의 단어들 각각에 대응되는 범주로 특정될 수 있다. When a category of a concept higher than the category of the higher-level concept has been previously defined, the category of the higher-level concept than the category of the higher-level concept may also be specified as a category corresponding to each of a plurality of words.

특정 범주의 상위 범주가 특정되는 경우, 상위 범주에 대응되는 제1타입의 제1타입 토큰이 생성될 수 있다. 예를 들어, 상기 특정된 제3범주에 대응되는 상기 제1타입의 제1타입 토큰이 생성된다. 상기 제3범주에 대응되는 제1타입 토큰, 상기 제1범주에 대응되는 제1타입 토큰 및 상기 제1범주에 대응되는 제2타입 토큰은 순차적으로 배열될 수 있다. When the upper category of a specific category is specified, a first type token of the first type corresponding to the upper category may be generated. For example, a first type token of the first type corresponding to the specified third category is generated. A first type token corresponding to the third category, a first type token corresponding to the first category, and a second type token corresponding to the first category may be arranged sequentially.

한편, 특정 범주의 하위 범주는 복수 개 특정될 수 있다. 예를 들어, 상기 제1 및 제2범주가 상기 제3범주의 하위 범주일 수 있다. 이 경우, 제1 내지 제3범주에 대응되는 제1타입의 제1타입 토큰이 생성된다. 상기 제3범주에 대응되는 제1타입 토큰, 상기 제1범주에 대응되는 제1타입 토큰, 상기 제1범주에 대응되는 제2타입 토큰, 제3타입 토큰, 상기 제2범주에 대응되는 제1타입 토큰 및 상기 제2범주에 대응되는 제2타입 토큰은 순차적으로 배열될 수 있다. Meanwhile, a plurality of subcategories of a specific category may be specified. For example, the first and second categories may be subcategories of the third category. In this case, first type tokens of the first type corresponding to the first to third categories are generated. A first type token corresponding to the third category, a first type token corresponding to the first category, a second type token corresponding to the first category, a third type token, a first type token corresponding to the second category The type token and the second type token corresponding to the second category may be arranged sequentially.

상술한 바와 같이, 두 개의 하위 범주 각각에 대응되는 제1타입 토큰 사이에는 제3타입 토큰이 배열된다.As described above, third-type tokens are arranged between first-type tokens corresponding to each of the two subcategories.

도 3을 참조하여, 실제 영수증을 기반으로 생성된 토큰을 배열하는 방법에 대하여 보다 구체적으로 설명한다. Referring to FIG. 3, a method of arranging tokens generated based on an actual receipt will be described in more detail.

도 3에서는 토큰이 생성된 순서와 토큰의 배열 순서가 동일한 것으로 설명하지만, 토큰의 생성 순서와 토큰의 배열 순서가 반드시 일치할 필요는 없다. In Figure 3, it is explained that the order in which tokens are generated and the order in which they are arranged are the same, but the order in which tokens are created and the order in which they are arranged do not necessarily match.

대상 문서(10)로부터, 추출된 단어들 각각의 의미에 기반하여, “[store]”, “[name]”(“[store]” 토큰에 대응하는 범주의 하위 범주에 대응), “[address]” (“[store]” 토큰에 대응하는 범주의 하위 범주에 대응), “[item]”, “[list]” (“[item]” 토큰에 대응하는 범주의 하위 범주에 대응), “[menu]” (“[list]” 토큰에 대응하는 범주의 하위 범주에 대응), “[name]” (“[menu]” 토큰에 대응하는 범주의 하위 범주에 대응), “[count]” (“[menu]” 토큰에 대응하는 범주의 하위 범주에 대응) 및 “[price]” (“[menu]” 토큰에 대응하는 범주의 하위 범주에 대응) 토큰이 생성된다. From the target document 10, based on the meaning of each extracted word, “[store]”, “[name]” (corresponding to a subcategory of the category corresponding to the “[store]” token), “[address] ]” (corresponds to a subcategory of the category corresponding to the “[store]” token), “[item]”, “[list]” (corresponds to a subcategory of the category corresponding to the “[item]” token), “ [menu]” (corresponds to a subcategory of the category corresponding to the “[list]” token), “[name]” (corresponds to a subcategory of the category corresponding to the “[menu]” token), “[count]” (corresponding to a subcategory of the category corresponding to the “[menu]” token) and “[price]” (corresponding to a subcategory of the category corresponding to the “[menu]” token) tokens are generated.

또한, 제2타입으로 분류된 단어들(“Happy”, “store”, “105 h-street”, “20210520011”, “Carrot”, “3”, “2997”, “tomato”, “2”, “1000”)에 대응되는 제2타입의 토큰이 생성된다.In addition, words classified as Type 2 (“Happy”, “store”, “105 h-street”, “20210520011”, “Carrot”, “3”, “2997”, “tomato”, “2”, A second type of token corresponding to “1000”) is created.

복수의 범주 중 가장 상위 개념에 대응되는 두 개의 범주 “store”, “item” 범주 중 어느 하나에 대응되는 [store] 토큰이 가장 첫 번째 토큰으로 배열된다. 이후, “store” 범주의 하위 범주에 대응되는 “name” 범주에 대응되는 [name] 토큰이 [store] 토큰에 연속적으로 배열되며, “name” 범주에 속한 제2타입 단어에 대응되는 “Happy”, “store” 토큰이 [name] 토큰에 이어 연속적으로 배치된다. The [store] token corresponding to one of the two categories “store” and “item” that correspond to the highest concept among the plurality of categories is arranged as the first token. Afterwards, the [name] tokens corresponding to the “name” category, which correspond to the subcategories of the “store” category, are sequentially arranged in the [store] token, and the “Happy” corresponding to the second type word belonging to the “name” category. , “store” tokens are placed consecutively following the [name] token.

“name” 범주에 속한 토큰(321a)이 모두 배열된 후, “name” 범주에 대응되는 토큰 중 가장 마지막 토큰(“store” 토큰”)에 연속적으로 제3타입 토큰([reduce], 321b)이 배열된다. 이후, “store” 범주의 하위 범주에 대응되는 “address” 범주에 대응되는 [address] 토큰이 [reduce] 토큰에 연속적으로 배열된다.After all the tokens (321a) belonging to the “name” category are arranged, a third type token ([reduce], 321b) is sequentially added to the last token (“store” token”) among the tokens corresponding to the “name” category. are arranged. Afterwards, the [address] token corresponding to the “address” category, which corresponds to the subcategory of the “store” category, is sequentially arranged in the [reduce] token.

도시되지 않았지만, 이후 배열 방법에 대하여 추가적으로 설명한다. “address” 범주에 속한 제2타입 단어에 대응되는 “105 h-street” 토큰이 [address] 토큰에 이어 연속적으로 배치된다. “address” 범주에 속한 토큰이 모두 배열된 후, “address” 범주에 대응되는 토큰 중 가장 마지막 토큰(“105 h-street” 토큰)에 연속적으로 제3타입 토큰이 배열된다. Although not shown, the arrangement method will be additionally described later. The “105 h-street” token corresponding to the second type word belonging to the “address” category is placed consecutively following the [address] token. After all tokens belonging to the “address” category are arranged, type 3 tokens are sequentially arranged at the very last token (“105 h-street” token) among the tokens corresponding to the “address” category.

한편, “store” 범주에 대응되는 모든 토큰이 배열되었는 바, 제3타입 토큰이 추가적으로 한 번 더 배열된다. 즉, “address” 범주에 대응되는 토큰 중 가장 마지막 토큰(“105 h-street” 토큰)에 연속적으로 두 개의 제3타입 토큰이 배열된다.Meanwhile, since all tokens corresponding to the “store” category have been arranged, the third type token is additionally arranged once more. In other words, two third-type tokens are sequentially arranged in the last token (“105 h-street” token) among the tokens corresponding to the “address” category.

연속적으로 배열된 두 개의 제3타입 토큰에 이어 “item” 범주에 대응되는 [item] 토큰이 배열된다. [item] 토큰에 이어, “item” 범주의 하위 범주인 “list” 범주에 대응되는 [list] 토큰, “list” 범주의 하위 범주인 “menu” 범주에 대응되는 [menu] 토큰, “menu” 범주의 하위 범주인 “name” 범주에 대응되는 [name] 토큰이 연속적으로 배열된다. [name] 토큰에 이어 “name” 범주 속한 값에 대응되는 “carrot” 토큰이 연속적으로 배열되며, “carrot” 토큰에 이어 [reduce] 토큰이 배열된다. Following the two third type tokens arranged consecutively, an [item] token corresponding to the “item” category is arranged. Following the [item] token, the [list] token corresponding to the “list” category, which is a subcategory of the “item” category, the [menu] token, corresponding to the “menu” category, which is a subcategory of the “list” category, “menu” [name] tokens corresponding to the “name” category, which is a subcategory of the category, are arranged sequentially. Following the [name] token, “carrot” tokens corresponding to values in the “name” category are arranged sequentially, and the “carrot” token is followed by a [reduce] token.

이후, “menu” 범주의 하위 범주인 “count” 범주에 대응되는 [count] 토큰이 연속적으로 배열된다. [count] 토큰에 이어 “count” 범주 속한 값에 대응되는 “3” 토큰이 연속적으로 배열되며, “3” 토큰에 이어 [reduce] 토큰이 배열된다.Afterwards, [count] tokens corresponding to the “count” category, which is a subcategory of the “menu” category, are sequentially arranged. Following the [count] token, “3” tokens corresponding to values in the “count” category are sequentially arranged, and the “3” token is followed by a [reduce] token.

이후, “menu” 범주의 하위 범주인 “price” 범주에 대응되는 [price] 토큰이 연속적으로 배열된다. [price] 토큰에 이어 “price” 범주 속한 값에 대응되는 “2997” 토큰이 연속적으로 배열되며, “2997” 토큰이 배열된다.Afterwards, [price] tokens corresponding to the “price” category, which is a subcategory of the “menu” category, are sequentially arranged. Following the [price] token, “2997” tokens corresponding to values in the “price” category are arranged sequentially, and the “2997” token is arranged.

“price” 범주, “menu” 범주, “list” 범주에 대응되는 모든 토큰이 배열되었는 바, “2997” 토큰에 이어, 연속적으로 세 개의 제3타입 토큰이 배열된다.All tokens corresponding to the “price” category, “menu” category, and “list” category are arranged, and following the “2997” token, three third-type tokens are arranged consecutively.

이후, 연속적으로 배열된 세 개의 제3타입 토큰에 이어, “item” 범주의 하위 범주인 “list” 범주에 대응되는 [list] 토큰, “list” 범주의 하위 범주인 “menu” 범주에 대응되는 [menu] 토큰, “menu” 범주의 하위 범주인 “name” 범주에 대응되는 [name] 토큰이 연속적으로 배열된다. [name] 토큰에 이어 “name” 범주 속한 값에 대응되는 “tomato” 토큰이 연속적으로 배열되며, “tomato” 토큰에 이어 [reduce] 토큰이 배열된다. Afterwards, following the three third type tokens arranged consecutively, the [list] token corresponding to the “list” category, which is a subcategory of the “item” category, and the “menu” category, which is a subcategory of the “list” category. The [menu] token and the [name] token corresponding to the “name” category, which is a subcategory of the “menu” category, are arranged sequentially. Following the [name] token, “tomato” tokens corresponding to values in the “name” category are arranged sequentially, and the “tomato” token is followed by a [reduce] token.

이후, “menu” 범주의 하위 범주인 “tomato” 범주에 대응되는 [count] 토큰이 연속적으로 배열된다. [count] 토큰에 이어 “count” 범주 속한 값에 대응되는 “2” 토큰이 연속적으로 배열되며, “2” 토큰에 이어 [reduce] 토큰이 배열된다.Afterwards, [count] tokens corresponding to the “tomato” category, which is a subcategory of the “menu” category, are sequentially arranged. Following the [count] token, “2” tokens corresponding to values in the “count” category are sequentially arranged, and the “2” token is followed by a [reduce] token.

이후, “menu” 범주의 하위 범주인 “price” 범주에 대응되는 [price] 토큰이 연속적으로 배열된다. [price] 토큰에 이어 “price” 범주 속한 값에 대응되는 “1000” 토큰이 연속적으로 배열되며, “1000” 토큰이 배열된다. 상기 “1000” 토큰을 마지막으로 토큰 배열이 종료된다.Afterwards, [price] tokens corresponding to the “price” category, which is a subcategory of the “menu” category, are sequentially arranged. Following the [price] token, “1000” tokens corresponding to values in the “price” category are arranged sequentially, and then “1000” tokens are arranged. The token arrangement ends with the “1000” token.

한편, 상기 생성된 토큰들 및 상기 토큰들이 배열된 순서에 기반하여 상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영된 데이터가 생성될 수 있다.Meanwhile, data reflecting the data structure between the plurality of words included in the target document may be generated based on the generated tokens and the order in which the tokens are arranged.

상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영된 데이터는 토큰이 배열된 순서대로 토큰에 대응되는 액션을 수행함으로써 생성된다. Data reflecting the data structure between the plurality of words included in the target document is generated by performing actions corresponding to the tokens in the order in which the tokens are arranged.

일 실시 예에 있어서, 상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영된 데이터는 트리(tree) 형태로 생성될 수 있다. In one embodiment, data reflecting the data structure between the plurality of words included in the target document may be generated in the form of a tree.

트리 데이터는 복수의 노드 및 복수의 계층을 포함하며, 각각의 노드에는 복수의 범주 중 어느 하나가 대응되며, 대응되는 범주의 속성 및 값 중 적어도 하나가 매칭된다. Tree data includes a plurality of nodes and a plurality of hierarchies, each node corresponds to one of a plurality of categories, and at least one of the properties and values of the corresponding category matches.

트리 데이터 생성 시 최상위 노드(S)를 기준 노드로 설정한 후, 토큰이 배열된 순서대로, 토큰에 대응되는 액션을 수행하며 노드를 생성하거나, 노드에 대응되는 데이터를 매칭시킨다.When creating tree data, the top node (S) is set as the standard node, and then, in the order in which the tokens are arranged, actions corresponding to the tokens are performed to create nodes or match data corresponding to the nodes.

제1타입의 토큰에 대한 액션은, 기준 노드의 하위 노드를 생성하고, 생성된 하위 노드를 기준 노드로 변경하는 것이며, 제2타입의 토큰에 대한 액션은 기준 노드에 해당 제2타입 토큰에 대응되는 단어를 값으로 매칭시키는 것이다. 제3타입의 토큰에 대한 액션은 기준 노드보다 한 단계 상위 노드를 기준 노드로 변경하는 것이다.The action for the first type of token is to create a child node of the standard node and change the created child node to the standard node, and the action for the second type token is to correspond to the standard node and the second type token. Matching words with values. The action for the third type of token is to change the node one level higher than the standard node to the standard node.

상술한 기준에 따라, 순서대로 배열된 토큰으로부터 트리 데이터가 생성될 수 있다.According to the above-mentioned criteria, tree data can be generated from tokens arranged in order.

도 3 및 4를 참조하여, 트리 데이터를 생성하는 일 실시 예에 대하여 설명한다. 대상 문서(10)로부터 토큰을 생성하고 배열하는 방법에 대한 설명은 앞서 설명한 내용으로 갈음한다.Referring to FIGS. 3 and 4, an embodiment of generating tree data will be described. The description of how to generate and arrange tokens from the target document 10 is replaced with the content described above.

도 3을 참조하면, 토큰이 배열 순서(310)대로 토큰에 대응되는 액션(330)을 수행한다. 도 3에 도시된 표의 토큰 생성 시간 열(311)에 포함된 숫자들은 토큰을 처리하는 순서가 될 수 있으며, 토큰 처리 순서 대로 액션 열(331)에 포함된 액션이 수행된다. 이에 따라, 파싱(340)이 수행되며, 파싱 열(341)에 포함된 데이터들이 순차적으로 생성된다.Referring to FIG. 3, the action 330 corresponding to the token is performed in the order in which the tokens are arranged (310). The numbers included in the token generation time column 311 of the table shown in FIG. 3 may be the order in which tokens are processed, and the actions included in the action column 331 are performed in the token processing order. Accordingly, parsing 340 is performed, and data included in the parsing string 341 is sequentially generated.

가장 먼저 트리의 최상위 노드(S)를 기준 노드로 설정하고, 기준 노드에서 [store] 토큰에 대응되는 액션(NT(store))이 수행된다. 이에 따라, 기준 노드(S)의 하위 노드인 [store] 노드(410)가 생성되며, 기준 노드가 [store] 노드(410)로 변경된다.First, the top node (S) of the tree is set as the standard node, and the action (NT (store)) corresponding to the [store] token is performed at the standard node. Accordingly, the [store] node 410, which is a child node of the standard node (S), is created, and the standard node is changed to the [store] node 410.

다음으로, [name] 토큰에 대응되는 액션(NT(name))이 수행되며, [store] 노드(410)의 하위 노드인 [name] 노드(420)가 생성되며, 기준 노드가 [name] 노드(420)로 변경된다.Next, the action (NT(name)) corresponding to the [name] token is performed, and the [name] node 420, a child node of the [store] node 410, is created, and the reference node is the [name] node. Changed to (420).

다음으로, [name] 노드(420)에 “Happy” 토큰에 대응되는 단어 “Happy”를 매칭시키는 액션(GEN(Happy))이 수행된다. 이어서, [name] 노드(420)에 “store” 토큰에 대응되는 단어 “store”를 매칭시키는 액션(GEN(store))이 수행된다. [name] 노드(420)에 매칭된 단어는 단어가 매칭된 순서대로 직렬화(serialization)된다. 이에 따라, [name] 노드(420)에는 “Happy store”(421)가 매칭된다.Next, an action (GEN(Happy)) that matches the word “Happy” corresponding to the “Happy” token is performed on the [name] node 420. Next, an action (GEN(store)) that matches the word “store” corresponding to the “store” token is performed on the [name] node 420. Words matched to the [name] node 420 are serialized in the order in which the words are matched. Accordingly, “Happy store” (421) is matched to the [name] node (420).

도 3에 도시된 표의 331a 영역에 포함된 모든 액션이 수행됨에 따라, 도 4의 410, 420 노드가 생성되며, 420노드에 대응되는 텍스트가 매칭된다. As all actions included in area 331a of the table shown in FIG. 3 are performed, nodes 410 and 420 in FIG. 4 are created, and the text corresponding to node 420 is matched.

다음으로, 도 3에 도시된 표의 331b 영역에 포함된 [reduce] 토큰에 대응되는 액션이 수행된다. 이에 따라, 기준 노드가 [name] 노드에서 [name] 노드의 상위 노드인 [store] 노드로 변경된다. Next, the action corresponding to the [reduce] token included in area 331b of the table shown in FIG. 3 is performed. Accordingly, the standard node changes from the [name] node to the [store] node, which is the parent node of the [name] node.

다음으로, [address] 토큰에 대응되는 액션(NT(address))이 수행되며, [store] 노드(410)의 하위 노드인 [address] 노드가 생성되며, 기준 노드가 [address] 노드로 변경된다.Next, the action (NT(address)) corresponding to the [address] token is performed, the [address] node, which is a child node of the [store] node 410, is created, and the reference node is changed to the [address] node. .

다음으로, [address] 노드에 “105 h-street” 토큰에 대응되는 단어 “105 h-street”를 매칭시키는 액션(GEN(105 h-street))이 수행된다. 이에 따라, [address] 노드에는 “105 h-street”가 매칭된다.Next, an action (GEN(105 h-street)) is performed that matches the word “105 h-street” corresponding to the “105 h-street” token to the [address] node. Accordingly, “105 h-street” is matched to the [address] node.

다음으로, 연속으로 배치된 두 개의 [reduce] 토큰에 대응되는 액션이 수행되며, 기준 노드가 최상위 노드(S)로 변경된다.Next, the action corresponding to the two [reduce] tokens placed in succession is performed, and the reference node is changed to the top node (S).

다음으로, [item] 토큰, [list] 토큰, [menu] 토큰, [name] 토큰에 대응되는 액션이 순차적으로 수행되며, [item] 노드(430), [list] 노드(440), [menu] 노드(450), [name] 노드(460)가 순차적으로 생성된다. 이어서, “carrot” 토큰에 대응되는 액션이 수행됨에 따라, [name] 노드(460)에 단어 “carrot”(461)이 매칭된다.Next, actions corresponding to the [item] token, [list] token, [menu] token, and [name] token are performed sequentially, with the [item] node 430, [list] node 440, and [menu] ] node 450 and [name] node 460 are created sequentially. Subsequently, as the action corresponding to the “carrot” token is performed, the word “carrot” (461) is matched to the [name] node (460).

상술한 룰에 따라, 생성된 토큰에 대한 액션을 반복하는 경우, 도 4에 도시된 트리 데이터가 생성될 수 있다. According to the above-described rule, when the action on the generated token is repeated, the tree data shown in FIG. 4 can be generated.

도 4에 도시된 트리는 대상 문서(10)에 포함된 단어들 각각에 대한 키-값 쌍이 완전히 매칭된 데이터이며, 각각의 데이터들의 범주가 완전히 정의되어 있다. The tree shown in FIG. 4 is data in which key-value pairs for each word included in the target document 10 are completely matched, and the categories of each data are completely defined.

상술한 바와 같이, 본 발명은 대상 문서에서 추출된 상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 생성된 토큰 및 생성된 토큰의 배열을 이용하여, 대상 문서에 포함된 복수의 단어 간의 데이터 구조가 반영된 데이터를 생성할 수 있다. As described above, the present invention includes the meaning of the plurality of words extracted from the target document and the location information for each of the plurality of words, using the generated token and the arrangement of the generated token to be included in the target document. Data that reflects the data structure between multiple words can be generated.

한편, 본 발명은 정보 추출 모델에 대한 기계 학습 수행 시 상술한 트리 데이터를 기준으로 정보 추출 모델에 대한 정확도를 판단한다.Meanwhile, the present invention determines the accuracy of the information extraction model based on the above-described tree data when performing machine learning on the information extraction model.

도 5는 본 발명에 따른 정보 추출 모델의 기계학습 방법을 나타내는 개념도이고, 도 6은 본 발명에 따른 정보 추출 모델로부터 출력된 데이터의 정확도를 산출하는 모습을 나타내는 개념도이다.Figure 5 is a conceptual diagram showing the machine learning method of the information extraction model according to the present invention, and Figure 6 is a conceptual diagram showing calculating the accuracy of data output from the information extraction model according to the present invention.

도 5를 참조하면, 대상 문서(10)에 대한 OCR(511)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보(512)를 추정한 후, 복수의 단어 및 위치 정보를 본 발명에 따른 정보 추출 모델(513)에 입력한다. 이에 따라, 순차적으로 배열된 토큰이 순차적으로 배열된다. Referring to FIG. 5, after performing OCR 511 on the target document 10 and estimating a plurality of words and location information 512 for each of the plurality of words, the plurality of words and location information are viewed. It is input into the information extraction model 513 according to the invention. Accordingly, sequentially arranged tokens are arranged sequentially.

한편, 대상 문서(10)에 대응되는 데이터는 학습 데이터로 가공된다. 학습 데이터를 위한 가공은 parse annotator(521)에 의해 수행되는데, parse annotator(521)는 기 저장된 데이터를 복수의 토큰이 순차적으로 배열된 복수의 토큰 형태로 출력한다. 즉, parse annotator(521)는 본 발명에 따른 기계 학습 모델의 출력 데이터와 동일한 형식의 데이터를 출력한다. 이를 통해, 기계학습을 위한 원본 데이터(학습 데이터)가 생성된다. Meanwhile, data corresponding to the target document 10 is processed into learning data. Processing for learning data is performed by the parse annotator 521, which outputs the previously stored data in the form of a plurality of tokens arranged sequentially. That is, the parse annotator 521 outputs data in the same format as the output data of the machine learning model according to the present invention. Through this, original data (learning data) for machine learning is created.

본 발명에 따른 정보 추출 모델로부터 출력된 복수의 토큰들을 기반으로 생성된 트리 데이터와 원본 데이터 간의 오차를 산출하고, 오차를 최소화하는 방향으로 훈련이 진행될 수 있다.The error between tree data generated based on a plurality of tokens output from the information extraction model according to the present invention and the original data can be calculated, and training can be performed in a direction to minimize the error.

일 실시 예에 있어서, 도 6을 참조하면, 정보 추출 모델의 오차는, 정보 추출 모델로부터 생성된 트리 데이터에 포함된 노드와 및 원본 데이터를 구성하는 노드 간의 비교를 통해 산출될 수 있다. 구체적으로, 정보 추출 모델로부터 출력된 트리 데이터(도 6의 최상단 트리)를 원본 데이터의 트리(도 6의 최하단 트리)와 동일하게 변화시키면서 정보 추출 모델의 오차가 산출될 수 있다. In one embodiment, referring to FIG. 6, the error of the information extraction model may be calculated through comparison between nodes included in tree data generated from the information extraction model and nodes constituting the original data. Specifically, the error of the information extraction model can be calculated by changing the tree data output from the information extraction model (top tree in FIG. 6) to be the same as the tree of the original data (bottom tree in FIG. 6).

구체적으로, 정보 추출 모델로부터 출력된 트리 데이터(도 6의 최상단 트리)의 각 노드들(610, 620, 630)과 노드에 매칭된 값(621, 631)이 원본 데이터의 트리와 일치하는 지 판단하고, 일치하지 않는 노드(630) 및 일치하지 않는 값(631)을 원본 데이터와 동일하게 수정하여, 일치하지 않는 노드(630)가 원본 데이터와 일치하는 노드(630’)로 수정되도록 하고, 일치하지 않는 값(631)이 원본 데이터와 일치하는 값(631’)으로 수정되도록 한다. 이러한 과정에서 정보 추출 모델로부터 출력된 트리 데이터의 스코어가 산출된다. 스코어 산출 방식은 기 공지된 방식을 활용하므로 구체적인 설명은 생략한다.Specifically, determine whether each node (610, 620, 630) of the tree data (top tree in FIG. 6) output from the information extraction model and the values (621, 631) matched to the nodes match the tree of the original data. and modify the non-matching nodes 630 and non-matching values 631 to be the same as the original data, so that the non-matching nodes 630 are modified to nodes 630' matching the original data, and The missing value (631) is modified to a value (631') that matches the original data. In this process, the score of the tree data output from the information extraction model is calculated. Since the score calculation method uses a previously known method, detailed description is omitted.

상술한 바와 같이, 본 발명에 따른 정보 추출 모델의 기계학습은 정보 추출 모델로부터 출력되며, 순차적으로 배열된 토큰의 정확도를 산출함으로써 수행된다. 상기 출력된 토큰들은 “키-값” 쌍이 완전히 매칭된 데이터가 아니므로, 상기 정보 추출 모델의 정확도를 산출하기 위한 학습 데이터 생성이 용이 해진다. As described above, machine learning of the information extraction model according to the present invention is performed by calculating the accuracy of sequentially arranged tokens output from the information extraction model. Since the output tokens are not data in which “key-value” pairs are completely matched, it becomes easy to generate learning data to calculate the accuracy of the information extraction model.

구체적으로, 학습 데이터 생성 시 기 정해진 룰(토큰 생성 룰)에 따라 일정한 순서로 배열된 토큰을 생성한 후, 정보 추출 모델에서 출력된 토큰들과 비교하는 작업을 통해, 정보 추출 모델의 정확도를 판단하고, 상기 정보 추출 모델의 정확도를 향상시키기 위한 방향으로 기계학습을 진행할 수 있게 된다. 이에 따라, 정보 추출 모델의 기계학습을 위한 학습 데이터를 생성하는데 소요되는 시간이 크게 단축될 수 있다.Specifically, when generating learning data, tokens arranged in a certain order are generated according to predetermined rules (token generation rules), and then the accuracy of the information extraction model is determined by comparing them with the tokens output from the information extraction model. And, machine learning can be performed in the direction of improving the accuracy of the information extraction model. Accordingly, the time required to generate learning data for machine learning of the information extraction model can be greatly reduced.

한편, 위에서 살펴본 본 발명은, 컴퓨터에서 하나 이상의 프로세스에 의하여 실행되며, 이러한 컴퓨터로 판독될 수 있는 매체(또는 기록 매체)에 저장 가능한 프로그램으로서 구현될 수 있다.Meanwhile, the present invention discussed above can be implemented as a program that is executed by one or more processes on a computer and can be stored in a medium (or recording medium) that can be read by such a computer.

나아가, 위에서 살펴본 본 발명은, 프로그램이 기록된 매체에 컴퓨터가 읽을 수 있는 코드 또는 명령어로서 구현하는 것이 가능하다. 즉, 본 발명은 프로그램의 형태로 제공될 수 있다. Furthermore, the present invention discussed above can be implemented as computer-readable codes or instructions on a program-recorded medium. That is, the present invention may be provided in the form of a program.

한편, 컴퓨터가 읽을 수 있는 매체는, 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 매체의 예로는, HDD(Hard Disk Drive), SSD(Solid State Disk), SDD(Silicon Disk Drive), ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있다. Meanwhile, computer-readable media includes all types of recording devices that store data that can be read by a computer system. Examples of computer-readable media include HDD (Hard Disk Drive), SSD (Solid State Disk), SDD (Silicon Disk Drive), ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. There is.

나아가, 컴퓨터가 읽을 수 있는 매체는, 저장소를 포함하며 전자기기가 통신을 통하여 접근할 수 있는 서버 또는 클라우드 저장소일 수 있다. 이 경우, 컴퓨터는 유선 또는 무선 통신을 통하여, 서버 또는 클라우드 저장소로부터 본 발명에 따른 프로그램을 다운로드 받을 수 있다.Furthermore, the computer-readable medium may be a server or cloud storage that includes storage and can be accessed by electronic devices through communication. In this case, the computer can download the program according to the present invention from a server or cloud storage through wired or wireless communication.

나아가, 본 발명에서는 위에서 설명한 컴퓨터는 프로세서, 즉 CPU(Central Processing Unit, 중앙처리장치)가 탑재된 전자기기로서, 그 종류에 대하여 특별한 한정을 두지 않는다.Furthermore, in the present invention, the computer described above is an electronic device equipped with a processor, that is, a CPU (Central Processing Unit), and there is no particular limitation on its type.

한편, 상기의 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다.Meanwhile, the above detailed description should not be construed as restrictive in all respects and should be considered illustrative. The scope of the present invention should be determined by reasonable interpretation of the appended claims, and all changes within the equivalent scope of the present invention are included in the scope of the present invention.

Claims (16)

대상 문서에 대한 OCR(Optical character recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 단계;
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계; 및
상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 단계를 포함하고,
상기 복수의 토큰은, 범주의 속성을 갖는 제1 타입 및 상기 범주의 값에 해당하는 데이터 속성을 갖는 제2 타입 중 어느 하나의 타입을 갖고,
상기 복수의 토큰을 배열하는 단계에서는,
상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 서로 다른 범주 중 특정 범주에 대응되는 제1 타입 토큰을 첫번째로 배열하고,
상기 특정 범주에 대응되는 제1 타입 토큰에 연속하여 상기 특정 범주에 대응되는 제2 타입 토큰을 배열하며,
상기 특정 범주에 대응되는 제2 타입 토큰 중 마지막으로 배열된 토큰에 연속하여, 제3 타입 토큰을 배열하고,
상기 제3 타입 토큰은 상기 특정 범주에 대응되는 토큰들과 다른 범주에 대응되는 토큰들을 구분하기 위한 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
Performing optical character recognition (OCR) on a target document to extract a plurality of words and location information for each of the plurality of words;
generating a plurality of tokens corresponding to each of the plurality of words; and
Arranging the plurality of tokens so that the data structure between the plurality of words included in the target document is reflected,
The plurality of tokens have one of a first type having a category attribute and a second type having a data attribute corresponding to a value of the category,
In the step of arranging the plurality of tokens,
Using the meaning of the plurality of words and the location information for each of the plurality of words, first type first type tokens corresponding to a specific category among different categories are arranged,
Arranging a second type token corresponding to the specific category consecutively to a first type token corresponding to the specific category,
Arranging a third type token sequentially to the last arranged token among the second type tokens corresponding to the specific category,
The third type token is used to distinguish tokens corresponding to the specific category from tokens corresponding to other categories.
삭제delete 제1항에 있어서,
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계는,
상기 복수의 단어 각각의 의미에 기반하여, 상기 제1 타입을 가지는 제1 타입 토큰 및 상기 제2 타입을 가지는 제2 타입 토큰 중 적어도 하나를 생성하는 단계를 포함하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to paragraph 1,
The step of generating a plurality of tokens corresponding to each of the plurality of words,
From a semi-structured document, comprising the step of generating at least one of a first type token having the first type and a second type token having the second type, based on the meaning of each of the plurality of words. How to extract information.
제1항에 있어서,
상기 복수의 단어 각각의 의미 및 상기 대상 문서 상에서의 복수의 단어 각각에 대한 위치 정보에 근거하여, 상기 복수의 단어를 상기 제1 타입을 가지는 제1 타입 단어 및 상기 제2 타입을 가지는 제2 타입 단어 중 적어도 하나로 분류하는 단계를 더 포함하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to paragraph 1,
Based on the meaning of each of the plurality of words and the location information for each of the plurality of words in the target document, the plurality of words are divided into a first type word having the first type and a second type word having the second type. A method of extracting information from a semi-structured document, further comprising the step of classifying into at least one of the words.
제4항에 있어서,
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계는,
상기 제1 타입 단어에 각각 대응되도록 적어도 하나의 제1 타입 토큰을 생성하고,
상기 제2 타입 단어에 각각 대응되도록 적어도 하나의 제2 타입 토큰을 생성하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to paragraph 4,
The step of generating a plurality of tokens corresponding to each of the plurality of words,
Generating at least one first type token to each correspond to the first type word,
A method of extracting information from a semi-structured document, characterized in that generating at least one second type token to each correspond to the second type word.
제5항에 있어서,
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계는,
상기 제2 타입 단어가 속하는 범주 각각에 대한 제1 타입 토큰을 생성하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to clause 5,
The step of generating a plurality of tokens corresponding to each of the plurality of words,
A method for extracting information from a semi-structured document, characterized in that generating a first type token for each category to which the second type word belongs.
제6항에 있어서,
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계는, 상기 복수의 단어에 상기 특정 범주의 범주 값에 해당하는 특정 제2타입 단어가 존재하고, 상기 특정 범주에 해당하는 단어가 존재하지 않는 경우,
상기 특정 제2타입 단어에 근거하여, 상기 특정 범주에 대응되는 특정 제1타입 토큰을 생성하는 단계를 더 포함하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to clause 6,
In the step of generating a plurality of tokens corresponding to each of the plurality of words, a specific second type word corresponding to a category value of the specific category exists in the plurality of words, and a word corresponding to the specific category does not exist. If not,
A method for extracting information from a semi-structured document, further comprising generating a specific first type token corresponding to the specific category based on the specific second type word.
삭제delete 제4항에 있어서,
상기 복수의 토큰을 배열하는 단계에서는,
상기 복수의 단어에, 상기 특정 범주의 범주 값에 해당하는 특정 제2타입 단어가 복수개 포함된 경우,
상기 복수개의 특정 제2 타입 단어 각각에 대응되는 복수개의 제2 타입 토큰을 순차적으로 배열하고,
순차적으로 배열된 상기 복수개의 제2 타입 토큰의 배열 순서는, 상기 복수개의 특정 제2 타입 단어 각각의 의미 및 상기 대상 문서 상의 위치 정보에 근거하여, 결정되는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to paragraph 4,
In the step of arranging the plurality of tokens,
If the plurality of words include a plurality of specific second type words corresponding to the category value of the specific category,
sequentially arranging a plurality of second type tokens corresponding to each of the plurality of specific second type words,
Information from a semi-structured document, wherein the arrangement order of the plurality of sequentially arranged second type tokens is determined based on the meaning of each of the plurality of specific second type words and location information on the target document. How to extract it.
제1항에 있어서,
상기 복수의 토큰을 배열하는 단계에서는,
상기 대상 문서로부터 상기 데이터 속성에 대응되는 단어가 추출되지 않은 경우,
상기 특정 범주에 대응되는 제1타입 토큰과, 상기 다른 범주에 대응되는 제1 타입 토큰을 순차적으로 배열하고,
상기 특정 범주에 대응되는 제1타입 토큰과 상기 다른 범주에 대응되는 제1 타입 토큰 사이에는 제3 타입 토큰이 배열되는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to paragraph 1,
In the step of arranging the plurality of tokens,
If a word corresponding to the data attribute is not extracted from the target document,
sequentially arranging a first type token corresponding to the specific category and a first type token corresponding to the other category,
A method for extracting information from a semi-structured document, characterized in that a third type token is arranged between the first type token corresponding to the specific category and the first type token corresponding to the other category.
삭제delete 제1항에 있어서,
상기 복수의 토큰을 이용하여, 상기 대상 문서와 대응되는 구조를 갖는 데이터를 생성하는 단계를 더 포함하고,
상기 데이터를 생성하는 단계에서는,
상기 복수의 토큰 중 상기 제3 타입 토큰이 검출되면, 상기 제3 타입 토큰이 검출되기 직전에 검출된 특정 토큰과 상기 제3 타입 토큰에 연속하는 특정 토큰을 서로 다른 범주에 각각 대응되는 토큰으로서 인식하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to paragraph 1,
Further comprising generating data having a structure corresponding to the target document using the plurality of tokens,
In the step of generating the data,
When the third type token is detected among the plurality of tokens, the specific token detected just before the third type token is detected and the specific token consecutive to the third type token are recognized as tokens corresponding to different categories. A method of extracting information from a semi-structured document, characterized in that:
제1항에 있어서,
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계는,
상기 특정 범주의 상위 개념에 대응되는 범주가 존재하는 경우, 상기 특정 범주의 상위 개념 범주에 대응되는 제1타입 토큰을 생성하는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to paragraph 1,
The step of generating a plurality of tokens corresponding to each of the plurality of words,
A method for extracting information from a semi-structured document, characterized in that when a category corresponding to a high-level concept of the specific category exists, a first type token corresponding to the high-level concept category of the specific category is generated.
제13항에 있어서,
상기 특정 범주의 상위 개념 범주에 대응되는 제1타입 토큰, 상기 특정 범주에 대응되는 제1타입 토큰 및 상기 특정 범주에 대응되는 제2타입 토큰은 순차적으로 배열되는 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 방법.
According to clause 13,
Information from a semi-structured document, wherein a first type token corresponding to a higher concept category of the specific category, a first type token corresponding to the specific category, and a second type token corresponding to the specific category are arranged sequentially. How to extract .
대상 문서에 대한 OCR(Optical character recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 OCR부,
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하고,
상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 제어부를 포함하고,
상기 복수의 토큰은, 범주의 속성을 갖는 제1 타입 및 상기 범주의 값에 해당하는 데이터 속성을 갖는 제2 타입 중 어느 하나의 타입을 갖고,
상기 제어부는,
상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 서로 다른 범주 중 특정 범주에 대응되는 제1 타입 토큰을 첫번째로 배열하고,
상기 특정 범주에 대응되는 제1 타입 토큰에 연속하여 상기 특정 범주에 대응되는 제2 타입 토큰을 배열하며,
상기 특정 범주에 대응되는 제2 타입 토큰 중 마지막으로 배열된 토큰에 연속하여, 제3 타입 토큰을 배열하고,
상기 제3 타입 토큰은 특정 범주에 대응되는 토큰들과 다른 범주에 대응되는 토큰들을 구분하기 위한 것을 특징으로 하는 반정형 문서로부터 정보를 추출하는 시스템.
An OCR unit that performs optical character recognition (OCR) on the target document to extract a plurality of words and location information for each of the plurality of words;
Generating a plurality of tokens corresponding to each of the plurality of words,
A control unit that arranges the plurality of tokens so that the data structure between the plurality of words included in the target document is reflected,
The plurality of tokens have one of a first type having a category attribute and a second type having a data attribute corresponding to a value of the category,
The control unit,
Using the meaning of the plurality of words and the location information for each of the plurality of words, first type first type tokens corresponding to a specific category among different categories are arranged,
Arranging a second type token corresponding to the specific category consecutively to a first type token corresponding to the specific category,
Arranging a third type token sequentially to the last arranged token among the second type tokens corresponding to the specific category,
The third type token is a system for extracting information from a semi-structured document, characterized in that it is used to distinguish tokens corresponding to a specific category from tokens corresponding to other categories.
전자기기에서 하나 이상의 프로세스에 의하여 실행되며, 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램으로서,
상기 프로그램은,
대상 문서에 대한 OCR(Optical character recognition)을 수행하여, 복수의 단어 및 상기 복수의 단어 각각에 대한 위치 정보를 추출하는 단계;
상기 복수의 단어 각각에 대응되는 복수의 토큰을 생성하는 단계; 및
상기 대상 문서에 포함된 상기 복수의 단어 간의 데이터 구조가 반영되도록, 상기 복수의 토큰을 배열하는 단계를 수행하도록 하는 명령어들을 포함하고,
상기 복수의 토큰은, 범주의 속성을 갖는 제1 타입 및 상기 범주의 값에 해당하는 데이터 속성을 갖는 제2 타입 중 어느 하나의 타입을 갖고,
상기 복수의 토큰을 배열하는 단계에서는,
상기 복수의 단어의 의미 및 상기 복수의 단어 각각에 대한 위치 정보를 이용하여, 서로 다른 범주 중 특정 범주에 대응되는 제1 타입 토큰을 가장 첫번째로 배열하고,
상기 특정 범주에 대응되는 제1 타입 토큰에 연속하여 상기 특정 범주에 대응되는 제2 타입 토큰을 배열하며,
상기 특정 범주에 대응되는 제2 타입 토큰 중 마지막으로 배열된 토큰에 연속하여, 제3 타입 토큰을 배열하고,
상기 제3 타입은 상기 특정 범주에 대응되는 토큰들과 다른 범주에 대응되는 토큰들을 구분하기 위한 것을 특징으로 하는 컴퓨터로 판독될 수 있는 기록매체에 저장 가능한 프로그램.
A program that is executed by one or more processes in an electronic device and can be stored in a computer-readable recording medium,
The above program is,
Performing optical character recognition (OCR) on a target document to extract a plurality of words and location information for each of the plurality of words;
generating a plurality of tokens corresponding to each of the plurality of words; and
Includes instructions for performing the step of arranging the plurality of tokens so that the data structure between the plurality of words included in the target document is reflected,
The plurality of tokens have one of a first type having a category attribute and a second type having a data attribute corresponding to a value of the category,
In the step of arranging the plurality of tokens,
Using the meaning of the plurality of words and the location information for each of the plurality of words, the first type token corresponding to a specific category among the different categories is arranged first,
Arranging a second type token corresponding to the specific category consecutively to a first type token corresponding to the specific category,
Arranging a third type token sequentially to the last arranged token among the second type tokens corresponding to the specific category,
The third type is a program storable on a computer-readable recording medium, characterized in that it is for distinguishing tokens corresponding to the specific category from tokens corresponding to other categories.
KR1020210070404A 2021-04-15 2021-05-31 Method and system for extracting information from semi-structured documents KR102649429B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022062744A JP7453731B2 (en) 2021-04-15 2022-04-05 Method and system for extracting information from semi-structured documents

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210049464 2021-04-15
KR20210049464 2021-04-15

Publications (2)

Publication Number Publication Date
KR20220142901A KR20220142901A (en) 2022-10-24
KR102649429B1 true KR102649429B1 (en) 2024-03-20

Family

ID=83805852

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210070404A KR102649429B1 (en) 2021-04-15 2021-05-31 Method and system for extracting information from semi-structured documents

Country Status (1)

Country Link
KR (1) KR102649429B1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102127985B1 (en) * 2018-11-28 2020-06-29 삼성생명보험주식회사 A computing device for extracting item from a document image
KR102379674B1 (en) * 2019-07-23 2022-03-29 한국과학기술원 Method and Apparatus for Analyzing Tables in Document
KR102149050B1 (en) * 2020-04-24 2020-08-28 주식회사 애자일소다 System and method for analyzing document using artificial intelligence based on ocr

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
한국 공개특허공보 제10-2020-0063750호(2020.06.05.) 1부.*
한국 공개특허공보 제10-2021-0011606호(2021.02.02.) 1부.*
한국 등록특허공보 제10-2149050호(2020.08.28.) 1부.*

Also Published As

Publication number Publication date
KR20220142901A (en) 2022-10-24

Similar Documents

Publication Publication Date Title
US10614266B2 (en) Recognition and population of form fields in an electronic document
Tkaczyk et al. CERMINE: automatic extraction of structured metadata from scientific literature
US9251467B2 (en) Probabilistic parsing
US20240095247A1 (en) Computerized information extraction from tables
Tkaczyk et al. Cermine--automatic extraction of metadata and references from scientific literature
US8756216B1 (en) Scalable tree builds for content descriptor search
US8352483B1 (en) Scalable tree-based search of content descriptors
US20210350068A1 (en) Descriptive insight generation and presentation system
JP2014067154A (en) Document classification support device, document classification support method and program
CN114612921B (en) Form recognition method and device, electronic equipment and computer readable medium
US20170132484A1 (en) Two Step Mathematical Expression Search
US20230409645A1 (en) Search needs evaluation apparatus, search needs evaluation system, and search needs evaluation method
JP7493937B2 (en) Method, program and system for identifying a sequence of headings in a document
CN114416926A (en) Keyword matching method and device, computing equipment and computer readable storage medium
Kusumaningrum et al. WCLOUDVIZ: Word cloud visualization of Indonesian news articles classification based on Latent dirichlet allocation
JP2016027493A (en) Document classification support device, document classification support method, and document classification support program
KR102649429B1 (en) Method and system for extracting information from semi-structured documents
JP7453731B2 (en) Method and system for extracting information from semi-structured documents
KR20220143538A (en) Method and system for extracting information from semi-structured documents
CN113627173A (en) Manufacturer name identification method and device, electronic equipment and readable medium
CN111090743A (en) Thesis recommendation method and device based on word embedding and multi-valued form concept analysis
KR102655430B1 (en) Table gnerating method and system
US12032605B2 (en) Searchable data structure for electronic documents
US20240127577A1 (en) Generating templates using structure-based matching
US20230153335A1 (en) Searchable data structure for electronic documents

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right