Method and device for storing files and method and device for deleting files

A file storage and file deletion technology, applied in file systems, special data processing applications, instruments, etc., can solve the problems of long deletion process, affecting disk access speed, etc., and achieve the effect of reducing system resources

Inactive Publication Date: 2009-06-03
HUAWEI DIGITAL TECH (CHENGDU) CO LTD
View PDF0 Cites 26 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

As a result, the deletion process takes a long time, which se

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
  • Method and device for storing files and method and device for deleting files
  • Method and device for storing files and method and device for deleting files
  • Method and device for storing files and method and device for deleting files

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0027] Such as figure 1 As shown, the file storage device 100 of this embodiment includes: a file data storage unit 101 for storing directory data and application file data under the directory in units of data blocks; a data block pointer storage unit 102 for storing pointers to the The data block pointer of the data block; the directory node storage unit 103 is used to store the directory index node information of the directory; the file node storage unit 104 is used to store the directory index node information and the application file index node information; location information The storage unit 105 is configured to store the application file data block pointer position information of the application file in the data block pointer storage unit, and the application file inode position information of the application file in the file node storage unit.

[0028] Such as figure 2 As shown, the process flow of the file storage method in this embodiment includes: storing directo...

Embodiment 2

[0037] in such as Figure 4 The directory inode number 2000 of the subdirectory 2000 is added to the directory node list 1002 shown.

[0038] Such as Figure 5 As shown, three attribute files are created for subdirectory 2000: data block pointer list 2001, directory node list 2002 and file node list 2003, and the inode numbers of the three attribute files are 2001, 2002 and 2003 in sequence.

[0039] Create an offset location list 3101 for an application file 3100, create an offset location list 3201 for an application file 3200, create an offset location list 3301 for an application file 3300, create an offset location list 3401 for an application file 3400, and create an offset location list 3401 for an application file 3500. Shift location list 3501.

[0040] The data block pointer list 2001 , which is a data block pointer set, records: pointers 621 , 622 , 623 , 624 and pointers 700 - 704 . Each pointer points to different data blocks of the nonvolatile memory respectiv...

Embodiment 3

[0050] Such as Image 6 As shown, the file deletion device in this embodiment includes: a data block pointer obtaining unit 201 for obtaining a data block pointer set pointing to a data block storing directory data and application file data under the directory; a directory node obtaining unit 202 for Obtaining the directory index node information of the directory and the file index node information of the application file; the file node obtaining unit 203 is used to obtain the position information of the application file and the data block pointer, and the application file and the The location information of the file index node information; the data release unit 204 is used to obtain the application file corresponding to the application file to be deleted from the data block pointer set of the data block pointer obtaining unit 201 according to the location information of the application file and the data block pointer obtained by the file node obtaining unit 203. The data bloc...

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 method and a device for storing files, and a method and a device for deleting files. The method for storing files comprises the following steps: storing a catalogue data and the application file data under the catalogue in a data block; storing the data block pointer pointing to the data block; storing the catalogue index node information of the catalogue and the file index node information of the application file; storing the position information of the application file and the data block pointer and the application file and the file index node information. In the deleting catalogue, the disk resource occupied by these files can be found without traveling the files under the catalogue and the file and the catalogue can be deleted, thereby effectively decreasing the occupied system resource during the deleting the whole catalogue process.

Description

technical field [0001] The present invention relates to file storage technology, in particular to file storage and deletion in file system applications, and specifically to a file storage method and device, and a file deletion method and device. Background technique [0002] At present, in the application of the video surveillance file system, the directory structure for storing video files is very simple, often only having one or two levels of directories. However, there are many files stored in the directory, up to 100,000 or even millions. In the application of this file system, generally only files are created and written, and files are rarely read, and when files are deleted, the entire directory is often deleted together, and a certain file is rarely deleted. [0003] As far as deleting a file is concerned, it is mainly to reclaim the disk resources used by this file, including the data block for saving data and the index node of the file. Deleting a directory is to ...

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): G06F17/30
CPCG06F17/30117G06F17/30067G06F16/162
Inventor 封欢
Owner HUAWEI DIGITAL TECH (CHENGDU) 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