KR20150013000A - Parallel tree labeling apparatus and method for massive XML document processing - Google Patents

Parallel tree labeling apparatus and method for massive XML document processing Download PDF

Info

Publication number
KR20150013000A
KR20150013000A KR1020140056817A KR20140056817A KR20150013000A KR 20150013000 A KR20150013000 A KR 20150013000A KR 1020140056817 A KR1020140056817 A KR 1020140056817A KR 20140056817 A KR20140056817 A KR 20140056817A KR 20150013000 A KR20150013000 A KR 20150013000A
Authority
KR
South Korea
Prior art keywords
labeling
label
data block
tag
partial
Prior art date
Application number
KR1020140056817A
Other languages
Korean (ko)
Inventor
이경하
최혜봉
박원주
조기성
류원
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to US14/444,089 priority Critical patent/US20150032764A1/en
Priority to DE102014110590.7A priority patent/DE102014110590A1/en
Publication of KR20150013000A publication Critical patent/KR20150013000A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/42Data-driven translation
    • G06F40/44Statistical methods, e.g. probability models

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The present invention relates to a parallel tree labeling apparatus of an XML document, and a method thereof. According to an embodiment of the present invention, the parallel tree labeling apparatus of the XML document includes: a data distribution unit which distributes the XML document into a plurality of data block units; and a labeling performing unit which receives the elements of the distributed data block, performs labeling of each data block in parallel, and combines a labeling performing result to generate a final labeling value.

Description

XML 문서의 병렬 트리 레이블링 장치 및 그 방법 {Parallel tree labeling apparatus and method for massive XML document processing}[0001] The present invention relates to a parallel tree labeling apparatus and method for XML document,

본 발명은 데이터 처리기술에 관한 것으로, 보다 상세하게는 XML 데이터의 레이블링 기술에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing technique, and more particularly, to a labeling technique of XML data.

확장성 마크업언어(eXtensible Markup Language: XML, 이하 XML이라 칭함)로 작성되는 데이터 또는 문서는 데이터 자체 외에 태그들, 그리고 태그들 간의 중첩 관계를 통한 구조정보(structural information)를 갖는다. XML 데이터에 대한 질의는 데이터 자체에 대한 질의 이외에 이러한 구조정보를 포함하는 구조 질의(structured query)의 형태를 갖는다. Data or documents created with extensible Markup Language (XML) have structural information through tags, and overlapping relationships between tags. Queries on XML data are in the form of structured queries that contain such structural information in addition to querying the data itself.

트리 레이블링 기법(tree labeling scheme)은 XML 문서에 대한 구조 질의의 처리에 있어 부모-자식, 조상-후손 관계 등과 같은 엘리먼트(element) 간 관계성을 빠르게 식별하는데 도움이 되는 값을 각 엘리먼트마다 부여하는 방법이다. XML로 작성된 데이터에 대한 구조 질의를 효과적으로 처리하기 위한 XML 레이블링 기법들 중에 구간 기반(interval-based) 레이블링 기법과 접두어 기반(prefix-based labeling) 레이블링 기법이 널리 사용되고 있다.The tree labeling scheme provides a value for each element that helps to quickly identify the relationships between elements, such as parent-child, ancestor-descendant relationships, in the processing of structured queries against XML documents Method. Interval-based and prefix-based labeling techniques are widely used among XML labeling techniques to efficiently process structure queries on data written in XML.

일 실시 예에 따라, XML 문서에 대한 효과적인 질의 처리를 위해 요구되는 트리 레이블링 과정의 빠른 처리를 위한 대용량 XML 문서의 병렬 트리 레이블링 장치 및 그 방법을 제안한다.According to one embodiment, a parallel tree labeling apparatus and method for large-capacity XML documents for fast processing of a tree labeling process required for effective query processing on an XML document are proposed.

일 실시 예에 따른 XML 문서의 병렬 트리 레이블링 장치는 XML 문서를 다수의 데이터 블록 단위로 분할하는 데이터 분산부와, 분할된 데이터 블록의 엘리먼트들을 입력받아 각 데이터 블록을 대상으로 병렬로 레이블링을 수행하고 레이블링 수행 결과를 결합하여 최종 레이블 값을 생성하는 레이블링 수행부를 포함한다.An apparatus for parallel tree labeling of an XML document according to an exemplary embodiment includes a data distributing unit for dividing an XML document into a plurality of data block units, a parallel labeling unit for receiving the elements of the divided data block, And a labeling execution unit for generating a final label value by combining the results of the labeling.

일 실시 예에 따른 레이블링 수행부는, 맵-리듀스 프로그래밍 모델에 따라 작성된 프로그램 또는 해당 프로그램의 기능을 수행하는 모듈이다. 레이블링 수행부는 할당된 데이터 블록 내 엘리먼트들에 대해서 부분적으로 레이블링을 수행하는 다수의 부분 레이블링부와, 각 부분 레이블링부에 의해 병렬로 레이블링된 부분 레이블들을 대상으로 셔플링을 통해 그룹화된 부분 레이블들을 수집하여 레이블을 완성하는 레이블링 완성부를 포함할 수 있다.The labeling performing unit according to an embodiment is a module that performs a program created according to the map-reduction programming model or a function of the program. The labeling performing unit includes a plurality of partial labeling units for performing partial labeling on the elements in the allocated data block, and a partial labeling unit for collecting partial labels grouped through shuffling for partial labels labeled in parallel by each partial labeling unit. And a labeling completion unit for completing the label.

일 실시 예에 따른 각 부분 레이블링부는, 할당된 데이터 블록에 대해서 부분 레이블링을 수행하고, 레이블링 완성부의 최종 레이블링 계산 시 레이블 결합 및 조정에 요구되는 오프셋 정보를 기록한다.Each partial labeling unit according to an embodiment performs partial labeling on the allocated data block and records offset information required for label combining and adjustment in the final labeling calculation of the label finishing unit.

일 실시 예에 따른 레이블링 완성부는, 부분 레이블들을 결합할 때 오프셋 정보를 이용하여 레이블 값을 보정함에 따라 최종 레이블을 완성하고, 오프셋 정보는 부분적으로 생성된 레이블들을 결합하여 최종 레이블 값을 생성하는 데 있어 보정을 위해 요구되는 정보를 가진 자료구조이다.The label completing unit according to an exemplary embodiment completes the final label by correcting the label value using the offset information when joining the partial labels, and the offset information combines the partially generated labels to generate the final label value It is a data structure with information required for correction.

일 실시 예에 따른 레이블링 완성부는, 부분 레이블들을 결합할 때 부분 레이블을 보정하기 위한 보정 연산자를 이용하여 레이블 값을 보정함에 따라 최종 레이블을 완성한다.The label finishing unit according to an embodiment completes the final label by correcting the label value using a correction operator for correcting the partial label when joining the partial labels.

일 실시 예에 따른 데이터 분산부는, 데이터 블록 기반의 데이터 복제를 지원하는 분산 파일 시스템에 XML 문서를 다수의 데이터 블록 단위로 분할하여 저장한다.The data distribution unit according to an embodiment divides an XML document into a plurality of data block units and stores the XML document in a distributed file system supporting data block-based data replication.

일 실시 예에 따른 XML 문서의 병렬 트리 레이블링 장치는, 데이터 분산부를 통해 분할된 XML 문서를 읽어들여 각 데이터 블록 내에서 태그 명 별로 문서 내 엘리먼트들의 출현횟수 정보를 집계하는 통계 처리부를 더 포함한다.An apparatus for parallel tree labeling of an XML document according to an embodiment further includes a statistical processing unit for reading an XML document divided through a data distribution unit and counting the number of occurrences of elements in a document for each tag name in each data block.

일 실시 예에 따른 통계 처리부는, 데이터 블록을 읽어들여 읽어들인 데이터 블록 내에 위치하는 엘리먼트들에 대해서 동일한 태그 명을 가진 엘리먼트들의 출현횟수를 측정하는 다수의 태그 명 출현횟수 측정부와, 각 태그 명 출현횟수 측정부가 계산한 출현횟수 정보들을 입력받아 문서 내에서 태그 명 별로 엘리먼트들의 출현횟수를 집계하는 출현횟수 집계부를 포함한다.The statistical processing unit according to an embodiment includes a plurality of tag name occurrence count measurement units for measuring the number of occurrences of elements having the same tag name for the elements located in the data block in which the data block is read and read, And an appearance frequency counting unit for receiving the appearance frequency information calculated by the appearance frequency measuring unit and counting the appearance frequency of the elements in the document according to the tag name.

일 실시 예에 따른 XML 문서의 병렬 트리 레이블링 장치는, 통계 처리부의 출현횟수 집계 결과를 이용하여 레이블링 수행부의 각 태스크들이 서로 동일한 작업량을 가지도록 데이터 량을 분배하는 데이터 재분배부를 더 포함한다.The apparatus for parallel tree labeling of an XML document according to an embodiment further includes a data redistributing unit for distributing data amounts such that each task of the labeling performing unit has the same amount of work using the counting result of the number of occurrences of the statistics processing unit.

일 실시 예에 따른 데이터 재분배부는, 태그 명 별 엘리먼트의 문서 내 전체 출현횟수를 읽어들여 태그 명 별 엘리먼트들의 문서 내 출현횟수의 평균을 구하고, 태그 명 별 엘리먼트의 평균값을 가지고 이보다 크기가 큰 각 태그 명 별 엘리먼트 리스트를 다수의 엘리먼트 리스트로 분할하며, 분할된 엘리먼트 리스트에 파티션 키를 할당한다. 이때, 레이블링 수행부는 데이터 재분배부가 제공하는 파티션 키에 따라 셔플링하여 레이블 완성을 위한 태스크 별 작업량을 균등하게 할당할 수 있다.The data redistributing unit according to an embodiment reads the total number of occurrences of the element in the document by the tag name to obtain an average of the number of occurrences of the elements in the document by the tag name and obtains an average value of the elements per tag name, It divides the list of name elements into a list of elements, and assigns a partitioning key to the list of divided elements. At this time, the labeling performing unit may shuffle according to the partitioning key provided by the data redistributing unit and allocate the workload per task for label completion evenly.

다른 실시 예에 따른 XML 문서의 병렬 트리 레이블링 방법은, XML 문서를 다수의 데이터 블록 단위로 분할하는 단계와, 분할된 데이터 블록의 엘리먼트들을 입력받아 각 데이터 블록을 대상으로 병렬로 레이블링을 수행하고 레이블링 수행 결과를 결합하여 최종 레이블 값을 생성하는 단계를 포함한다.According to another aspect of the present invention, there is provided a method of parallel tree labeling of an XML document, the method comprising: dividing an XML document into a plurality of data block units; inputting elements of the divided data block, performing parallel labeling on each data block, And combining the execution results to generate a final label value.

대용량 XML 문서에 대하여 대표적인 레이블링 기법들인 구간-기반 레이블링 기법과 접두어-기반 레이블링 기법 모두에 있어서 병렬 처리를 통해 분산 환경에서 레이블링 과정을 효율적으로 수행할 수 있다. 특히, XML 문서에 대한 구조 질의 처리에 앞서 필수적인 전처리 과정인 레이블링 기법을 병렬화함으로써 빠른 전처리가 가능하다.The labeling process can be efficiently performed in the distributed environment through parallel processing in both the interval-based labeling technique and the prefix-based labeling technique, which are typical labeling techniques for large-capacity XML documents. In particular, it is possible to perform fast preprocessing by parallelizing the labeling technique, which is an essential preprocessing process, prior to the structure query processing of the XML document.

