KR20210052148A - Method and apparatus for conversing data key value - Google Patents

Method and apparatus for conversing data key value Download PDF

Info

Publication number
KR20210052148A
KR20210052148A KR1020200032602A KR20200032602A KR20210052148A KR 20210052148 A KR20210052148 A KR 20210052148A KR 1020200032602 A KR1020200032602 A KR 1020200032602A KR 20200032602 A KR20200032602 A KR 20200032602A KR 20210052148 A KR20210052148 A KR 20210052148A
Authority
KR
South Korea
Prior art keywords
distribution
data key
key values
determining
processor
Prior art date
Application number
KR1020200032602A
Other languages
Korean (ko)
Other versions
KR102388458B1 (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 울산과학기술원
Publication of KR20210052148A publication Critical patent/KR20210052148A/en
Application granted granted Critical
Publication of KR102388458B1 publication Critical patent/KR102388458B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a method for performing dynamic hashing scannable by a processor. The method may comprise the steps of: determining a distribution form of key value distribution information calculated for data key values; determining a transformation function which transforms the data key values based on a distribution shape of the key value distribution information; converting the data key values into values corresponding to a uniform distribution using the determined conversion function; and generating a hash index structure related to the converted data key values. The present invention realizes fast performance in all insert, search, and scan functions by converting an original data key value based on a conversion function.

Description

데이터 키 값 변환 방법 및 장치{METHOD AND APPARATUS FOR CONVERSING DATA KEY VALUE}Data key value conversion method and device {METHOD AND APPARATUS FOR CONVERSING DATA KEY VALUE}

이하, 데이터 키 값을 변환하는 방법 및 장치에 관한 기술이 제공된다.Hereinafter, a method and an apparatus for converting a data key value are provided.

LSM 기반 키 값 저장소와 같은 기존 스토리지 시스템은 느린 디스크 용으로 설계되었다. 하드 디스크 드라이브 또는 SSD를 사용하는 시스템의 경우, 디스크 I/O 레이턴시(latency)는 병목현상을 야기하고, 이러한 시스템의 인덱스 구조(index structure)는 최소한의 성능을 제공할 수 있다. 예를 들어 B +- tree 인덱스에 대한 인덱스 쿼리 시간은 데이터 블록 읽기 시간의 1 % 미만일 수 있다. 최근 STT-MRAM과 같은 바이트의 주소를 지정 할 수 있는 비휘발성 메모리와 현재 상용화된 Optane DC Persistent Memory와 같은 빠른 스토리지 시스템과 Z-SSD와 같은 초저 대기 시간 SSD 및 Optane SSD가 환경을 변화시키고 있다. 이러한 빠른 스토리지 시스템의 경우 인덱스 구조의 효율성과 같은 소프트웨어 계층의 성능이 중요해지고 이에 따라 시스템의 최종 대기 시간에 더 큰 영향을 미칠 수 있게 된다.Traditional storage systems, such as LSM-based key value storage, are designed for slow disks. In the case of a system using a hard disk drive or an SSD, disk I/O latency causes a bottleneck, and the index structure of such a system can provide minimal performance. For example, the index query time for a B +- tree index may be less than 1% of the data block read time. Recently, nonvolatile memory that can address bytes such as STT-MRAM, fast storage systems such as the currently commercially available Optane DC Persistent Memory, and ultra-low latency SSDs and Optane SSDs such as Z-SSD are changing the environment. In the case of such a fast storage system, the performance of the software layer, such as the efficiency of the index structure, becomes important, and accordingly, the final latency of the system can be affected more greatly.

스토리지 시스템의 경우 널리 사용되는 두 가지 인덱싱 구조로는 B +-트리 및 해시 인덱스(hash index)가 있다. B +-트리는 현재 워크로드를 기반으로 내부 구조를 조정할 수있는 동적 구조이며, 삽입 및 검색과 같은 일반적인 작업뿐만 아니라 스캔 작업도 지원할 수 있다. 한편, 해시 인덱스는 일반적으로 B +-트리에 비해 빠른 삽입 및 검색 작업을 제공할 수 있다. 그러나 해시 인덱스는 스캔 작업을 제공할 수 없다.In the case of storage systems, two widely used indexing structures are B +-tree and hash index. B+-tree is a dynamic structure that can adjust its internal structure based on the current workload, and it can support not only common tasks such as inserts and searches, but also scan tasks. On the other hand, the hash index can generally provide faster insertion and search operations compared to the B +-tree. However, hash indexes cannot provide scan operations.

스캔 작업을 제공하는 동안 해시 인덱스만큼 빠른 삽입 및 검색을 지원하려는 시도들이 있었다. 예를 들어, 두 인덱스를 모두 사용하는 하이브리드 인덱스 구조가 제안되었다. 그러나 두 인덱스 구조 사이의 일관성 문제를 포함하여 두 인덱스 구조를 유지 관리하는 데에는 오버 헤드가 있다는 문제점이 있었다.While providing scan operations, there have been attempts to support insertions and searches as fast as hash indexes. For example, a hybrid index structure using both indexes has been proposed. However, there was a problem that there was an overhead in maintaining the two index structures, including the problem of consistency between the two index structures.

대한민국 특허공개공보 제10-2006-0013815호(공개일: 2006년 02월 14일)Korean Patent Publication No. 10-2006-0013815 (Publication date: February 14, 2006)

일 실시예에 따르면 프로세서에 의해 스캔 가능한 동적 해싱(hashing)을 수행하는 방법은, 데이터 키 값들에 대해 산출된 키 값 분포 정보의 분포 형태를 판단하는 단계; 상기 키 값 분포 정보의 상기 분포 형태를 판단한 결과에 기초하여, 상기 데이터 키 값들을 변환시키는 변환 함수를 결정하는 단계; 상기 결정된 변환 함수를 이용하여 상기 데이터 키 값들을 균일(uniform)한 분포에 대응하는 값으로 변환하는 단계; 및 상기 변환된 데이터 키 값들에 관련된 해쉬 인덱스 구조(hash index structure)를 생성하는 단계를 포함할 수 있다.According to an embodiment, a method of performing scannable dynamic hashing by a processor includes: determining a distribution type of key value distribution information calculated for data key values; Determining a conversion function for converting the data key values based on a result of determining the distribution type of the key value distribution information; Converting the data key values into values corresponding to a uniform distribution using the determined transformation function; And generating a hash index structure related to the converted data key values.

동적 해싱 수행 방법은 균일한 분포에 관련된 값과 상기 키 값 분포 정보 간의 거리를 계산한 결과에 기초하여, 상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계를 더 포함할 수 있다.The method of performing dynamic hashing may further include determining whether to convert the data key values based on a result of calculating a distance between a value related to a uniform distribution and the key value distribution information.

상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계는, 상기 거리로서 상기 균일한 분포의 분산 값과 상기 키 분포 정보의 분산 값의 차이를 계산하는 단계를 포함할 수 있다.Determining whether to convert the data key values may include calculating a difference between a variance value of the uniform distribution and a variance value of the key distribution information as the distance.

상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계는, 상기 계산된 거리를 미리 지정된 임계 거리에 비교하는 단계; 및 상기 계산된 거리 및 상기 임계 거리를 비교한 결과에 기초하여, 상기 데이터 키 값들을 변환을 수행하는 단계를 더 포함할 수 있다.The determining whether to convert the data key values may include comparing the calculated distance to a predetermined threshold distance; And converting the data key values based on a result of comparing the calculated distance and the threshold distance.

동적 해싱 수행 방법은 상기 데이터 키 값들의 군집 레벨(cluster level)에 기초하여, 상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계를 더 포함할 수 있다.The method of performing dynamic hashing may further include determining whether to convert the data key values based on a cluster level of the data key values.

상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계는, 상기 데이터 키 값들 간의 공통 비트 개수를 상기 군집 레벨로서 결정하는 단계; 및 상기 군집 레벨이 미리 지정된 임계 레벨 이상인 경우에 응답하여, 상기 데이터 키 값들을 변환을 수행하는 단계를 포함할 수 있다.The determining whether to convert the data key values may include determining the number of common bits between the data key values as the cluster level; And converting the data key values in response to the cluster level being equal to or greater than a predetermined threshold level.

상기 키 값 분포 정보는 상기 데이터 키 값들의 분산 및 평균을 포함할 수 있다.The key value distribution information may include a variance and an average of the data key values.

상기 분포 형태를 판단하는 단계는, 상기 분포 형태 및 복수의 연속확률분포들의 각 연속확률분포에 대응하는 형태에 매칭하는지 판단하는 단계; 및 상기 분포 형태가 상기 복수의 연속확률분포들 중 한 연속확률분포에 대응하는 형태에 매칭하는 경우에 응답하여, 상기 분포 형태를 매칭된 연속확률분포로 결정하는 단계를 포함할 수 있다.The determining of the distribution shape may include determining whether the distribution shape and a shape corresponding to each continuous probability distribution of a plurality of continuous probability distributions match; And in response to a case in which the distribution shape matches a shape corresponding to one of the plurality of continuous probability distributions, determining the distribution shape as the matched continuous probability distribution.

상기 분포 형태를 판단하는 단계는, 상기 분포 형태가 상기 복수의 연속확률분포들에 매칭되지 않는 경우에 응답하여, 상기 데이터 키 값들의 군집 레벨을 결정하는 단계; 및 상기 결정된 군집 레벨이 미리 지정된 임계 레벨 미만인 경우에 응답하여, 상기 데이터 키 값의 변환을 스킵하는 단계를 포함할 수 있다.The determining of the distribution type may include determining a cluster level of the data key values in response to a case where the distribution type does not match the plurality of continuous probability distributions; And in response to the determined cluster level being less than a predetermined threshold level, skipping conversion of the data key value.

상기 변환 함수를 결정하는 단계는, 상기 키 값 분포 정보의 분포 형태에 대한 누적 분포 함수(Cumulative distribution function, CDF)에 기초하여 상기 변환 함수를 결정하는 단계를 포함할 수 있다.The determining of the transformation function may include determining the transformation function based on a cumulative distribution function (CDF) for a distribution type of the key value distribution information.

상기 변환 함수를 결정하는 단계는, 선형 보간법에 기초하여 상기 누적 분포 함수를 일련의 선형 함수들의 집합으로 변환하는 단계를 포함할 수 있다.The determining of the transformation function may include transforming the cumulative distribution function into a set of linear functions based on a linear interpolation method.

상기 변환 함수를 결정하는 단계는, 상기 데이터 키 값들을 데이터 키 값 개수에 따라 복수의 그룹으로 분할하고, 각 그룹에 대한 선형 함수를 계산하는 단계를 포함할 수 있다.The determining of the conversion function may include dividing the data key values into a plurality of groups according to the number of data key values, and calculating a linear function for each group.

상기 해쉬 인덱스 구조를 결정하는 단계는, 상기 데이터 키 값에 관련된 디렉토리(directory) 및 상기 디렉토리에 대응하는 버킷(bucket)을 생성하고, 상기 변환 함수에 따라 변환된 데이터 키 값들을 상기 버킷에 매핑하는 단계를 포함할 수 있다.The determining of the hash index structure includes creating a directory related to the data key value and a bucket corresponding to the directory, and mapping the converted data key values to the bucket according to the conversion function. It may include steps.

일 실시예에 따른 스캔 가능한 동적 해싱 수행 장치는, 데이터 키 값들에 대해 산출된 키 값 분포 정보의 분포 형태를 판단하고, 키 값 분포 정보의 상기 분포 형태를 판단한 결과에 기초하여, 상기 데이터 키 값들을 변환시키는 변환 함수를 결정하며, 기 결정된 변환 함수를 이용하여 상기 데이터 키 값들을 균일(uniform)한 분포에 대응하는 값으로 변환하고, 상기 변환된 데이터 키 값들에 관련된 해쉬 인덱스 구조(hash index structure)를 생성하는 프로세서; 및 상기 해쉬 인덱스 구조에 상기 변환된 데이터 키 값들을 저장하는 메모리를 포함할 수 있다.The apparatus for performing scannable dynamic hashing according to an embodiment determines a distribution type of key value distribution information calculated for data key values, and based on a result of determining the distribution type of the key value distribution information, the data key value A hash index structure related to the transformed data key values is determined by determining a transform function that transforms the data keys, transforming the data key values into values corresponding to a uniform distribution using a predetermined transform function. A processor that generates ); And a memory for storing the converted data key values in the hash index structure.

일실시예에 따르면, 데이터 키 값 변환 방법은 원 데이터 키 값을 변환함수에 기초하여 변환함으로써, 삽입, 검색, 스캔 기능에서 모두 빠른 성능을 제공할 수 있다.According to an embodiment, the data key value conversion method converts the original data key value based on a conversion function, thereby providing fast performance in all of the insert, search, and scan functions.

기존 해싱(hashing)에서 해싱 함수들은 각 키들을 균일하게 분산시켜 서로 충돌(collision)이 일어나지 않게 매핑시키려 하므로, 변환 데이터 키와 원 데이터 키가 같은 순서로 정렬이 되지 않는다. 이에 반해, 일실시예에 따르면, 프로세서는 변환된 변환 데이터 키를 원 데이터 키와 같은 순서를 유지하며 버킷에 정렬시켜 저장시킬 수 있다.In conventional hashing, the hashing functions distribute the keys evenly and map them so that collision does not occur. Therefore, the converted data key and the original data key are not sorted in the same order. On the contrary, according to an embodiment, the processor may store the converted converted data keys in the same order as the original data keys and sorted in the bucket.

도 1는 일실시예에 따른 키 값을 변환시켜 인덱스 구조를 결정하는 방법을 도시한 흐름도이다.
도 2는 일실시예에 따른 확장 해싱(extendible hashing)의 해싱 방법을 도시한 도면이다.
도 3은 일실시예에 따라 키 값의 분포 정보에 기초하여 키 값을 변환시킨 인덱스 구조를 도시한 도면이다.
도 4는 일실시예에 따라 키 값을 변환시킬지 여부를 결정하는 방법을 도시한 흐름도이다.
도 5는 일실시예에 따른 키 값의 분포 형태를 도시한 도면이다.
도 6은 일실시예에 따라 디렉토리를 생성하는 것을 도시한 도면이다.
도 7은 일실시예에 따른 키 값 변환 장치의 개괄적인 구성을 도시한 블록도이다.
1 is a flowchart illustrating a method of determining an index structure by converting a key value according to an embodiment.
2 is a diagram illustrating a hashing method of extended hashing according to an embodiment.
3 is a diagram illustrating an index structure in which a key value is converted based on distribution information of a key value according to an embodiment.
4 is a flowchart illustrating a method of determining whether to convert a key value according to an embodiment.
5 is a diagram illustrating a distribution of key values according to an embodiment.
6 is a diagram illustrating creating a directory according to an embodiment.
7 is a block diagram showing an outline configuration of an apparatus for converting a key value according to an embodiment.

실시예들에 대한 특정한 구조적 또는 기능적 설명들은 단지 예시를 위한 목적으로 개시된 것으로서, 다양한 형태로 변경되어 실시될 수 있다. 따라서, 실시예들은 특정한 개시형태로 한정되는 것이 아니며, 본 명세서의 범위는 기술적 사상에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Specific structural or functional descriptions of the embodiments are disclosed for the purpose of illustration only, and may be changed and implemented in various forms. Accordingly, the embodiments are not limited to a specific disclosure form, and the scope of the present specification includes changes, equivalents, or substitutes included in the technical idea.

제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 해석되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Although terms such as first or second may be used to describe various components, these terms should be interpreted only for the purpose of distinguishing one component from other components. For example, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다.When a component is referred to as being "connected" to another component, it is to be understood that it may be directly connected or connected to the other component, but other components may exist in the middle.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설명된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present specification, terms such as "comprise" or "have" are intended to designate that the described feature, number, step, action, component, part, or combination thereof is present, but one or more other features or numbers, It is to be understood that the presence or addition of steps, actions, components, parts, or combinations thereof, does not preclude the possibility of preliminary exclusion.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다. 이하, 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the relevant technical field. Terms as defined in a commonly used dictionary should be construed as having a meaning consistent with the meaning of the related technology, and should not be interpreted as an ideal or excessively formal meaning unless explicitly defined in the present specification. Does not. Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. The same reference numerals shown in each drawing indicate the same members.

도 1는 일실시예에 따른 키 값을 변환시켜 인덱스 구조를 결정하는 방법을 도시한 흐름도이다.1 is a flowchart illustrating a method of determining an index structure by converting a key value according to an embodiment.

일실시예에 따른 프로세서는 스캔 가능한 동적 해싱을 수행하는 방법을 수행할 수 있다. 단계(110)에서, 프로세서는 데이터 키 값들에 대해 산출된 키 값 분포 정보의 분포 형태를 판단할 수 있다. 프로세서는 키 값 각각들을 "1"과 "0"으로 나열된 복수의 비트 중 일정 개수의 비트 단위로 군집화하고, 군집에 포함된 데이터 개수에 기초하여 키 값 분포를 결정할 수 있다. 예시적으로, 키 값 분포는 최상위 일정 개수의 비트 단위로 군집화된 군집에 기초하여 결정된 분포일 수 있다.The processor according to an embodiment may perform a method of performing scannable dynamic hashing. In step 110, the processor may determine a distribution type of the key value distribution information calculated for the data key values. The processor may cluster each of the key values in units of a predetermined number of bits among a plurality of bits listed as "1" and "0", and determine a key value distribution based on the number of data included in the cluster. For example, the key value distribution may be a distribution determined based on clusters clustered in units of the highest predetermined number of bits.

단계(120)에서, 프로세서는 키 값 분포 정보의 분포 형태를 판단한 결과에 기초하여 데이터 키 값들을 변화시키는 변환 함수를 결정할 수 있다. 예를 들어, 키 값 분포 정보가 연속확률분포에 매칭하는 경우, 프로세서는 키 값 분포 정보의 분포 형태에 대한 누적 분포 함수에 기초하여 변환 함수를 결정할 수 있다. 이 때, 프로세서는 선형 보간법에 기초하여 누적 분포 함수를 일련의 선형 함수들의 집합으로 변형시킬 수 있는데, 선형 함수들의 집합에 기초하여 변환 함수를 결정함으로써, 선형 함수를 이용하지 않는 경우에 비해 더 빠르게 변환 함수를 계산할 수 있다. 프로세서는 선형 함수를 계산하기 위해 복수의 그룹으로 분할하는데, 데이터 키 값 개수에 따라 복수의 그룹으로 분할할 수 있다. 다른 예를 들어, 키 값 분포 정보가 연속확률분포에 매칭되지 않는 경우, 프로세서는 군집된 데이터 키 값이 존재하는 구간의 누적 분포 함수의 기울기를 증가시키는 함수로 변환 함수를 결정할 수 있다.In operation 120, the processor may determine a transformation function for changing data key values based on a result of determining the distribution type of the key value distribution information. For example, when the key value distribution information matches the continuous probability distribution, the processor may determine a transformation function based on a cumulative distribution function for a distribution type of the key value distribution information. In this case, the processor can transform the cumulative distribution function into a set of linear functions based on the linear interpolation method. By determining the transformation function based on the set of linear functions, the processor is faster than when the linear function is not used. You can calculate the transformation function. The processor divides it into a plurality of groups to calculate a linear function, and may divide it into a plurality of groups according to the number of data key values. For another example, when the key value distribution information does not match the continuous probability distribution, the processor may determine a transform function as a function that increases the slope of the cumulative distribution function in a section in which the clustered data key values exist.

단계(130)에서, 프로세서는 결정된 변환 함수를 이용하여 데이터 키 값들을 균일한 분포에 대응하는 값으로 변환시킬 수 있다.In step 130, the processor may convert the data key values into values corresponding to a uniform distribution by using the determined transformation function.

