Method for storing and searching character strings in hash table

A string and hash table technology, applied in the field of hash tables, can solve the problems of low development cost, high development cost, slow data processing, etc., to reduce delay and jitter, improve string search performance, and improve query efficiency.

Pending Publication Date: 2022-08-02
南京火牙科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, there are two ways to realize high-frequency trading counters on the market: one is realized by hardware, and the other is realized by software. The advantage of hardware is fast data processing and low jitter, but the disadvantage is high development cost, while software On the contrary, the data processing is slow and the jitter is high, but the development cost is low. To realize the software high-frequency trading counter, it is necessary to solve the problem of data processing speed. One of the cores is to improve the performance of string search

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 for storing and searching character strings in hash table
  • Method for storing and searching character strings in hash table
  • Method for storing and searching character strings in hash table

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] see Figure 1 to Figure 5 , the present invention provides a kind of technical scheme: a kind of hash table realizes the method of character string storage and search, the method that hash table realizes character string storage and search comprises the following operation steps:

[0038] S1, the collision sequence of strings:

[0039] Determine the length of the hash table according to the number of strings, denoted as Len, calculate the hash value A of the string str, and then perform the modulo operation on A to obtain the position pos in the hash table;

[0040] Among them, Hash(str)=>A; A mode Len=>pos;

[0041] The longest string is 16Byte;

[0042] S2, collision sequence statistics:

[0043] Since different strings str have a chance to get the same position value pos, that is, different strings conflict, so this conflict needs to be resolved;

[0044] Remember that the first time the pos value is obtained, its collision order is 1; the second time the pos val...

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 invention discloses a method for realizing character string storage and search by a hash table, which relates to the technical field of hash tables and comprises the following steps of: S1, determining a collision order of character strings; s2, carrying out collision order statistics; s3, storing the character string into the hash table according to the collision order; and S4, searching the position of the character string in the hash table. Compared with a general method in a standard library, the method for storing and searching the character strings by the hash table has the advantages that the character string query efficiency is greatly improved, the delay and jitter in a transaction process are greatly reduced, a transaction system realized by software achieves the performance of a transaction system realized by hardware, and the transaction efficiency is improved. And the character string searching performance in the high-frequency transaction counter realized by software can be improved.

Description

technical field [0001] The invention relates to the technical field of hash tables, in particular to a method for storing and searching character strings in a hash table. Background technique [0002] String search is a must in all software engineering and projects. Hash table is a classic data structure and one of the core methods for processing string storage and search. In most scenarios with low performance requirements, The storage and search of strings are usually implemented using the tools provided by the standard library. It is a general method and can meet most of the needs. [0003] At present, there are two ways to realize high-frequency trading counters on the market: one is realized by hardware, and the other is realized by software. The advantages of hardware are fast data processing and low jitter, but the disadvantage is that the development cost is high, and the software On the contrary, data processing is slow and jitter is high, but the development cost ...

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 Applications(China)
IPC IPC(8): G06F16/903G06F16/901
CPCG06F16/90344G06F16/9014Y02D10/00
Inventor 李道双陆怀军
Owner 南京火牙科技有限公司
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