또한, 분산 노드들 간의 레이블링의 작업량의 균형을 맞출 수 있는 기술을 적용하여 작업량이 한 노드에 치우쳐 전체 시스템의 수행시간이 최종 노드의 수행시간에 따라 늦춰지는 현상을 방지할 수 있다.In addition, by applying a technique to balance the workload of labeling between distributed nodes, the workload is shifted to one node, and the execution time of the entire system can be prevented from being delayed according to the execution time of the final node.

나아가, 레이블링 병렬화를 수행함에 있어 XML 문서 내 엘리먼트들의 구조정보가 손실되지 않도록 보정함에 따라 직렬 알고리즘과 동일한 결과를 얻으면서도 병렬화를 통한 빠른 처리가 가능하다.Furthermore, in performing labeling parallelization, it is possible to perform fast processing through parallelization while obtaining the same result as the serial algorithm by correcting the structure information of the elements in the XML document so as not to be lost.

도 1은 본 발명의 이해를 돕기 위해 명세서 전반에서 예제로 사용되는 XML 문서의 구조도,
도 2 및 도 3은 도 1의 XML 문서가 갖는 구조정보를 대표하는 논리적인 트리 모델 상에서 구간-기반 레이블링 기법과 접두어-기반 레이블링 기법을 수행한 예를 각각 도시한 예시도,
도 4는 본 발명의 일 실시 예에 따른 병렬 트리 레이블링 장치의 구성도,
도 5는 본 발명의 일 실시 예에 따른 구간-기반 레이블링 기법을 이용한 병렬화 시의 부분 레이블링 방법을 도시한 흐름도,
도 6은 본 발명의 일 실시 예에 따른 구간-기반 레이블링 기법을 이용한 병렬화 시 레이블 완성 방법을 도시한 흐름도,
도 7a 및 도 7b는 본 발명의 일 실시 예에 따른 구간-기반 레이블링 기법을 본 발명의 시스템을 통해 병렬화하는 실시 예를 도시한 예시도,
도 8a 및 도 8b는 본 발명의 일 실시 예에 따른 접두어-기반 레이블링 기법을 본 발명의 시스템을 통해 병렬화하는 실시 예를 도시한 예시도이다.
FIG. 1 is a structural diagram of an XML document used as an example throughout the specification to help understand the present invention. FIG.
FIG. 2 and FIG. 3 illustrate examples of performing an interval-based labeling technique and a prefix-based labeling technique on a logical tree model representing structure information of the XML document of FIG. 1,
4 is a configuration diagram of a parallel tree labeling apparatus according to an embodiment of the present invention.
FIG. 5 is a flowchart illustrating a partial labeling method in parallelization using an interval-based labeling technique according to an embodiment of the present invention. FIG.
FIG. 6 is a flowchart illustrating a method of completing a label in a parallelization using an interval-based labeling technique according to an embodiment of the present invention. FIG.
7A and 7B illustrate an example of parallelizing an interval-based labeling technique according to an embodiment of the present invention through a system of the present invention;
8A and 8B illustrate an embodiment of parallelizing a prefix-based labeling scheme according to an embodiment of the present invention through a system of the present invention.

이하에서는 첨부한 도면을 참조하여 본 발명의 실시 예들을 상세히 설명한다. 본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 또한, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear. In addition, the terms described below are defined in consideration of the functions of the present invention, which may vary depending on the intention of the user, the operator, or the custom. Therefore, the definition should be based on the contents throughout this specification.

이하에서는 첨부한 도면을 참조하여 본 발명의 실시 예들을 상세히 설명한다. 본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 또한, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear. In addition, the terms described below are defined in consideration of the functions of the present invention, which may vary depending on the intention of the user, the operator, or the custom. Therefore, the definition should be based on the contents throughout this specification.

도 1은 본 발명의 이해를 돕기 위해 명세서 전반에서 예제로 사용되는 확장성 마크업언어(eXtensible markup language: XML, 이하 XML이라 칭함) 문서의 구조도이다.FIG. 1 is a structural diagram of an extensible markup language (XML) document used as an example throughout the specification to facilitate understanding of the present invention.

도 1을 참조하면, XML 문서(100)는 데이터 자체 외에 태그들, 그리고 태그들 간의 중첩 관계를 통한 구조정보(structural information)를 갖는다. XML 데이터에 대한 질의는 데이터 자체에 대한 질의 이외에 이러한 구조정보를 포함하는 구조 질의(structured query)의 형태를 갖는다.Referring to FIG. 1, the XML document 100 has tags, as well as data itself, and structural information through a superposition relationship between the tags. Queries on XML data are in the form of structured queries that contain such structural information in addition to querying the data itself.

XML 문서(100)에서 엘리먼트는 시작 태그와 종료 태그로 구성된다. 예를 들어, 도 1에 도시된 바와 같이 quantity 엘리먼트(101)는 <quantity> 시작(start) 태그와 </quantity> 종료(end) 태그로 구성되며, 레이블(label)은 엘리먼트 단위로 부여된다. In the XML document 100, an element is composed of a start tag and an end tag. For example, as shown in FIG. 1, the quantity element 101 is composed of a <quantity> start tag and a </ quantity> end tag, and a label is given in units of elements.

도 2 및 도 3은 도 1의 XML 문서(100)가 갖는 구조정보를 대표하는 논리적인 트리 모델 상에서 구간-기반 레이블링 기법(210)과 접두어-기반 레이블링 기법(320)을 수행한 예를 각각 도시한 예시도이다.FIGS. 2 and 3 illustrate examples of performing the section-based labeling technique 210 and the prefix-based labeling technique 320 on a logical tree model representing structure information of the XML document 100 of FIG. It is an example.

도 1과 도 2를 참조하면, 구간 기반 레이블링 기법(210)은 부모 또는 조상 엘리먼트들의 구간이 자식 또는 후손 엘리먼트의 구간을 포함하는 방식으로 구성된다. 두 엘리먼트 간의 관계는 두 엘리먼트에 할당된 구간들이 서로 포함 관계가 있는지 여부를 통해 판별된다. Referring to FIGS. 1 and 2, the interval based labeling scheme 210 is configured in such a manner that a section of a parent or ancestor elements includes a section of a child or a descendant element. The relationship between two elements is determined by whether or not the intervals allocated to the two elements are related to each other.

예를 들어, 도 1의 XML 문서(100)에서 Africa 엘리먼트(102)는 Region 엘리먼트(103) 안에 포함되어 부모-자식 관계를 갖는다. 따라서, 도 2에 도시된 바와 같이, Africa 엘리먼트(102)의 구간 <2, 15>(211)이 Region 엘리먼트의 구간 <1, 24>(212)에 포함되는 방식으로 표기된다. 추가로 구간-기반 레이블링 기법(210)에서 레이블은 부모-자식, 조상-후손 관계를 식별하기 위해 레벨(level) 값을 갖는다. 예를 들어, Region 엘리먼트의 레이블 값 <1, 24, 1>(212)에서 마지막 1은 트리 구조에서 해당 엘리먼트의 레벨 값이다. 따라서, 각 엘리먼트의 레이블 값은 <시작 태그(start), 종료 태그(end), 레벨(level)>로 구성된다.For example, in the XML document 100 of FIG. 1, the Africa element 102 is included in the Region element 103 and has a parent-child relationship. Therefore, as shown in FIG. 2, the interval <2, 15> 211 of the Africa element 102 is represented in a manner that it is included in the interval <1, 24> 212 of the Region element. In addition, in the interval-based labeling scheme 210, labels have level values to identify parent-child, ancestor-descendant relationships. For example, the last 1 in the label value <1, 24, 1> (212) of the Region element is the level value of the corresponding element in the tree structure. Therefore, the label value of each element is composed of < start tag, end tag, and level.

도 1과 도 3을 참조하면, 접두어 기반 레이블링 기법(320)은 하나의 엘리먼트 레이블은 그 엘리먼트의 부모 또는 조상 엘리먼트의 레이블 값을 접두어로 하여 레이블 값을 갖도록 고안된 기법이다. 레이블 값에서 접두어를 하나씩 분해함으로써 특정 엘리먼트의 부모와 조상 엘리먼트들이 무엇인지 파악이 가능하다. 예를 들어, 첫 번째 quantity 엘리먼트의 접두어-기반 레이블 값은 1.1.1.1 (321)로 할당되어 있는데, 이를 통해 이 엘리먼트의 부모 엘리먼트는 1.1.1로 레이블링된 엘리먼트인 첫 번째 item 엘리먼트(322), 그 위의 조상 엘리먼트들은 각각 1.1과 1의 레이블 값을 가지는 Africa(323)와 Region(324) 엘리먼트임을 확인할 수 있다.Referring to FIGS. 1 and 3, the prefix-based labeling technique 320 is a technique in which one element label is designed to have a label value by prefixing the label value of the parent element or ancestor element of the element. By separating the prefixes one by one from the label value, it is possible to know what the parent and ancestor elements of a particular element are. For example, the prefix-based label value of the first quantity element is assigned to 1.1.1.1 (321), whereby the parent element of this element is the first item element (322), which is the element labeled 1.1.1, We can see that the ancestor elements above are Africa (323) and Region (324) elements with label values of 1.1 and 1, respectively.

도 2와 도 3을 참조로 하여 전술한 구간-기반 레이블링 기법(210)과 접두어-기반 레이블링 기법(320)은 모두 직렬(serial) 기반 알고리즘을 따른다. 즉, XML 문서 내에서 각 엘리먼트들을 순차적으로 읽으면서 차례대로 레이블 값을 부여하는 방식을 취한다. 그런데, XML 문서들은 점점 그 크기가 대용량화되고 있고 그 숫자 또한 급증하고 있어서, 직렬 기반 알고리즘으로는 주어진 시간 내에 신속하게 레이블링을 완료하기 어려워 매우 긴 시간을 필요로 한다. 본 발명은 전술한 문제를 해결하기 위해 XML 문서에 대한 레이블링을 병렬화(parallelization)함으로써 신속한 처리를 달성하고자 한다. 본 발명은 특히 대용량 XML 문서의 레이블링에 유용하다. 이하, 후술되는 도면들을 참조로 하여 본 발명의 대용량 XML 문서에 대한 효율적인 병렬 레이블링 기법에 대하여 상세히 설명한다.Both the interval-based labeling technique 210 and the prefix-based labeling technique 320 described above with reference to FIGS. 2 and 3 follow a serial-based algorithm. That is, a method of sequentially reading each element in an XML document and sequentially assigning a label value is adopted. By the way, XML documents are getting bigger in size and their numbers are soaring, and serial-based algorithms require very long time to complete labeling quickly within a given time. The present invention seeks to achieve rapid processing by parallelizing the labeling of XML documents to solve the above-mentioned problems. The present invention is particularly useful for labeling large XML documents. Hereinafter, an efficient parallel labeling technique for a large capacity XML document of the present invention will be described in detail with reference to the following drawings.

도 4는 본 발명의 일 실시 예에 따른 병렬 트리 레이블링 장치의 구성도이다.4 is a block diagram of a parallel tree labeling apparatus according to an embodiment of the present invention.

도 4를 참조하면, 병렬 트리 레이블링 장치(4)는 데이터 분산부(410)와 레이블링 수행부(450)를 포함하며, 분산 파일 시스템(420), 통계 처리부(440), 레이블링 수행부(450) 및 데이터 재배분부(443)를 더 포함할 수 있다.4, the parallel tree labeling apparatus 4 includes a data distribution unit 410 and a labeling execution unit 450. The parallel tree labeling apparatus 4 includes a distributed file system 420, a statistical processing unit 440, a labeling performing unit 450, And a data redistributing unit 443.

데이터 분산부(410)는 XML 문서(400)를 다수의 데이터 블록 단위로 분할한다. 이때, 분산 파일 시스템(420)에 XML 문서(400)를 분산하여 저장할 수 있다. 분산 파일 시스템(420)은 레이블링을 수행하고자 하는 XML 문서(400)를 저장하기 위한 블록 기반의 데이터 복제를 지원한다. 이때, XML 문서(400)의 저장은 분산 파일 시스템(420)에 단순히 해당 파일을 적재하는 것만으로 달성되며, 고정 크기의 여러 블록들로 나뉘어 분산 저장이 가능하다. 예를 들어, 분산 파일 시스템에 데이터가 n개의 데이터 블록들(430-1,430-2,…,430-n)로 분산되어 적재된다.The data distribution unit 410 divides the XML document 400 into a plurality of data block units. At this time, the XML document 400 may be distributed and stored in the distributed file system 420. The distributed file system 420 supports block-based data replication for storing the XML document 400 for which labeling is to be performed. At this time, the storage of the XML document 400 is accomplished by merely loading the corresponding file in the distributed file system 420, and the XML document 400 can be distributed and stored in a plurality of blocks of a fixed size. For example, in the distributed file system, data is distributed and distributed into n data blocks 430-1, 430-2, ..., 430-n.

일 실시 예에 따른 데이터 분산부(410)는 구글 파일 시스템(Google File System: GFS), 하둡 분산파일 시스템(Hadoop Distributed File System: HDFS) 등과 같은 분산 파일 시스템(420)에 XML 문서(400)를 고정 크기의 데이터 블록들로 분할하여 분산 저장한다.The data distributor 410 according to an embodiment distributes an XML document 400 to a distributed file system 420 such as a Google File System (GFS), a Hadoop Distributed File System (HDFS) The data blocks are divided into fixed size data blocks and distributed.

레이블링 수행부(450)는 데이터 분산부(410)를 통해 분리된 데이터 블록 별로 XML 문서의 엘리먼트들을 입력받아 엘리먼트들의 부분집합들을 가지고 각각 병렬적으로 레이블링을 수행하고, 이후 부분 레이블링 결과들을 결합하여 최종 레이블 값(460)을 생성한다.The labeling performing unit 450 receives the elements of the XML document for each of the separated data blocks through the data distribution unit 410 and performs labeling in parallel on each of the subset of elements, Label value 460 is generated.

일 실시 예에 따른 레이블링 수행부(450)는 부분 레이블링부(451)와 레이블링 완성부(453)를 포함하는 하나의 맵리듀스(MapReduce) 기반의 프로그램 또는 해당 기능을 갖는 모듈이다. 맵리듀스는 병렬 프로그래밍 모델이자 이를 지원하는 시스템으로, 맵(Map)과 리듀스(Reduce)의 두 함수만을 이용하여 데이터를 분할 및 병렬 처리하는 방법을 제공한다. 맵리듀스로 작성된 프로그램은 고정 크기의 블록 단위로 분할된 데이터를 각 태스크들이 읽어서 Map() 함수를 수행하고 이들을 키 값 별로 모아 다음 단계에서 Reduce() 함수를 적용하여 집계함으로써 최종 결과를 얻는 방식으로 수행된다. The labeling performing unit 450 according to one embodiment is a single MapReduce-based program including the partial labeling unit 451 and the labeling completion unit 453 or a module having the corresponding function. MapReduce is a parallel programming model and a system that supports it. It provides a way to split and parallelize data using only two functions, Map and Reduce. A program written in MapReduce is a method in which each task reads data divided into fixed size block units, performs Map () function, collects them according to key values, and calculates the final result by applying Reduce () function in the next step .

각 부분 레이블링부(451-1,451-2,…,452-n)는 한번에 하나의 데이터 블록을 입력받아 이 데이터 블록에 있는 엘리먼트들에 대해서만 독립적으로 레이블링을 수행하며, Map() 함수 기반으로 작성된다. 각 부분 레이블링부(451-1,451-2,…,452-n)를 통해 작성된 부분 레이블 값들은 맵리듀스 프로그래밍 모델에 따라 파티션 키 값을 기준으로 셔플링(452)되어 레이블링 완성부(453)로 전달될 수 있다. 레이블링 완성부(453)는 각 태그 명 또는 파티션 키 별로 부분 레이블 값들을 수집하여 레이블 값들을 결합하고, 최종 레이블 값을 출력하는 Reduce() 함수 기반으로 동작되는 모듈이다. 레이블링 수행부(450)의 부분 레이블링부(451)와 레이블링 완성부(453)는 복수 개로 구성되어 병렬 처리한다.Each of the partial labeling units 451-1, 451-2, ..., and 452-n receives one data block at a time, performs labeling independently for the elements in the data block, and is created based on the Map () function . The partial label values created through the partial labeling units 451-1, 451-2, ..., and 452-n are shuffled 452 based on the partition key value according to the MapReduce programming model and are transmitted to the labeling completion unit 453 . The labeling completion unit 453 is a module based on a Reduce () function that collects partial label values for each tag name or partition key, combines label values, and outputs a final label value. The partial labeling unit 451 and the labeling completion unit 453 of the labeling performing unit 450 are constituted by a plurality of parallel processing units.

맵리듀스를 이용한 병렬화 수행에 있어서, XML 문서는 구조정보를 포함하고 있어 단순히 데이터를 분할하는 경우에는 구조정보가 손실될 우려가 있다. 예를 들어, 부모-자식 관계로 엮인 두 엘리먼트들이 서로 다른 데이터 블록으로 분할되면 이 관계가 깨지게 되면서, 두 엘리먼트 간에 부모-자식 관계를 가짐을 알 수 없게 된다. 그러나, 본 발명의 레이블링 수행부(450)는 레이블링 병렬화를 수행함에 있어 XML 문서 내 엘리먼트들의 구조정보가 손실되지 않게 함으로써 직렬 알고리즘과 동일한 결과를 얻으면서도 병렬화를 통한 빠른 처리가 가능하다. 예를 들어, 레이블링 수행부(450)는 부분 레이블들을 결합할 때 오프셋 정보 또는 보정 연산자를 이용하여 부분 레이블들을 보정함에 따라 직렬로 레이블링을 수행한 결과와 동일한 결과를 얻도록 최종 레이블을 완성한다.In performing parallelization using MapReduce, an XML document includes structure information, so that there is a fear that structural information is lost when simply dividing data. For example, if two elements in a parent-child relationship are divided into different data blocks, this relationship will be broken, and it will not be known that there is a parent-child relationship between the two elements. However, in performing labeling parallelization, the labeling implementer 450 of the present invention can achieve fast processing through parallelization while obtaining the same result as the serial algorithm by preventing the structure information of the elements in the XML document from being lost. For example, the labeling performing unit 450 completes the final label to obtain the same result as the serial labeling by correcting the partial labels using the offset information or the correction operator when combining the partial labels.

통계 처리부(440)는 분산 파일 시스템(420)에 블록 단위로 나뉘어 저장된 데이터 블록들(430-1,430-2,…,430-n)을 읽어들여 각 데이터 블록을 대상으로 태그 명 별로 엘리먼트들의 문서 내 출현횟수를 집계한다.The statistical processing unit 440 reads the data blocks 430-1, 430-2, ..., 430-n stored in the distributed file system 420 on a block basis and stores the data blocks in the document The number of occurrences is counted.

일 실시 예에 따른 통계 처리부(440)는 그 자체가 하나의 맵리듀스 프로그래밍 모델에 따라 작성된 프로그램 또는 해당 프로그램의 기능을 수행하는 모듈로서, 태그 명 출현횟수 측정부(441)와 출현횟수 집계부(442)를 포함한다. 태그 명 출현횟수 측정부(441)는 매퍼(mapper)의 기능을, 출현횟수 집계부(442)는 리듀서(reducer)의 기능을 수행한다.The statistical processing unit 440 according to an exemplary embodiment of the present invention is a module that performs the functions of the program or the program created according to one mapping rule programming model. The statistics processing unit 440 includes a tag name appearance count measurement unit 441 and an appearance count aggregation unit 442). The tag name occurrence frequency measurement unit 441 functions as a mapper and the occurrence frequency count unit 442 functions as a reducer.

태그 명 출현횟수 측정부(441)는 Map() 함수 기반으로, 통계 처리부(440) 내에 n개(441-1,441-2,…,441-n)가 형성되어 해당 기능을 동시에 병렬 수행한다. 각 태그 명 출현횟수 측정부(441-1,441-2,…,441-n)는 각자의 데이터 블록(430-1,430-2,…,430-n)을 읽어 들여 그 데이터 블록 내에 위치하는 엘리먼트들에 대해서 동일한 태그 명을 가지는 엘리먼트들의 출현횟수를 측정한다.The tag name occurrence count measuring unit 441 is based on a Map () function, and n (441-1, 441-2, ..., 441-n) are formed in the statistical processing unit 440 so that the corresponding functions are simultaneously performed in parallel. Each of the tag name occurrence count measurement units 441-1, 441-2, ..., and 441-n reads the respective data blocks 430-1, 430-2, ..., and 430-n, The number of occurrences of elements having the same tag name is measured.

출현횟수 집계부(442)는 Reduce() 함수 기반으로, 태그 명 출현횟수 측정부들(441-1,441-2,…,441-n)이 계산한 출현횟수 정보를 수집하고, 최종적으로 XML 문서(400) 내에서 각 태그 명 별 엘리먼트들의 출현횟수를 집계하며 이를 데이터 재배분부(443)에 전달한다. 출현횟수 집계부(442)는 통계 처리부(443) 내에 하나 존재하며, 모든 태그 명 출현횟수 측정부들(441-1,441-2,…,441-n)의 출력이 출현횟수 집계부(442)의 입력으로 전달된다.The appearance count aggregation unit 442 collects the occurrence count information calculated by the tag name occurrence count measurement units 441-1, 441-2, ..., 441-n on the basis of the Reduce () function, ), And transmits the counted number of occurrences of the elements to the data redistributing unit 443. The occurrence count aggregation unit 442 is one in the statistical processing unit 443. The output count of all the tag name occurrence count measurement units 441-1, 441-2, ..., 441-n is input to the occurrence count aggregation unit 442 .

데이터 재배분부(443)는 통계 처리부(440)의 출현횟수 집계 결과에 따라 레이블링 수행부(450)의 각 태스크들이 서로 동일한 작업량을 가지도록 입력 데이터 량을 조정한다. 이를 위해 데이터 재배분부(443)는 통계 처리부(440)에서 태그 명 별 엘리먼트들의 출현빈도 통계를 수신하고, 이를 이용하여 실제 레이블링을 수행하는 레이블링 수행부(450)에서 레이블링 완성부(453)에 할당되는 작업량이 서로 균등하도록 배분한다.The data re-distribution unit 443 adjusts the amount of input data so that each task of the labeling execution unit 450 has the same amount of work according to the counting result of the number of occurrences of the statistical processing unit 440. To this end, the data re-distribution unit 443 receives the appearance frequency statistics of the elements by the tag name in the statistical processing unit 440, and assigns it to the labeling completion unit 453 in the labeling execution unit 450 performing the actual labeling So that the workloads are equal to each other.

