Method and device for solving Hash collision

A technology of operation results and table entries, applied in the field of network communication, can solve the problems of Hash conflict and long search time, and achieve the effect of solving Hash conflict and saving bandwidth

Inactive Publication Date: 2007-03-14
BEIJING HUAWEI DIGITAL TECH
View PDF0 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] In order to solve the problems of Hash conflicts, long search time and no maintenance of conflictin

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 solving Hash collision
  • Method and device for solving Hash collision
  • Method and device for solving Hash collision

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0066] Referring to Figure 4, a method for adding a linked list, the method includes the following steps:

[0067] Step 101: Perform a hash operation on the information to be stored, look up the hash table according to the operation result, and find the head of the linked list corresponding to the operation result. The hash table here is composed of a linked list head, a pointer and a linked list tail.

[0068] Step 102: judge whether the head of the linked list is empty, if it is empty, execute step 103; otherwise, execute step 104;

[0069] Step 103: Fill the head of the linked list with the operation result of the information to be stored.

[0070] Step 104: Determine whether the content stored in the head of the linked list is the same as the operation result of the information to be stored, if they are the same, go to step 105; otherwise, go to step 106.

[0071] Step 105: Do not process the operation results of the information to be stored.

[0072] Step 106: Determin...

Embodiment 2

[0089] Referring to Figure 5, a method for deleting an entry in a linked list, the method specifically includes:

[0090] Step 201: When there is information to be deleted, perform a hash operation on the information to obtain the operation result, find the corresponding entry in the hash table according to the operation result, and release the entry, that is, the content in the entry delete;

[0091] Step 202: Determine whether there is a pointer pointing to the next entry in the current entry, if yes, execute step 203, otherwise, execute step 204.

[0092] Step 203: Modify the pointer of the previous entry of the current entry to the pointer stored in the current entry, if the current entry is the head of the linked list, put the content of the next entry pointed to by the pointer into the head of the linked list;

[0093] Step 204: delete the pointer of the previous entry of the current entry;

[0094] Step 205: Write the address of the current entry into the write FIFO m...

Embodiment 3

[0099] Referring to Fig. 6, to the maintenance method of the conflict (idle) address in the Hash table structure, this method applies the module in the schematic diagram that Fig. 3 provides, and concrete steps are as follows:

[0100] Step 301: Initialize the free address pool, and write the conflicting address into the corresponding offset address.

[0101] In this embodiment, two 16×13bit FIFO reset signals are first pulled high, and the FIFO is reset for 8 time periods, and then pulled low, mainly because the FIFO has certain requirements on the length of the reset signal.

[0102] A preset value is set for the number of conflicting addresses in the read FIFO module and the write FIFO module. The preset value can be set according to experience, and this embodiment takes 4.

[0103] Then send an application to the downstream ZBT (Zero-Bus Turnaround, zero bus delay), and write the 8k conflict addresses into the corresponding offset addresses in sequence. After all writing is...

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

This invention provides one method and device to solve Hash collision in network communication field, wherein the method comprises the following steps: processing Hash computation on memory data information; finding relative list items according to computation results; then storing the information computation results into list and setting index list in Hash list. This invention provides one device to solve Hash collision composed of Hash computation module, judgment module, address requirement module and information memory module and index set module.

Description

technical field [0001] The invention relates to the field of network communication, in particular to a method and device for resolving Hash conflicts. Background technique [0002] In Ethernet, the MAC address often needs to automatically learn the aging technology. Since the MAC address has 48 bits, it is impossible to allocate an entry for each address in the actual use process. Therefore, in specific applications, it is often implemented through the Hash algorithm, that is, according to According to certain rules, the 48-bit MAC address is converted into a low-order address of more than a dozen bits, and then the actual content to be forwarded is stored in the memory corresponding to the low-order address. [0003] The Hash algorithm is a high-speed table lookup algorithm. It establishes the mapping from the keyword set to the Hash index through the Hash function. Under ideal conditions, it can achieve a lookup performance with a complexity of 0(1). The advantages of the...

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
IPC IPC(8): H04L12/56H04L29/06
CPCG06F17/30949H04L45/745G06F16/9014
Inventor 叶锦华孙浩张磊
Owner BEIJING HUAWEI DIGITAL TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products