Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for adding, searching for and deleting key in hash table

A hash table and hash sub-table technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve problems such as inability to guarantee that z2 and y1 will not conflict, and improve search performance and search process simplified effect

Inactive Publication Date: 2015-01-07
HUAWEI TECH CO LTD
View PDF1 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Suppose y1 and x1 correspond to the same address in subtable 1, but now subtable 1 is full, only y1 can be put into subtable 2
In this way, it is guaranteed that there is no conflict between x1, x2, x3 and y1, but it cannot guarantee that other key values ​​​​do not conflict with y1, for example, it is difficult to guarantee that z2 and y1 do not conflict

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for adding, searching for and deleting key in hash table
  • Method and device for adding, searching for and deleting key in hash table
  • Method and device for adding, searching for and deleting key in hash table

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0047] Embodiments of the present invention provide a method and device for adding, searching or deleting key values ​​in a hash table. A detailed description will be given below in conjunction with the accompanying drawings.

[0048] Please refer to figure 1 , this embodiment provides a method for adding a key value in a hash table.

[0049] Before describing the method of this embodiment, the structure of the hash table in this embodiment will be described first. The hash table of this embodiment consists of the following parts:

[0050] At least two hash subtables are used to store the fingerprint and index corresponding to the key value, which is the address of the key value in the original key value table;

[0051] A conflict processing space is used to store key values ​​that conflict with the stored key values ​​in the hash subtable; an overflow processing space is used to store overflow key values; it should be noted that the conflict processing space and the overfl...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention discloses a method and device for adding, searching for and deleting a key in a hash table, wherein, the method for adding a key in a hash table includes: calculating both the bucket address corresponding to the key to be added and the address extension of the key to be added in each hash sub-table according to a hash function; generating the fingerprints of the key to be added corresponding to each hash sub-table, wherein the fingerprint of the key to be added corresponding to one hash sub-table includes: the address extension of the key to be added in the hash sub-table, and the bucket address corresponding to the key to be added and the address extension of the key to be added in other hash sub-tables; and when determining that there is no conflict, storing the fingerprint of the key to be added corresponding to the selected hash sub-table into the selected hash sub-table. The solution of the present invention enables that the fingerprint of each key can only match one fingerprint in one hash sub-table, thus when searching for a key, at most once is required to visit an original key table, thereby improving the search performance, and simplifying the search process.

Description

technical field [0001] The invention relates to the field of communication technology, in particular to a method and device for adding, searching or deleting key values ​​in a hash table. Background technique [0002] Due to its high lookup performance, hash tables are widely used in the field of communication technology. A hash table generally consists of one or more hash sub-tables. An address space in a hash sub-table is called a bucket. Each bucket is composed of multiple slices (slots). Each slice can store A key value (key). Each hash subtable corresponds to a hash function (hash function), the key value is input to the hash function, and the output result is the address of the bucket that stores the key value in the corresponding hash subtable. The utilization of a hash table is defined as the number of keys to be stored divided by the number of shards in all hash subtables. If the number of key values ​​to be stored is 8M (8388608), the hash table includes two has...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/12G06F17/30
CPCG06F17/30949G06F16/9014
Inventor 刘振肖
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products