맵리듀스는 프로그래밍 모델의 단순함과 병렬 처리의 많은 부분을 시스템에서 담당해주는 편리성으로 인해 많이 이용되고 있다. 그러나, 특정 태스크에 처리할 데이터가 편향되어 몰리거나 특정 태스크의 종료가 현저하게 늦은 경우 전체 프로그램의 종료시간 또한 해당 태스크의 종료에 따라 같이 늦어지는 문제를 내포하고 있다. 특히, 태그 명 별로 셔플링을 수행하는 경우 리듀스 과정의 입력 데이터 량의 차이가 매우 크게 되어, 이로 인해 어느 한 태스크의 종료시간이 매우 길게 되면서 전체 작업시간이 그만큼 늘어나게 된다. 일 실시 예에 따른 데이터 재분배부(443)는 태스크 간의 레이블링 작업량의 균형을 맞출 수 있는 기술을 적용하여 작업량이 한 태스크에 치우쳐 전체 시스템의 수행시간이 최종 태스크의 수행시간에 따라 늦춰지는 현상을 방지한다.MapReduce is widely used because of the simplicity of the programming model and the convenience of handling many parts of the parallel processing in the system. However, when the data to be processed for a specific task is biased or the end of a specific task is significantly late, the end time of the entire program is also delayed according to the end of the task. In particular, when shuffling is performed for each tag name, the difference in the amount of input data in the redescription process becomes very large. As a result, the end time of one task becomes very long, and the total work time increases accordingly. The data redistributing unit 443 according to an embodiment applies a technique of balancing the labeling workload between tasks so that the workload is shifted to one task, thereby preventing the execution time of the entire system from being delayed according to the execution time of the final task do.

이를 위해, 일 실시 예에 따른 데이터 재배분부(443)는 전체 태그 명 별 엘리먼트들의 출현빈도 통계 값을 입력 받아 이에 대한 평균값을 구한다. 그리고, 출현빈도 통계 값이 평균값을 상회하는 태그 명에 대해서는 엘리먼트들을 분할한다. 예를 들어, A라는 태그 이름에 대한 엘리먼트의 출현빈도 값이 200이고 출현빈도 평균값이 100이라면, 이들을 둘로 분할하여 A_1 태그 명에 대한 100개의 엘리먼트, A_2 태그 명에 대한 100개의 엘리먼트를 구성한다. 그리고, A_1, A_2 태그 명에 대한 엘리먼트는 사실상 A 태그 명에 대한 엘리먼트 하나를 지칭함을 맵 자료 구조를 이용하여 기록하고, 이를 레이블링 수행부(450)에 전달한다. 이 분할을 위해 사용되는 A_1, A_2를 파티션 키라고 명명하고, 레이블링 수행부(450)는 부분 레이블링부(451)에서 파티션 키에 따른 셔플링(452)을 통해 레이블링 완성부(453)에 레이블 값을 전달한다.To this end, the data re-distribution unit 443 according to an exemplary embodiment receives the appearance frequency statistical values of the elements of all the tag names, and obtains an average value thereof. Then, the elements are divided for tag names whose appearance frequency statistics exceed the average value. For example, if the appearance frequency of the element for the tag name A is 200 and the average value of the appearance frequency is 100, then divide them by two to construct 100 elements for the A_1 tag name and 100 elements for the A_2 tag name. The element for the A_1 and A_2 tag names actually records one element for the A tag name by using the map data structure and delivers it to the labeling execution unit 450. [ A_1 and A_2 used for this division are called partitioning keys and the labeling performing unit 450 causes the labeling completion unit 453 to output the label value .

도 5는 본 발명의 일 실시 예에 따른 구간-기반 레이블링 기법을 이용한 병렬화 시의 부분 레이블링 방법을 도시한 흐름도이다.FIG. 5 is a flowchart illustrating a partial labeling method in parallelization using an interval-based labeling technique according to an embodiment of the present invention.

도 4와 도 5를 참조하면, 각 부분 레이블링부(451-1,451-2,…,452-n)는 레이블링 수행을 위해 $Count와 $Level 변수와 스택 1개를 갖는다. 각 부분 레이블링부(451-1,451-2,…,452-n)는 하나의 데이터 블록을 입력받고, 이를 읽기 전에 먼저 스택을 초기화하고 $Count 변수와 $Level 변수를 0으로 설정한다(501).Referring to FIGS. 4 and 5, each of the partial labeling units 451-1, 451-2,..., 452-n has a $ Count, a $ Level variable, and a stack for labeling. Each of the partial labeling units 451-1, 451-2,..., 452-n receives one data block and initializes the stack before reading it, and sets $ Count variable and $ Level variable to 0 (501).

이어서, 입력 받은 데이터 블록의 모든 태그를 하나씩 차례로 읽어 들이고, 태그 하나를 읽어들이면 $Count 값을 1 증가시킨다(502). 그리고 해당 태그가 시작 태그인지 종료 태그인지 여부를 판단한다(511).Then, all the tags of the input data block are read one by one, and when one tag is read, the $ Count value is incremented by 1 (502). It is determined whether the tag is a start tag or an end tag (511).

임의의 태그 x가 시작 태그이면, $level 값을 1 증가시키고, 새 레이블 L을 현재의 변수 값들을 이용하여 생성한 후 생성된 새 레이블 L($Count, _, $level)을 바로 스택에 넣는다(push)(503). 이때 구간-기반 레이블 값 중 end 값은 기재하지 않는다.If an arbitrary tag x is a start tag, the $ level value is incremented by 1, a new label L is generated using the current variable values, and a new label L ($ Count, _, $ level) (push) 503. At this time, the end value of the interval-based label value is not described.

임의의 태그 x가 종료 태그이면, $level 값을 1 감소시키고(504), 현재 스택이 비어있는지를 검사한다(512). 스택이 비어있는 경우, 새 레이블 L을 현재의 $count, $level 값을 가지고 생성한다(505). 이때, 레이블 L의 start 값은 기재하지 않는다(_, $Count, $level). 스택이 비어있지 않은 경우, 스택에 저장된 레이블 1개를 추출(pop)한 후 이 레이블의 end 값을 현재의 $count 값으로 설정한다(506).If an arbitrary tag x is an end tag, the $ level value is decremented by 1 (504) and the current stack is checked to see if it is empty (512). If the stack is empty, a new label L is created with the current $ count, $ level values (505). At this time, the start value of label L is not described (_, $ Count, $ level). If the stack is not empty, pop one label stored in the stack and set the end value of this label to the current $ count value (506).

이어서, 두 경우(505,506) 모두 종료 전에 레이블 값을 키-값 쌍(K, L)으로 출력한다(507). 키(K)는 태그 명 또는 데이터 재분배부(443)를 통해 생성된 파티션 키고, 값(L)은 계산된 레이블과 결합에 요구되는 다른 값들의 집합이다.Then, in both cases 505 and 506, the label value is output as the key-value pair (K, L) before termination (507). The key K is the partition name generated by the tag name or data redistributor 443, and the value L is a set of calculated labels and other values required for association.

전술한 레이블 생성 프로세스는 데이터 블록에 아직까지 읽지 않은 태그가 존재하는 한 계속 반복된다(508). 만약 데이터 블록 내 모든 태그를 읽었다면, 스택에 저장된 레이블들을 모두 출력한다(509). 그리고, 현재의 $count, $level 변수 값을, 처리한 데이터 블록 식별자(Id)와 함께 오프셋 정보(블록 Id, $count, $level)로 기록한다(510). 오프셋 정보의 실시 예는 도 7a 및 도 7b를 참조로 후술한다.The above-described label generation process is repeated 508 as long as there are still unread tags in the data block. If all the tags in the data block have been read, all the labels stored in the stack are output (509). Then, the current values of the $ count and $ level variables are recorded as offset information (block Id, $ count, $ level) together with the processed data block identifier (Id) (510). An embodiment of the offset information will be described later with reference to Figs. 7A and 7B.

도 6은 본 발명의 일 실시 예에 따른 구간-기반 레이블링 기법을 이용한 병렬화 시 레이블 완성 방법을 도시한 흐름도이다.6 is a flowchart illustrating a method of completing a label in a parallelization using an interval-based labeling technique according to an embodiment of the present invention.

도 4와 도 6을 참조하면, 레이블링 완성부(453)는 태그 명 또는 파티션 키 별로 수집된 부분 레이블들을 결합하기 위해 다음의 프로세스를 수행한다.Referring to FIGS. 4 and 6, the label finishing unit 453 performs the following process to combine the partial labels collected by the tag name or the partition key.

먼저, 분산 파일 시스템(420)에서 각 데이터 블록 별로 생성된 오프셋 정보를 읽어들여 오프셋 테이블을 생성한다(601). 오프셋 테이블은 부분적으로 생성된 레이블들을 결합하여 최종 레이블 값을 생성하는 데 있어 보정을 위해 요구되는 정보를 담은 자료구조이다. 예를 들어, 구간-기반 레이블링을 위한 오프셋 테이블은 count와 level로 이루어진 2개의 컬럼 값을 갖는 테이블의 구조를 갖는다. 오프셋 테이블의 count 컬럼 값은 첫 번째 행은 0이고, i번째 행의 값은 1번부터 i-1 번째까지의 오프셋 정보 중 $count 값들을 합한 값이다. 마찬가지로, 오프셋 테이블의 level 컬럼 값은 첫 번째 행 값은 0이고, i 번째 행의 값은 첫 번째 데이터 블록부터 i-1 번째까지의 데이터 블록에 해당하는 오프셋 정보들 중 $level 값들을 합한 값이다. 예를 들어, 오프셋 정보의 첫 번째 데이터 블록의 $count 값이 8이고 $level 값이 2인 경우, 오프셋 테이블의 두 번째 행의 count 컬럼 값과 level 컬럼 값은 각각 0에서 8과 2를 더한 8과 2이다.First, in the distributed file system 420, offset information generated for each data block is read and an offset table is created (601). The offset table is a data structure that contains the information required for calibration to combine partially generated labels to produce a final label value. For example, the offset table for interval-based labeling has a table structure with two column values of count and level. The count column value of the offset table is 0 in the first row, and the value of the i-th row is a sum of $ count values of offset information from 1 to i-1. Similarly, the level column value of the offset table is the value of the first row is 0, and the value of the i-th row is the sum of the $ level values of the offset information corresponding to the data block from the first data block to the i-1th data block . For example, if the $ count value of the first data block of the offset information is 8 and the $ level value is 2, the count column value and the level column value of the second row of the offset table are 8 And two.

이어서, 레이블링 완성부(453)는 스택을 초기화(601)하고, 특정 태그 명에 대한 부분 레이블 값들을 입력받는다. 그리고 해당 레이블이 어느 데이터 블록으로부터 왔는지를 알 수 있도록 키 값에서 블록 Id를 추출하여 변수 $i에 할당한다(602). 이어서, 각 부분 레이블들에 대하여 모든 부분 레이블들을 처리할 때까지 다음의 프로세스를 반복한다. Next, the label completion unit 453 initializes the stack 601 and receives partial label values for a specific tag name. Then, the block ID is extracted from the key value so as to know which data block the label comes from, and allocated to the variable $ i (602). The following process is then repeated until all partial labels have been processed for each partial label.

우선, 소정의 레이블 L이 end 값이 지정되어 있지 않은 레이블인지, start 값이 지정되어 있지 않은 레이블인지 여부를 판단한다(604,606). First, it is determined whether a predetermined label L is a label for which an end value is not specified or a start value is not specified (604, 606).

소정의 레이블 L이 end 값이 지정되어 있지 않은 레이블이면, 해당 레이블의 start 값(L.start)에 오프셋 테이블의 i-번째 행의 count 값(Ti.count)을, L의 level 값(L.level)에 오프셋 테이블의 i-번째 행의 level 값(Ti.level)을 각각 더한다. 그리고, 구한 레이블 L을 스택에 삽입한다(push)(605). 예를 들어, region 엘리먼트 중 하나의 레이블은 <1, x, 1> 1로, end 값이 지정되어 있지 않은 레이블이다. 이 경우, 해당 레이블의 start 값(L.start)에 오프셋 테이블의 1번째 행의 count 값(T1.count)인 0을 더하고, level 값(L.level)에 오프셋 테이블의 1번째 행의 level 값(T1.level)인 0을 각각 더하여 레이블 <1, x, 1>을 생성한다.If a predetermined label L is a label to which an end value is not specified, the count value (T i . Count) of the i-th row of the offset table is set to the start value (L.start) .level) is added to the level value (T i .level) of the i -th row of the offset table, respectively. Then, the obtained label L is inserted into the stack (push) (605). For example, the label of one of the region elements is <1, x, 1> 1, with no end value specified. In this case, the count value (T 1. Count) of the first row of the offset table is added to the start value (L.start) of the corresponding label, and the level (L.level) (T 1 .level) are added to generate a label < 1, x, 1 &gt;.

