Internal data sorting method and device

An internal sorting and data technology, applied in the field of data processing, can solve the problems of consumption, reduce data loading efficiency, long time, etc., and achieve the effect of improving program execution efficiency, shortening program execution time, and reducing the number of file reads and writes.

Inactive Publication Date: 2017-11-17
ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF2 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When loading a small file into the memory, it first copies the data in the small file from the hard disk to a buffer in the kernel space, and then copies the data to the user space. In fact, two data copies are performed, which re

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
  • Internal data sorting method and device
  • Internal data sorting method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0028] In the traditional way, external sorting is often used to divide files larger than the size of the memory space into several small files, and then load the data in the small files into the memo...

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 discloses an internal data sorting method and device. By invoking a mmap function, a mapping relation between a file to be processed and a physical memory is built, and a pointer variable is generated; according to the pointer variable, internal sorting of the file to be processed is completed. Through a memory mapping file technique, a big file is mapped into a piece of memory, and therefore internal sorting of data inside the big file is achieved. Additionally, since read-write I/O operation can no longer be executed on the file when a memory mapping file is used for processing files saved in a hard disk, the course can access the files just like accessing the internal memory, so that the file reading and writing frequency is greatly reduced, the program execution time is extremely shortened and the program execution efficiency is improved.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a method and device for sorting within data. Background technique [0002] When sorting the data in the file, if the file is small, all the data in the file can be read into the memory, and it can be easily realized by internal sorting methods such as bubble sorting and quick sorting. But if the file size exceeds the memory size, because the memory resources are limited, and the files to be sorted are very large (for example, a 100G file has only 1G of memory), the files to be sorted cannot be loaded into the memory at one time, and only internal sorting is used. Goal achieved. [0003] At present, the existing general solution is to use external sorting, divide the file according to the available memory size, divide the large file into several small files, so that all the divided small files can be loaded into the memory, and then internally sort the small files respect...

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): G06F12/06G06F12/10G06F17/30G06F7/78
CPCG06F7/78G06F12/063G06F12/10G06F16/90348
Inventor 李延彬
Owner ZHENGZHOU YUNHAI INFORMATION 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