단계(140)에서, 프로세서는 변환된 데이터 키 값들에 관련된 해쉬 인덱스 구조를 생성할 수 있다. 프로세서는 데이터 키 값에 관련된 디텍토리 및 디렉토리에 대응하는 버킷을 생성하고, 변환 함수에 따라 변환된 데이터 키 값들을 버킷에 매핑시킬 수 있다. 이 때, 매핑된 키 값들은 변환 함수에 따라 변환되기 전 키 값들과 같은 순서로 배열될 수 있다. 해쉬 인덱스 구조를 생성하는 것에 대해서는 도 6을 통해 상세히 후술한다.In step 140, the processor may generate a hash index structure related to the converted data key values. The processor may create a directory related to the data key value and a bucket corresponding to the directory, and map the converted data key values to the bucket according to the conversion function. In this case, the mapped key values may be arranged in the same order as the key values before conversion according to the conversion function. The generation of the hash index structure will be described in detail later with reference to FIG. 6.

일실시예에 따르면, 프로세서는 변환 함수를 결정하기 위해 키 값 분포 정보의 분포 형태를 판단하기 전, 데이터 키 값들을 변환시킬지 여부를 판단할 수 있다. 데이터 키 값들을 변환시킬지 여부를 판단하는 것은 도 4에서 후술한다.According to an embodiment, the processor may determine whether to convert data key values before determining a distribution type of the key value distribution information in order to determine a conversion function. Determining whether to convert data key values will be described later in FIG. 4.

도 2는 확장 해싱(extendible hashing)의 해싱 방법을 도시한 도면이다.2 is a diagram illustrating a hashing method of extended hashing.

확장 해싱은 작업량이 동적으로 변경될 때 커지거나 줄어들 수 있는 동적 인덱싱 구조로, 재해싱(rehashing)이 필요한 전통적인 해싱 구조와 차이가 있을 수 있다. 도 1에 도시된 일실시예에서, n은 키에 사용된 비트 수이며 주어진 키 K의 해시 값은 의사 키(pseudo-key)로 사용될 수 있다. 여기서, K` = h(K)로써, h는 해시 함수일 수 있다.Extended hashing is a dynamic indexing structure that can increase or decrease when the workload changes dynamically, and may differ from the traditional hashing structure that requires rehashing. In the embodiment shown in FIG. 1, n is the number of bits used in the key, and a hash value of a given key K may be used as a pseudo-key. Here, as K` = h(K), h may be a hash function.

확장 해싱에서 해시 테이블은 디렉토리(directory)와 버킷(bucket)을 포함할 수 있다. 디렉토리는 최상위 비트(MSB)와 관련된 접두사 또는 의사 키의 최하위 비트(LSB)와 관련된 접미사가 인덱스로 사용되는 배열일 수 있다. 도 2에 따르면, 프로세서는 의사 키의 최상위 두 비트를 디렉토리의 인덱스로 사용할 수 있다. 프로세서는 디렉토리에 인덱스로 사용되는 최상위 비트 수와 대응되는 전역 깊이(global depth) G를 설정할 수 있다. 즉, G (여기서 G는 자연수)는 디렉토리의 크기를 결정할 수 있다.In extended hashing, a hash table can include a directory and a bucket. The directory may be an array in which a prefix related to the most significant bit (MSB) or a suffix related to the least significant bit (LSB) of a pseudo key is used as an index. According to FIG. 2, the processor may use the most significant two bits of a pseudo key as an index of a directory. The processor may set a global depth G corresponding to the number of most significant bits used as an index in the directory. That is, G (where G is a natural number) can determine the size of the directory.

도 2에 따르면, 디렉토리의 각 항목은 고정된 수의 키 값을 저장할 수 있는 버킷을 의미하는 것일 수 있다. 키 값은 키와 연관된 실제 값에 대한 포인터 일 수 있다. 프로세서는 키 값을 삽입 할 때 디렉토리 항목을 찾기 위해 해쉬의 최상위 비트를 사용하고, 디렉토리 항목을 찾은 경우, 디렉토리 항목이 가리키는 버킷에 여유 공간이 있는 경우 버킷의 여유 공간에 저장 키 값 및 키 값과 관련된 데이터를 저장할 수 있다. 예를 들어, 도 110 및 도 120은 각각 "01101 ..."키를 해싱 인덱스에 삽입하기 전 후의 상태를 도시한 것일 수 있다. 프로세서는 각 버킷에 로컬 깊이(local depth)L을 설정할 수 있고, 여기서 로컬 깊이는 0보다 크거나 같고 전역 깊이G보다 작거나 같을 수 있다. 이 버킷에 연결된 디렉토리 인덱스의 L 개의 최상위 비트로 시작하는 모든 키가 포함될 수 있다. 따라서, 도 120에 따르면, 디렉토리의 둘 이상의 항목이 동일한 버킷을 지시할 수 있다.According to FIG. 2, each item in a directory may mean a bucket capable of storing a fixed number of key values. The key value may be a pointer to an actual value associated with the key. When the processor inserts the key value, it uses the most significant bit of the hash to find the directory entry, and if it finds the directory entry, and if there is free space in the bucket pointed to by the directory entry, it stores the key value and key value in the free space of the bucket, and Related data can be saved. For example, FIGS. 110 and 120 may show states before and after inserting the "01101 ..." key into the hashing index, respectively. The processor may set a local depth L in each bucket, where the local depth may be greater than or equal to 0 and less than or equal to the global depth G. Any key starting with the L most significant bits of the directory index linked to this bucket can be included. Accordingly, according to FIG. 120, two or more items in a directory may indicate the same bucket.

버킷이 과도하게 채워지면 프로세서는 버킷을 두 개의 버킷으로 분할할 수 있다. 버킷이 분리되는 두 가지 상황이 있을 수 있는데, 첫 번째는 L < G 일 때이며, 이는 도 120의 경우와 같이 여러 디렉토리 항목들이 가장 오른쪽 버킷을 가리키고 있는 경우를 포함할 수 있다. 이 경우 프로세서는 G를 동일하게 유지하고, 두 버킷의 L을 원래 버킷 중 하나만큼 증가시키며, 원래 버킷의 내용을 의사 키의 L + 1 개의 최상위 비트 값에 따라 조정할 수 있다. 예를 들어, 도 120에서 dir[2] 및 dir[3]이 가리키는 버킷은 도 130에서 두 개의 버킷으로 분할되어 접두사가“10”인 키는 하나의 버킷에 저장되고 접두사“11”은 또 다른 버킷에 저장될 수 있다.If the bucket is overfilled, the processor can split the bucket into two buckets. There may be two situations in which the buckets are separated. The first is when L <G, and this may include a case in which several directory entries point to the rightmost bucket as in the case of FIG. 120. In this case, the processor can keep G the same, increment L in both buckets by one of the original buckets, and adjust the contents of the original bucket according to the value of L + 1 most significant bit of the pseudo key. For example, the bucket pointed to by dir[2] and dir[3] in FIG. 120 is divided into two buckets in FIG. 130, so that a key with a prefix of "10" is stored in one bucket, and a prefix of "11" is another. Can be stored in a bucket.

두 번째 상황은 G = L 인 경우일 수 있다. 이 경우 하나의 디렉토리 항목은 하나의 버킷을 지시한다. 따라서 분할을 수용할 수 있도록 디렉토리를 확장해야 하며 이를 디렉토리 더블링(directory doubling)이라고 한다. 이를 위해 프로세서는 인덱스로 사용되는 비트 수, 즉 G를 먼저 증가시키고, 첫번째 경우와 동일한 방식으로 내용을 분할하고 L 값을 조정시킬 수 있다. 예를 들어, 도 130에서 dir[1]이 가리키는 버킷에 하나 이상의 키가 추가되면 프로세서는 디렉토리를 배가함으로써, 버킷의 L 값이 3이 되고, dir[1]은 dir[2] 및 dir[3]으로 분할시킬 수 있다.The second situation may be the case where G = L. In this case, one directory entry points to one bucket. Therefore, the directory must be expanded to accommodate partitioning, which is called directory doubling. To this end, the processor may first increase the number of bits used as an index, that is, G, and divide the content and adjust the L value in the same manner as in the first case. For example, in FIG. 130, when one or more keys are added to the bucket indicated by dir[1], the processor multiplies the directory, so that the L value of the bucket becomes 3, and dir[1] becomes dir[2] and dir[3. Can be divided into ].

도 3은 일실시예에 따라 키 값의 분포 정보에 기초하여 키 값을 변환시킨 인덱스 구조를 도시한 도면이다.3 is a diagram illustrating an index structure in which a key value is converted based on distribution information of a key value according to an embodiment.

일실시예에 따르면, 프로세서는 확장 해싱을 기반으로 하지만 해시 키(hash key)가 아닌 재매핑된 키(remapped key)를 의사 키로 사용함으로써, 키의 원래 순서를 유지하면서 키 값을 변환하는 스캔 가능한 동적 해싱 방법을 제공할 수 있다. 도 3은 키 값 변환 방법의 아키텍처를 보여준다. 예시적으로, 비휘발성 메모리(persistent memory, PM)에 유지되는 디렉토리 및 버킷을 사용하는 인덱싱 구조는 기본적으로 정렬된 버킷을 사용하는 확장 해싱일 수 있다. 다만, 인덱싱 구조가 저장되는 메모리는 비휘발성 메모리에 국한되는 것이 아니라, 휘발성 메모리도 포함될 수 있다. 비휘발성 메모리는 예시적으로, 하드디스크, 플래시 메모리 뿐만 아니라, PM, MRAM을 포함할 수 있다. 휘발성 메모리는 DRAM, SRAM을 포함할 수 있다.According to one embodiment, the processor is based on extended hashing, but by using a remapped key rather than a hash key as a pseudo key, a scannable key value is converted while maintaining the original order of the keys. It can provide a dynamic hashing method. 3 shows the architecture of a key value conversion method. For example, an indexing structure using a directory and a bucket maintained in a persistent memory (PM) may be extended hashing using a bucket that is basically aligned. However, the memory in which the indexing structure is stored is not limited to nonvolatile memory, but may also include volatile memory. The nonvolatile memory may include, for example, a hard disk and a flash memory, as well as PM and MRAM. Volatile memory may include DRAM and SRAM.

