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

Data storage and query method and apparatus

A data storage and data search technology, applied in the field of data processing, can solve the problems of long initialization time consumption and large memory usage, and achieve the effects of reducing occupation, convenient search, and reducing initialization time consumption

Active Publication Date: 2015-12-16
SHENZHEN IPANEL TECH LTD
View PDF6 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of this, the present application provides a data storage and search method and device, which are used to solve the problems of long initialization time consumption and large memory usage in the existing method of querying data using memory hash table technology

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0068] The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0069] In order to solve the problems of long initialization time and large memory usage in the existing hash table storage method, the inventor of this case decided to use the memory mapping method after research, mapping external kv data such as hard disks to the server memory, and searching for When using memory mapping technology, there is no need to read external kv data into the memory, so the initialization time is reduced and the memory usage rate is reduced. In consideratio...

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 application discloses a data storage and query method and apparatus. The storage method comprises: performing ordering on a plurality of kv data pairs in an ascending or descending order of k values to obtain ordered data; grouping the kv data pairs in the ordered data according to an ordering sequence; storing v values of the kv data pairs in each group in a data file uniquely corresponding to each group, and storing the k values of the kv data pairs in each group and position information of the v values, corresponding to the k values, in the data file in an index file uniquely corresponding to each group, wherein the data file and the index file uniquely corresponding to each group are same in name; and finally mapping the data file and the index file into a server memory in a memory mapping mode to obtain memory mapping data. According to the data storage and query method and apparatus, the memory mapping mode is adopted, so that all the kv data do not need to be read into the memory, the initialization time is shortened, and the occupation of the server memory is reduced.

Description

technical field [0001] The present application relates to the technical field of data processing, and more specifically, to a data storage and search method and device. Background technique [0002] kv is the abbreviation of key-value, which refers to a data representation method in which a key value corresponds to a data value in a computer data structure. [0003] The existing kv data query methods are generally, first import the database data or file data on the hard disk into the memory, construct a hash table in the memory, and then perform data query according to the hash table. [0004] However, the hash table technology has the following problems: the storage method of the hash table needs to read the data on the hard disk into the memory, and then construct the hash table according to the kv method. During the initialization process, the process of reading data from the hard disk to memory takes a lot of time. Moreover, the hash table storage method needs to read ...

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): G06F17/30
CPCG06F16/2228G06F16/2453
Inventor 徐佳宏成学文
Owner SHENZHEN IPANEL TECH 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