소정의 레이블 L이 start 값이 지정되어 있지 않은 레이블이면, 해당 레이블의 end 값(L.end)에 오프셋 테이블의 i-번째 행의 count 값(Ti.count)을, L의 level 값(L.level)에 오프셋 테이블의 i-번째 행의 level 값(Ti.level)을 각각 더한다(608). 예를 들어, region 엘리먼트 중 하나의 레이블은 <x, 8, -1> 3으로, start 값이 지정되어 있지 않은 레이블이다. 이 경우 해당 레이블의 end 값(L.end)에 오프셋 테이블의 3번째 행의 count 값(T3.count)인 16을 더하고, level 값(L.level)에 오프셋 테이블의 3번째 행의 level 값(T3.level)인 2를 각각 더하여 레이블 <x,24,1>을 생성한다. 그리고, 스택에서 소정의 레이블 L’을 꺼내어(pop) 레이블 L과 결합(608)한 후 최종 레이블 값을 출력한다(609). 이때, 결합이란 간단하게 비어있는 L’의 end 값을 L의 end 값으로 설정하는 것으로 완료된다.(T i . Count) of the i-th row of the offset table to the end value (L.end) of the label and a level value (L (Level.level) of the i-th row of the offset table are added to the respective levels (T i .level) of the offset table (608). For example, the label of one of the region elements is <x, 8, -1> 3 and the start value is not specified. In this case, the end value (L.end) of the corresponding label is added to the count value (T 3. Count) of the third row of the offset table, and the level value (L.level) (T 3 .level) are added to generate a label <x, 24,1>. Then, a predetermined label L 'is extracted from the stack (pop), combined with the label L (608), and the final label value is output (609). At this time, the coupling is completed by simply setting the end value of L 'to the end value of L.

전술한 둘의 경우에 해당하지 않는다면, 레이블 L의 start 값(L.start)과 end 값(L.end)에 오프셋 테이블의 i-번째 행의 count 값(Ti.count)을 더하고, level 값(L.level)에 오프셋 테이블의 i-번째 행의 level 값(Ti.level)을 더하여 최종 레이블 L을 생성한다(607). 그리고, 해당 레이블 L을 출력한다(609). 예를 들어, item 엘리먼트 중 하나의 레이블은 <1, 6, 1> 2로 start 값, end 값이 지정된 레이블이고, 이 경우 해당 레이블의 start 값(L.start), end 값(L.end)에 오프셋 테이블의 2번째 행의 count 값(T2.count)인 8을 각각 더하고, level 값(L.level)에 오프셋 테이블의 2번째 행의 level 값(T2.level)인 2를 각각 더하여 레이블 <9, 14, 3>을 생성한다. 구간-기반 레이블링 기법에서의 최종 레이블 생성에 대한 실시 예는 도 7a 및 도 7b를 참조로 하여 상세히 후술한다.The count value (T i . Count) of the i-th row of the offset table is added to the start value (L.start) and the end value (L.end) of the label L, (T i .level) of the i -th row of the offset table is added to the last label (L.level) to generate a final label L (607). Then, the label L is output (609). For example, one of the item elements is a label with a start value and an end value of <1, 6, 1> 2. In this case, the start value (L.start), end value (L.end) (T 2. Count) of the second row of the offset table is added to the level value (L.level), and 2 is added to the level value (L.level), which is the level value (T 2 .level) of the second row of the offset table Labels <9, 14, 3>. An embodiment of final label generation in the interval-based labeling technique will be described in detail below with reference to FIGS. 7A and 7B.

도 7a 및 도 7b는 본 발명의 일 실시 예에 따른 구간-기반 레이블링 기법을 본 발명의 시스템을 통해 병렬화하는 실시 예를 도시한 예시도이다.FIGS. 7A and 7B are diagrams illustrating an example of parallelizing an interval-based labeling technique according to an embodiment of the present invention through a system of the present invention.

도 7a 및 도 7b를 참조하면, 일 실시 예에 따른 XML 문서(703)가 분산 파일 시스템에서 3개의 데이터 블록들(703-1,703-2,703-3)로 나뉘어 저장되는 경우, 각 부분 레이블링부(704-1,704-2,704-3)들은 각 데이터 블록을 입력받아 부분 레이블링을 수행하고 부분 레이블링 결과들(705)을 출력한다. 이때, 각 부분 레이블링부(704-1,704-2,704-3)는 각 데이터 블록에 대한 최종 $count, $level 값을 데이터 블록 ID와 함께 오프셋 정보로 분산 파일 시스템에 저장한다.7A and 7B, when an XML document 703 according to an embodiment is divided and stored in three data blocks 703-1, 703-2, and 703-3 in the distributed file system, each partial labeling unit 704 704-2, and 704-3) receives the data block, performs partial labeling, and outputs partial labeling results 705. FIG. At this time, the partial labeling units 704-1, 704-2, and 704-3 store the final $ count and $ level values for each data block in the distributed file system as offset information together with the data block ID.

예를 들어, 부분 레이블링부 1(704-1)는 데이터 블록 1(703-1)을 읽어들여 총 5개의 레이블을 출력한다. 이때, Africa 엘리먼트(706)와 region 엘리먼트(707)는 데이터 블록 1(703-1)에서 시작 태그만 존재하고 종료 태그는 존재하지 않는다. 따라서 Africa 엘리먼트(706)와 region 엘리먼트(707)에 대한 레이블들은 end 값이 설정되지 않는다. 마찬가지로, 두 엘리먼트에 대한 종료 태그가 데이터 블록 1(703-1) 내에 없으므로 종료 시 분산 파일 시스템에 기록될 $level 변수 값은 2로 설정된다. 또한 $count 변수 값은 태그의 유형과 상관없이 태그를 만나면 증가하므로 총 8개의 태그를 데이터 블록 1(703-1)에서 읽어들여서 8로 설정된다. For example, the partial labeling unit 1 704-1 reads the data block 1 703-1 and outputs a total of five labels. At this time, only the start tag exists in the data block 1 703-1 of the Africa element 706 and the region element 707, and there is no end tag. Therefore, the labels for the Africa element 706 and the region element 707 are not set to an end value. Similarly, since the end tag for the two elements is not in data block 1 703-1, the value of the $ level variable to be written to the distributed file system upon termination is set to two. Also, the $ count variable is incremented when a tag is encountered regardless of the type of the tag. Therefore, a total of 8 tags are read from the data block 1 (703-1) and set to 8.

데이터 블록 2(703-2)의 경우에는 Asia 엘리먼트(708)는 시작 태그는 존재하지만 종료 태그는 존재하지 않으므로 레이블의 end 값이 설정되지 않는다(710). 그러나, Africa 엘리먼트(709)의 경우 시작 태그가 데이터 블록 1(703-1)에서 출현하였으므로 데이터 블록 2(703-2)에서는 시작 태그를 가지지 않는다. 따라서, 데이터 블록 2(703-2)에서의 Africa 엘리먼트(709)는 레이블의 start 값이 설정되지 않은 채로 출력된다(711).In the case of data block 2 703-2, the end value of the label is not set 710 because the start tag exists in the Asia element 708 but the end tag does not exist. However, in the case of the Africa element 709, since the start tag appeared in the data block 1 703-1, the data block 2 703-2 has no start tag. Therefore, the Africa element 709 in the data block 2 703-2 is outputted without setting the start value of the label (711).

각 부분 레이블링부(704-1,704-2,704-3)의 출력은 참조부호 712에 도시된 바와 같이 키-값의 쌍들로 출력된다. 여기에서 키는 태그 명이고, 값은 레이블과 블록 Id의 조합이다. 부분 레이블 값들은 맵 리듀스 프로그래밍 모델에 따라 셔플링 과정을 거쳐 동일한 키, 즉 동일한 태그 명 별로 그룹화되고, Reduce 함수 기반의 레이블링 완성부(713)에 할당된다.The outputs of the partial labeling units 704-1, 704-2, 704-3 are output as key-value pairs as shown at reference numeral 712. Here, the key is a tag name, and the value is a combination of a label and a block ID. The partial label values are grouped according to the same key, i.e., the same tag name, through the shuffling process according to the mapping reduction programming model, and are assigned to the labeling completion unit 713 based on the Reduce function.