프로세서는 가상 키를 생성하기 위해 해시 함수(hash function)를 사용하지 않고, 대신 원시 키(raw key) 자체를 의사 키로 사용 한 후, 각 버킷에 키를 정렬된 순서로 저장할 수 있다. 이를 통해 효율적인 스캔 작업이 가능합니다. 그러나 특정 범위에 많은 수의 키가 존재하고, 나머지 범위의 디렉토리에는 몇 개의 키만 존재하는 경우, 이러한 균일하지 않은(non-uniform) 키 분포는 불균형 디렉토리를 초래할 수 있고, 디렉토리 더블링을 불필요하게 많이 수행해야 할 수 있다.Instead of using a hash function to generate a virtual key, the processor can instead use the raw key itself as a pseudo key and then store the keys in each bucket in sorted order. This enables efficient scanning. However, if a large number of keys exist in a specific range and only a few keys exist in the directories in the rest of the range, such a non-uniform key distribution can lead to an unbalanced directory, and directory doubling is performed unnecessarily. You can do it.

예를 들어, 프로세서는 데이터 키의 본래 순서를 유지하면서 특정 분포를 따르는 키를 균일하게 재분배할 수 있다. 특히, 프로세서는 확률 누적 변환(probability integral transform)에 기초하여 키 값 분포가 균일해지도록 키 값을 변환시킬 수 있다. 프로세서는 확률 누적 변환에 기초하여 주어진 랜덤 변수의 연속 분포가 표준 균일 분포(standard uniform distribution)에 따르도록 랜덤 변수를 변환시킬 수 있다. 이 때, 표준 균일 분포는 범위가 (예를 들어, 0 내지 1)이지만, 이를 전체 키 범위(예를 들어, 0 내지 2n-1)로 확장하여 균일 분포(uniform distribution)에 따르도록 랜덤 변수를 변환시킬 수 있다. 즉, 랜덤 변수 X에 연속 분포가 있는 경우, FX가 분포에 대한 누적 분포 함수 (CDF)인 랜덤 변수 Y = FX(X)는 균일 분포를 따를 수 있다.For example, the processor may evenly redistribute keys that follow a certain distribution while maintaining the original order of the data keys. In particular, the processor may transform the key value so that the key value distribution becomes uniform based on a probability integral transform. The processor may transform the random variable so that the continuous distribution of the given random variable follows a standard uniform distribution based on the probability cumulative transformation. At this time, the standard uniform distribution has a range (e.g., 0 to 1), but it is expanded to the entire key range (e.g., 0 to 2 n -1) to follow a uniform distribution. Can be converted. That is, when the random variable X has a continuous distribution , the random variable Y = F X (X), where F X is a cumulative distribution function (CDF) for the distribution, may follow a uniform distribution.

다른 예를 들어, 프로세서는, 데이터 키 값들의 키 값 분포가 복수의 연속확률분포들에 매칭되지 않는 경우에 응답하여, 데이터 키 값들의 군집 레벨을 산출할 수 있다. 프로세서는 군집 레벨이 임계 레벨 이상인 경우에 응답하여, 데이터 키 값들이 군집된 것으로 판단할 수 있다. 프로세서는 군집된 데이터 키 값이 존재하는 구간의 누적 분포 함수의 기울기를 증가시킬 수 있다. 누적 분포 함수의 기울기 증가를 통해 해당 구간 안의 키 거리가 증가하므로, 프로세서는 키 값 분포를 균일하게 재분배할 수 있다. For another example, in response to a case in which the key value distribution of the data key values does not match the plurality of continuous probability distributions, the processor may calculate the clustering level of the data key values. The processor may determine that the data key values are clustered in response to the clustering level being equal to or greater than the threshold level. The processor may increase the slope of the cumulative distribution function of a section in which the clustered data key values exist. Since the key distance in the corresponding section is increased by increasing the slope of the cumulative distribution function, the processor can uniformly redistribute the key value distribution.

일실시예에 따라 변환 함수에 기초하여 키 값을 변환시키고, 해쉬 인덱스 구조를 생성하는 프로세서는 기능에 따라 키 간 거리 검사부(key distance checker), 누적 분포 함수 조율부(CDF tuner), 및 키 재매핑부(key remapper)로 구분할 수 있다. 부들은 동일한 프로세서에 의해 수행될 수 있고, 기능에 따라 구분된 부들일 수 있다.According to an exemplary embodiment, a processor that converts a key value based on a conversion function and generates a hash index structure includes a key distance checker, a cumulative distribution function tuner, and a key rebuild according to the function. It can be classified as a key remapper. The units may be executed by the same processor, and may be divided according to functions.

키 간 거리 검사부에 의해 균일 분포와 키 분포 간 거리 및 군집 레벨 중 적어도 하나를 계산함으로써, 데이터의 키 값을 변환할지 여부를 판단하는 것은 도 4를 통해 상세히 후술한다. 누적 분포 함수 조율부에 의해 키 값의 분포 형태를 판단하는 것은 도 5를 통해 후술한다. 키 재매핑부에 의해 데이터 키 값을 변환하고, 해쉬 인덱스 구조를 생성하는 것은 도 6을 통해 후술한다.Determining whether to convert a key value of data by calculating at least one of a uniform distribution, a distance between key distributions, and a cluster level by the inter-key distance checker will be described later in detail with reference to FIG. Determining the distribution shape of the key value by the cumulative distribution function tuning unit will be described later with reference to FIG. 5. Converting a data key value by the key remapping unit and generating a hash index structure will be described later with reference to FIG. 6.

도 4은 일실시예에 따라 키 값을 변환시킬지 여부를 결정하는 방법을 도시한 흐름도이다.4 is a flowchart illustrating a method of determining whether to convert a key value according to an embodiment.

디렉토리 더블링이 임계 횟수보다 많이 발생하는 경우, 프로세서는 데이터 키 값 분포가 균일한 키 값 분포에서 얼마나 멀리 떨어져 있는지 판단할 수 있다. 일실시예에 따르면, 프로세서는 데이터 키 값들 간의 거리 및 군집 레벨에 기초하여 동적 해싱, 예를 들어, 데이터 키 값들의 변환 동작의 수행 여부를 결정할 수 있다. 다만, 변환 동작 수행 여부를 판단하는 동작의 트리거 조건을 디렉토리 더블링 횟수로 한정하는 것은 아니다. 다른 예를 들어, 프로세서는 주기적으로 데이터 키 값의 분포가 균일한 키 값 분포에서 얼만큼 떨어져 있는지 여부를 판단할 수 있다.When directory doubling occurs more than a threshold number of times, the processor may determine how far the data key value distribution is from the uniform key value distribution. According to an embodiment, the processor may determine whether to perform dynamic hashing, for example, converting data key values, based on a distance between data key values and a cluster level. However, the trigger condition for the operation of determining whether the conversion operation is performed is not limited to the number of directory doublings. For another example, the processor may periodically determine how far the distribution of the data key values is apart from the uniform distribution of the key values.

일 실시예에 따르면 프로세서는 균일한 분포에 관련된 값과 키 값 분포 정보 간의 거리를 계산한 결과에 기초하여, 데이터 키 값들을 변환시킬지 여부를 판단할 수 있다. 다른 일실시예에 따르면 프로세서는 데이터 키 값들의 군집 레벨(cluster level)에 기초하여, 데이터 키 값들을 변환시킬지 여부를 판단할 수 있다. 도 4에서는 프로세서가 키 값 분포 정보 및 연속확률분포 간의 매칭 여부에 따라 균일한 분포 및 키 값 분포 정보 간의 거리 및 데이터 키 값들의 군집 레벨 중 하나를 선택적으로 계산하고, 계산된 거리 또는 계산된 군집 레벨을 이용하여 데이터 키 값들의 변환 수행 여부를 결정하는 예시를 설명한다. 다만, 이는 순전히 예시적인 것으로 이로 한정하는 것은 아니고, 프로세서는 단계들(412, 413)만을 수행하여 변환 동작 개시 여부를 결정하거나, 단계들(414, 415)만을 수행하여 변환 동작 개시 여부를 결정할 수도 있다.According to an embodiment, the processor may determine whether to convert data key values based on a result of calculating a distance between a value related to a uniform distribution and the key value distribution information. According to another embodiment, the processor may determine whether to convert data key values based on a cluster level of data key values. In FIG. 4, the processor selectively calculates one of a uniform distribution and a distance between the key value distribution information and a cluster level of data key values according to whether the key value distribution information and the continuous probability distribution match, and the calculated distance or the calculated cluster An example of determining whether to perform conversion of data key values using a level will be described. However, this is purely exemplary and is not limited thereto, and the processor may determine whether to start the conversion operation by performing only steps 412 and 413, or determine whether to start the conversion operation by performing only steps 414 and 415. have.

우선, 단계(411)에서 프로세서는 키 값 분포 정보의 분포 형태가 연속확률분포에 매칭하는지 여부를 판단할 수 있다. 예를 들어, 프로세서는 키 값 분포 정보의 분포 형태 및 복수의 연속확률분포들의 각 연속확률분포에 대응하는 형태에 매칭하는지 판단할 수 있다. 프로세서는 키 값 분포 정보의 분포 형태 및 각 연속확률분포에 대응하는 형태 간의 유사도를 산출할 수 있다. 프로세서는, 예를 들어, 임의의 연속확률분포에 대해 산출된 유사도가 임계 유사도를 초과하는 경우에 응답하여, 분포 형태가 해당 연속확률분포에 대응하는 형태에 매칭하는 것으로 결정할 수 있다. 프로세서는 분포 형태가 복수의 연속확률분포들 중 한 연속확률분포에 대응하는 형태에 매칭하는 경우에 응답하여, 분포 형태를 매칭된 연속확률분포로 결정할 수 있다.First, in step 411, the processor may determine whether the distribution type of the key value distribution information matches the continuous probability distribution. For example, the processor may determine whether a distribution type of the key value distribution information and a type corresponding to each continuous probability distribution of a plurality of continuous probability distributions are matched. The processor may calculate a similarity between a distribution type of the key value distribution information and a type corresponding to each continuous probability distribution. The processor may determine that the distribution shape matches the shape corresponding to the continuous probability distribution, for example, in response to a case in which the calculated similarity for an arbitrary continuous probability distribution exceeds a threshold similarity. In response to a case where the distribution shape matches a shape corresponding to one of the plurality of continuous probability distributions, the processor may determine the distribution shape as the matched continuous probability distribution.

