KR20170093767A - Method for Hash collision detection that is based on the sorting unit of the bucket - Google Patents

Method for Hash collision detection that is based on the sorting unit of the bucket Download PDF

Info

Publication number
KR20170093767A
KR20170093767A KR1020170096213A KR20170096213A KR20170093767A KR 20170093767 A KR20170093767 A KR 20170093767A KR 1020170096213 A KR1020170096213 A KR 1020170096213A KR 20170096213 A KR20170096213 A KR 20170096213A KR 20170093767 A KR20170093767 A KR 20170093767A
Authority
KR
South Korea
Prior art keywords
bucket
record
records
new record
hash
Prior art date
Application number
KR1020170096213A
Other languages
Korean (ko)
Other versions
KR101866697B1 (en
Inventor
최규상
온병원
이인규
Original Assignee
영남대학교 산학협력단
군산대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 영남대학교 산학협력단, 군산대학교산학협력단 filed Critical 영남대학교 산학협력단
Priority to KR1020170096213A priority Critical patent/KR101866697B1/en
Publication of KR20170093767A publication Critical patent/KR20170093767A/en
Application granted granted Critical
Publication of KR101866697B1 publication Critical patent/KR101866697B1/en

Links

Images

Classifications

    • G06F17/30949
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9014Indexing; Data structures therefor; Storage structures hash tables
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/325Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • G06F17/3033
    • G06F17/30628
    • G06F17/30952
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99941Database schema or data structure
    • Y10S707/99942Manipulating data structure, e.g. compression, compaction, compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99941Database schema or data structure
    • Y10S707/99944Object-oriented database structure
    • Y10S707/99945Object-oriented database structure processing

Landscapes

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

Abstract

Disclosed is a hash collision processing method using a general separation chain method. The hash collision processing method comprises the steps of: sorting records in a first bucket of a directory in an ascending order or a descending order; having a second bucket assigned in order to record a new record and connecting the same to the first bucket if there is no empty space in the first bucket when adding the new record to the directory; and storing the new record to the second bucket without sorting records between the first bucket and the second bucket.

Description

버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법{Method for Hash collision detection that is based on the sorting unit of the bucket}[0001] The present invention relates to a hash collision detection method, and more particularly,

본 발명은 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법에 관한 것으로, 더욱 상세하게는 데이터베이스 내 검색의 효율성을 높이기 위하여 버킷 내 데이터를 미리 정렬해둠으로써 향후 검색의 시간을 단축시키는 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법 에 관한 것이다. The present invention relates to a hash collision processing method based on sorting in units of buckets, and more particularly, to a method of processing a hash value in a bucket unit And more particularly, to a hash collision processing method based on sorting.

잘 알려진 바와 같이, 인덱스 자료구조는 레코드를 통해 저장 장치에 원하는 데이터를 빠르게 찾을 수 있는 자료구조이다. 가장 기본적인 인덱스 자료구조는 모든 레코드를 차례로 정렬하는 방법이다. 인덱스는 데이터 파일보다 일반적으로 크기가 작아 인덱스를 탐색하는 것이 데이터 전체를 차례로 탐색하는 것보다는 효율적이다. 하지만 레코드의 개수가 많아지면 많아질수록 원하는 레코드를 찾기 위해 탐색해야 하는 범위가 너무 넓어져 많은 양의 데이터를 관리하기 위해서 대부분의 데이터베이스와 파일 시스템에서는 해시와 트리 인덱스 자료구조를 많이 사용하고 있다.As is well known, an index data structure is a data structure that enables a user to quickly find desired data on a storage device through a record. The most basic index data structure is to sort all the records in order. Since indexes are generally smaller in size than data files, searching the index is more efficient than searching through the data in turn. However, the larger the number of records, the wider the scope to search for the desired record. To manage large amounts of data, most databases and file systems use hash and tree index data structures.

트리 구조 방법은 파일 내에 저장되어 있는 레코드의 수와 저장 형태 및 위치 등에 영향을 받기 때문에 검색 시간이 많이 소요되고, 최선과 최악의 차이가 많이 발생할 수 있으므로 큰 데이터 셋에서는 효율적이지 못한 문제점이 있다.Since the tree structure method is affected by the number of records stored in the file, the storage type and location, and so on, it takes a lot of searching time and there is a difference between the best and the worst.

해시는 비교가 아닌 계산 방법으로 키의 계수적인 성질을 이용하여 레코드를 검색하는 방법이다. 해시는 기억 공간을 충분히 활용하면서, 일정한 속도로 할 수 있고, 삽입과 제거가 쉬워 컴퓨터의 여러 분야에서 활용되고 있다. A hash is a method of retrieving a record by using a numerical property of a key as a calculation method, not a comparison. Hashes are used in many areas of the computer because they are easy to insert and remove, and can be done at a constant speed while fully utilizing the memory space.

분리 연쇄 방법은 해시 테이블의 각 버킷을 헤드 노드(Head node)로 취급하고, 레코드의 키를 저장하는 부분과 노드 간의 연결 역할을 하는 인덱스 부분을 하나의 버킷으로 구성하고 헤드 노드의 버킷 당 하나의 연결 리스트를 만든다. 각 버킷은 저장 장치에 독립적으로 위치하게 된다.The split-chain method treats each bucket of a hash table as a head node, constructs a bucket for storing the key of the record and an index portion serving as a connection between the nodes, Create a linked list. Each bucket is placed independently in the storage device.

저장장치를 필요한 만큼만 데이터를 저장하기 위해 충돌이 발생할 때마다 모든 슬롯을 연결 리스트로 연결해 읽는 것은 무작위 접근이 가능하고 접근 속도가 매우 빠른 RAM(Random Access Memory)과 같은 환경에 적합하고 NAND 플래시 메모리의 읽기 속도가 하드 디스크에 비해 빠르고 다른 NAND 플래시 메모리에 비해 빠르긴 하지만 RAM과 비교하여 매우 느린 NAND 플래시 메모리에서는 바로 적용하여 사용하기 어려운 문제점이 있다. 그리고 NAND 플래시 메모리의 최소 읽기 단위는 Bit 단위인 RAM과 달리 페이지(Page)라는 점도 분리 연쇄 방법의 문제 중 하나이다. 작은 하나의 레코드를 읽기 위해 페이지 단위를 계속 쓰고 읽는 것은 손해가 매우 크다. To save data as much as necessary, connecting all the slots to a linked list whenever a conflict occurs is suitable for environments such as RAM (Random Access Memory) with random access and very high access speed. Although the read speed is faster than that of the hard disk and is faster than other NAND flash memories, it is difficult to use the NAND flash memory because it is very slow compared with the RAM. And the minimum reading unit of NAND flash memory is one of the problem of the separation method of the page, which is different from the RAM of the bit unit. Reading and writing page units to read a small record is very damaging.

가장 이상적인 해시 테이블은 레코드의 개수에 맞는 버킷과 슬롯으로 구성된 것이지만, 그 이상적인 레코드가 계속 입력, 삭제되며 변화하는 인덱스 자료구조 특성상 버킷의 크기를 지정하기 어려운 문제가 있다. The most ideal hash table is composed of buckets and slots that match the number of records, but there is a problem that it is difficult to specify the size of the bucket due to the nature of the index data structure changing and deleting the ideal records.

변하는 레코드 개수에 성능에서 가장 좋은 결과를 보여주는 것은 버킷의 크기를 낸드 플래시 메모리의 크기와 같게 하는 것이다. 하지만 이 방법은 충돌이 많이 발생하지 않는 해시 테이블에서 실제 필요한 크기보다 훨씬 더 많은 저장 공간이 필요하게 되는 단점이 있다. The best performance for changing the number of records is to make the bucket size equal to the size of the NAND flash memory. However, this method has a disadvantage in that it requires much more storage space than the actual required size in a hash table that does not cause many collisions.

가장 좋은 해시 함수는 충돌이 최대한 드물게 일어나고 분포가 잘 되어 있는 상태이지만 분리 연쇄 방법의 버킷 크기를 기존의 하드디스크의 섹터 단위보다 훨씬 큰 플래시 메모리의 페이지 단위로 설정할 경우 저장 장치의 자원 낭비가 심해지고, 메모리 버퍼의 적중률(Hit Rate)을 떨어뜨려 오히려 전체적인 해시 테이블의 성능이 저하될 수도 있다. 충돌이 매우 많이 발생하는 해시는 다른 해시 함수를 사용하는 재해싱을 통해 충돌이 드물게 발생하게 하는 것이 더 효과적이다.The best hash function is that the conflicts occur as infrequently as possible and are well distributed. However, if the bucket size of the detachment chain method is set to a page unit of the flash memory much larger than the sector unit of the existing hard disk, , The memory buffer hit rate may be lowered, and the performance of the entire hash table may deteriorate. It is more effective for a hash that has a very large number of collisions to cause a collision to occur infrequently through a hash function using another hash function.

미국등록특허공보 제7,370,054호(출원일자 2008년05월06일)U.S. Patent No. 7,370,054 (filed on May 06, 2008)

본 발명은 상술한 종래기술의 문제점을 극복하기 위한 것으로서, 새로운 레코드가 추가되는 경우에 상기 새로운 레코드를 저장하기 위해 새로운 버킷을 할당받는데, 상기 새로운 버킷은 정렬된 기존의 버킷에 연결하여 버킷 간에 추가적인 정렬을 하지 않도록 함으로써, 해시 테이블의 성능을 향상시키는 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법을 제공하는 데에 그 목적이 있다.SUMMARY OF THE INVENTION The present invention is directed to overcoming the problems of the prior art described above and in that when a new record is added, a new bucket is allocated to store the new record. The new bucket is connected to an existing sorted bucket, It is an object of the present invention to provide a hash collision processing method based on sorting in units of buckets, which improves the performance of a hash table.

본 발명의 실시 예에 따른 통상의 분리 체인 방법을 이용한 해시 충돌 처리 방법은, 디렉토리의 제1버킷 내의 레코드들을 오름차순으로 정렬하거나 또는 내림차순으로 정렬하는 단계와, 상기 디렉토리에 새로운 레코드를 추가할 때, 상기 제1버킷 내에 빈 공간이 없을 경우, 상기 새로운 레코드를 저장하기 위하여 제2 버킷을 먼저 할당받은 후 상기 제1 버킷에 연결하는 단계와, 상기 제1 버킷과 상기 제2 버킷 간에는 레코드들의 정렬을 하지 않고 상기 새로운 레코드를 상기 제2 버킷에 저장한다.A method of processing a hash conflict using a normal split chain method according to an embodiment of the present invention includes the steps of sorting records in an ascending order or a descending order in a first bucket of a directory, If there is no empty space in the first bucket, allocating a second bucket first and then connecting to the first bucket to store the new record; and sorting records between the first bucket and the second bucket And stores the new record in the second bucket.

상기 디렉토리의 상기 제2 버킷 내의 레코드들을 오름차순으로 정렬하거나 또는 내림차순으로 정렬한다.The records in the second bucket of the directory are sorted in ascending or descending order.

상기 새롭게 추가되는 레코드가 기존의 레코드보다 적은 수일 경우, 기존 레코드를 옆 공간으로 이동시키고, 기존 레코드가 저장되어 있던 위치에 새로운 레코드를 저장한다.If the newly added record is smaller than the existing record, the existing record is moved to the side space and a new record is stored at the position where the existing record is stored.

상기와 같이 구성된 본 발명에 따른 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법에 의하면, 새로운 레코드가 추가되는 경우에 상기 새로운 레코드를 저장하기 위해 새로운 버킷을 할당받는데, 상기 새로운 버킷은 정렬된 기존의 버킷에 연결하여 버킷 간에 추가적인 정렬을 하지 않도록 함으로써, 해시 테이블의 성능을 향상시키는 효과가 있다.According to the hash-collision processing method based on the arrangement of bucket units according to the present invention configured as described above, when a new record is added, a new bucket is allocated to store the new record, So that the performance of the hash table can be improved by preventing the additional alignment between the buckets.

특히, 본 발명의 병합 연쇄 방법에 레코드간 병합 체이닝 그리고 버킷 분할 방법을 사용할 경우 분리 연쇄방법보다 적은 저장공간 활용, 빠른 삽입, 빠른 검색이 모두 가능하게 되는 효과가 있다.In particular, when the merge chaining method and the bucket dividing method are used in the merging and concatenating method of the present invention, it is possible to utilize less storage space, faster insertion, and quick retrieval than the separate concatenating method.

도 1은 일반적인 분리 체인(Separate Chaining) 해시 방법을 나타낸 블록도,
도 2는 도 1에서 새로운 레코드 80이 추가되었을 경우를 나타낸 블록도,
도 3은 도 2에서 추가적으로 새로운 레코드 32가 추가되었을 경우를 나타낸 블록도,
도 4는 분리 체인에서 레코드 전체를 정렬하는 방식을 적용한 경우를 나타낸 블록도,
도 5는 본 발명의 바람직한 일 실시예에 따른 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법을 나타낸 블록도,
도 6은 도 5에서 새로운 레코드 80이 추가되었을 경우를 나타낸 블록도,
도 7은 도 6에 추가적으로 새로운 레코드 32가 추가되었을 경우를 나타낸 블록도,
도 8은 본 발명에 따른 레코드 추가 실험 결과를 나타낸 도면이다.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a general method of separating hashing;
FIG. 2 is a block diagram showing a case where a new record 80 is added in FIG. 1,
FIG. 3 is a block diagram showing a case where a new record 32 is additionally added in FIG.
FIG. 4 is a block diagram showing a case where a method of sorting an entire record in a separate chain is applied.
FIG. 5 is a block diagram illustrating a hash-collision processing method based on an arrangement of bucket units according to a preferred embodiment of the present invention.
FIG. 6 is a block diagram showing a case where a new record 80 is added in FIG. 5,
FIG. 7 is a block diagram showing a case where a new record 32 is additionally added to FIG. 6. FIG.
8 is a diagram showing a result of a record addition experiment according to the present invention.

본 발명은 다양한 변형 및 여러 가지 실시예를 가질 수 있는바, 특정 실시예들을 도면에 예시하고 상세한 설명에 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.The present invention may have various modifications and various embodiments, and specific embodiments are illustrated in the drawings and described in detail in the detailed description. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

일반적인 분리 체인 방법은 해시 내에 저장된 특정한 레코드를 찾으려고 할 때에, 하나의 디렉토리 엔트리에 연결되어 있는 버킷을 순차적으로 방문하면서, 버킷 내에 있는 레코드들을 하나씩 비교해야 한다. 즉, 검색하는 대에 많은 시간이 소요된다. 이러한 분리 체인 방법의 단점을 극복하고자, 본 발명에서는 버킷 내에서는 레코드들간에 정렬된 상태를 유지하도록 한다. 즉, 새로운 레코드를 추가할 때에 버킷 내에의 레코드들 간에 정렬된 상태를 유지하며, 버킷 간에는 정렬된 상태를 유지하지 않는 것이 바람직하다. 이렇게 하면, 버킷 내에서 이진 탐색을 할 수 있으므로, 검색하는 데 걸리는 시간을 획기적으로 단축시킬 수 있다.A typical detachment chain approach is to sequentially look up buckets that are connected to a directory entry and compare records in the bucket one by one, when trying to find a particular record stored in a hash. That is, it takes a lot of time to search. In order to overcome the disadvantages of such a separation chain method, the present invention maintains an aligned state between records in a bucket. That is, when adding a new record, it is desirable to maintain alignment between records in the bucket, and not maintain alignment between buckets. By doing so, the binary search can be performed in the bucket, and the time required for searching can be significantly shortened.

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

도 1은 일반적인 분리 체인(Separate Chaining) 해시 방법을 나타낸 블록도, 도 2는 도 1에서 새로운 레코드 80이 추가되었을 경우를 나타낸 블록도, 도 3은 도 2에서 추가적으로 새로운 레코드 32가 추가되었을 경우를 나타낸 블록도, 도 4는 분리 체인에서 레코드 전체를 정렬하는 방식을 적용한 경우를 나타낸 블록도이다.FIG. 2 is a block diagram showing a case where a new record 80 is added in FIG. 1. FIG. 3 is a block diagram showing a case where a new record 32 is additionally added in FIG. And FIG. 4 is a block diagram showing a case in which a method of sorting the entire records in a separate chain is applied.

도 1에 도시된 바와 같이, 일반적으로 분리 체인(Separate Chaining)을 활용할 때에, 디렉토리(10) 엔트리 0에 레코드가 24, 8, 16, 40이 순차적으로 추가된다. 이와 같은 분리 체인(Separate Chaining)에서는 하나의 버킷(20) 내에 있는 레코드들이 정렬되어 있지 않고, 레코들이 추가되는 순서에 맞추어서 버킷 내에 순차적으로 저장된다. As shown in FIG. 1, records 24, 8, 16, and 40 are sequentially added to the entry 10 of the directory 10 when a separate chain (Separate Chaining) is utilized. In such a separate chain, the records in one bucket 20 are not sorted and are stored sequentially in the bucket according to the order in which the records are added.

도 2는 도 1의 상태에서 새로운 레코드 80이 추가되었 때의 경우를 나타낸 것으로, 도시된 바와 같이 도 1에서 디렉토리(10) 엔트리 0에 연결된 버킷(20)에 빈 공간이 없으므로, 새로운 레코드 80을 저장하기 위하여 새로운 버킷(30)을 먼저 할당받고, 기존의 버킷(20)에 연결한다. 그 다음에 새롭게 추가되는 레코드 80을 새로 할당받은 버킷(30)에 저장한다.FIG. 2 shows a case where a new record 80 is added in the state of FIG. 1. As shown in FIG. 1, since there is no empty space in the bucket 20 connected to the entry 0 of the directory 10 in FIG. 1, A new bucket 30 is first allocated and stored in the existing bucket 20 for storage. And then stores the newly added record 80 in the newly allocated bucket 30.

도 3은 도 2의 상태에서 새로운 레코드 32를 추가하는 경우를 나타낸 것으로, 도시된 바와 같이 레코드 80이 저장되어 있는 버킷(30)에 빈 공간이 있으므로, 레코드 32를 기존 레코드 80 다음에 저장한다. 즉, 기존의 분리 방법은 새로운 레코드를 추가할 때에 레코드가 추가되는 순서대로 버킷(30)에 저장된다.FIG. 3 shows a case where a new record 32 is added in the state of FIG. 2. Since there is a vacant space in the bucket 30 in which the record 80 is stored as shown in FIG. 3, the record 32 is stored after the existing record 80. That is, the existing separation method is stored in the bucket 30 in the order in which the records are added when a new record is added.

도 4는 분리 체인에서 레코드 전체를 정렬하는 방식을 적용한 경우를 나타낸 블록도로서, 도시된 바와 같이 전체 정렬 과정을 통하여 버킷(20)에 레코드가 8, 16, 24, 32가 저장되고, 버킷(30)에 레코드 40 및 80이 순서대로 정렬되어 저장된다.FIG. 4 is a block diagram showing a case where a whole record sorting method is applied in a separate chain. As shown in FIG. 4, records 8, 16, 24 and 32 are stored in the bucket 20 through an entire sorting process, 30, records 40 and 80 are sorted and stored in order.

이에 반하여 도 5 내지 도 7은 본 발명에서 제안하는 버킷 정렬 체인 방법을 활용하는 예시이다.On the contrary, Figs. 5 to 7 are examples utilizing the bucket alignment chain method proposed in the present invention.

도 5는 본 발명의 바람직한 일 실시예에 따른 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법을 나타낸 블록도이고, 도 6은 도 5에서 새로운 레코드 80이 추가되었을 경우를 나타낸 블록도이고, 도 7은 도 6에 추가적으로 새로운 레코드 32가 추가되었을 경우를 나타낸 블록도이다.FIG. 5 is a block diagram illustrating a method of processing a hash conflict based on the arrangement of buckets according to a preferred embodiment of the present invention. FIG. 6 is a block diagram showing a case where a new record 80 is added in FIG. 7 is a block diagram showing a case where a new record 32 is additionally added to Fig.

도 5에 도시된 바와 같이, 디렉토리(100)에 현재 레코드 8, 16, 24, 40이 순차적으로 추가된 상태를 나타낸다.As shown in FIG. 5, the current record 8, 16, 24, and 40 are sequentially added to the directory 100.

본 발명은 버킷(200) 내에 레코드를 저장할 때에 정렬 상태가 유지되도록 하는 것이 특징이다. 따라서, 실제로 버킷(200) 내의 레코드는 8, 16, 24, 40 순서로 정렬되어 저장된다.The present invention is characterized in that the alignment state is maintained when a record is stored in the bucket (200). Therefore, the records in the bucket 200 are actually stored in the order of 8, 16, 24, 40.

도 6은 도 5에서 새로운 레코드 80을 추가하는 경우를 나타낸 것으로, 도시된 바와 같이 디렉토리(100) 엔트리 0에 연결된 버킷(200)에 빈 공간이 없으므로, 새로운 레코드 80을 저장하기 위하여 새로운 버킷(300)을 먼저 할당받고, 기존의 버킷(200)에 연결한다. 그 다음에 새롭게 추가되는 레코드 80을 새로 할당받은 버킷(300)에 저장한다. FIG. 6 shows a case in which a new record 80 is added in FIG. 5. Since there is no empty space in the bucket 200 connected to the directory 100 entry 0 as shown in FIG. 5, a new bucket 300 And is connected to the existing bucket 200. The newly added record 80 is then stored in the newly allocated bucket 300.

본 발명에서 제안하는 방법은 버킷(200) 내의 레코드들간에 정렬이 되어 있는 상태를 유지한다. 즉, 버킷(200) 간에서는 정렬을 하지 않는다. The method proposed by the present invention maintains a state in which records are arranged in the bucket 200. That is, the buckets 200 are not aligned.

도 7은 도 6의 상태에서 새로운 레코드 32를 추가하는 경우를 나타낸다. FIG. 7 shows a case where a new record 32 is added in the state of FIG.

새롭게 추가되는 레코드 32는 기존의 레코드 80보다 적은 수이므로, 레코드 80을 버킷(300)의 아래 공간으로 이동시키고, 레코드 80이 저장되어 있던 그 위치에 레코드 32를 저장한다. 이때, 본 발명은 도 4에 도시된 바와 같이 전체 정렬을 수행하지 않는다.Since the newly added record 32 is smaller than the existing record 80, the record 80 is moved to the lower space of the bucket 300 and the record 32 is stored at the position where the record 80 is stored. At this time, the present invention does not perform the whole sorting as shown in FIG.

도 8은 본 발명에 따른 레코드 추가 실험 결과를 나타낸 도면이다. 도시된 바와 같이, 각각의 실험에서는 100~1,000개의 레코드를 추가하고, 추가된 레코드들을 대상으로 1,000~10,000번의 찾기 연산을 수행하였다. 이때, 각각 10회의 실험을 실시하고 그 평균값을 사용하여 성능 실험을 진행하였다. 8 is a diagram showing a result of a record addition experiment according to the present invention. As shown, in each experiment 100 to 1,000 records were added, and 1,000 to 10,000 search operations were performed on the added records. At this time, each experiment was conducted 10 times, and the performance test was conducted using the average value.

따라서, 본 발명에 따른 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법에 의하면, 새로운 레코드가 추가되는 경우에 상기 새로운 레코드를 저장하기 위해 새로운 버킷을 할당받는데, 상기 새로운 버킷은 정렬된 기존의 버킷에 연결하여 버킷 간에 추가적인 정렬을 하지 않도록 함으로써, 즉 버킷 내에의 레코드들 간에 정렬된 상태를 유지하며, 버킷 간에는 정렬된 상태를 유지하지 않음으로써 시 테이블의 성능을 향상시킬 수 있다. Therefore, according to the hash-collision processing method based on the arrangement of bucket units according to the present invention, when a new record is added, a new bucket is allocated to store the new record, To maintain the alignment between records in the bucket, and not to maintain alignment between the buckets, thereby improving performance of the time table.

특히, 본 발명의 병합 연쇄 방법에 레코드간 병합 체이닝 그리고 버킷 분할 방법을 사용할 경우 분리 연쇄방법보다 적은 저장공간 활용, 빠른 삽입, 빠른 검색이 모두 가능하게 된다.In particular, when the merge chaining method and the bucket dividing method are used in the merge concatenation method of the present invention, it is possible to utilize less storage space, faster insertion, and faster retrieval than the split concatenation method.

또한, 본 발명은 분리 체인 해시 방법을 사용하는 운영체제 또는 데이터베이스를 포함하여 어떤 어플리케이션에도 사용될 수 있으며, 본 발명은 해시 처리에 대한 데 성능을 향상 시킬 수 있다. In addition, the present invention can be used for any application including an operating system or a database using a hash-based hash method, and the present invention can improve performance for hash processing.

본 명세서에 기재된 본 발명의 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 실시예에 관한 것이고, 발명의 기술적 사상을 모두 포괄하는 것은 아니므로, 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다. 따라서 본 발명은 상술한 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자라면 누구든지 다양한 변형실시가 가능한 것은 물론이고, 그와 같은 변경은 청구범위 기재의 권리범위 내에 있게 된다.The embodiments of the present invention described in the present specification and the configurations shown in the drawings relate to the most preferred embodiments of the present invention and are not intended to encompass all of the technical ideas of the present invention so that various equivalents It should be understood that water and variations may be present. Therefore, it is to be understood that the present invention is not limited to the above-described embodiments, and that various modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims. , Such changes shall be within the scope of the claims set forth in the claims.

100 : 디렉토리
200 : 버킷
300 : 새로운 버킷
100: Directory
200: Bucket
300: New bucket

Claims (3)

통상의 분리 체인 방법을 이용한 해시 충돌 처리 방법에 있어서,
디렉토리의 제1버킷 내의 레코드들을 오름차순으로 정렬하거나 또는 내림차순으로 정렬하는 단계;
상기 디렉토리에 새로운 레코드를 추가할 때, 상기 제1버킷 내에 빈 공간이 없을 경우, 상기 새로운 레코드를 저장하기 위하여 제2 버킷을 먼저 할당받은 후 상기 제1 버킷에 연결하는 단계; 및
상기 제1 버킷과 상기 제2 버킷 간에는 레코드들의 정렬을 하지 않고 상기 새로운 레코드를 상기 제2 버킷에 저장하는 것을 특징으로 하는 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법.
In a hash-collision processing method using a normal separation chain method,
Sorting the records in the first bucket of the directory in ascending or descending order;
When a new record is added to the directory, if there is no empty space in the first bucket, allocating a second bucket first to connect to the first bucket to store the new record; And
And storing the new record in the second bucket without sorting records between the first bucket and the second bucket.
제 1항에 있어서,
상기 디렉토리의 상기 제2 버킷 내의 레코드들을 오름차순으로 정렬하거나 또는 내림차순으로 정렬하는 것을 특징으로 하는 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법.
The method according to claim 1,
Wherein the records in the second bucket of the directory are sorted in ascending or descending order.
제 1항에 있어서,
상기 새롭게 추가되는 레코드가 기존의 레코드보다 적은 수일 경우, 기존 레코드를 옆 공간으로 이동시키고, 기존 레코드가 저장되어 있던 위치에 새로운 레코드를 저장하는 것을 특징으로 하는 버킷 단위의 정렬을 기반으로 하는 해시 충돌 처리 방법.
The method according to claim 1,
Wherein when the new record is smaller than the existing record, the existing record is moved to the next space and a new record is stored at the position where the existing record is stored. Processing method.
KR1020170096213A 2017-07-28 2017-07-28 Method for Hash collision detection that is based on the sorting unit of the bucket KR101866697B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170096213A KR101866697B1 (en) 2017-07-28 2017-07-28 Method for Hash collision detection that is based on the sorting unit of the bucket

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170096213A KR101866697B1 (en) 2017-07-28 2017-07-28 Method for Hash collision detection that is based on the sorting unit of the bucket

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020150171727A Division KR20170065374A (en) 2015-12-03 2015-12-03 Method for Hash collision detection that is based on the sorting unit of the bucket

Publications (2)

Publication Number Publication Date
KR20170093767A true KR20170093767A (en) 2017-08-16
KR101866697B1 KR101866697B1 (en) 2018-06-12

Family

ID=59752707

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170096213A KR101866697B1 (en) 2017-07-28 2017-07-28 Method for Hash collision detection that is based on the sorting unit of the bucket

Country Status (1)

Country Link
KR (1) KR101866697B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7370054B1 (en) 2003-09-29 2008-05-06 Sun Microsystems, Inc Method and apparatus for indexing a hash table which is organized as a linked list
KR20130064319A (en) * 2011-12-08 2013-06-18 한양대학교 에리카산학협력단 Hybrid hash index for storage device based on flash memory
JP2015515047A (en) * 2012-02-24 2015-05-21 シンプリヴィティ・コーポレーション Method and apparatus utilizing non-uniform hash function to place records in non-uniform access memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7370054B1 (en) 2003-09-29 2008-05-06 Sun Microsystems, Inc Method and apparatus for indexing a hash table which is organized as a linked list
KR20130064319A (en) * 2011-12-08 2013-06-18 한양대학교 에리카산학협력단 Hybrid hash index for storage device based on flash memory
JP2015515047A (en) * 2012-02-24 2015-05-21 シンプリヴィティ・コーポレーション Method and apparatus utilizing non-uniform hash function to place records in non-uniform access memory

Also Published As

Publication number Publication date
KR101866697B1 (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN110083601B (en) Key value storage system-oriented index tree construction method and system
JP5524144B2 (en) Memory system having a key-value store system
JP5996088B2 (en) Cryptographic hash database
KR101972645B1 (en) Clustering storage method and device
US9047301B2 (en) Method for optimizing the memory usage and performance of data deduplication storage systems
US8849876B2 (en) Methods and apparatuses to optimize updates in a file system based on birth time
US7610468B2 (en) Modified buddy system memory allocation
KR101467589B1 (en) Dynamic fragment mapping
US7805427B1 (en) Integrated search engine devices that support multi-way search trees having multi-column nodes
CN105320775A (en) Data access method and apparatus
KR20170065374A (en) Method for Hash collision detection that is based on the sorting unit of the bucket
US6415375B2 (en) Information storage and retrieval system
US8225060B2 (en) Data de-duplication by predicting the locations of sub-blocks within the repository
US20150058352A1 (en) Thin database indexing
CN103914483A (en) File storage method and device and file reading method and device
CN106599091B (en) RDF graph structure storage and index method based on key value storage
CN109407985B (en) Data management method and related device
US8190655B2 (en) Method for reliable and efficient filesystem metadata conversion
KR100907477B1 (en) Apparatus and method for managing index of data stored in flash memory
US20180011897A1 (en) Data processing method having structure of cache index specified to transaction in mobile environment dbms
US20240028560A1 (en) Directory management method and system for file system based on cuckoo hash and storage medium
US8156126B2 (en) Method for the allocation of data on physical media by a file system that eliminates duplicate data
JP5646775B2 (en) Memory system having a key-value store system
JP6258436B2 (en) Memory system local controller
CN110515897B (en) Method and system for optimizing reading performance of LSM storage system

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant