File storage method and device

A file storage and file technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve problems such as fragmentation or overflow, unreasonable file storage methods, low file query efficiency, etc., to improve query efficiency, storage reasonable effect

Inactive Publication Date: 2016-07-27
LETV INFORMATION TECH BEIJING
View PDF7 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention provides a method and device for file storage to solve the problem that the existing file storage method is unreasonable, easily causing fragmentation or overflow, and the file query efficiency is low

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
  • File storage method and device
  • File storage method and device
  • File storage method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0073] refer to figure 1 , shows a flow chart of steps of a file storage method according to Embodiment 1 of the present invention.

[0074] The method for file storage of this embodiment may include the following steps:

[0075] Step 101, according to the size of the received file uploaded by the client, store the content data of the file in at least one file storage block.

[0076] In the embodiment of the present invention, the client can upload files to the file system, and can also download files from the file system. Wherein, the file system may be a file system under an operating system such as Linux.

[0077] When the file system receives the file uploaded by the client, it can first obtain the size of the file, and then determine which file storage block or blocks the content data of the file should be stored in according to the size of the file, that is, according to the received client The size of the file uploaded by the end, and the content data of the file is ...

Embodiment 2

[0088] refer to figure 2 , shows a flow chart of steps of a file storage method according to Embodiment 2 of the present invention.

[0089] The method for file storage of this embodiment may include the following steps:

[0090] Step 201, receiving a file uploaded by a client.

[0091] As mentioned above, the client can upload files to the file system, and can also download files from the file system.

[0092] Step 202, according to the size of the file, store the content data of the file in at least one file storage block.

[0093] According to the size of the received file, the content data of the file may be stored in at least one file storage block, where the file storage block refers to the storage space of the file system. In this embodiment, a standard size can be preset, and according to the standard size, it can be determined that the content data of the file is stored in one file storage block or multiple file storage blocks. For example, the standard size can b...

Embodiment 3

[0166] refer to image 3 , shows a structural block diagram of a file storage device according to Embodiment 3 of the present invention.

[0167] The file storage device of the present embodiment may include the following modules:

[0168] A content storage module 301, configured to store the content data of the file in at least one file storage block according to the size of the received file uploaded by the client;

[0169] An information obtaining module 302, configured to obtain information of a file storage block storing the content data;

[0170] A metadata generation module 303, configured to generate metadata corresponding to the content data according to the information of the file storage block;

[0171] The metadata storage module 304 is configured to store the metadata of the file in a preset storage space.

[0172] In the embodiment of the present invention, the content data of the file is stored in at least one file storage block according to the size of the f...

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 provides a file storage method and device to solve the problems of unreasonable file storage, easy fragmentation or overflow, and low file query efficiency. Wherein, the method includes: according to the size of the file uploaded by the received client, storing the content data of the file in at least one file storage block; obtaining the information of the file storage block storing the content data; generating and The metadata corresponding to the content data; store the metadata of the file in the preset storage space. The present invention can avoid disk fragmentation and overflow caused by directly storing all the content data of the file as a whole in the corresponding storage space, the storage method is more reasonable, and the metadata is stored independently, so that unified management of files can be realized Metadata, thereby improving the query efficiency of subsequent files.

Description

technical field [0001] The present invention relates to the technical field of files, in particular to a method and device for storing files. Background technique [0002] A file system is a mechanism for providing data access to users. From a system perspective, a file system is a system that organizes and allocates space on file storage devices, is responsible for file storage, and protects and retrieves stored files. When the file uploaded by the client is received, the file is stored in the corresponding storage space, and when the request for downloading the file is received, the corresponding file is searched from the storage space, and the found file is delivered, realizing the file upload and download, which is convenient for users to use. A file can include content data and metadata. Content data refers to the actual data in the file. Metadata records the relevant information of the file and is used to describe the attributes of the file, such as the creation time...

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
Inventor 王香荣薛伟胡勇陈翔魏泽涛赵晓飞宋健张晓亮王涛
Owner LETV INFORMATION TECH BEIJING
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