그리고 단계(412)에서, 분포 형태가 연속확률분포에 매칭된 경우에 응답하여, 프로세서는 균일한 분포 및 키 값 분포 정보 간의 거리를 결정할 수 있다. 예를 들어, 프로세서는 거리로서 균일한 분포의 분산 값과 키 분포 정보의 분산 값의 차이를 계산할 수 있다. 키 분포 정보는 원시 키 값의 분포 정보일 수 있다.In step 412, in response to the case where the distribution type matches the continuous probability distribution, the processor may determine a distance between the uniform distribution and the key value distribution information. For example, the processor may calculate a difference between a variance value of a uniform distribution as a distance and a variance value of the key distribution information. The key distribution information may be distribution information of an original key value.

이어서, 단계(413)에서, 프로세서는 계산된 거리를 미리 지정된 임계 거리에 비교할 수 있다. 프로세서는 계산된 거리 및 임계 거리를 비교한 결과에 기초하여, 데이터 키 값들을 변환을 수행할 수 있다. 예를 들어, 프로세서는 결정된 거리가 미리 지정된 임계 거리 이상인지 여부를 판단할 수 있다. 결정된 거리가 미리 지정된 임계 거리 이상인 경우, 프로세서는 데이터 키 값을 변환시키기 위한 프로세스를 진행할 수 있지만, 임계 거리 미만인 경우, 프로세서는 키 값 분포가 균일하다고 판단하여 키 값 변환을 수행하지 않을 수 있다.Subsequently, in step 413, the processor may compare the calculated distance to a predetermined threshold distance. The processor may convert data key values based on a result of comparing the calculated distance and the threshold distance. For example, the processor may determine whether the determined distance is equal to or greater than a predetermined threshold distance. If the determined distance is greater than or equal to a predetermined threshold distance, the processor may proceed with a process for converting the data key value, but if it is less than the threshold distance, the processor may determine that the key value distribution is uniform and not perform the key value conversion.

예를 들어, 프로세서는 키 값 분포가 균일 분포에서 얼마나 벗어나는지 확인하기 위하여 키 값 분포의 분산을 사용할 수 있다. 임계 분산보다 키 값 분포의 분산이 큰 경우는 데이터 키 값이 평균으로부터 널리 퍼져 있음을 의미할 수 있고, 임계 분산보다 키 값 분포의 분산이 작은 경우는 키 값이 평균으로부터 가깝다는 것을 의미할 수 있다. For example, the processor may use the variance of the key value distribution to determine how far the key value distribution deviates from the uniform distribution. If the variance of the key value distribution is greater than the critical variance, it may mean that the data key value is wider from the average, and if the variance of the key value distribution is smaller than the critical variance, it may mean that the key value is close to the mean. have.

또한, 프로세서는 데이터 키 값들의 군집 레벨(cluster level)에 기초하여, 데이터 키 값들을 변환시킬지 여부를 판단할 수 있다. 예를 들어, 단계(414)에서 프로세서는 분포 형태가 복수의 연속확률분포들에 매칭되지 않는 경우에 응답하여, 데이터 키 값들의 군집 레벨을 결정할 수 있다. 프로세서는 데이터 키 값들 간의 공통 비트 개수를 군집 레벨로서 결정할 수 있다. 공통 비트 개수는 동일한 비트 값이 나타나는 비트 위치의 개수를 나타낼 수 있다. 예를 들어, 공통 비트 개수는 최상위 비트 위치로부터 공통된 비트 값이 나타나는 비트 위치 개수를 나타낼 수 있다. 다시 말해, 데이터 키 값들에서 공통 비트 개수는, 해당 데이터 키 값들에서 최상위 비트 위치로부터 서로 다른 비트 값이 나타나는 다음 하위 비트 위치 직전 비트 위치까지의 비트 위치 개수를 나타낼 수 있다. 예를 들어, 데이터 키 값들이 "1010", "1011"인 경우, 최상위 비트로부터 "101"의 비트 시퀀스가 공통되므로 공통 비트 개수는 3일 수 있다. 다른 예를 들어, 데이터 키 값들이 "1000", "1010"인 경우, 최상위 비트로부터 "10"의 비트 시퀀스가 공통되므로 공통 비트 개수는 2일 수 있다.Also, the processor may determine whether to convert data key values based on a cluster level of data key values. For example, in step 414, the processor may determine the clustering level of the data key values in response to the case where the distribution shape does not match the plurality of continuous probability distributions. The processor may determine the number of common bits between data key values as the cluster level. The number of common bits may indicate the number of bit positions in which the same bit value appears. For example, the number of common bits may indicate the number of bit positions at which a common bit value appears from the most significant bit position. In other words, the number of common bits in the data key values may represent the number of bit positions from the most significant bit position to the bit position immediately before the next lower bit position where different bit values appear in the corresponding data key values. For example, when the data key values are "1010" and "1011", since the bit sequence of "101" from the most significant bit is common, the number of common bits may be 3. For another example, when the data key values are "1000" and "1010", since the bit sequence of "10" from the most significant bit is common, the number of common bits may be 2.

그리고 단계(415)에서 프로세서는 군집 레벨을 임계 레벨에 비교할 수 있다. 예를 들어, 프로세서는 군집 레벨이 미리 지정된 임계 레벨 이상인 경우에 응답하여, 단계(120)로 진행하여 데이터 키 값들의 변환을 계속해서 수행할 수 있다. 군집 레벨이 공통 비트 개수인 경우, 임계 레벨은 미리 지정된 임계 공통 개수를 나타낼 수 있다. 다른 예를 들어, 프로세서는 결정된 군집 레벨이 미리 지정된 임계 레벨 미만인 경우에 응답하여, 데이터 키 값의 변환(예를 들어, 도 1의 단계(120)의 변환 함수 결정, 단계(120)의 키 값 변환, 및 단계(140)의 해쉬 인덱스 구조 생성)을 스킵(skip)할 수 있다.And in step 415, the processor may compare the cluster level to the threshold level. For example, in response to the cluster level being equal to or greater than a predetermined threshold level, the processor may proceed to step 120 to continuously perform conversion of data key values. When the cluster level is the number of common bits, the threshold level may represent a predetermined threshold common number. For another example, in response to a case where the determined cluster level is less than a predetermined threshold level, the processor converts the data key value (e.g., determines the conversion function in step 120 of FIG. 1, the key value of step 120). Transformation and generation of the hash index structure in step 140) may be skipped.

도 5는 일실시예에 따른 키 값의 분포 형태를 도시한 도면이다.5 is a diagram illustrating a distribution of key values according to an embodiment.

제1 그래프(510)는 평균과 분산 값에 대한 정규 분포를 도시한 것이고, 제2 그래프(520)는 정규 분포에 상응하는 누적 분포 함수를 도시한 것이다. 제3 그래프(530)는 형상 k에 따른 감마 분포를 도시한 그래프이다.The first graph 510 shows a normal distribution for the mean and variance values, and the second graph 520 shows a cumulative distribution function corresponding to the normal distribution. The third graph 530 is a graph showing the gamma distribution according to the shape k.

프로세서가 키 값 분포가 균일하지 않다고 판단하면, 키 값 분포가 균일 해지도록 데이터 키 값을 변환시킬 수 있다. 키 값을 변환시키기 위해 프로세서는 데이터 키 값 분포 형태 또는 키 간 거리를 파악해야 할 수 있다. 프로세서는 키 값 분포 정보의 분포 형태를 복수의 연속확률분포들 중 하나로 결정할 수 있다.If the processor determines that the key value distribution is not uniform, it may convert the data key value so that the key value distribution becomes uniform. In order to convert the key value, the processor may need to determine the distribution of the data key value or the distance between the keys. The processor may determine a distribution type of the key value distribution information as one of a plurality of continuous probability distributions.

연속확률분포는 예를 들어, 정규(normal) 분포, 지수(exponential) 분포, 및 감마(gamma) 분포를 포함할 수 있다. 본 명세서에서 연속확률분포로서 주로 정규 분포, 지수 분포, 및 감마 분포를 예시적으로 설명하나, 이는 설명의 편의를 위한 것으로서, 이로 한정되는 것은 아니다. 예를 들어, 상술한 예시적인 분포 각각은 다른 연속 분포와 많은 관계가 있을 수 있고, 특정 파라미터에 따라 다양한 분포가 될 수 있다. 예시적으로, 정규 분포는 일반적인 연속확률분포이고, 모양 매개 변수 k와 스케일 매개 변수 q의 두 매개 변수를 갖는 감마 분포는 매개 변수 값에 따라 지수 분포, 얼랭 분포(Erlang distribution) 및 카이 제곱 분포(chi-squared distribution)가 될 수 있다. 따라서 프로세서는 여러 분포 형태를 고려하여 다양한 워크로드를 제공할 수 있다.The continuous probability distribution may include, for example, a normal distribution, an exponential distribution, and a gamma distribution. In the present specification, a normal distribution, an exponential distribution, and a gamma distribution are mainly exemplarily described as a continuous probability distribution, but these are for convenience of description and are not limited thereto. For example, each of the exemplary distributions described above may have many relationships with other continuous distributions, and may be various distributions according to specific parameters. As an example, the normal distribution is a normal continuous probability distribution, and the gamma distribution with two parameters, a shape parameter k and a scale parameter q, is an exponential distribution, an Erlang distribution, and a chi-square distribution ( chi-squared distribution). Therefore, the processor can provide various workloads in consideration of various distribution types.

예를 들어, 연속확률분포들 중 정규(normal), 지수(exponential) 및 감마(gamma) 분포 중 하나로 분류하는 경우, 프로세서는 최대 엔트로피의 원리에 기초하여 키 값 분포 정보의 분포 형태가 정규 분포와 유사한지 여부를 판단할 수 있다. 예를 들어, 프로세서는 키 값 분포 정보의 분산이 평균값을 제곱한 값에 근사하면, 키 값 분포 정보의 분포 형태가 지수 분포라고 판단할 수 있다.For example, in the case of classifying one of the continuous probability distributions into one of normal, exponential, and gamma distributions, the processor determines the distribution type of the key value distribution information based on the principle of maximum entropy. You can determine whether they are similar or not. For example, if the variance of the key value distribution information is approximated to a squared value of the average value, the processor may determine that the distribution form of the key value distribution information is an exponential distribution.

