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

A key-value pair-based memory database query method and device

A data query and database technology, applied in the field of data query, can solve the problems of query interference, the system can not work, the database can not meet the demand and so on

Inactive Publication Date: 2018-12-25
成都瑞视恒基通信技术有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, conventional databases can no longer meet the needs; and commonly used in-memory data structures for queries: ordered tables, RB-Tree, AVL-Tree, etc., will also cause serious problems to high-frequency queries when inserting or deleting data. interference, causing the system not to work in good condition

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
  • A key-value pair-based memory database query method and device

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment

[0044] Concrete embodiment: a kind of memory database query method based on key-value pairs comprises:

[0045] Step 1: Encrypt the random value with a hash algorithm to form a query key, and use the structure to form a key-value pair with the query key and the string;

[0046] Step 2: The memory database maintenance module sets the memory database maintenance module to apply for a data operation buffer whose memory size can be set; construct an RB_Tree as the real-time data area; apply for a piece of shared memory as the query data area, and set the query data area for the query data area header, data query block pointer, data preparation block pointer, data query block, data preparation block;

[0047] Step 3: the memory database maintenance module opens an interface thread for performing instruction operations and a data update thread for real-time data update; the opening thread receives data operation commands and data through the Socket, and writes the data operation ins...

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 relates to the data query field, especially a memory database query method and device based on key value pairs. The memory database query method and device provided by the invention aims at the problems of the prior art. All non- query operations of the memory database are managed through an interface thread; real time data are sorted through a data updating thread; the data are output to a data preparation block for querying the data; the data in a data operation buffer are updated to the real time data; then the data are exchanged; and the data are switched after the data are prepared well. Meanwhile, the query interface is set to only access to the data of a data query block, therefore, the purpose of the invention is realized. The starting thread of the invention receives a data operation command and the data through a Socket and writes the data operation command and the data in a data operation buffer; the query interface carries out dichotomy query in a data query area according to the pointed direction of the pointer at the head of the data query area and the key values; and a query result is returned by the query interface.

Description

technical field [0001] The invention relates to the field of data query, in particular to a key-value pair-based memory database query method and device. Background technique [0002] In the project application environment, we need to query a tens of millions of databases at high frequency, and require the average query time to be within 20us. Therefore, conventional databases can no longer meet the needs; and commonly used in-memory data structures for queries: ordered tables, RB-Tree, AVL-Tree, etc., will also cause serious problems to high-frequency queries when inserting or deleting data. Interference, causing the system not to work in good condition. Therefore, we need an in-memory database that: 1 can withstand high-frequency queries, 2 can return query results at high speed, 3 can support orders of tens of millions, and 4 can not affect normal query operations during data operations. Contents of the invention [0003] The technical problem to be solved by the pres...

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): G06F17/30
Inventor 钟昊华
Owner 成都瑞视恒基通信技术有限公司
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