Indexing method and device based on key value pair KV system, electronic equipment and medium

A key-value pair and index technology, applied in the computer field, can solve problems such as low index efficiency, and achieve the effect of improving reading speed, improving reading efficiency, and saving memory resources

Pending Publication Date: 2020-06-05
BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF7 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The embodiment of the present application provides an indexing method, device, electronic device and medium based on a key-value pair K

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
  • Indexing method and device based on key value pair KV system, electronic equipment and medium
  • Indexing method and device based on key value pair KV system, electronic equipment and medium
  • Indexing method and device based on key value pair KV system, electronic equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0064] Example one

[0065] Figure 1A This is a schematic flowchart of a method for indexing a KV system based on key-value pairs provided in the first embodiment of this application. This embodiment is applicable to the case of querying the corresponding value based on the KV system through the key value, and can be executed by the KV system-based indexing device provided in the embodiment of the present application, and the device can be implemented in software and / or hardware. Such as Figure 1A As shown, the method can include:

[0066] S101. Obtain a key value in a key-value pair to be queried, wherein the key value of each key-value pair in the KV system is an increasing integer number.

[0067] Among them, the key-value pair is composed of the key-value Key and the numerical value, which are used to represent the corresponding relationship between the numerical value and the key-value. A key-value can correspond to one numerical value or multiple numerical values. For example,...

Example Embodiment

[0108] Example two

[0109] Figure 2A This is a schematic flowchart of a method for indexing a KV system based on key-value pairs provided in the second embodiment of this application. This embodiment provides a specific implementation for the foregoing embodiment, which is suitable for solving the problem of excessive memory usage due to the use of a primary index when the amount of data is too large in the prior art, such as Figure 2A As shown, the method can include:

[0110] S201. Obtain a key value in a key-value pair to be queried, where the key value of each key-value pair in the KV system is an increasing integer number.

[0111] S202. Use the key value as the primary index sequence number, and determine the secondary index sequence number of the index block corresponding to the sequence number range of the primary index sequence number, where each index block corresponds to a set number of primary index sequence numbers.

[0112] Exemplary, such as Figure 2B As shown, assu...

Example Embodiment

[0125] Example three

[0126] Figure 3A This is a schematic flowchart of a method for indexing a KV system based on key-value pairs provided in the third embodiment of this application. This embodiment provides a specific implementation for the above embodiment. This embodiment is suitable for reading the value in the key-value pair to be queried when the value is of the POD type, such as Figure 3A As shown, the method can include:

[0127] S301. Obtain the key value in the key-value pair to be queried, where the key value of each key-value pair in the KV system is an increasing integer number.

[0128] S302. Use the key value as the primary index sequence number, and determine the secondary index sequence number of the index block corresponding to the sequence number range of the primary index sequence number, where each index block corresponds to a set number of primary index sequence numbers.

[0129] Specifically, in this embodiment, there is a one-to-one correspondence between ...

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 an indexing method and device based on a key value pair KV system, electronic equipment and a medium, and relates to the technical field of indexing. According to the specificimplementation scheme, the method comprises the steps: acquiring key values in key value pairs to be inquired, wherein the key values of the key value pairs in the KV system are progressively increased integer numbers; taking the key value as a serial number of a fixed-length type index, and determining address information of a storage position where a numerical value in the to-be-queried key value pair is located according to the serial number; and reading a numerical value in the to-be-queried key value pair from a storage space according to the address information. According to the method,the obtained key values are used as the serial number of the fixed-length type index, so that the resource occupation amount of a system memory is reduced; by determining the address information of the storage position where the numerical value is located according to the serial number, the numerical value reading is completed, the numerical value reading speed is increased, and the numerical value reading efficiency is improved.

Description

technical field [0001] The embodiments of the present application relate to computer technology, in particular to indexing technology, and in particular to an indexing method, device, electronic device and medium based on a key-value pair KV system. Background technique [0002] KV (Key Value, keyword-value) retrieval is a type of NoSQL (Not OnlySQL, non-relational database) retrieval engine that is currently very common in the industry. This type of system has high retrieval performance and large-scale update throughput. [0003] The index information in the existing KV search stores the key value and the mapping relationship between the key value and the address information of the corresponding data. When querying the target data, firstly, the target key is found in the index information based on the set data structure. value, and then query the data content of the target data according to the mapping relationship between the target key value and the address information of...

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): G06F16/22
CPCG06F16/2228
Inventor 汪洋宋勋超袁鹏程王益飞张海平
Owner BEIJING BAIDU NETCOM SCI & TECH CO LTD
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