또한, 정규 분포라고 판단한 키 값 분포 지지집합에서 키가 존재할 수 있는 유의미한 범위를 구하였을 때 음수 값이 포함된다면 이를 감마분포라고 판단할 수 있다. 예를 들어 정규분포의 평균과 표준편차를 이용하여 전체의 99.7%에 해당하는 키가 존재하는 구간 값을 구했을 때 이 구간에 음수 범위가 포함된다면, 전체 키 분포가 양수 값만을 가지는 것을 고려했을 때 오차를 줄이기 위해 이를 감마분포라고 판단할 수 있다.In addition, if a negative value is included when a significant range in which the key can exist in the key value distribution support set determined to be a normal distribution, it can be determined as a gamma distribution. For example, when the average and standard deviation of the normal distribution are used to find the value of the interval in which the key corresponding to 99.7% of the total exists, if the interval contains a negative range, consider that the total key distribution has only positive values. In order to reduce the error, it can be determined as a gamma distribution.

프로세서는 키 값 분포 정보의 분포 형태를 복수의 연속확률분포들(예를 들어, 정규 분포, 지수 분포 및 감마 분포) 중 한 연속확률분포 중 하나로 분류하고, 분포 파라미터(distribution parameter)를 계산하여 분포의 누적 분포 함수를 계산할 수 있다.The processor classifies the distribution type of the key value distribution information into one of a plurality of continuous probability distributions (e.g., normal distribution, exponential distribution, and gamma distribution), and calculates the distribution parameter to distribute the distribution. The cumulative distribution function of can be calculated.

추가적으로, 프로세서는 누적 분포 함수를 선형 보간에 기반한 일련의 선형 함수의 집합으로 변환할 수 있다. 우리는 0에서 2n-1 까지의 전체 키 범위를 각 하위 범위에 동일한 수의 키가 포함하도록 하위 범위을 나눌 수 있다. 이 하위 범위는 분포의 Quantile 함수 (즉, 역 누적 분포 함수)를 사용하여 찾을 수 있다. Quantile 함수에 대해 간단한 닫힌 형태를 갖지 않는 연속확률 분포의 경우, 프로세서는 수치적 방법에 기반한 근사법을 사용하여 변환 함수를 결정할 수 있다. 프로세서는 분포의 누적 분포 함수를 기반으로 각 하위 범위에 대한 선형 함수를 생성하고 하위 범위의 키에 대한 변형 함수로 선형 함수를 사용할 수 있다.Additionally, the processor can transform the cumulative distribution function into a set of a series of linear functions based on linear interpolation. We can divide the subranges so that the entire range of keys from 0 to 2 n -1 contains the same number of keys in each subrange. This subrange can be found using the Quantile function of the distribution (i.e. the inverse cumulative distribution function). In the case of a continuous probability distribution that does not have a simple closed form for the quantile function, the processor can determine the transform function using an approximation based on a numerical method. The processor may generate a linear function for each subrange based on the cumulative distribution function of the distribution and use the linear function as a transformation function for the keys of the subrange.

도 6은 일실시예에 따라 디렉토리를 생성하는 것을 도시한 도면이다.6 is a diagram illustrating creating a directory according to an embodiment.

일실시예에 따라, 프로세서가 키 값 분포 정보의 분포 형태를 판단하고 누적 분포 함수를 기반으로 변환 함수를 생성 한 후에는 변환된 키를 다시 맵핑 해야 한다. 프로세서는 새로운 디렉토리를 생성할 수 있고, 디렉토리에 기초하여 버킷에 변환된 키 값을 매핑시킬 수 있다.According to an embodiment, after the processor determines the distribution type of the key value distribution information and generates a transformation function based on the cumulative distribution function, the transformed key must be remapped. The processor can create a new directory and map the converted key value to the bucket based on the directory.

프로세서는 변환 함수에 기초하여 새로운 디렉토리를 생성하고, 새 디렉토리의 각 항목이 지시하는 버킷의 로컬 깊이를 결정할 수 있다. 프로세서는 최상위 비트로 확장 해싱을 위해 디렉토리에 대한 버킷의 히스토리와 연관되는 이진 버디 트리(binary buddy tree)를 작성할 수 있다. 프로세서가 새 디렉토리를 생성하는 과정에서 바이너리 버디 트리에서 버킷이 가리키는 연속적인 디렉토리 항목의 수가 2G-L 이어야 한다는 사실을 활용함으로써, 버킷의 로컬 깊이를 결정할 수 있다. The processor may create a new directory based on the conversion function and determine the local depth of the bucket pointed to by each entry in the new directory. The processor can create a binary buddy tree that is associated with the history of the bucket for the directory for extended hashing to the most significant bit. By taking advantage of the fact that the number of consecutive directory entries pointed to by the bucket in the binary buddy tree must be 2 GL while the processor creates a new directory, it can determine the local depth of the bucket.

도 6에서 이전 디렉토리를 지시하는 어레이를 dir, 새로운 디렉토리를 지시하는 어레이를 dirnew로 도시된다. 디렉토리를 지시하는 어레이의 각 항목은 임의의 버킷에 대응할 수 있고, 디렉토리 항목이라고 나타낼 수 있다.. 예를 들어, dir[i]는 이전 디렉토리의 i번째 디렉토리 항목이고, dirnew[j]는 새로운 디렉토리의 j번째 디렉토리 항목을 나타낼 수 있다. i, j는 각각 0 이상의 정수일 수 있다.In FIG. 6, an array indicating a previous directory is illustrated as dir, and an array indicating a new directory is illustrated as dir new . Each item in the array pointing to a directory can correspond to an arbitrary bucket and can be represented as a directory item. For example, dir[i] is the i-th directory item of the previous directory, and dir new [j] is the new directory item. Can represent the j-th directory entry in the directory. Each of i and j may be an integer greater than or equal to 0.

일 실시예에 따른 디렉토리 매핑 관계(610)에서, 프로세서는 기존 버킷을 dirnew에 분산시킬 수 있는 분할 히스토리를 구성하여 변환 함수를 기반으로 G=4의 새 디렉토리 (dirnew)를 생성할 수 있다. 이 실시예에서 이전 디렉토리에서 dir[0]이 지시하는 버킷 B1은, 새 디렉토리의 dirnew[0]에서 dirnew[5]까지 6 개의 항목에 의해 지시되는 경우를 가정한다. 디렉토리 매핑 관계(610)에 대한 예시적인 매핑 과정을 아래에서 설명한다. 이 경우, dirnew [0]의 가능한 최소 L은 0이며, 현재 최대 24 = 16 개의 디렉토리 항목이 dirnew[0]의 B1을 가리킬 수 있다. In the directory mapping relationship 610 according to an embodiment, the processor may create a new directory (dir new ) of G=4 based on the conversion function by constructing a partitioning history capable of distributing an existing bucket to dir new. . Bucket B1 that dir [0] in the previous directory indicated in this embodiment, it is assumed to be indicated by the six items to new dir [5] from the new dir [0] for the new directory. An exemplary mapping process for the directory mapping relationship 610 will be described below. In this case, the minimum possible L of dir new [0] is 0, and the current maximum 2 4 = 16 directory entries can point to B1 of dir new [0].

그 후, 제2 매핑 과정(630)과 같이, 프로세서는 dir에서 다음 디렉토리 B2 (예를 들어, 두 번째 버킷)를 가리키는 새 디렉토리의 항목을 계산할 수 있다. 먼저 이전 변환 함수에 기초하여 프로세서는 B2에 삽입할 수 있는 최소 키 k를 계산할 수 있다. 그런 다음 프로세서는 새로운 변환 함수를 사용하여 k를 k`로 변환하고 k`의 접두사를 추출하여 dirnew의 인덱스를 계산할 수 있다. dirnew[6]가 버킷 B2를 지시하는 경우, B1이 L=2 레벨의 형제 버킷인 B3을 가져야 하기 때문에 B1는 dirnew[0]에서 dirnew[3]까지 4 개의 연속 항목으로 표시될 수 있다. B1은 두 번 분할되므로 4 개의 항목에 대한 L은 2로 계산될 수 있다. 따라서, 제2 매핑 과정(630)에 도시된 바와 같이 L=2 인 레벨에 B1의 형제 버킷인 B3가 존재할 수 있으며, 프로세서는 B3에 근본이 있는 서브 트리에서 가장 왼쪽 항목인 dirnew[4]에 B3를 매핑시킬 수 있다. 또한, L = 1 인 레벨에서 B1의 형제 버킷인 B4 가 존재해야 하며, 프로세서는 B4를 유사한 방식으로 dirnew[8]에 매핑시킬 수 있다.Thereafter, as in the second mapping process 630, the processor may calculate an entry in the new directory pointing to the next directory B2 (eg, the second bucket) in dir. First, based on the previous transformation function, the processor may calculate the minimum key k that can be inserted into B2. The processor can then use a new conversion function to convert k to k'and compute the index of dir new by extracting the prefix of k'. dir new case of [6] instructs the bucket B2, B1 is L = 2 levels of because have a brother bucket of B3 B1 is in the dir new [0] dir new [3] to be displayed in four consecutive entries have. Since B1 is divided twice, L for 4 items can be calculated as 2. Accordingly, as shown in the second mapping process 630, B3, which is a sibling bucket of B1, may exist at the level of L=2, and the processor is dir new [4], which is the leftmost item in the subtree rooted in B3. You can map B3 to Also, at the level where L = 1, there must be a sibling bucket of B1, B4, and the processor can map B4 to dir new [8] in a similar manner.

제3 매핑 과정(640)과 같이 B3가 한 번 더 분할되어야 하므로, 두 개의 항목 dirnew[4]와 dirnew[5]는 B3를 지시하게 되고 B3의 L은 3이 된다.As in the third mapping process 640, since B3 needs to be divided once more, two items dir new [4] and dir new [5] indicate B3, and L of B3 becomes 3.