예를 들어, region 엘리먼트에 대한 두 레이블 <1, x, 1>과 <x, 8, -1>(712-1)이 모아져 레이블링 완성부 1(713-1)로 전달된다. 레이블링 완성부 1(713-1)는 두 레이블(712-1)을 오프셋 테이블(702)의 값을 참조하여 결합한다. region 엘리먼트의 경우 데이터 블록 1(703-1)과 데이터 블록 3(703-3)에서 온 두 레이블을 결합하게 되므로, 오프셋 테이블(702)의 1번째와 3번째 행의 값들이 각각 더해져서 레이블 값이 설정되고, 이 후 설정된 레이블 값들이 결합된다. 즉, 데이터 블록 1(703-1)에서 온 region 레이블 <1, x, 1>은 오프셋 테이블(702)의 1번째 행의 값들이 각각 더해진 <1, x, 1> 레이블로 설정되고, 데이터 블록 3(703-3)에서 온 region 레이블 <x, 8, -1>은 오프셋 테이블(702)의 3번째 행의 값들이 각각 더해진 <x, 24, 1> 레이블로 설정되며, 두 레이블이 결합되어 <1, 24, 1> 레이블이 생성된다.For example, two labels <1, x, 1> and <x, 8, -1> 712-1 for the region element are collected and transmitted to the labeling completion unit 1 713-1. The labeling completion unit 713-1 combines the two labels 712-1 with reference to the value of the offset table 702. [ In the case of the region element, since the two labels from the data block 1 703-1 and the data block 3 703-3 are combined, the values of the first and third rows of the offset table 702 are added, Is set, and the label values set after this are combined. That is, the on-region label <1, x, 1> in the data block 1 703-1 is set to the <1, x, 1> label to which the values of the first row of the offset table 702 are added, The on-region label <x, 8, -1> in the third table 703-3 is set to the <x, 24, 1> label to which the values of the third row of the offset table 702 are added, <1, 24, 1> labels are generated.

이에 비해, item 엘리먼트들에 대한 레이블들(712-2)은 각 데이터 블록에서 완전하게 계산된 경우이므로, 레이블의 결합은 없고 단순히 오프셋 테이블의 해당 행 값을 레이블 값에 더하는 것으로 레이블 값이 완성된다.In contrast, since labels 712-2 for item elements are completely calculated in each data block, there is no label combination and the label value is completed by merely adding the corresponding row value of the offset table to the label value .

한편, 접두어 기반 레이블링 기법의 병렬화 또한 도 4를 참조로 설명한 구조의 방식을 따르나, 레이블링 완성에 있어 부분 레이블들 간의 결합 대신, 조정 연산자를 사용한다는 점이 다르다. 이하 후술되는 도 8a 및 도 8b를 참조로 하여 접두어-기반 레이블링 기법의 병렬화에 대해 설명한다.On the other hand, the parallelization of the prefix-based labeling scheme also follows the scheme of the structure described with reference to FIG. 4, except that the labeling completion uses a coordination operator instead of a combination of partial labels. Hereinafter, parallelization of the prefix-based labeling technique will be described with reference to FIGS. 8A and 8B. FIG.

도 8a 및 도 8b는 본 발명의 일 실시 예에 따른 접두어-기반 레이블링 기법을 본 발명의 시스템을 통해 병렬화하는 실시 예를 도시한 예시도이다.8A and 8B illustrate an embodiment of parallelizing a prefix-based labeling scheme according to an embodiment of the present invention through a system of the present invention.

도 8a 및 도 8b를 참조하면, 각 부분 레이블링부(802-1,802-2,802-3)는 각 데이터 블록(803-1,803-2,803-3) 내의 엘리먼트들에 대하여 부분적으로 레이블링을 수행한다. 이때, 각 부분 레이블링부(802-1,802-2,802-3)는 소정의 엘리먼트의 부모 엘리먼트의 레이블 값을 저장하기 위한 벡터 V와 해당 엘리먼트의 내부 순서 값을 저장하기 위한 변수 $o를 갖는다.8A and 8B, each partial labeling unit 802-1, 802-2, 802-3 performs partial labeling on the elements in each data block 803-1, 803-2, 803-3. Each of the partial labeling units 802-1, 802-2, 802-3 has a vector V for storing a label value of a parent element of a predetermined element and a variable $ o for storing an internal order value of the element.

각 부분 레이블링부(802-1,802-2,802-3)는 처음 시작 시 벡터 V와 변수 $o를 초기화한다. 그리고, 시작 태그를 만날 때마다 새로운 레이블 값을 벡터 V에, 변수 $o에 1을 더한 값을 붙여서 생성하여 출력하고, 생성된 레이블 값은 벡터 V에 삽입하고, $o는 다시 0으로 재설정한다. 처음에는 $o의 값이 0이므로 레이블은 단순히 1로 설정되어 출력된 후 이 1의 값이 벡터 V에 삽입된다. 그러나, Africa 엘리먼트의 시작 태그의 경우에는 이미 벡터 V에 1 값이 있고 $o는 0이므로, 생성되는 레이블은 1.1이 된다. Each of the partial labeling units 802-1, 802-2, 802-3 initializes the vector V and the variable $ o at the start. Each time a start tag is encountered, a new label value is added to the vector V, the variable $ o is added to the value 1, and the generated label value is inserted into the vector V, and $ o is reset to 0 again . First, since the value of $ o is 0, the label is simply set to 1 and the value of this 1 is inserted into the vector V. However, in the case of the start tag of the Africa element, since the vector V has a value of 1 and $ o is 0, the generated label is 1.1.

각 부분 레이블링부(802-1,802-2,802-3)가 어떤 엘리먼트의 종료 태그를 만날 때에는 벡터 V가 비어있지 않는 한, 벡터 V에 저장된 레이블 값에서 접미어 하나를 잘라서 이를 변수 $o의 값으로 설정한다. 벡터 V가 비어있을 때에는, $o를 0으로 재설정한다. 예를 들어, 데이터 블록 1(803-1)에서는 quantity와 payment 엘리먼트가 시작 태그와 종료 태그를 모두 갖는다. 부분 레이블링부 1(802-1)이 quantity의 종료 태그를 만날 때 벡터 V에는 레이블 값 1.1.1.1 이 이미 들어 있고, 여기에서 접미어 1을 제거한 1.1.1을 V의 값으로 설정하고, 제거된 접미어 1을 $o 값으로 설정한다. 이후, payment 엘리먼트에 대한 시작 태그를 만날 때에는 벡터 V의 1.1.1에 $o + 1인 값을 붙여서 1.1.1.2를 payment 엘리먼트의 레이블 값으로 출력하게 된다.When each partial labeling unit 802-1, 802-2, 802-3 encounters an end tag of an element, it cuts off one suffix from the label value stored in the vector V, and sets it to the value of the variable $ o unless the vector V is empty . When vector V is empty, reset $ o to zero. For example, in data block 1 (803-1), the quantity and payment elements have both a start tag and an end tag. When the partial labeling part 1 (802-1) meets the end tag of quantity, the vector V already contains the label value 1.1.1.1, where 1.1.1 with the suffix 1 removed is set to the value of V, and the removed suffix 1 to the $ o value. Then, when the start tag for the payment element is encountered, 1.1.1.2 is printed as the label value of the payment element with the value of $ o + 1 added to 1.1.1 of the vector V.

전술한 방법으로 각 부분 레이블링부(802-1,802-2,802-3)는 자신이 할당받은 데이터 블록 내 엘리먼트들에 대하여 부분 레이블링을 수행한다. 그리고, 종료 시 벡터 V와 $o의 최종 상태 값을 분산 파일 시스템에 블록 ID와 함께 저장한다(804). 각 변수의 최종 상태 값을 기록 시에는 기저 값을 같이 저장하는데, 기저 값은 해당 데이터 블록에서 얼마나 많은 종료 태그들이 이에 대응하는 시작 태그 없이 존재하는지를 의미한다. 이 기저 값은 최종 레이블 값 계산 시 얼마나 많은 접두어가 벡터 V에서 제거된 후에 참조되는지를 결정하는데 이용된다. 부분 레이블링의 결과는 태그 명이나 파티션 키를 키로 하고, 부분 레이블 값, 기저 값, 데이터 블록 ID의 조합을 값으로 하는 키-값 쌍들로 출력된다(805).Each of the partial labeling units 802-1, 802-2, and 802-3 performs partial labeling on the elements in the data block allocated thereto in the above-described manner. Then, the final state value of the vector V and $ o at the end is stored in the distributed file system together with the block ID (804). When the last state value of each variable is recorded, the base value is also stored. The base value means how many end tags exist in the corresponding data block without the corresponding start tag. This base value is used to determine how many prefixes are referenced after removal from the vector V in calculating the final label value. The result of the partial labeling is output as key-value pairs in which the tag name or the partition key is a key, and the combination of the partial label value, the base value, and the data block ID is a value (805).

각 레이블링 완성부(806-1,806-2)는 각 태그 명 별로 그룹화된 부분 레이블 값들을, 부분 레이블링부들(802-1,802-2,802-3)이 종료 시점에 기록한 오프셋 정보(804)를 기준으로 작성된 오프셋 테이블(801)을 참조하여 조정하는 방식으로 최종 레이블 값을 계산 및 출력한다. 접두어-기반 레이블링의 병렬화를 위해 본 발명에서는 오프셋 테이블의 작성과 이를 이용한 레이블 값 조정을 위해 하나의 동일한 조정 연산자를 이용한다.Each of the labeling completion units 806-1 and 806-2 stores the partial label values grouped by each tag name in an offset 804 based on the offset information 804 recorded at the end of the partial labeling units 802-1, 802-2, 802-3, The final label value is calculated and outputted in a manner of adjusting by referring to the table 801. [ For parallelization of prefix-based labeling, the present invention uses one and the same adjustment operator to create an offset table and adjust label values using it.

일 실시 예에 따른 접두어-기반 레이블링 기법의 병렬화 시에 레이블 조정을 위해 사용되는 레이블 조정 연산자의 동작 원리를 설명하는 수식은 표 1과 같다.Table 1 describes the operation principle of the label adjustment operator used for label adjustment in the parallelization of the prefix-based labeling scheme according to an embodiment.

Figure pat00001
Figure pat00001

표 1에 따르면, 레이블 조정 연산자는 오프셋 테이블을 계산할 때도, 그리고 레이블 조정을 하는 경우 모두에 사용된다. According to Table 1, the label adjustment operator is used both when calculating the offset table and when performing label adjustment.

레이블 조정 연산자는 소정의 엘리먼트에 대한 접두어-기반 레이블을 이 엘리먼트에 선행하는 엘리먼트의 튜플 값을 가지고 조정한다. 표 1에서 보이는 바와 같이 레이블 조정에는 3가지 경우가 존재한다. 예를 들어 두 개의 튜플 X와 Y가 존재하고, X는 <1.1, 0, 2>라는 값을 갖는다고 가정한다.The label adjustment operator adjusts the prefix-based label for a given element with the tuple value of the element preceding it. As shown in Table 1, there are three cases of label adjustment. For example, assume that there are two tuples X and Y, and X has a value of <1.1, 0, 2>.

우선, Y: <1.1, 0, 1>로 설정되어 있다고 가정하면, by=0으로 표 1의 첫 번째 경우에 해당한다. 조정된 레이블 값은 <1.1, 0, 2> ⊙ <1.1., 0, 1> = < 1.1.(2+1).1, 0, 1>로 계산되어 최종적으로 <1.1.3.1, 0, 1> 이 된다.Assuming that Y is set to <1.1, 0, 1>, b y = 0 corresponds to the first case of Table 1. The adjusted label value is calculated as <1.1, 0, 2> ⊙ <1.1., 0, 1> = <1.1. (2 + 1) .1, >.

Y: <empty, -1, 1>이 입력이라고 가정하면, by≠0, n=0으로, 표 1의 두 번째 경우에 해당하고, 조정된 레이블 값은 <1.1, 0, 2> ⊙ <empty, -1, 1> = <1, 0, 2> 이 된다.Assuming that Y is <empty, -1, 1>, b y ≠ 0 and n = 0 correspond to the second case in Table 1, and the adjusted label value is <1.1, 0, 2> empty, -1, 1> = <1, 0, 2>.

Y: <1.1, -1, 1>이라고 가정하면, by≠0, n>0으로, 표 1의 세 번째 경우에 해당하고, 조정된 레이블 값은 <1.1, 0, 2> ⊙ <1.1. ,-1, 1> = <1.(1+1).1, 0, 1> 이다. 레이블 조정 연산자 ⊙는 교환법칙과 결합법칙 모두를 허용하지 않는다. 즉, X⊙Y≠Y⊙X이고, X⊙(Y⊙Z)≠(X⊙Y)⊙Z이다.Y is <1.1, -1, 1>, b y ≠ 0, n> 0, corresponding to the third case in Table 1, and the adjusted label value is <1.1, 0, 2> ⊙ <1.1. , -1, 1> = <1. (1 + 1) .1, 0, 1>. The label adjustment operator ⊙ does not allow both exchange and combining rules. That is, X ⊙ Y ≠ Y ⊙ X, and X ⊙ (Y ⊙ Z) ≠ (X ⊙ Y) ⊙Z.

접두어-기반 레이블링 기법에서 오프셋 테이블은 레이블, 기저 값, 내부순서 값의 컬럼들을 가진 테이블로 구성되고, 이의 튜플들은 다음과 같이 구성된다. In the prefix-based labeling scheme, the offset table consists of a table with columns of labels, base values, and inner order values, and their tuples are constructed as follows.

첫 번째 튜플은 <empty, 0, 0>으로 구성되고, 이후의 튜플들은 1부터 i-1 번째 데이터 블록에 대한 오프셋 정보들을 ⊙으로 계산한 값이 된다. 최종적으로 접두어-기반 레이블링에서 기저값 b를 갖는 i-번째 데이터 블록의 XML 엘리먼트에 대한 부분 레이블 L은 T'=Ti⊙<L,b,_>으로 계산되어 최종 레이블 값 L’으로 구해진다. 여기서 Ti는 오프셋 테이블의 i 번째 튜플이고, L’은 결과 튜플 T’의 레이블 값이다. 예를 들어, 표 1에서 데이터 블록 2(803-2)의 item 엘리먼트는 부분 레이블링부 2(802-2)를 통해 1로 레이블링되며 기저 값은 0이다. 따라서, 부분 레이블링부의 결과는 <1,0,_>로 기록된다. 이 엘리먼트는 데이터 블록 2(803-2)에 속하므로, 오프셋 테이블의 두 번째 튜플 값이 참조되어 레이블 조정이 이루어진다. 이를 수식으로 표현하면, T’= <1.1, 0, 1> ⊙ <1, 0, _> = < 1.1.(1+1), 0, _> 이다. 따라서, 최종 레이블 L’은 1.1.2가 된다.The first tuple consists of <empty, 0, 0>, and subsequent tuples are the offset information of the data blocks from 1 to i-1 calculated by ⊙. Finally, in the prefix-based labeling, the partial label L for the XML element of the i-th data block with the base value b is calculated as T '= T i ⊙ <L, b, _> . Where T i is the ith tuple of the offset table and L 'is the label value of the resulting tuple T'. For example, the item element of data block 2 (803-2) in Table 1 is labeled 1 through partial labeling section 2 802-2 and the base value is zero. Therefore, the result of the partial labeling section is written as < 1, 0, _ &gt;. Since this element belongs to data block 2 (803-2), the second tuple value of the offset table is referenced to make label adjustment. This can be expressed as: T '= <1.1, 0, 1> ⊙ <1, 0, _> = <1.1. (1 + 1), 0, _>. Thus, the final label L 'is 1.1.2.

이제까지 본 발명에 대하여 그 실시 예들을 중심으로 살펴보았다. 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The embodiments of the present invention have been described above. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

4: 병렬 트리 레이블링 장치 410: 데이터 분산부
420: 분산 파일 시스템 440: 통계 처리부
441: 태그명 출현횟수 측정부 442: 출현횟수 집계부
443: 데이터 재배분부 450: 레이블링 수행부
451: 부분 레이블링부 452: 레이블링 완성부
4: parallel tree labeling apparatus 410: data distribution unit
420: Distributed file system 440: Statistical processing unit
441: Tag name appearance frequency measuring unit 442: Frequency of occurrence counting unit
443: Data rearrangement unit 450: Labeling execution unit
451: partial labeling section 452: labeling completion section

Claims (24)

확장성 마크업언어(eXtensible markup language: XML, 이하 XML이라 칭함) 문서를 다수의 데이터 블록 단위로 분할하는 데이터 분산부; 및
분할된 데이터 블록의 엘리먼트들을 입력받아 각 데이터 블록을 대상으로 병렬로 레이블링을 수행하고 레이블링 수행 결과를 결합하여 최종 레이블 값을 생성하는 레이블링 수행부;
를 포함하는 XML 문서의 병렬 트리 레이블링 장치.
A data distributor for dividing an extensible markup language (XML) document into a plurality of data block units; And
A labeling execution unit for receiving elements of the divided data block, labeling the data blocks in parallel, and combining the results of the labeling to generate a final label value;
And a parallel tree labeling device for the XML document.
제 1 항에 있어서, 상기 레이블링 수행부는
맵-리듀스 프로그래밍 모델에 따라 작성된 프로그램 또는 해당 프로그램의 기능을 수행하는 모듈인 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
The apparatus of claim 1, wherein the labeling performing unit
Wherein the program is a program created according to a map-reduction programming model or a module that performs functions of the program.
제 1 항에 있어서, 상기 레이블링 수행부는
할당된 데이터 블록 내 엘리먼트들에 대해서 부분적으로 레이블링을 수행하는 다수의 부분 레이블링부; 및
각 부분 레이블링부에 의해 병렬로 레이블링된 부분 레이블들을 대상으로 셔플링을 통해 그룹화된 부분 레이블들을 수집하여 레이블을 완성하는 레이블링 완성부;
를 포함하는 XML 문서의 병렬 트리 레이블링 장치.
The apparatus of claim 1, wherein the labeling performing unit
A plurality of partial labeling parts for performing partial labeling on the elements in the allocated data block; And
A labeling completion unit for collecting partial labels grouped through shuffling with respect to partial labels labeled in parallel by each partial labeling unit to complete a label;
And a parallel tree labeling device for the XML document.
제 3 항에 있어서, 각 부분 레이블링부는
할당된 데이터 블록에 대해서 부분 레이블링을 수행하고, 상기 레이블링 완성부의 최종 레이블링 계산 시 레이블 결합 및 조정에 요구되는 오프셋 정보를 기록하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
4. The apparatus according to claim 3, wherein each partial labeling section
Wherein partial labeling is performed on the allocated data block and offset information required for label combining and adjustment in the final labeling calculation of the label finishing unit is recorded.
제 3 항에 있어서, 각 부분 레이블링부는
할당된 데이터 블록 내 태그들을 읽을 때 각 태그들의 숫자를 기록하고, 시작 태그와 종료 태그 중 쌍으로 맺어지지 않는 시작 태그 또는 종료 태그의 수를 계산함으로써 해당 데이터 블록 내 상대적인 레벨 정보를 획득하고, 태그 숫자와 쌍으로 맺어지지 않는 태그 숫자들을 이용하여 레이블 값을 재계산하며, 각 데이터 블록의 마지막 엘리먼트에 대해 레이블 값을 기록하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
4. The apparatus according to claim 3, wherein each partial labeling section
When the tags in the allocated data block are read, the number of each tag is recorded, and the number of the start tag or the end tag that is not paired with the start tag or the end tag is calculated to acquire the relative level information in the corresponding data block. Wherein the label value is recalculated using tag numbers that are not paired with the number, and a label value is recorded for the last element of each data block.
제 3 항에 있어서, 상기 레이블링 완성부는
부분 레이블들을 결합할 때 오프셋 정보를 이용하여 레이블 값을 보정함에 따라 최종 레이블을 완성하고,
상기 오프셋 정보는 부분적으로 생성된 레이블들을 결합하여 최종 레이블 값을 생성하는 데 있어 보정을 위해 요구되는 정보를 가진 자료구조인 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
4. The apparatus of claim 3, wherein the labeling completion unit
When the partial labels are combined, the final label is completed by correcting the label value using the offset information,
Wherein the offset information is a data structure having information required for correction in combining the partially generated labels to generate a final label value.
제 3 항에 있어서, 상기 레이블링 완성부는
부분 레이블들을 결합할 때 부분 레이블을 보정하기 위한 보정 연산자를 이용하여 레이블 값을 보정함에 따라 최종 레이블을 완성하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
4. The apparatus of claim 3, wherein the labeling completion unit
And the final label is completed by correcting the label value using a correction operator for correcting the partial label when joining the partial labels.
제 1 항에 있어서, 상기 XML 문서의 병렬 트리 레이블링 장치는
상기 데이터 분산부를 통해 분할된 XML 문서를 읽어들여 각 데이터 블록 내에서 태그 명 별로 문서 내 엘리먼트들의 출현횟수 정보를 집계하는 통계 처리부;
를 더 포함하는 XML 문서의 병렬 트리 레이블링 장치.
The apparatus of claim 1, wherein the parallel tree labeling apparatus of the XML document comprises:
A statistical processing unit for reading an XML document segmented by the data distribution unit and counting the number of occurrences of elements in a document by each tag name in each data block;
Wherein the parallel tree labeling apparatus further comprises:
제 8 항에 있어서, 상기 통계 처리부는
맵-리듀스 프로그래밍 모델에 따라 작성된 프로그램 또는 해당 프로그램의 기능을 수행하는 모듈인 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
The apparatus of claim 8, wherein the statistical processor
Wherein the program is a program created according to a map-reduction programming model or a module that performs functions of the program.
제 8 항에 있어서, 상기 통계 처리부는
데이터 블록을 읽어들여 읽어들인 데이터 블록 내에 위치하는 엘리먼트들에 대해서 동일한 태그 명을 가진 엘리먼트들의 출현횟수를 측정하는 다수의 태그 명 출현횟수 측정부; 및
각 태그 명 출현횟수 측정부가 계산한 출현횟수 정보들을 입력받아 문서 내에서 태그 명 별로 엘리먼트들의 출현횟수를 집계하는 출현횟수 집계부;
를 포함하는 XML 문서의 병렬 트리 레이블링 장치.
The apparatus of claim 8, wherein the statistical processor
A plurality of tag name occurrence count measuring units for measuring the number of occurrences of elements having the same tag name for the elements located in the data block by reading the data block; And
An appearance frequency counting unit for counting the number of occurrences of elements by tag name in the document by receiving the number-of-occurrences information calculated by the number-of-tag-frequency-counting unit;
And a parallel tree labeling device for the XML document.
제 8 항에 있어서, 상기 XML 문서의 병렬 트리 레이블링 장치는
상기 통계 처리부의 출현횟수 집계 결과를 이용하여 상기 레이블링 수행부의 각 태스크들이 서로 동일한 작업량을 가지도록 데이터 량을 분배하는 데이터 재분배부;
를 더 포함하는 XML 문서의 병렬 트리 레이블링 장치.
The apparatus of claim 8, wherein the parallel tree labeling apparatus of the XML document comprises:
A data redistributing unit for distributing a data amount such that each task of the labeling performing unit has the same amount of work, using the counting result of the number of occurrences of the statistical processing unit;
Wherein the parallel tree labeling apparatus further comprises:
제 11 항에 있어서, 상기 데이터 재분배부는
태그 명 별 엘리먼트의 문서 내 전체 출현횟수를 읽어들여 태그 명 별 엘리먼트들의 문서 내 출현횟수의 평균을 구하고, 태그 명 별 엘리먼트의 평균값을 가지고 이보다 크기가 큰 각 태그 명 별 엘리먼트 리스트를 다수의 엘리먼트 리스트로 분할하며, 분할된 엘리먼트 리스트에 파티션 키를 할당하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
12. The apparatus of claim 11, wherein the data redistributing unit
The total number of occurrences of the elements in the tag name is read and an average of the number of occurrences of the elements in the tag name by the tag name is obtained and the element list of each larger tag name having the larger value of the element value per tag name is divided into a plurality of element lists And assigning a partition key to the divided element list.
제 12 항에 있어서, 상기 레이블링 수행부는
상기 데이터 재분배부가 제공하는 파티션 키에 따라 셔플링하여 레이블 완성을 위한 태스크 별 작업량을 균등하게 할당하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 장치.
13. The apparatus of claim 12, wherein the labeling performing unit
And shuffling according to the partition key provided by the data redistribution unit to allocate workload per task for label completion evenly.
XML 문서를 다수의 데이터 블록 단위로 분할하는 단계; 및
분할된 데이터 블록의 엘리먼트들을 입력받아 각 데이터 블록을 대상으로 병렬로 레이블링을 수행하고 레이블링 수행 결과를 결합하여 최종 레이블 값을 생성하는 단계;
를 포함하는 XML 문서의 병렬 트리 레이블링 방법.
Dividing an XML document into a plurality of data block units; And
Receiving elements of the divided data block, labeling each data block in parallel, and combining the results of labeling to generate a final label value;
A method of labeling a parallel tree of an XML document.
제 14 항에 있어서, 상기 최종 레이블 값을 생성하는 단계는
할당된 데이터 블록 내 엘리먼트들에 대해서 데이터 블록 단위로 부분 레이블링을 병렬로 수행하는 단계; 및
병렬로 레이블링된 부분 레이블들을 대상으로 셔플링을 통해 그룹화된 부분 레이블들을 수집하여 레이블을 완성하는 단계;
를 포함하는 XML 문서의 병렬 트리 레이블링 방법.
15. The method of claim 14, wherein generating the final label value comprises:
Performing partial labeling in parallel on a data block basis for elements in an allocated data block; And
Collecting partial labels grouped through shuffling with respect to partial labels labeled in parallel and completing a label;
A method of labeling a parallel tree of an XML document.
제 15 항에 있어서, 상기 최종 레이블 값을 생성하는 단계는
부분 레이블링을 수행한 후 최종 레이블링 계산 시 레이블 결합 및 조정에 요구되는 오프셋 정보를 기록하는 단계;
를 더 포함하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 방법.
16. The method of claim 15, wherein generating the final label value comprises:
Recording offset information required for label combining and adjustment in the final labeling calculation after performing partial labeling;
The method of claim 1, further comprising:
제 16 항에 있어서, 상기 오프셋 정보를 기록하는 단계는
할당된 데이터 블록 내 태그들을 읽을 때 각 태그들의 숫자를 기록하는 단계;
시작 태그와 종료 태그 중 쌍으로 맺어지지 않는 시작 태그 또는 종료 태그의 수를 계산함으로써 해당 데이터 블록 내 상대적인 레벨 정보를 획득하는 단계;
태그 숫자와 쌍으로 맺어지지 않는 태그 숫자들을 이용하여 레이블 값을 재계산하는 단계; 및
각 데이터 블록의 마지막 엘리먼트에 대해 레이블 값을 기록하는 단계;
를 포함하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 방법.
17. The method of claim 16, wherein recording the offset information comprises:
Recording the number of each tag when reading tags in the allocated data block;
Obtaining the relative level information in the corresponding data block by calculating the number of start tags or end tags not paired with the start tag and the end tag;
Recalculating a label value using tag numbers that are not paired with a tag number; And
Recording a label value for a last element of each data block;
The method of claim 1,
제 15 항에 있어서, 상기 레이블을 완성하는 단계는
파티션 키를 기준으로 셔플링된 부분 레이블들을 수집하여 레이블을 완성하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 방법.
16. The method of claim 15, wherein completing the label
And collecting the shuffled partial labels based on the partition key to complete the label.
제 15 항에 있어서, 상기 레이블을 완성하는 단계는
부분 레이블들을 결합할 때 오프셋 정보를 이용하여 레이블 값을 보정함에 따라 최종 레이블을 완성하고,
상기 오프셋 정보는 부분적으로 생성된 레이블들을 결합하여 최종 레이블 값을 생성하는 데 있어 보정을 위해 요구되는 정보를 가진 자료구조인 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 방법.
16. The method of claim 15, wherein completing the label
When the partial labels are combined, the final label is completed by correcting the label value using the offset information,
Wherein the offset information is a data structure having information required for correction in combining the partially generated labels to generate a final label value.
제 15 항에 있어서, 상기 레이블을 완성하는 단계는
부분 레이블들을 결합할 때 부분 레이블을 보정하기 위한 보정 연산자를 이용하여 레이블 값을 보정함에 따라 최종 레이블을 완성하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 방법.
16. The method of claim 15, wherein completing the label
Wherein the final label is completed by correcting the label value using a correction operator for correcting the partial label when joining the partial labels.
제 14 항에 있어서, 상기 XML 문서의 병렬 트리 레이블링 방법은
상기 분할된 데이터 블록 내에서 태그 명 별로 문서 내 엘리먼트들의 출현횟수 정보를 집계하는 단계;
를 더 포함하는 XML 문서의 병렬 트리 레이블링 방법.
15. The parallel tree labeling method of claim 14,
Counting the number of occurrences of elements in the document by the tag name in the divided data block;
The method comprising the steps of:
제 21 항에 있어서, 상기 출현횟수 정보를 집계하는 단계는
데이터 블록을 읽어들여 읽어들인 데이터 블록 내에 위치하는 엘리먼트들에 대해서 동일한 태그 명을 가진 엘리먼트들의 출현횟수를 측정하는 단계; 및
측정된 출현횟수 정보들을 입력받아 문서 내에서 태그 명 별로 엘리먼트들의 출현횟수를 집계하는 단계;
를 포함하는 XML 문서의 병렬 트리 레이블링 방법.
22. The method of claim 21, wherein the step of counting the number of occurrences comprises:
Measuring the number of occurrences of elements having the same tag name for the elements located in the data block by reading the data block; And
Counting the number of occurrences of the elements by the tag name in the document by receiving the measured occurrence count information;
A method of labeling a parallel tree of an XML document.
제 21 항에 있어서, 상기 XML 문서의 병렬 트리 레이블링 방법은
출현횟수 집계 결과를 이용하여 레이블링 수행을 위한 각 태스크들이 서로 동일한 작업량을 가지도록 데이터 량을 분배하는 단계;
를 더 포함하는 XML 문서의 병렬 트리 레이블링 방법.
22. The method of claim 21, wherein the parallel tree labeling method of the XML document comprises:
Distributing a data amount such that each task for performing labeling has the same amount of work using the count of occurrence counts;
The method comprising the steps of:
제 23 항에 있어서, 상기 데이터 량을 분배하는 단계는
태그 명 별 엘리먼트의 문서 내 전체 출현횟수를 읽어들여 태그 명 별 엘리먼트들의 문서 내 출현횟수의 평균을 구하는 단계;
태그 명 별 엘리먼트의 평균값을 가지고 이보다 크기가 큰 각 태그 명 별 엘리먼트 리스트를 다수의 엘리먼트 리스트로 분할하는 단계; 및
분할된 엘리먼트 리스트에 파티션 키를 할당하는 단계;
를 포함하는 것을 특징으로 하는 XML 문서의 병렬 트리 레이블링 방법.
24. The method of claim 23, wherein distributing the amount of data comprises:
Obtaining an average of the number of occurrences of the elements in the document by the tag name by reading the total number of occurrences of the element in the document by the tag name;
Dividing an element list of each tag name having a larger size into a plurality of element lists with an average value of elements per tag name; And
Assigning a partition key to the partitioned element list;
The method of claim 1,
KR1020140056817A 2013-07-26 2014-05-12 Parallel tree labeling apparatus and method for massive XML document processing KR20150013000A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/444,089 US20150032764A1 (en) 2013-07-26 2014-07-28 Parallel tree labeling apparatus and method for processing xml document
DE102014110590.7A DE102014110590A1 (en) 2013-07-26 2014-07-28 Parallel tree labeling apparatus and method for processing an XML document

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020130089112 2013-07-26
KR20130089112 2013-07-26

Publications (1)

Publication Number Publication Date
KR20150013000A true KR20150013000A (en) 2015-02-04

Family

ID=52488920

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140056817A KR20150013000A (en) 2013-07-26 2014-05-12 Parallel tree labeling apparatus and method for massive XML document processing

Country Status (1)

Country Link
KR (1) KR20150013000A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117556850A (en) * 2023-11-13 2024-02-13 中国计量科学研究院 Method and system for taking RFID tag as carrier of digital calibration certificate

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117556850A (en) * 2023-11-13 2024-02-13 中国计量科学研究院 Method and system for taking RFID tag as carrier of digital calibration certificate
CN117556850B (en) * 2023-11-13 2024-05-03 中国计量科学研究院 Method and system for taking RFID tag as carrier of digital calibration certificate

Similar Documents

Publication Publication Date Title
US11386091B2 (en) Joining large database tables
US7627604B2 (en) Method for handling tree-type data structure, information processing device, and program
US8856183B2 (en) Database access using partitioned data areas
CA2150745C (en) Method and apparatus for implementing partial declustering in a parallel database system
US20160179856A1 (en) Data storage method and apparatus
US8271523B2 (en) Coordination server, data allocating method, and computer program product
US10452632B1 (en) Multi-input SQL-MR
US8321476B2 (en) Method and system for determining boundary values dynamically defining key value bounds of two or more disjoint subsets of sort run-based parallel processing of data from databases
WO2014139450A1 (en) System and method for distributed sql join processing in shared-nothing relational database clusters using stationary tables
US8898422B2 (en) Workload-aware distributed data processing apparatus and method for processing large data based on hardware acceleration
CN108268586B (en) Data processing method, device, medium and computing equipment across multiple data tables
CN110222029A (en) A kind of big data multidimensional analysis computational efficiency method for improving and system
CN107180031B (en) Distributed storage method and device, and data processing method and device
EP3217296A1 (en) Data query method and apparatus
CN107102999A (en) Association analysis method and device
CN112035578B (en) Data parallel processing method and device based on many-core processor
CN110442602A (en) Data query method, apparatus, server and storage medium
Choi et al. Parallel labeling of massive XML data with MapReduce
Dehne et al. A distributed tree data structure for real-time OLAP on cloud architectures
US10289723B1 (en) Distributed union all queries
KR101450239B1 (en) A system for simultaneous and parallel processing of many twig pattern queries for massive XML data and method thereof
US20130332465A1 (en) Database management device and database management method
US20150032764A1 (en) Parallel tree labeling apparatus and method for processing xml document
KR20150013000A (en) Parallel tree labeling apparatus and method for massive XML document processing
CN108595482B (en) Data indexing method and device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E801 Decision on dismissal of amendment
E601 Decision to refuse application