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

Data query method and device

A data query and data technology, applied in database indexing, file metadata retrieval, structured data retrieval, etc., can solve the problem of long time required for query, achieve the effect of reducing query delay and improving query speed

Active Publication Date: 2022-03-08
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF13 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The larger the number of files in the layer, the longer the query may take

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
  • Data query method and device
  • Data query method and device
  • Data query method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, not all of them.

[0018] A relational database is a database system that supports a relational model. It generally adopts a two-dimensional table structure storage method, and data is stored in the form of rows and columns. Relational databases store data in a structured way. Each data table must define each field (that is, define the structure of the table first), and then store data according to the structure of the table. The advantage of this is that the data The form and content have been defined before storing the data, so the entire data table can become very clear and clear at a glance, it is very convenient to read and query, and the reliability and stability ...

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 disclosure provides a data query method and device. The method is applied to a database based on an LSM tree. The LSM tree includes a multi-layer structure. The Kth layer in the multi-layer structure includes M files. There is a one-to-one mapping relationship between the file index of the M files and the M hash ranges. Each file in the file is used to store at least one data, and the hash index obtained after the key of the data stored in each file is hashed falls into the hash range corresponding to each file. The method includes: receiving the query Request, the query request is used to query the data corresponding to the target key; perform a hash operation on the target key to obtain the first hash index corresponding to the target key; determine the first target file from M files according to the first hash index A file index, wherein the hash range corresponding to the first target file includes the first hash index; according to the file index of the first target file, the data corresponding to the target key is queried in the first target file.

Description

technical field [0001] The present disclosure relates to the technical field of data storage, and in particular to a data query method and device. Background technique [0002] Log Structured Merge (LSM) trees are often applied to non-relational databases. In an LSM tree-based storage system, data is usually stored in the form of key-value. If you need to query the file location of the target key in a certain layer, you need to perform a binary search on the files in this layer to determine the file that stores the target key. [0003] In the above query method, not only time-consuming comparison of key strings is required, but also the time complexity of binary search is logN, that is to say, the query complexity is related to the number of files in this layer. The larger the number of files in the layer, the longer the query may take. Therefore, adopting the above binary search method is not conducive to improving the query speed. Contents of the invention [0004] E...

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): G06F16/13G06F16/14G06F16/22
CPCG06F16/137G06F16/152G06F16/2246
Inventor 黄华宋杰刘静怡江进
Owner ALIPAY (HANGZHOU) INFORMATION 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