새 디렉토리를 작성하는 동안 프로세서는 삽입 및 삭제를 제외한 모든 조작을 정상적으로 수행할 수 있다.While creating a new directory, the processor can perform all operations normally except inserts and deletes.

PM의 경우, dirnew가 작성되면 프로세서는 데이터가 저장되는 순서를 보장하는 명령어(예를 들어, CLFLUSH 및 MFENCE 명령)을 지속적으로 호출할 수 있다.In the case of PM, when dir new is written, the processor can continuously call instructions (eg, CLFLUSH and MFENCE instructions) that ensure the order in which data is stored.

이전 디렉토리의 동일한 버킷에 매핑되었던 복수의 키는 새로운 변환 함수에 따라 다른 접두사를 가질 수 있기 때문에, 프로세서는 복수의 키 값들이 변환시켜 새로운 디렉토리의 다른 버킷에 매핑시킬 수 있다. 동일한 버킷에 복수의 키가 매핑되었던 경우를 처리하기 위해 프로세서는 dirnew에 대한 새 버킷을 생성하고 dir의 모든 버킷에 있는 키-포인터 레코드(key-pointer record)를 새 디렉토리에 할당할 수 있다. 프로세서는 디렉토리의 각 버킷에 대해 버킷의 관련 포인터와 함께 각 키 값을 읽고, 각 키들을 새 디렉토리에 하나씩 매핑시킬 수 있다. 프로세서는 변환 함수를 사용하여 k를 k`로 변환시키고, dirnew에서 인덱스i를 찾기 위해 k`의 접두사를 계산할 수 있다. 버킷이 dirnew[i]에 할당되지 않은 경우, 프로세서는 새 버킷을 생성하여 메모리에 저장할 수 있다. 그런 다음 프로세서는, 예를 들어 PM의 경우 CLFLUSH 및 MFENCE 명령어를 사용하여, dirnew[i]의 버킷에 대한 포인터를 업데이트할 수 있다. 프로세서가 dir의 모든 키 포인터 레코드를 dirnew로 이전시키면, 프로세서는 이전 디렉토리 대신 새 디렉토리로 전환하여 사용할 수 있다. 새 디렉토리로 전환 후 PM의 경우, 이전 디렉토리 배열과 이전 버킷은 더 이상 사용되지 않는 객체이다. 따라서 결국 PMDK와 같은 영구 메모리 관리자에 의해 가비지(garbage)가 수집될 수 있다.Since a plurality of keys mapped to the same bucket in the previous directory may have different prefixes according to the new conversion function, the processor may convert the plurality of key values and map them to different buckets in the new directory. In order to handle the case were more keys are mapped to the same bucket processor generates a new bucket for dir new and key in any bucket in the dir - may assign a pointer to the record (key-pointer record) to the new directory. For each bucket in the directory, the processor reads the value of each key along with the bucket's associated pointer, and can map each key to a new directory one by one. The processor can use a conversion function to convert k to k and compute the prefix of k to find the index i in dir new. If the bucket is not assigned to dir new [i], the processor can create a new bucket and store it in memory. The processor can then update the pointer to the bucket of dir new [i] using the CLFLUSH and MFENCE instructions, for example in the case of PM. If the processor moves all the key pointer records in dir to dir new , the processor can switch to the new directory instead of the old one and use it. In the case of PM after switching to the new directory, the old directory array and the old bucket are obsolete objects. Thus, in the end, garbage may be collected by a permanent memory manager such as PMDK.

프로세서가 레코드들을 기존 디렉토리에서 새 디렉토리로 이전하는 동안, 프로세서는 새 디렉토리로 복사한 키 포인터 레코드와 복사 전인 키 포인터 레코드를 구분 할 수 있기 때문에 여전히 기존 디렉토리와 새 디렉토리를 모두 사용하여 해싱 색인에 액세스하여 검색 및 스캔을 수행할 수 있다.While the processor is migrating records from the old directory to the new directory, the processor can still distinguish between the key pointer records copied to the new directory and the key pointer records that were before the copy, so the hashing index is still accessed using both the old and new directories. You can search and scan.

도 7은 일실시예에 따른 키 값 변환 장치(700)의 개괄적인 구성을 도시한 블록도이다.7 is a block diagram showing an outline configuration of a key value conversion apparatus 700 according to an embodiment.

일실시예에 따른 키 값 변환 장치(700)는 프로세서(710) 및 메모리(720)를 포함할 수 있다. 프로세서(710)는 데이터 키 값들에 대해 산출된 키 값 분포 정보의 분포 형태를 판단하고, 키 값 분포 정보의 분포 형태에 기초하여, 데이터 키 값들을 변환시키는 변환 함수를 결정하며, 기 결정된 변환 함수를 이용하여 데이터 키 값들을 균일(uniform)한 분포에 대응하는 값으로 변환하고, 변환된 데이터 키 값들에 관련된 해쉬 인덱스 구조(hash index structure)를 생성할 수 있다. 메모리(720)는 해쉬 인덱스 구조에 변환된 데이터 키 값들을 적어도 일시적으로 저장할 수 있다.The key value conversion apparatus 700 according to an embodiment may include a processor 710 and a memory 720. The processor 710 determines a distribution type of the key value distribution information calculated for the data key values, determines a transformation function for converting data key values based on the distribution type of the key value distribution information, and a predetermined transformation function By using, data key values may be converted into values corresponding to a uniform distribution, and a hash index structure related to the transformed data key values may be generated. The memory 720 may at least temporarily store the converted data key values in the hash index structure.

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

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

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -A hardware device specially configured to store and execute program instructions such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those produced by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.

이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described by the limited drawings, a person of ordinary skill in the art can apply various technical modifications and variations based on the above. For example, the described techniques are performed in a different order from the described method, and/or components such as systems, structures, devices, circuits, etc. described are combined or combined in a form different from the described method, or other components Alternatively, even if substituted or substituted by an equivalent, an appropriate result can be achieved.

Claims (15)

