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

Key value database-based data storage method and retrieval method and corresponding devices

A database and key-value technology, applied in the field of data management, can solve the problems of large storage space and low retrieval efficiency, and achieve the effect of reducing the space occupied

Pending Publication Date: 2022-02-25
BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When the key is a string type, since the data length of the string type is uncertain, and the data length of the general string type will exceed 8 bytes, if the original string type key is directly used to store, there will be The problem of taking up a large storage space; and in the subsequent process of retrieving the stored data, it is necessary to compare the keys of the string type byte by byte, which will lead to low retrieval efficiency

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
  • Key value database-based data storage method and retrieval method and corresponding devices
  • Key value database-based data storage method and retrieval method and corresponding devices
  • Key value database-based data storage method and retrieval method and corresponding devices

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0099] In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0100] In the technical field of data management, a key-value database is a kind of database that is often used. For example, in the scenario of storing user ID (Identity document, identity identification number) and user information, it specifically includes: file management scenarios, online shopping scenarios, conversation scenarios, mailbox usage scenarios, etc.; a user ID corresponds to a collection of user information, The key-value pair data with user ID as the key and user information set as the value can be obtained, and the key-value pair data is stored in the key-value database. When the user ID is determined, the key-value pair data can be quickly and efficiently obtained from the key-value database. A collection of us...

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 embodiment of the invention provides a key value database-based data storage method and retrieval method and corresponding devices. The key value database-based data storage method comprises the steps: obtaining to-be-stored key value pair data, wherein the key value pair data comprise an original key and value, wherein the original key is of a character string type; converting the original key of the character string type into a corresponding integer type with a specified byte length by adopting a conversion rule to obtain an index key corresponding to the key value pair data; storing the value of the key value pair data in a value storage area of a key value database, and recording the offset of the value in the value storage area and the length of the value; and according to the index key, the offset and the length, generating a directory entry corresponding to the value, and storing the directory entry in a key storage area of the key value database. According to the method, the original key of the character string type is converted into the corresponding index key of the integer type with the specified byte length, so that the key storage area of the key value database is convenient to organize, and the occupied space of the key storage area can be reduced.

Description

technical field [0001] The present invention relates to the technical field of data management, in particular to a key-value database-based data storage method, a key-value database-based retrieval method, a key-value database-based data storage device, a key-value database-based A retrieval device, a device, a readable storage medium and a computer program product. Background technique [0002] A key-value database is a non-relational database that uses a key-value (Key-Value) form to organize data storage structures. Among them, the keys of different key-value elements are all unique. Fast storage and retrieval of values ​​through unique keys. [0003] In the prior art, regardless of the type of the key, the original key of the key-value element is directly stored in the key-value database. When the key is a string type, since the data length of the string type is uncertain, and the data length of the general string type will exceed 8 bytes, if the original string type ...

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/22G06F16/2458G06F16/25
CPCG06F16/2228G06F16/2474G06F16/258
Inventor 罗京潘松强
Owner BEIJING SOGOU TECHNOLOGY DEVELOPMENT 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