프로세서에 의해 스캔 가능한 동적 해싱(hashing)을 수행하는 방법에 있어서,
데이터 키 값들에 대해 산출된 키 값 분포 정보의 분포 형태를 판단하는 단계;
상기 키 값 분포 정보의 상기 분포 형태를 판단한 결과에 기초하여, 상기 데이터 키 값들을 변환시키는 변환 함수를 결정하는 단계;
상기 결정된 변환 함수를 이용하여 상기 데이터 키 값들을 균일(uniform)한 분포에 대응하는 값으로 변환하는 단계; 및
상기 변환된 데이터 키 값들에 관련된 해쉬 인덱스 구조(hash index structure)를 생성하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
In the method of performing dynamic hashing (hashing) scannable by a processor,
Determining a distribution type of the key value distribution information calculated for the data key values;
Determining a conversion function for converting the data key values based on a result of determining the distribution type of the key value distribution information;
Converting the data key values into values corresponding to a uniform distribution using the determined transformation function; And
Generating a hash index structure related to the converted data key values
A method of performing scannable dynamic hashing comprising a.
제1항에 있어서,
균일한 분포에 관련된 값과 상기 키 값 분포 정보 간의 거리를 계산한 결과에 기초하여, 상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계
를 더 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 1,
Determining whether to convert the data key values based on a result of calculating a distance between a value related to a uniform distribution and the key value distribution information
A method of performing scannable dynamic hashing further comprising a.
제2항에 있어서,
상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계는,
상기 거리로서 상기 균일한 분포의 분산 값과 상기 키 분포 정보의 분산 값의 차이를 계산하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 2,
The step of determining whether to convert the data key values,
Calculating a difference between the variance value of the uniform distribution and the variance value of the key distribution information as the distance
A method of performing scannable dynamic hashing comprising a.
제2항에 있어서,
상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계는,
상기 계산된 거리를 미리 지정된 임계 거리에 비교하는 단계; 및
상기 계산된 거리 및 상기 임계 거리를 비교한 결과에 기초하여, 상기 데이터 키 값들을 변환을 수행하는 단계
를 더 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 2,
The step of determining whether to convert the data key values,
Comparing the calculated distance to a predetermined threshold distance; And
Converting the data key values based on a result of comparing the calculated distance and the threshold distance
A method of performing scannable dynamic hashing further comprising a.
제1항에 있어서,
상기 데이터 키 값들의 군집 레벨(cluster level)에 기초하여, 상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계
를 더 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 1,
Determining whether to convert the data key values based on a cluster level of the data key values
A method of performing scannable dynamic hashing further comprising a.
제5항에 있어서,
상기 데이터 키 값들을 변환시킬지 여부를 판단하는 단계는,
상기 데이터 키 값들 간의 공통 비트 개수를 상기 군집 레벨로서 결정하는 단계; 및
상기 군집 레벨이 미리 지정된 임계 레벨 이상인 경우에 응답하여, 상기 데이터 키 값들을 변환을 수행하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 5,
The step of determining whether to convert the data key values,
Determining the number of common bits between the data key values as the cluster level; And
In response to the cluster level being equal to or greater than a predetermined threshold level, converting the data key values
A method of performing scannable dynamic hashing comprising a.
제1항에 있어서,
상기 키 값 분포 정보는 상기 데이터 키 값들의 분산 및 평균을 포함하는
스캔 가능한 동적 해싱 수행 방법.
The method of claim 1,
The key value distribution information includes a variance and an average of the data key values.
How to perform scannable dynamic hashing.
제1항에 있어서,
상기 분포 형태를 판단하는 단계는,
상기 분포 형태 및 복수의 연속확률분포들의 각 연속확률분포에 대응하는 형태에 매칭하는지 판단하는 단계; 및
상기 분포 형태가 상기 복수의 연속확률분포들 중 한 연속확률분포에 대응하는 형태에 매칭하는 경우에 응답하여, 상기 분포 형태를 매칭된 연속확률분포로 결정하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 1,
The step of determining the distribution shape,
Determining whether the distribution shape and the shape corresponding to each continuous probability distribution of the plurality of continuous probability distributions match; And
In response to a case in which the distribution shape matches a shape corresponding to one of the plurality of continuous probability distributions, determining the distribution shape as a matched continuous probability distribution
A method of performing scannable dynamic hashing comprising a.
제8항에 있어서,
상기 분포 형태를 판단하는 단계는,
상기 분포 형태가 상기 복수의 연속확률분포들에 매칭되지 않는 경우에 응답하여, 상기 데이터 키 값들의 군집 레벨을 결정하는 단계; 및
상기 결정된 군집 레벨이 미리 지정된 임계 레벨 미만인 경우에 응답하여, 상기 데이터 키 값의 변환을 스킵(skip)하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 8,
The step of determining the distribution shape,
Determining a cluster level of the data key values in response to a case where the distribution shape does not match the plurality of continuous probability distributions; And
In response to the determined cluster level being less than a predetermined threshold level, skipping conversion of the data key value
A method of performing scannable dynamic hashing comprising a.
제1항에 있어서,
상기 변환 함수를 결정하는 단계는,
상기 키 값 분포 정보의 분포 형태에 대한 누적 분포 함수(Cumulative distribution function, CDF)에 기초하여 상기 변환 함수를 결정하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 1,
The step of determining the conversion function,
Determining the transformation function based on a cumulative distribution function (CDF) for a distribution type of the key value distribution information
A method of performing scannable dynamic hashing comprising a.
제10항에 있어서,
상기 변환 함수를 결정하는 단계는,
선형 보간법에 기초하여 상기 누적 분포 함수를 일련의 선형 함수들의 집합으로 변환하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 10,
The step of determining the conversion function,
Converting the cumulative distribution function into a set of linear functions based on a linear interpolation method
A method of performing scannable dynamic hashing comprising a.
제11항에 있어서,
상기 변환 함수를 결정하는 단계는,
상기 데이터 키 값들을 데이터 키 값 개수에 따라 복수의 그룹으로 분할하고, 각 그룹에 대한 선형 함수를 계산하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 11,
The step of determining the conversion function,
Dividing the data key values into a plurality of groups according to the number of data key values, and calculating a linear function for each group
A method of performing scannable dynamic hashing comprising a.
제1항에 있어서,
상기 해쉬 인덱스 구조를 결정하는 단계는,
상기 데이터 키 값에 관련된 디렉토리(directory) 및 상기 디렉토리에 대응하는 버킷(bucket)을 생성하고, 상기 변환 함수에 따라 변환된 데이터 키 값들을 상기 버킷에 매핑하는 단계
를 포함하는 스캔 가능한 동적 해싱 수행 방법.
The method of claim 1,
The step of determining the hash index structure,
Creating a directory related to the data key value and a bucket corresponding to the directory, and mapping data key values converted according to the conversion function to the bucket
A method of performing scannable dynamic hashing comprising a.
제1항 내지 제13항 중 어느 한 항의 방법을 수행하기 위한 명령어들을 포함하는 하나 이상의 컴퓨터 프로그램을 저장한 컴퓨터 판독 가능 기록 매체.A computer-readable recording medium storing one or more computer programs including instructions for performing the method of claim 1. 데이터 키 값들에 대해 산출된 키 값 분포 정보의 분포 형태를 판단하고, 키 값 분포 정보의 상기 분포 형태를 판단한 결과에 기초하여, 상기 데이터 키 값들을 변환시키는 변환 함수를 결정하며, 기 결정된 변환 함수를 이용하여 상기 데이터 키 값들을 균일(uniform)한 분포에 대응하는 값으로 변환하고, 상기 변환된 데이터 키 값들에 관련된 해쉬 인덱스 구조(hash index structure)를 생성하는 프로세서; 및
상기 해쉬 인덱스 구조에 상기 변환된 데이터 키 값들을 저장하는 메모리;
를 포함하는 스캔 가능한 동적 해싱 수행 장치.
Determine a distribution type of the key value distribution information calculated for data key values, determine a conversion function for converting the data key values based on the result of determining the distribution type of the key value distribution information, and a predetermined conversion function A processor for converting the data key values into values corresponding to a uniform distribution by using and generating a hash index structure related to the transformed data key values; And
A memory for storing the converted data key values in the hash index structure;
An apparatus for performing scannable dynamic hashing comprising a.
KR1020200032602A 2019-10-31 2020-03-17 Method and apparatus for conversing data key value KR102388458B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190137520 2019-10-31
KR20190137520 2019-10-31

Publications (2)

Publication Number Publication Date
KR20210052148A true KR20210052148A (en) 2021-05-10
KR102388458B1 KR102388458B1 (en) 2022-04-21

Family

ID=75917951

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200032602A KR102388458B1 (en) 2019-10-31 2020-03-17 Method and apparatus for conversing data key value

Country Status (1)

Country Link
KR (1) KR102388458B1 (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010047384A (en) * 1999-11-19 2001-06-15 오길록 A method for controlling directory splits of the extendible hashing
KR20060013815A (en) 2004-08-09 2006-02-14 한국전자통신연구원 Hash table address dispersion apparatus and method, pattern matching apparatus using it
JP2008513891A (en) * 2004-09-15 2008-05-01 ディリジェント テクノロジーズ コーポレイション System and method for retrieving and storing data
JP2010531020A (en) * 2007-06-18 2010-09-16 株式会社ソニー・コンピュータエンタテインメント Load distribution of data distribution to multiple recipients on a peer-to-peer network
US7962453B2 (en) * 2004-04-26 2011-06-14 Oracle International Corporation Dynamic redistribution of a distributed memory index when individual nodes have different lookup indexes
JP2013045181A (en) * 2011-08-22 2013-03-04 Nippon Telegr & Teleph Corp <Ntt> Load distribution device of database
KR20130064319A (en) * 2011-12-08 2013-06-18 한양대학교 에리카산학협력단 Hybrid hash index for storage device based on flash memory
KR20140060285A (en) * 2011-07-22 2014-05-19 샌디스크 테크놀로지스, 인코포레이티드 Systems and methods of storing data
JP2014130489A (en) * 2012-12-28 2014-07-10 Fujitsu Ltd Data storage program, data retrieval program, data retrieval device, data storage method, and data retrieval method
JP2015176407A (en) * 2014-03-17 2015-10-05 Necソリューションイノベータ株式会社 Search device, search method, search program and search data structure
KR101695277B1 (en) * 2016-04-26 2017-01-11 (주)시큐레이어 Method for supporting regularization of unconstructed data and computing device using the same
US20180341596A1 (en) * 2017-05-26 2018-11-29 Oracle International Corporation Latchless, non-blocking dynamically resizable segmented hash index
WO2019111435A1 (en) * 2017-12-05 2019-06-13 日本電気株式会社 Malfunction assessment device, malfunction assessment method, and non-transient computer-readable medium whereon program has been stored

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010047384A (en) * 1999-11-19 2001-06-15 오길록 A method for controlling directory splits of the extendible hashing
US7962453B2 (en) * 2004-04-26 2011-06-14 Oracle International Corporation Dynamic redistribution of a distributed memory index when individual nodes have different lookup indexes
KR20060013815A (en) 2004-08-09 2006-02-14 한국전자통신연구원 Hash table address dispersion apparatus and method, pattern matching apparatus using it
JP2008513891A (en) * 2004-09-15 2008-05-01 ディリジェント テクノロジーズ コーポレイション System and method for retrieving and storing data
JP2010531020A (en) * 2007-06-18 2010-09-16 株式会社ソニー・コンピュータエンタテインメント Load distribution of data distribution to multiple recipients on a peer-to-peer network
KR20140060285A (en) * 2011-07-22 2014-05-19 샌디스크 테크놀로지스, 인코포레이티드 Systems and methods of storing data
JP2013045181A (en) * 2011-08-22 2013-03-04 Nippon Telegr & Teleph Corp <Ntt> Load distribution device of database
KR20130064319A (en) * 2011-12-08 2013-06-18 한양대학교 에리카산학협력단 Hybrid hash index for storage device based on flash memory
JP2014130489A (en) * 2012-12-28 2014-07-10 Fujitsu Ltd Data storage program, data retrieval program, data retrieval device, data storage method, and data retrieval method
JP2015176407A (en) * 2014-03-17 2015-10-05 Necソリューションイノベータ株式会社 Search device, search method, search program and search data structure
KR101695277B1 (en) * 2016-04-26 2017-01-11 (주)시큐레이어 Method for supporting regularization of unconstructed data and computing device using the same
US20180341596A1 (en) * 2017-05-26 2018-11-29 Oracle International Corporation Latchless, non-blocking dynamically resizable segmented hash index
WO2019111435A1 (en) * 2017-12-05 2019-06-13 日本電気株式会社 Malfunction assessment device, malfunction assessment method, and non-transient computer-readable medium whereon program has been stored

Also Published As

Publication number Publication date
KR102388458B1 (en) 2022-04-21

Similar Documents

Publication Publication Date Title
US11899641B2 (en) Trie-based indices for databases
US8868926B2 (en) Cryptographic hash database
Lemire et al. Consistently faster and smaller compressed bitmaps with roaring
US10255287B2 (en) Method and apparatus for on-disk deduplication metadata for a deduplication file system
US8224829B2 (en) Database
US10552378B2 (en) Dividing a dataset into sub-datasets having a subset of values of an attribute of the dataset
US20190065546A1 (en) Multi stage aggregation using digest order after a first stage of aggregation
AU2002222096A1 (en) Method of organising, interrogating and navigating a database
KR102440128B1 (en) Memory management divice, system and method for unified object interface
JPH1131096A (en) Data storage/retrieval system
CN105989015B (en) Database capacity expansion method and device and method and device for accessing database
WO2024078122A1 (en) Database table scanning method and apparatus, and device
KR102388458B1 (en) Method and apparatus for conversing data key value
WO2015129109A1 (en) Index management device
EP3995972A1 (en) Metadata processing method and apparatus, and computer-readable storage medium
JP2000181768A (en) Data storage/retrieval system
CN117389950A (en) LSM tree layer design method and system based on learning index
Alom et al. COMPRESSED DATABASE STRUCTURE TO MANAGE LARGE SCALE DATA IN A DISTRIBUTED ENVIRONMENT

Legal Events

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