CN110531940B - Video file processing method and device - Google Patents

Video file processing method and device Download PDF

Info

Publication number
CN110531940B
CN110531940B CN201910971138.9A CN201910971138A CN110531940B CN 110531940 B CN110531940 B CN 110531940B CN 201910971138 A CN201910971138 A CN 201910971138A CN 110531940 B CN110531940 B CN 110531940B
Authority
CN
China
Prior art keywords
file
directory
index
memory
block group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910971138.9A
Other languages
Chinese (zh)
Other versions
CN110531940A (en
Inventor
杨涛
代洪跃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Publication of CN110531940A publication Critical patent/CN110531940A/en
Application granted granted Critical
Publication of CN110531940B publication Critical patent/CN110531940B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes

Abstract

The application provides a video file processing method and a video file processing device, which relate to the technical field of information processing, and the method comprises the following steps: determining idle data blocks in a disk of a file system according to file attributes stored in a memory; determining the number of data blocks required by the video file to be stored according to the size of the video file to be stored; determining a target data block from the idle data blocks according to the number of the data blocks required by the video file to be stored; and storing the video file to be stored into the target data block, updating the file attribute recorded by the file index unit of the block group where the target data block is located, and updating the file attribute loaded from the file index unit of the block group where the target data block is located in the memory. The disk of the file system is divided into a plurality of block groups, each block group comprises the index area and the data area, the index area and the data area of the file system are stored in a segmented mode, the damage of a certain index area is avoided, the access performance of the data area in the whole file system is prevented from being influenced, and the use performance of the file system is effectively improved.

Description

Video file processing method and device
The present application claims priority of chinese patent application with the application number CN201910494901.3, entitled "video file processing method and apparatus" filed in 2019 on 06 th month 06, which is incorporated herein by reference in its entirety.
Technical Field
The application relates to the technical field of information processing, in particular to a video file processing method and device.
Background
In recent years, video surveillance technology has been developed at a high speed, and in the video surveillance process, massive data is generated, and a large amount of storage resources are required to store the video data, so that it is important to adopt an efficient and reliable file system to manage the massive data. At present, various file systems are developed to meet different application scenarios.
In the prior art, the index area and the data area of various file systems are both of two-segment storage structures, that is, the disk space of a file system only includes one index area and one data area.
Thus, when the index area of the disk space is damaged, the access processing of the data area fails, and data operation cannot be performed, thereby affecting the usability of the file system.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method and an apparatus for processing a video file, which are used to solve the problem of poor usability of a file system in the prior art.
In a first aspect, an embodiment of the present application provides a video file processing method, where the method includes:
determining a free data block in a disk of a file system according to file attributes stored in a memory, wherein the disk comprises: a plurality of block groups, each block group including an index area and a data area, the index area including: a file index unit for recording file attributes of the data blocks of each block group, wherein the data area comprises a plurality of data blocks; the file attributes in the memory are as follows: file attributes loaded from the file index unit of each block group, the file attributes including: information used for representing the file use state of each data block in each block group;
determining the number of data blocks required by the video file to be stored according to the size of the video file to be stored;
determining a target data block from the idle data blocks according to the number of the data blocks required by the video file to be stored;
and storing the video file to be stored into the target data block, and updating the file attribute recorded by the file index unit of the block group where the target data block is located and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory.
Optionally, before determining a free data block in a disk of the file system according to the file attribute stored in the memory, the method further includes:
and formatting each block group according to the size of a preset index area, so that the size of the index area in each block group is the size of the preset index area.
Optionally, the method further comprises: and loading the information recorded in the index area in each block group into the memory by taking the size of the preset index area as a unit.
Optionally, the index area includes: a plurality of sub-index units, each of the sub-index units comprising: the file index area comprises a plurality of file index units; the updating of the file attribute recorded by the file index unit of the block group where the target data block is located and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory includes:
and updating the file attributes recorded by the file index unit of the block group where the target data block is located and the file attributes loaded from the file index unit of the block group where the target data block is located in the memory by taking the size of the sub index unit as a unit.
Optionally, each sub-index unit further includes: the directory index area comprises a plurality of directory index units, and each directory index unit is used for recording the directory attribute of a data block in a block group where the directory index unit is located; the method further comprises the following steps:
and updating the directory attribute recorded by the directory index unit of the block group where the target data block is located and the directory attribute loaded from the directory index unit of the block group where the target data block is located in the memory by taking the size of the sub-index unit as a unit.
Optionally, before determining a free data block in a disk of the file system according to the file attribute stored in the memory, the method further includes:
acquiring attribute information of the file system from the disk, wherein the disk comprises: the super block is stored with attribute information of the file system; the attribute information of the file system includes: the number of block groups in the disk and the number of data blocks in the disk;
and loading the attribute information of the file system into the memory.
Optionally, the index area of each block group includes a main index area and a backup index area, and before determining, according to a file attribute stored in the memory, a free data block in a disk of the file system, the method further includes:
determining whether the main index area and the standby index area of each block group have abnormal indexes;
if one of the main index area and the standby index area has an abnormal index, the information recorded in the other index area is stored in the memory;
and if the access request of the memory is received, updating the abnormal index according to the information recorded in the other index area.
Optionally, a hierarchical directory is further stored in the memory, where the hierarchical directory includes: at least one file node, a directory node where each file node is located, and a parent-child relationship between the file nodes and the directory node;
the method further comprises the following steps:
creating a file node of the video file to be stored;
and adding the created file node to the directory node where the created file node is located in the hierarchical directory.
Optionally, the memory further stores: the directory attribute and the application starting position of the directory index unit; the hierarchical directory further comprises: parent-child relationships between directory nodes; the directory attributes in the memory are: the directory attribute loaded from the directory index unit of each block group; the directory attributes include: information for characterizing the directory usage status of each block group.
Optionally, the method further comprises:
obtaining a catalog creation request, wherein the catalog creation request comprises: the method comprises the following steps that a directory name to be created and path information of the directory to be created are obtained;
determining a father directory node of the directory to be created according to the path information and the hierarchical directory;
determining an unused directory index unit in the disk as a target directory index unit according to the application starting position of the directory index unit in the memory and the directory attribute;
creating a directory node according to the name of the directory to be created, and adding the created directory node to the position below the father directory node in the hierarchical directory;
and updating the directory use state recorded by the target directory index unit in the memory and the directory use state recorded by the target directory index unit in the disk.
Optionally, the determining, according to the application start position of the directory index unit in the memory and the directory attribute, that the directory index unit that is not used in the disk is a target directory index unit includes:
judging whether a directory or a file with the same name as the directory to be created exists in the father directory node or not;
and if the target directory index unit does not exist, determining the unused directory index unit in the disk as the target directory index unit according to the application starting position of the directory index unit in the memory and the directory attribute.
Optionally, the file attribute further includes: file location information, where the file location information is used to indicate the location of a block group and/or a data block of a file in the disk; the method further comprises the following steps:
acquiring a file operation request, wherein the file operation request comprises: the identification and the operation type of the file to be operated;
determining the target position of the file to be operated in the disk from the file attribute of the memory according to the identifier of the file to be operated;
and according to the operation type, performing operation corresponding to the operation type on the file to be operated at the target position in the disk.
Optionally, the file index unit further records the use capacity of the data block in the block group where the file index unit is located;
the performing, according to the operation type, an operation corresponding to the operation type on the file to be operated at the target position in the disk further includes:
if the operation type is a file closing operation, determining unused data blocks according to the use capacity of the data blocks recorded by each file index unit in the memory;
and updating the file use state of the data block recorded by the file index unit corresponding to the unused data block into an unused state.
In a second aspect, an embodiment of the present application provides a video file processing apparatus, including: the device comprises a first determining module, a second determining module, a third determining module and a first storage module;
the first determining module is used for determining free data blocks in a disk of the file system according to the file attributes stored in the memory; wherein the magnetic disk includes: a plurality of block groups, each block group including an index area and a data area, the index area including: a file index unit for recording file attributes of the data blocks of each block group, wherein the data area comprises a plurality of data blocks; the file attributes in the memory are as follows: file attributes loaded from the file index unit of each block group, the file attributes including: information used for representing the file use state of each data block in each block group;
the second determining module is used for determining the number of data blocks required by the video file to be stored according to the size of the video file to be stored;
the third determining module is configured to determine a target data block from the idle data blocks according to the number of data blocks required by the video file to be stored;
the first storage module is configured to store the video file to be stored in the target data block, and update the file attribute recorded by the file index unit of the block group in which the target data block is located, and the file attribute loaded from the file index unit of the block group in which the target data block is located in the memory.
Optionally, the apparatus further comprises a formatting module;
the formatting module is configured to format each block group according to a size of a preset index area, so that the size of the index area in each block group is the size of the preset index area.
Optionally, the apparatus further comprises a first loading module;
the first loading module is configured to load information recorded in the index area in each block group into the memory by using the size of the preset index area as a unit.
Optionally, the index area includes: a plurality of sub-index units, each of the sub-index units comprising: the file index area comprises a plurality of file index units;
the first storage module is specifically configured to update the file attribute recorded by the file index unit of the block group in which the target data block is located, and the file attribute loaded from the file index unit of the block group in which the target data block is located in the memory, with the size of the sub index unit as a unit.
Optionally, each sub-index unit further includes: the directory index area comprises a plurality of directory index units, and each directory index unit is used for recording the directory attribute of a data block in a block group where the directory index unit is located;
the first storage module is further configured to update the directory attribute recorded by the directory index unit of the block group in which the target data block is located, and the directory attribute loaded from the directory index unit of the block group in which the target data block is located in the memory, with the size of the sub-index unit as a unit.
Optionally, the system further comprises a first obtaining module and a second loading module;
the first obtaining module is configured to obtain attribute information of the file system from the disk, where the disk includes: the super block is stored with attribute information of the file system; the attribute information of the file system includes: the number of block groups in the disk and the number of data blocks in the disk;
the second loading module is configured to load the attribute information of the file system into the memory.
Optionally, the system comprises a fourth determining module, a second storing module and a first updating module; the index area of each block group comprises a main index area and a standby index area;
the fourth determining module is configured to determine whether an abnormal index exists in the main index area and the standby index area of each block group;
the second storage module is configured to, if one of the main index area and the standby index area has an abnormal index, store information recorded in the other index area to the memory;
and the first updating module is used for updating the abnormal index according to the information recorded in the other index area if the access request of the memory is received.
Optionally, a hierarchical directory is further stored in the memory, where the hierarchical directory includes: the device comprises at least one file node, a directory node where each file node is located, and a parent-child relationship between the file nodes and the directory node, and further comprises a first creation module and an addition module;
the first creating module is used for creating file nodes of the video files to be stored;
and the adding module is used for adding the created file node to the directory node where the created file node is located in the hierarchical directory.
Optionally, the memory further stores: the directory attribute and the application starting position of the directory index unit; the hierarchical directory further comprises: parent-child relationships between directory nodes; the directory attributes in the memory are: the directory attribute loaded from the directory index unit of each block group; the directory attributes include: information for characterizing the directory usage status of each block group.
Optionally, the system further comprises a second obtaining module, a fifth determining module, a sixth determining module, a second creating module and a second updating module;
the second obtaining module is configured to obtain a directory creation request, where the directory creation request includes: the method comprises the following steps that a directory name to be created and path information of the directory to be created are obtained;
the fifth determining module is configured to determine, according to the path information and the hierarchical directory, a parent directory node of the directory to be created;
a sixth determining module, configured to determine, according to the application start position of the directory index unit in the memory and the directory attribute, that a directory index unit that is not used in the disk is a target directory index unit;
the second creating module is used for creating a directory node according to the name of the directory to be created and adding the created directory node to the position below the father directory node in the hierarchical directory;
the second updating module is configured to update the directory use state recorded by the target directory index unit in the memory and the directory use state recorded by the target directory index unit in the disk.
Optionally, the system further comprises a judging module;
the judging module is used for judging whether a directory or a file with the same name as the directory to be created exists in the father directory node;
the sixth determining module is specifically configured to determine, if the directory index unit does not exist, an unused directory index unit in the disk as the target directory index unit according to the application start position of the directory index unit in the memory and the directory attribute.
Optionally, the file attribute further includes: file location information, where the file location information is used to indicate the location of a block group and/or a data block of a file in the disk; the device further comprises: the third acquisition module, the seventh determination module and the operation module;
the third obtaining module is configured to obtain a file operation request, where the file operation request includes: the identification and the operation type of the file to be operated;
the seventh determining module is configured to determine, according to the identifier of the file to be operated, a target position of the file to be operated in the disk from the file attribute of the memory;
and the operation module is used for performing operation corresponding to the operation type on the file to be operated at the target position in the disk according to the operation type.
Optionally, the file index unit further records the use capacity of the data block in the block group where the file index unit is located;
the operation module is further configured to determine, if the operation type is a file closing operation, an unused data block according to a usage capacity of a data block recorded in each file index unit in the memory; and updating the file use state of the data block recorded by the file index unit corresponding to the unused data block into an unused state.
According to the video file processing method provided by the embodiment of the application, the magnetic disk corresponding to the file system is divided into the plurality of block groups according to the preset rule, and each block group comprises the index area and the data area, so that the index area and the data area of the whole file system can be stored in a sectional mode, the damage of a certain index area is avoided, the access processing performance of the data area in the whole file system is prevented from being influenced, and the use performance of the file system is effectively improved.
Secondly, when the file system is formatted and loaded, the block group index is used as a unit for formatting and loading, and when the index data is updated, the sub-unit index is used as a unit for updating, so that the formatting and loading speed of the file system is improved, and the reading and writing performance of the video file in the file system is effectively ensured.
In addition, the scheme of the application also carries out validity check by periodically reading the data of the super block and the index area in the file system structure in real time, thereby ensuring the validity of the data of the file system.
Finally, the application also provides a mechanism for releasing and recovering the idle data blocks, thereby effectively avoiding the waste of idle resources and improving the utilization rate of system resources.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1A is a general schematic diagram of a video file processing system according to an embodiment of the present application;
fig. 1B is a schematic diagram illustrating initialization and partition of a disk space at a storage server according to an embodiment of the present application;
fig. 1 is a schematic flowchart of a video file processing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a file system structure provided in an embodiment of the present application;
fig. 3 is a schematic flow chart of another video file processing method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of another video file processing method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of another video file processing method according to an embodiment of the present application;
fig. 6 is a schematic flow chart of another video file processing method according to an embodiment of the present application;
fig. 7 is a schematic flow chart of another video file processing method according to an embodiment of the present application;
fig. 8 is a schematic flow chart of another video file processing method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a video file processing apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a video file processing apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of another video file processing apparatus according to an embodiment of the present application;
FIG. 19 is a block diagram of another video file processing apparatus according to an embodiment of the present application;
fig. 20 is a schematic structural diagram of a video file processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
It should be noted that the solution of the embodiment of the present application can be applied to a Linux operating system or other operating systems. The Disks referred to below may be divided into a plurality of block groups, and a device having a disk of this type may be referred to as a block device, and the disk may be a single hard disk or a Raid (Redundant Arrays of Independent Disks). The storage space of the disk may be larger than the storage space of the preset unit block group, such as: 4G +16K +8K +4M, i.e. at least the space for allocating a block group.
To facilitate understanding of the aspects of the present application, technical terms referred to in the present application may be explained below before describing the aspects of the present application.
Formatting of the disk: calling a system initialization interface, and transmitting parameters: the resource information (including the path information of the block device and the file operation interface of the operating system, so as to perform read-write operation on the block device under a certain operating system, such as modifying the information stored in the disk of the block device), format the status, and output the resource Identification (ID) (the resource ID is used as the identification for the subsequent directory file operation of the file system). The path information of the block device may be information of an access address of the block device, such as/dev/sdb. The file manipulation interface of the operating system may include: open, close, write, read, etc. interfaces for linux systems.
1) And initializing an error index recovery linked list structure, and storing the index unit with the exception in the operation process of the file system.
2) Formatting the super block:
the disk capacity of the block device is obtained and it is checked whether the minimum capacity size of the file system is met.
Calculating the number of block groups (block group number ═ disk space size-reserved area-super block size ×/block group size) of the disk of the block device according to the disk capacity, the number of index blocks (block group number × 2), the index size, the formatting time and the system identifier ID, and calculating the Check code of the super block of the block device by using a Cyclic Redundancy Check (CRC) algorithm such as a 32-bit Cyclic Redundancy Check (CRC 32) algorithm.
The number of blocks is disk space size-reserved area-superblock size 2)/block size.
Location of the master superblock: a reserved area (4M).
Position of spare super block: reserved area (4M) + number of blocks size (4G + 16) of blocks.
And calling a file operation interface of an operating system to write the superblock data into the offset address of the block device of the main superblock and the standby superblock. The superblock data records information of the whole file system, including check codes, system creating time, last writing time, access times, block group number, index unit number, data block size, etc.
3) Formatting the index area:
the primary and secondary index regions that format all block groups need to be traversed.
The index structure formats a check code that writes only log information and calculates an index using a CRC32 check algorithm, wherein the index region may include: the directory index unit is also called a directory node (DNode), and the file index unit is also called a file node (FNode). The information stored by the directory index unit and the file index unit in the initialization stage is a preset value of 0. And sequentially initializing the index regions in each block group, and formatting the index regions by taking the whole block group index GInode as a unit.
The numbering of the block groups is GDTNum (numbering starting with 0).
The positions of the main and standby index areas in the block group are as follows:
position of the main index area: reserved area (4M) + main superblock (4K) + block group size (256G +1M 2) GDTNum.
The position of the standby index area is the main index position + the index size (1M) + the data block size (256G).
And calling a file operation interface of an operating system to write the index data into the offset address of the block device of the main/standby index area. The index data, that is, the main watermark data and the spare watermark data of the block group, includes an index check code, writing time, updating times, directory attribute information, and file attribute information.
At this point, the formatting of the disk into a disk structure suitable for the file system in the present application has been completed.
Fig. 1A is an overall schematic diagram of a video file processing system according to an embodiment of the present application, where the video file processing system is composed of a video acquisition input end, a central scheduling server and a storage server end, video data at the video acquisition input end flows into the central scheduling server, the central scheduling server decides to select the storage server end, and the video data flows into the server end for storage, and the central scheduling server mainly balances data storage at each storage server end. Fig. 1B is a schematic diagram illustrating initialization and division of a disk space at a storage server according to an embodiment of the present disclosure, where a hard disk device is first organized into a Raid5 disk array, a Logical Volume Manager (LVM) is then used to instruct the disk array to be created into a Physical Volume (PV), a plurality of Physical volumes are created into a Volume Group (VG), and a Logical Volume is finally divided from the Volume Group (LV), so that an initialization operation of the disk storage space is completed, that is, the Logical Volume can be formatted into a file system in the present disclosure for processing a video file.
Fig. 1 is a schematic flowchart of a video file processing method according to an embodiment of the present application, where the video file processing method shown in fig. 1 may be implemented by a server. Fig. 2 is a schematic structural diagram of a file system provided in an embodiment of the present application, and as shown in fig. 1, the method includes:
s101, determining free data blocks in a magnetic disk of the file system according to file attributes stored in the memory.
Wherein, the magnetic disk includes: a plurality of block groups, each block group including an index area and a data area, the index area including: the file index unit records the file attribute of the data block of each block group, and the data area comprises a plurality of data blocks; the file attributes in the memory are: file attributes loaded from the file index unit of each block group, the file attributes including: and the information is used for representing the file use state of each data block in each block group.
It should be noted that the file in the embodiment of the present application may be a video file, and as security technology is continuously enhanced, video monitoring is more and more common, and a large amount of video files are generated accordingly, so that the video files are effectively managed, and the working efficiency of security workers can be improved to a certain extent, so that an efficient and reliable file management system becomes more important. Optionally, the file in the embodiment of the present application may also be not limited to a video file, but may also be a text file or other types of files.
Optionally, as shown in fig. 2, the file system performs structural division on the disk space during initialization. The disk space of the file system includes: the size of the reserved area may be 4M, the size of each super block may be 4K, and the size of each block group may be 256G + 2M.
Optionally, each chunk may include a main index region and a spare index region, where one main index region or one spare index region may be referred to as a chunk index GInode, and the size of each chunk index GInode is 1M, and one main index region or one spare index region may be further subdivided into 64 subunit indexes (sinodes), each subunit index being 16K, where one subunit may include: index log record 4K, directory index unit 4K, and file index unit 8K.
The main index area and the standby index area are respectively positioned at two ends of the block group, and a data area is arranged between the main index area and the standby index area. Each data area includes a plurality of data blocks, as shown in fig. 2, one data area may include 64 data blocks, and each data block may have a size of 64M.
In addition, the main/standby index area respectively comprises an index log record, a directory index unit and a file index unit, and the directory index unit and the file index unit of the index area are index units for recording directory attributes and file attributes respectively. The index log record size may be 4K, the directory index unit size may be 4K, and the file index unit size may be 8K. The directory index unit includes 32 directory indexes, the size of each directory index may be 128B, the file index unit includes 64 file indexes, the size of each file index may be 128B, and the number of the file index units corresponds to the number of the data blocks.
The super block is used for recording the whole information of the whole file system, including the signature of the file system, the creation time of the system, the last write time, the access times, the number of index units, the number of block groups, the size of a data block, the size of an index unit, a Universal Unique Identifier (UUID) and the formatting state. The super block is divided into a main super block and a standby super block, and the main and standby relations are used for improving the reliability of the system through the recovery of the data of the other super block when the information of a certain super block is abnormal.
The method divides the disk into a plurality of block groups by dividing the block groups, thereby realizing the segmented storage of the index information and the data respectively by segmenting the index area and the data area, and effectively avoiding the damage of the whole system and the damage and the loss of the data caused by the damage of the index area.
It should be noted that the size of the reserved area, the super block, and the size of the unit block group are all only one optional allocation manner, and may be specifically not limited to the foregoing, and may be appropriately adjusted according to actual situations.
In addition, the index area is a key area of the file system and is used for recording index log information, directory attributes and file attributes. The log information may include an index check code, index update time and times, log information, and the like, the directory attribute may include a use state, a number of path layers, a mode, creation and modification time, a parent directory sequence number, and a directory sequence number, and the file attribute may include a use state, a number of path layers, a mode, creation and modification time, a parent directory sequence number, a file fragment sequence number, an occupied capacity of a current block group, and a number of data blocks occupied by a file. The use state is used for representing whether the directory index unit where the directory attribute is located is used or not.
It should be noted that the number of the block groups divided by the disk, the number of the index areas included in each block group, the size of the index area, the size of the data area, the number of the data blocks included in the data area, and the size of each data block may be one possible example, and the application is not limited thereto.
The above-mentioned memory, that is, the file node management structure in the memory, includes a super block structure, disk path information, root directory nodes, index node bitmap information, a directory and file index unit application start position, an index recovery structure, and the number of current files and directories. The file node manages the contents of the entire file system that the structure maintains. The file node management structure is mainly file system information recorded in a memory, wherein the super block structure: the method comprises the steps of checking codes, system creation time, last write-in time, access times, block group number, index unit number, data block number and data block size; disk path information: for block device paths (e.g.,/dev/sdb); root directory node: is the root node of the directory tree of the whole file system; index node bitmap information: the system is used for recording the use states of the directory index and the file index unit in the used block group; the directory and file index unit applies for the start position: recording the block group position to which the current directory or file applies, and starting to apply from the position each time, so that the condition that the block group index area in front is always accessed and the block group in the back is not accessed, which causes unbalanced reading and writing of the whole block device and influences on performance can be avoided; and index recovery structure: storing index area information needing to be restored; the number of current files and directories: and recording the number of directories and files which are created by the whole system.
In this embodiment, before storing the video file to be stored, it is necessary to determine an idle data block in the disk first, so as to store the video file to be stored into the idle data block. Specifically, the free data blocks in the disk may be determined according to file attributes stored in the memory.
As can be seen from the above description, each data block of each block group in the disk corresponds to an index area, and the file attribute stored in the file index unit in the corresponding index area, that is, the file index information, may include file use state information of the index area, where the file use state information of the index area is information representing a file use state of each data block in each block group, and the file use state is whether each data block stores a file or is used by a file. The file attribute can be loaded from the file index unit of the index area of the data block of each block group and stored in the memory. Therefore, the file use state of the data blocks in the disk of the file system can be determined according to the file attributes stored in the memory, and then the free data blocks in the disk of the file system can be determined according to the file use state.
The index information may be stored in the memory, so that the use state of each data block in the disk may be obtained according to the index information stored in the memory, thereby determining a free data block.
S102, determining the number of data blocks needed by the video file to be stored according to the size of the video file to be stored.
Optionally, the number of data blocks required by the video file to be stored may be determined according to the size of the video file to be stored. For example: the video file to be stored is 15M, and the size of each data block in each block group in the disk is 4M, it is determined that the number of data blocks required by the video file to be stored is 4, and although the fourth data block cannot be fully occupied, at least four data blocks are required to store the video file.
S103, determining a target data block from the idle data blocks according to the number of the data blocks required by the video file to be stored.
In some embodiments, the number of free data blocks in the disk determined in step S101 is not unique, and the number of free data blocks may be equal to or greater than the number of data blocks required by the video file to be stored. And when the determined number of the free data blocks in the disk is larger than the number of the data blocks required by the video file to be stored, screening the plurality of free data blocks to determine a target data block.
Optionally, the determined first data blocks may be used as target data blocks according to the determined sequence of free data blocks in the disk. In addition, the corresponding data block may be determined as the target data block according to a preset selection rule. And is not particularly limited herein.
S104, storing the video file to be stored into the target data block, and updating the file attribute recorded by the file index unit of the block group where the target data block is located and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory.
And after the target data blocks are determined, correspondingly storing the video files to be stored into the plurality of target data blocks. It should be noted that, after the determined target data block stores the video file to be stored, the determined target data block is changed from the idle data block to the non-idle data block, that is, the state of the data block is changed from unused to used, so to ensure the accuracy of the file use state of the data block, the file attribute recorded by the file index unit of the block group where the target data block is located and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory need to be updated.
The updating of file attributes may include, for example: and updating the file use state included by the file attribute, namely changing the file use state from an unused state to a used state, so as to conveniently and accurately acquire the idle data block according to the file attribute when the file is stored next time. The file attributes corresponding to the video files to be stored in the memory and the disk can be updated, so that the validity of the data blocks in the disk is ensured.
Optionally, in the embodiment of the present application, in the file attributes recorded by the file indexing unit, the file usage status, also referred to as index status information, may be stored in the memory in the form of a bitmap, where 0 indicates unused, and 1 indicates used. The mode of storing the index information by using the bitmap can quickly locate the file use state of the data block, then determine the idle data block, and accelerate the creation, storage and the like of the directory or the file. However, the method for representing the index status information is not limited to the bitmap form, and is not particularly limited.
To sum up, the video file processing method provided in the embodiment of the present application may determine, according to file attributes stored in a memory, idle data blocks in a disk of a file system, determine, according to the size of a video file to be stored, the number of data blocks required by the video file to be stored, further determine, according to the number of data blocks required by the video file to be stored, a target data block from the idle data blocks, then store the video file to be stored in the target data block, and update file attributes recorded by a file index unit of a block group in which the target data block is located, and file attributes loaded from a file index unit of the block group in which the target data block is located in the memory, where the disk includes: a plurality of block groups, each block group including an index area and a data area, the index area including: a file index unit for recording file attributes of the data blocks of each block group, wherein the data area comprises a plurality of data blocks; the file attributes in the memory are: the file attributes loaded from the file index unit of each block group include: and the information is used for representing the file use state of each data block in each block group. In the method, the disk can comprise a plurality of block groups, and each block group comprises an index area and a data area, so that the index area and the data area of the whole file system realize sectional storage, the damage of a certain index area is avoided, the access processing performance of the data area in the whole file system is influenced, and the use performance of the file system is effectively improved.
Meanwhile, the method can also update the file attribute recorded by the file index unit of the block group where the target data block is located and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory under the condition that the video file to be stored is stored in the target data block, thereby ensuring the validity of the data block in the magnetic disk.
Optionally, in step S101, before determining a free data block in a disk of the file system according to the file attribute stored in the memory, the method of the present application may further include:
and formatting each block group according to the size of the preset index area, so that the size of the index area in each block group is the size of the preset index area.
Optionally, the size of the preset index area may be the size of the entire index file corresponding to each block group, that is, the size of the block group index (the main index area or the spare index area) corresponding to the block group, which may be preset, in this embodiment, each block group in the disk of the file system may be formatted by taking 1M as a unit, and compared with the formatting of each block group in the disk by taking the sub-index unit 16K corresponding to each block group as a unit, the formatting manner provided in this embodiment effectively increases the speed of formatting the file system, and accelerates the time of formatting.
After each block group in the file system disk is formatted according to the above-mentioned formatting manner using the block group index as a unit, the size of the index area in each block group can be the size of the preset index area, that is, the size of the main index area or the spare index area corresponding to each block group after formatting is 1M. Each block group may include a main index region and a spare index region, where one main index region or one spare index region may be referred to as a block group index GInode, and the size of each block group index GInode is 1M, and one main index region or one spare index region may be further subdivided into 64 subunit indexes (sinodes), each subunit index being 16K, where one subunit index may include: index log record 4K, directory index unit 4K, and file index unit 8K corresponding to the data. Thus, the formatting of the index area in the file system disk is completed.
In some embodiments, after formatting each block group in the file system disk, before further video file processing, for example: operations such as creating, deleting, reading and writing of files and the like also need to load a file system. That is, the information recorded in the index area of each block group in the magnetic disk is loaded into the memory. As explained above, the information recorded in the index area in each block group may include: index log information, directory attributes, and file attributes, etc.
Optionally, in order to improve the service performance of the file system and improve the loading speed of the file, the file system may be loaded by the same method as the above block group formatting, that is, when the file system is loaded, the file index unit information is loaded by the block group index size 1M, so as to effectively improve the loading speed of the file system.
In some embodiments, as explained above, the index region may include: a plurality of sub-index units, each sub-index unit may include: the file index area can comprise a plurality of file index units; the updating of the file attribute recorded by the file index unit of the block group in which the target data block is located in the step S104 and the file attribute loaded from the file index unit of the block group in which the target data block is located in the memory includes: and updating the file attributes recorded by the file index unit of the block group where the target data block is located and the file attributes loaded from the file index unit of the block group where the target data block is located in the memory by taking the size of the sub index unit as a unit.
In other embodiments, each sub-index unit may further include: the directory index area comprises a plurality of directory index units, and each directory index unit is used for recording the directory attribute of the data block in the block group where the directory index unit is located; the method of the application can also comprise the following steps: and updating the directory attribute recorded by the directory index unit of the block group where the target data block is located and the directory attribute loaded from the directory index unit of the block group where the target data block is located in the memory by taking the size of the sub-index unit as a unit.
Optionally, while the formatting and recording speed of the file system is increased, in order not to affect the read-write performance of the video file in the file system, when the directory attribute recorded by the directory index unit in the memory and the index area in the disk and the file attribute recorded by the file index unit are updated, the index unit may be updated in a manner different from the formatting and loading of the file system.
Optionally, in this embodiment, the index unit may be updated according to the size of the subunit index 16K, so as to ensure normal video read-write performance and improve the service performance of the file system. Alternatively, the updating of the index data by the sub-index unit 16K in the present embodiment is merely described as an example, and in practical application, the updating of the index data by the size of 16K is not limited.
Fig. 3 is a schematic flow chart of another video file processing method according to an embodiment of the present application; further, as shown in fig. 3, before determining a free data block in a disk of the file system according to the file attribute stored in the memory, the method further includes:
s201, acquiring attribute information of the file system from the disk.
Wherein, the magnetic disk includes: the super block stores attribute information of a file system; the attribute information of the file system includes: the number of block groups in the disk and the number of data blocks in the disk.
S202, loading the attribute information of the file system into a memory.
It should be noted that before obtaining the file attribute from the memory, the attribute information of the file system needs to be parsed from the disk and loaded into the memory, so as to synchronize the data information. The information stored in the superblock included in the disk may be analyzed to obtain the attribute information of the file system, and the attribute information of the file system is loaded into the memory. For the description of the super block, refer to the above description, and are not described herein again.
Further, the index area of each block group includes a main index area and a spare index area.
Optionally, in this embodiment of the application, the index areas in each block group include two main index areas and two backup index areas, so as to implement backup of index data, and when an index is abnormal, the index data is restored through another index, thereby ensuring consistency of the index data and improving reliability of the system.
In addition, the data of the index area can be checked in a CRC32 checking mode, the effectiveness of the index area is checked, and the consistency of the main index area and the standby index area is ensured.
Fig. 4 is a schematic flow chart of another video file processing method according to an embodiment of the present application; further, as shown in fig. 4, before determining a free data block in a disk of the file system according to the file attribute stored in the memory, the method further includes:
s301, determining whether the main index area and the standby index area of each block group have abnormal indexes.
Similarly, CRC32 may be used to check the validity of the primary index region and the backup index region, respectively, to determine whether an anomalous index exists in either the primary index region or the backup index region.
S302, if one index area of the main index area and the standby index area has an abnormal index, the information recorded in the other index area is stored in the memory.
If the abnormal index exists in the main index area, the abnormal index can be added into an index recovery structure in the memory, meanwhile, the index information recorded in the standby index area is stored in the memory, and the standby index is continuously used to complete the file operation.
Correspondingly, if it is determined that the spare index area has an abnormal index, the abnormal index can be added into an index recovery structure in the memory, and meanwhile, the index information recorded in the main index area is stored in the memory, and the main index is continuously used to complete the file operation.
And S303, if the access request of the memory is received, updating the abnormal index according to the information recorded in the other index area.
After the abnormal index is added into the index recovery structure, when an access request of a memory is received to perform file operation again, the abnormal index added into the main index area in the index recovery structure can be recovered, that is, the recorded information of the main index area is updated to the information recorded in the standby index area; or when the auxiliary index area is enabled, that is, the file operation is performed according to the information recorded in the auxiliary index area, the abnormal index in the main index area is recovered, and the recorded information in the main index area is updated to the information recorded in the auxiliary index area. Optionally, the abnormal index may be recovered through a primary and standby index recovery mechanism, so as to enhance the security and reliability of the file system.
Fig. 5 is a schematic flow chart of another video file processing method according to an embodiment of the present application, and further, as shown in fig. 5, a hierarchical directory is further stored in the memory, where the hierarchical directory includes: at least one file node, a directory node where each file node is located, and a parent-child relationship between the file nodes and the directory node;
the method may further comprise:
s401, creating a file node of the video file to be stored.
S402, adding the created file nodes to the directory nodes where the file nodes created in the hierarchical directory are located.
It should be noted that the file creation node may transfer the resource ID, the file path to be created, and the file size by calling the file creation interface, and return the location information of the data block successfully allocated by the file creation node. The creation of the file node adopts a space pre-allocation strategy, namely when the file node is successfully created, the data block allocated to the file node is determined. Analyzing a path of a file node to be created; acquiring a father directory node of a file node to be created, checking whether a child directory list of the father directory node and a child file node list have the same name or not, and if the same name exists, the file node cannot be created; and creating file nodes and adding the file nodes to a hierarchical directory in the memory. Meanwhile, the capacity of each level of parent directory nodes of the file node in the memory needs to be updated. And returning and outputting the position information of all the data blocks which are distributed to the file node, so that the upper-layer service can perform any type of operation such as reading and writing operation or deleting operation.
Further, the index area of each block group may further include: and the directory index unit records the directory attribute of the data block of each block group. The memory also stores: the directory attribute and the application starting position of the directory index unit; the hierarchical directory further includes: parent-child relationships between directory nodes; the directory attributes in memory are: directory attributes loaded from the directory index unit of each block group; the directory attributes include: information characterizing the directory usage status of each block group.
Fig. 6 is a schematic flow chart of another video file processing method provided in the embodiment of the present application, and further, as shown in fig. 6, the method may further include:
s501, obtaining a catalog creation request, wherein the catalog creation request comprises: the name of the directory to be created, and the path information of the directory to be created.
Optionally, it is first checked whether the file system status is normal, and only if it is normal, the creation of the directory may be performed. Specifically, whether an abnormal index to be restored exists in an index restoration structure in the memory is detected, and if the abnormal index does not exist, the state of the file system is determined to be normal. Otherwise, if the abnormal index exists, the file system state is determined to be abnormal. Optionally, the catalog creation request may include: the name of the directory to be created and the path information of the directory to be created.
And S502, determining a father directory node of the directory to be created according to the path information and the hierarchical directory.
Optionally, the parent directory node of the directory to be created may be determined from the hierarchical directory stored in the memory according to the obtained path information of the directory to be created.
S503, determining the unused directory index unit in the disk as the target directory index unit according to the application starting position and the directory attribute of the directory index unit in the memory.
The directory attribute may include the use state information of the directory, and the free directory index unit in the disk is searched in a traversal manner according to the start position of the directory index unit in the memory, that is, the application position of the current block group, and the searched free directory index unit is used as the target directory index unit. The free directory index unit, also called an unused directory index unit, may be a directory index unit in a disk, where the recorded directory use state is an unused state.
S504, creating a directory node according to the name of the directory to be created, and adding the created directory node to the position below a father directory node in the hierarchical directory.
Optionally, a new directory node is created according to the obtained name of the directory to be created, and the new directory node is added to the hierarchical directory stored in the memory, where the new directory node is below the parent directory node corresponding to the file to be created.
And S505, updating the directory use state recorded by the target directory index unit in the memory and the directory use state recorded by the target directory index unit in the disk.
Optionally, in this embodiment, in the same manner as the above updating of the index data, the directory use state recorded in the directory index unit may also be updated by using the size of the subunit index 16K as a unit, so as to ensure normal video read-write performance and improve the use performance of the file system.
Alternatively, similar to the file storage process, after creating a new directory, the information of the directory index unit corresponding to the occupied directory is changed from unused to used. Specifically, the directory use states corresponding to the target directory index units in the memory and the disk can be updated, so as to ensure the validity of the directory.
Fig. 7 is a flowchart illustrating another video file processing method according to an embodiment of the present application, further, as shown in fig. 7, determining an unused directory index unit in a disk as a target directory index unit according to an application start position and a directory attribute of a directory index unit in a memory includes:
s601, judging whether a directory or a file with the same name as the directory to be created exists in the father directory node.
In some embodiments, when creating the directory again, after determining the parent directory node, it is further required to determine whether a directory or a file with the same name as the directory to be created exists in the parent directory node, and if the directory or the file exists, the directory creation will fail.
And S602, if the target directory index unit does not exist, determining the unused directory index unit in the disk as the target directory index unit according to the application starting position and the directory attribute of the directory index unit in the memory.
Optionally, when a directory or a file with the same name as the directory to be created does not exist in the parent directory node, the unused directory index unit in the disk may be determined as the target directory index unit according to the application start position and the directory attribute of the directory index unit in the memory, and the directory is created.
Fig. 8 is a schematic flow chart of another video file processing method provided in the embodiment of the present application, and further, as shown in fig. 8, the file attributes further include: file position information, wherein the file position information is used for indicating the position of a block group and/or a data block of a file in a disk; the method further comprises the following steps:
s701, acquiring a file operation request, wherein the file operation request comprises: and the identification and the operation type of the file to be operated.
In some embodiments, after the file is stored, the upper layer service may pre-allocate the read-write data of the corresponding data block to the file system, and the upper layer service mainly performs read-write operation control of the file by calling an interface provided by the file system to acquire file data block information and update file index capacity, and a file operation interface of the Linux system.
Optionally, the identification of the file to be operated may include: the name of the file to be operated, the serial number of the file to be operated, and the like, and the operation types may be: opening operation, reading operation, writing operation, closing operation or deleting operation of the file, and the like.
Alternatively, an interface of the file system for obtaining the location of the data block of the file may be called, address offsets of all the data blocks of the file are pre-allocated, and file operations are performed using an Open interface, a seek (specifying the current read/write location in a file opened by an Open statement), a write interface, a read interface, and a close interface of the operating system.
It should be noted that, in this embodiment, the file attribute may be written into a corresponding location in the memory through the file operation interface, and meanwhile, the file attribute may also be acquired from the memory through the file operation interface.
S702, determining the target position of the file to be operated in the disk from the file attribute of the memory according to the identifier of the file to be operated.
Optionally, the file attribute of the memory further includes file location information, where the file location information is used to indicate a location of a block group and/or a data block of the file in the disk. The target position of the file to be operated in the disk can be obtained from the memory according to the identifier of the file to be operated.
Alternatively, the target location may be a location of one or more block groups in the disk, or may be a location of a plurality of data blocks in one or more block groups in the disk.
And S703, performing operation corresponding to the operation type on the file to be operated at the target position in the disk according to the operation type.
After the position of the file to be operated in the disk is determined, the type command can be operated, and corresponding operation, such as reading, writing or closing of the file, can be performed on the file to be operated at the target position in the disk.
Further, if the operation type is: the file deleting operation, the method may further include:
updating the file attributes of the files to be deleted in the memory and the magnetic disk, wherein the file attributes comprise: and index position information and index state information of the data block corresponding to the file to be deleted.
Optionally, as in the above updating manner of the index data, in this embodiment, the file attribute of the file to be deleted in the memory and the disk may also be updated by using the size of the sub-index unit 16K as a unit, which is not described herein any more.
Optionally, the file operation type may also be file deletion, and after a deletion operation is performed on a file to be operated, the file attribute information of the file stored in the memory needs to be correspondingly changed, where the method includes: and updating the index state information corresponding to the file to be deleted from used to unused, namely updating the file index bitmap information from 1 to 0.
Specifically, the position information of all file indexes can be traversed according to the position information of the file index stored in the file node of the directory tree in the memory, the file position indexes belonging to the same block group are combined, the use state in the stored file information is set to be 0, the file position indexes are written into the index area of the corresponding block group stored in the disk space, the FNode information in all block groups belonging to the file node is sequentially updated and stored, and meanwhile, the bitmap information is updated, and the corresponding bitmap is set to be 0. And after the index area in the disk space is updated successfully, deleting the file node in the directory tree in the memory.
Fig. 9 is a schematic flow chart of another video file processing method according to an embodiment of the present application, and optionally, according to the foregoing description, the file indexing unit further records: the file index unit is located in the block group, and the use capacity of the data block is determined; as shown in fig. 9, the step S703 may further include:
s7031, if the operation type is a file closing operation, determining an unused data block according to the usage capacity of the data block recorded in each file index unit in the memory.
S7032, the file use status of the data block recorded in the file index unit corresponding to the unused data block is updated to an unused status.
In some embodiments, whether the current data block is in an idle state may be determined according to the usage capacity information of the data block recorded in the file index unit, and for the data block in the idle state, that is, the unused data block, the data block may be released to be recycled, so as to avoid waste of resources.
It should be noted that, in the process of writing data in a data block, a file system provides an interface for updating the capacity of a file index unit, and in order to reduce the number of accesses to a disk space, it is agreed that one data block is not fully written, or that writing of data into a data block is stopped, and when a file is closed, the file index unit capacity information of the file is updated.
When the video file is closed without writing data into the target video file (file to be operated) of the target data block, whether the use capacity of the data block corresponding to the file to be operated is 0 or not can be judged according to the use capacity information of each data block in the block group corresponding to the file index unit and recorded by the file index unit in the memory; and if the using capacity of the data block corresponding to the file to be operated is 0, releasing the data block. Optionally, the data block is released, that is, the file use state information corresponding to the data block in the file index unit corresponding to the data block is changed from used to unused, that is, the file index bitmap information is updated from 1 to 0, so that the data block can be used by other video files, and waste of data block resources is avoided.
In some embodiments, to improve the effectiveness of the present file system, the present file system may be monitored for effectiveness. Optionally, the validity check may be performed by periodically reading the superblock and the index area data in the file system structure in real time, and if an exception occurs, the process to which the file system belongs is exited, and the video data is stopped from being continuously read and written to the disk space of the file system, so as to stop loss in time.
According to the video file processing method provided by the embodiment of the application, the magnetic disk corresponding to the file system is divided into the plurality of block groups according to the preset rule, and each block group comprises the index area and the data area, so that the index area and the data area of the whole file system can be stored in a sectional mode, the damage of a certain index area is avoided, the access processing performance of the data area in the whole file system is prevented from being influenced, and the use performance of the file system is effectively improved. In addition, the file attribute information is directly acquired from the memory to perform data access, so that the data access efficiency is improved. Secondly, when the file system is formatted and loaded, the block group index is used as a unit for formatting and loading, and when the index data is updated, the sub-unit index is used as a unit for updating, so that the formatting and loading speed of the file system is improved, and the reading and writing performance of the video file in the file system is effectively ensured. In addition, the scheme of the application also carries out validity check by periodically reading the data of the super block and the index area in the file system structure in real time, thereby ensuring the validity of the data of the file system. Finally, the application also provides a mechanism for releasing and recovering the idle data blocks, thereby effectively avoiding the waste of idle resources and improving the utilization rate of system resources.
Fig. 10 is a schematic structural diagram of a video file processing apparatus according to an embodiment of the present application, including: a first determination module 801, a second determination module 802, a third determination module 803, and a first storage module 804.
A first determining module 801, configured to determine, according to a file attribute stored in a memory, an idle data block in a disk of a file system; wherein, the magnetic disk includes: a plurality of block groups, each block group including an index area and a data area, the index area including: the file index unit records the file attribute of the data block of each block group, and the data area comprises a plurality of data blocks; the file attributes in the memory are: file attributes loaded from the file index unit of each block group, the file attributes including: information used for representing the file use state of each data block in each block group;
a second determining module 802, configured to determine, according to the size of the video file to be stored, the number of data blocks needed by the video file to be stored;
a third determining module 803, configured to determine a target data block from the idle data blocks according to the number of data blocks needed by the video file to be stored;
the first storage module 804 is configured to store the video file to be stored in the target data block, and update the file attribute recorded by the file index unit of the block group in which the target data block is located, and the file attribute loaded from the file index unit of the block group in which the target data block is located in the memory.
Further, as shown in fig. 11, a formatting module 8001 is further included;
the formatting module 8001 is configured to format each block group according to a size of a preset index area, so that the size of the index area in each block group is the size of the preset index area.
Further, as shown in fig. 12, a first load module 8002 is further included;
the first loading module 8002 is configured to load, in units of the size of the preset index area, information recorded in the index area in each block group into the memory.
Further, the index area includes: a plurality of sub-index units, each sub-index unit comprising: the file index area comprises a plurality of file index units;
the first storage module 804 is specifically configured to update the file attribute recorded by the file index unit of the block group where the target data block is located, and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory, with the size of the sub index unit as a unit.
Further, each sub-index unit further comprises: the directory index area comprises a plurality of directory index units, and each directory index unit is used for recording the directory attribute of the data block in the block group where the directory index unit is located;
the first storage module 804 is further configured to update, by taking the size of the sub-index unit as a unit, the directory attribute recorded by the directory index unit of the block group where the target data block is located, and the directory attribute loaded from the directory index unit of the block group where the target data block is located in the memory.
Further, as shown in fig. 13, the system further includes a first obtaining module 805, a second loading module 806;
a first obtaining module 805, configured to obtain attribute information of a file system from a disk, where the disk includes: the super block stores attribute information of a file system; the attribute information of the file system includes: the number of block groups in the disk and the number of data blocks in the disk;
the second loading module 806 is configured to load the attribute information of the file system into the memory.
Further, the index area of each block group includes a main index area and a spare index area.
Further, as shown in fig. 14, a fourth determining module 807, a second storing module 808 and a first updating module 809 are included.
A fourth determining module 807, configured to determine whether an abnormal index exists in the primary index area and the standby index area of each block group;
the second storage module 808 is configured to, if one of the main index area and the standby index area has an abnormal index, store information recorded in the other index area to the memory.
The first updating module 809 is configured to update the abnormal index according to the information recorded in the other index area if the access request of the memory is received.
Further, a hierarchical directory is stored in the memory, and the hierarchical directory includes: at least one file node, the directory node where each file node is located, and the parent-child relationship between the file node and the directory node, as shown in fig. 15, the apparatus further includes a first creating module 810 and an adding module 811.
A first creating module 810 for creating a file node of a video file to be stored;
the adding module 811 is configured to add the created file node to a directory node where the file node created in the hierarchical directory is located.
Further, the memory also stores: the directory attribute and the application starting position of the directory index unit; the hierarchical directory further includes: parent-child relationships between directory nodes; the directory attributes in memory are: directory attributes loaded from the directory index unit of each block group; the directory attributes include: information characterizing the directory usage status of each block group.
Further, as shown in fig. 16, a second obtaining module 812, a fifth determining module 813, a sixth determining module 814, a second creating module 815 and a second updating module 816 are further included;
a second obtaining module 812, configured to obtain a directory creation request, where the directory creation request includes: the name of the directory to be created and the path information of the directory to be created;
a fifth determining module 813, configured to determine, according to the path information and the hierarchical directory, a parent directory node of the directory to be created;
a sixth determining module 814, configured to determine, according to the application start position and the directory attribute of the directory index unit in the memory, that the directory index unit that is not used in the disk is the target directory index unit;
the second creating module 815 is configured to create a directory node according to the directory name to be created, and add the created directory node to a parent directory node in the hierarchical directory;
the second updating module 816 is configured to update the directory use status recorded by the target directory index unit in the memory and the directory use status recorded by the target directory index unit in the disk.
Further, as shown in fig. 17, a judging module 817 is further included;
a judging module 817, configured to judge whether a directory or a file with the same name as the directory to be created exists in the parent directory node;
the sixth determining module 814 is specifically configured to determine, if the directory index unit does not exist, that the directory index unit that is not used in the disk is the target directory index unit according to the application start position and the directory attribute of the directory index unit in the memory.
Further, the file attributes further include: file position information, wherein the file position information is used for indicating the position of a block group and/or a data block of a file in a disk; as shown in fig. 18, the apparatus further includes: a third acquisition module 818, a seventh determination module 819, and an operation module 820.
A third obtaining module 818, configured to obtain a file operation request, where the file operation request includes: the identification and the operation type of the file to be operated;
a seventh determining module 819, configured to determine, according to the identifier of the to-be-operated file, a target position of the to-be-operated file in the disk from the file attribute of the memory;
and the operation module 820 is configured to perform an operation corresponding to the operation type on the file to be operated at the target position in the disk according to the operation type.
Further, the operation types are: file deletion operation, as shown in fig. 19, the apparatus further includes: a third update module 821;
the third updating module 821 is configured to update a file attribute of a file to be deleted in a memory, where the file attribute includes: and index position information and index state information of the data block corresponding to the file to be deleted.
Further, the file index unit also records the use capacity of the data blocks in the block group where the file index unit is located;
the operation module 820 is further configured to determine, if the operation type is a file closing operation, an unused data block according to the usage capacity of the data block recorded in each file index unit in the memory; and updating the file use state of the data block recorded by the file index unit corresponding to the unused data block into the unused state.
The apparatus may be configured to execute the method provided by the method embodiment, and the specific implementation manner and the technical effect are similar and will not be described herein again.
Fig. 20 is a schematic structural diagram of a video file processing apparatus according to an embodiment of the present application, and as shown in fig. 20, the apparatus includes: a processor 901 and a memory 902, wherein: the memory 902 is used for storing programs, and the processor 901 calls the programs stored in the memory 902 to execute the above method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
The apparatus may be integrated in a device such as a terminal or a server, and is not limited in this application.
Optionally, the invention also provides a program product, for example a computer-readable storage medium, comprising a program which, when being executed by a processor, is adapted to carry out the above-mentioned method embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (24)

1. A video file processing method, comprising:
determining a free data block in a disk of a file system according to file attributes stored in a memory, wherein the disk comprises: a plurality of block groups, each block group including an index area and a data area, the index area including: a file index unit for recording file attributes of the data blocks of each block group, wherein the data area comprises a plurality of data blocks; the file attributes in the memory are as follows: file attributes loaded from the file index unit of each block group, the file attributes including: information used for representing the file use state of each data block in each block group;
determining the number of data blocks required by the video file to be stored according to the size of the video file to be stored;
determining a target data block from the idle data blocks according to the number of the data blocks required by the video file to be stored;
storing the video file to be stored into the target data block, and updating the file attribute recorded by the file index unit of the block group where the target data block is located, and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory;
wherein the index area includes: a plurality of sub-index units, each of the sub-index units comprising: the file index area comprises a plurality of file index units; the updating of the file attribute recorded by the file index unit of the block group where the target data block is located and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory includes:
updating the file attribute recorded by the file index unit of the block group where the target data block is located and the file attribute loaded from the file index unit of the block group where the target data block is located in the memory by taking the size of the sub index unit as a unit;
the index area of each block group comprises a main index area and a standby index area.
2. The method of claim 1, wherein before determining free data blocks in a disk of the file system according to the file attributes stored in the memory, further comprising:
and formatting each block group according to the size of a preset index area, so that the size of the index area in each block group is the size of the preset index area.
3. The method of claim 2, further comprising:
and loading the information recorded in the index area in each block group into the memory by taking the size of the preset index area as a unit.
4. The method of claim 1, wherein each of the sub-index units further comprises: the directory index area comprises a plurality of directory index units, and each directory index unit is used for recording the directory attribute of a data block in a block group where the directory index unit is located; the method further comprises the following steps:
and updating the directory attribute recorded by the directory index unit of the block group where the target data block is located and the directory attribute loaded from the directory index unit of the block group where the target data block is located in the memory by taking the size of the sub-index unit as a unit.
5. The method of claim 1, wherein before determining free data blocks in a disk of the file system according to the file attributes stored in the memory, further comprising:
acquiring attribute information of the file system from the disk, wherein the disk comprises: the super block is stored with attribute information of the file system; the attribute information of the file system includes: the number of block groups in the disk and the number of data blocks in the disk;
and loading the attribute information of the file system into the memory.
6. The method of claim 1, wherein before determining free data blocks in a disk of the file system according to the file attributes stored in the memory, the method further comprises:
determining whether the main index area and the standby index area of each block group have abnormal indexes;
if one of the main index area and the standby index area has an abnormal index, storing the information recorded in the other index area to the memory;
and if the access request of the memory is received, updating the abnormal index according to the information recorded in the other index area.
7. The method of claim 4, wherein the memory further stores a hierarchical directory, the hierarchical directory comprising: at least one file node, a directory node where each file node is located, and a parent-child relationship between the file nodes and the directory node;
the method further comprises the following steps:
creating a file node of the video file to be stored;
and adding the created file node to the directory node where the created file node is located in the hierarchical directory.
8. The method of claim 7, wherein the memory further stores: the directory attribute and the application starting position of the directory index unit; the hierarchical directory further comprises: parent-child relationships between directory nodes; the directory attributes in the memory are: the directory attribute loaded from the directory index unit of each block group; the directory attributes include: information for characterizing the directory usage status of each block group.
9. The method of claim 8, further comprising:
obtaining a catalog creation request, wherein the catalog creation request comprises: the method comprises the following steps that a directory name to be created and path information of the directory to be created are obtained;
determining a father directory node of the directory to be created according to the path information and the hierarchical directory;
determining an unused directory index unit in the disk as a target directory index unit according to the application starting position of the directory index unit in the memory and the directory attribute;
creating a directory node according to the name of the directory to be created, and adding the created directory node to the position below the father directory node in the hierarchical directory;
and updating the directory use state recorded by the target directory index unit in the memory and the directory use state recorded by the target directory index unit in the disk.
10. The method of claim 9, wherein the determining that the unused directory index unit in the disk is the target directory index unit according to the application start position of the directory index unit in the memory and the directory attribute comprises:
judging whether a directory or a file with the same name as the directory to be created exists in the father directory node or not;
and if the target directory index unit does not exist, determining the unused directory index unit in the disk as the target directory index unit according to the application starting position of the directory index unit in the memory and the directory attribute.
11. The method of claim 1, wherein the file attributes further comprise: file location information, where the file location information is used to indicate the location of a block group and/or a data block of a file in the disk; the method further comprises the following steps:
acquiring a file operation request, wherein the file operation request comprises: the identification and the operation type of the file to be operated;
determining the target position of the file to be operated in the disk from the file attribute of the memory according to the identifier of the file to be operated;
and according to the operation type, performing operation corresponding to the operation type on the file to be operated at the target position in the disk.
12. The method according to claim 11, wherein the file index unit further records the usage capacity of data blocks in the block group in which the file index unit is located;
the performing, according to the operation type, an operation corresponding to the operation type on the file to be operated at the target position in the disk further includes:
if the operation type is a file closing operation, determining unused data blocks according to the use capacity of the data blocks recorded by each file index unit in the memory;
and updating the file use state of the data block recorded by the file index unit corresponding to the unused data block into an unused state.
13. A video file processing apparatus, comprising: the device comprises a first determining module, a second determining module, a third determining module and a first storage module;
the first determining module is used for determining free data blocks in a disk of the file system according to the file attributes stored in the memory; wherein the magnetic disk includes: a plurality of block groups, each block group including an index area and a data area, the index area including: a file index unit for recording file attributes of the data blocks of each block group, wherein the data area comprises a plurality of data blocks; the file attributes in the memory are as follows: file attributes loaded from the file index unit of each block group, the file attributes including: information used for representing the file use state of each data block in each block group;
the second determining module is used for determining the number of data blocks required by the video file to be stored according to the size of the video file to be stored;
the third determining module is configured to determine a target data block from the idle data blocks according to the number of data blocks required by the video file to be stored;
the first storage module is configured to store the video file to be stored in the target data block, and update a file attribute recorded by the file index unit of the block group in which the target data block is located, and a file attribute loaded from the file index unit of the block group in which the target data block is located in the memory;
wherein the index area includes: a plurality of sub-index units, each of the sub-index units comprising: the file index area comprises a plurality of file index units;
the first storage module is specifically configured to update the file attribute recorded by the file index unit of the block group in which the target data block is located, and the file attribute loaded from the file index unit of the block group in which the target data block is located in the memory, with the size of the sub index unit as a unit;
the index area of each block group comprises a main index area and a standby index area.
14. The apparatus of claim 13, further comprising: a formatting module;
the formatting module is configured to format each block group according to a size of a preset index area, so that the size of the index area in each block group is the size of the preset index area.
15. The apparatus of claim 14, further comprising a first load module;
the first loading module is configured to load information recorded in the index area in each block group into the memory by using the size of the preset index area as a unit.
16. The apparatus of claim 13, wherein each of the sub-index units further comprises: the directory index area comprises a plurality of directory index units, and each directory index unit is used for recording the directory attribute of a data block in a block group where the directory index unit is located;
the first storage module is further configured to update the directory attribute recorded by the directory index unit of the block group in which the target data block is located, and the directory attribute loaded from the directory index unit of the block group in which the target data block is located in the memory, with the size of the sub-index unit as a unit.
17. The apparatus of claim 13, further comprising a first obtaining module, a second loading module;
the first obtaining module is configured to obtain attribute information of the file system from the disk, where the disk includes: the super block is stored with attribute information of the file system; the attribute information of the file system includes: the number of block groups in the disk and the number of data blocks in the disk;
the second loading module is configured to load the attribute information of the file system into the memory.
18. The apparatus of claim 13, further comprising a fourth determining module, a second storing module, and a first updating module;
the fourth determining module is configured to determine whether an abnormal index exists in the main index area and the standby index area of each block group;
the second storage module is configured to, if one of the main index area and the standby index area has an abnormal index, store information recorded in the other index area to the memory;
and the first updating module is used for updating the abnormal index according to the information recorded in the other index area if the access request of the memory is received.
19. The apparatus of claim 16, wherein the memory further stores a hierarchical directory, the hierarchical directory comprising: the device comprises at least one file node, a directory node where each file node is located, and a parent-child relationship between the file nodes and the directory node, and further comprises a first creation module and an addition module;
the first creating module is used for creating file nodes of the video files to be stored;
and the adding module is used for adding the created file node to the directory node where the created file node is located in the hierarchical directory.
20. The apparatus of claim 19, wherein the memory further stores: the directory attribute and the application starting position of the directory index unit; the hierarchical directory further comprises: parent-child relationships between directory nodes; the directory attributes in the memory are: the directory attribute loaded from the directory index unit of each block group; the directory attributes include: information for characterizing the directory usage status of each block group.
21. The apparatus of claim 20, further comprising a second obtaining module, a fifth determining module, a sixth determining module, a second creating module, and a second updating module;
the second obtaining module is configured to obtain a directory creation request, where the directory creation request includes: the method comprises the following steps that a directory name to be created and path information of the directory to be created are obtained;
the fifth determining module is configured to determine, according to the path information and the hierarchical directory, a parent directory node of the directory to be created;
a sixth determining module, configured to determine, according to the application start position of the directory index unit in the memory and the directory attribute, that a directory index unit that is not used in the disk is a target directory index unit;
the second creating module is used for creating a directory node according to the name of the directory to be created and adding the created directory node to the position below the father directory node in the hierarchical directory;
the second updating module is configured to update the directory use state recorded by the target directory index unit in the memory and the directory use state recorded by the target directory index unit in the disk.
22. The apparatus of claim 21, further comprising a determining module;
the judging module is used for judging whether a directory or a file with the same name as the directory to be created exists in the father directory node;
the sixth determining module is specifically configured to determine, if the directory index unit does not exist, an unused directory index unit in the disk as the target directory index unit according to the application start position of the directory index unit in the memory and the directory attribute.
23. The apparatus of claim 13, wherein the file attributes further comprise: file location information, where the file location information is used to indicate the location of a block group and/or a data block of a file in the disk; the device further comprises: the third acquisition module, the seventh determination module and the operation module;
the third obtaining module is configured to obtain a file operation request, where the file operation request includes: the identification and the operation type of the file to be operated;
the seventh determining module is configured to determine, according to the identifier of the file to be operated, a target position of the file to be operated in the disk from the file attribute of the memory;
and the operation module is used for performing operation corresponding to the operation type on the file to be operated at the target position in the disk according to the operation type.
24. The apparatus according to claim 23, wherein the file index unit further records the usage capacity of data blocks in the block group in which the file index unit is located;
the operation module is further configured to determine, if the operation type is a file closing operation, an unused data block according to a usage capacity of a data block recorded in each file index unit in the memory; and updating the file use state of the data block recorded by the file index unit corresponding to the unused data block into an unused state.
CN201910971138.9A 2019-06-06 2019-10-11 Video file processing method and device Active CN110531940B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019104949013 2019-06-06
CN201910494901.3A CN110221782A (en) 2019-06-06 2019-06-06 Video file processing method and processing device

Publications (2)

Publication Number Publication Date
CN110531940A CN110531940A (en) 2019-12-03
CN110531940B true CN110531940B (en) 2020-11-10

Family

ID=67816285

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910494901.3A Pending CN110221782A (en) 2019-06-06 2019-06-06 Video file processing method and processing device
CN201910971138.9A Active CN110531940B (en) 2019-06-06 2019-10-11 Video file processing method and device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201910494901.3A Pending CN110221782A (en) 2019-06-06 2019-06-06 Video file processing method and processing device

Country Status (1)

Country Link
CN (2) CN110221782A (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765094B (en) * 2019-10-24 2020-08-11 重庆紫光华山智安科技有限公司 File creation method, device, system and storage medium
CN110765076B (en) * 2019-10-25 2023-04-21 北京奇艺世纪科技有限公司 Data storage method, device, electronic equipment and storage medium
CN111068313B (en) * 2019-12-05 2021-02-19 腾讯科技(深圳)有限公司 Scene update control method and device in application and storage medium
CN111221776B (en) * 2019-12-30 2023-06-23 上海交通大学 Method, system and medium for realizing file system oriented to nonvolatile memory
CN111444152A (en) * 2020-03-30 2020-07-24 北京小米移动软件有限公司 File system, file system access method, electronic device, and storage medium
CN111522507B (en) * 2020-04-14 2021-10-01 中山大学 Low-delay file system address space management method, system and medium
CN111666256B (en) * 2020-05-27 2024-03-22 南京通用电器有限公司 Video file disk management method and device based on index file
CN113190503B (en) * 2021-05-08 2022-12-02 重庆紫光华山智安科技有限公司 File system capacity expansion method and device, electronic equipment and storage medium
CN113268201A (en) * 2021-05-13 2021-08-17 三星(中国)半导体有限公司 Cache management method and device based on file attributes
CN113568868B (en) * 2021-07-28 2024-02-06 重庆紫光华山智安科技有限公司 File system management method, system, electronic equipment and medium
CN114327290B (en) * 2021-12-31 2022-12-02 科东(广州)软件科技有限公司 Structure, formatting method and access method of disk partition
CN115422121B (en) * 2022-07-25 2023-06-06 安芯网盾(北京)科技有限公司 Method and device for monitoring file by utilizing inotify, electronic equipment and storage medium
CN116610383B (en) * 2023-05-25 2024-02-20 成都融见软件科技有限公司 Method for partially loading target file

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100578470C (en) * 2007-01-31 2010-01-06 浙江大学 Audio/video data access method and device based on raw device
CN101556557B (en) * 2009-05-14 2011-03-23 浙江大学 Object file organization method based on object storage device
US8578120B2 (en) * 2009-05-22 2013-11-05 Commvault Systems, Inc. Block-level single instancing
CN101630322B (en) * 2009-08-26 2011-04-13 中国人民解放军信息工程大学 Method for storing and accessing file set under tree directory structure in database
CN102982182B (en) * 2012-12-21 2017-02-08 浙江宇视科技有限公司 Data storage planning method and device
CN103226965B (en) * 2013-03-29 2015-09-09 浙江大学 Based on the audio/video data access method of time bitmap
CN105357229B (en) * 2015-12-22 2019-12-13 深圳市科漫达智能管理科技有限公司 Video processing method and device
CN108628753B (en) * 2017-03-24 2021-02-23 华为技术有限公司 Memory space management method and device
CN107544873A (en) * 2017-08-28 2018-01-05 郑州云海信息技术有限公司 A kind of standby system and method for depositing Backup Data
CN109669622B (en) * 2017-10-13 2022-04-05 杭州海康威视系统技术有限公司 File management method, file management device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110221782A (en) 2019-09-10
CN110531940A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN110531940B (en) Video file processing method and device
US9733862B1 (en) Systems and methods for reverse point-in-time copy management in a storage system
CN102929750B (en) Nonvolatile media dirty region tracking
US9582213B2 (en) Object store architecture for distributed data processing system
US6421767B1 (en) Method and apparatus for managing a storage system using snapshot copy operations with snap groups
US20060047926A1 (en) Managing multiple snapshot copies of data
US11093387B1 (en) Garbage collection based on transmission object models
KR20110050452A (en) Recovery of a computer that includes virtual disks
US20120005163A1 (en) Block-based incremental backup
JP2005301497A (en) Storage management system, restoration method and its program
US10628298B1 (en) Resumable garbage collection
CN113568582B (en) Data management method, device and storage equipment
CN111177143B (en) Key value data storage method and device, storage medium and electronic equipment
US9619322B2 (en) Erasure-coding extents in an append-only storage system
WO2023056728A1 (en) Method and apparatus for reconstructing redundant arrays of independent drives, and device and medium
CN110187834B (en) Data processing method and device for duplicate copies and electronic equipment
US7526622B1 (en) Method and system for detecting and correcting data errors using checksums and replication
CN114924914B (en) Disk partition table information backup and recovery method and system
CN108334453B (en) File debugging method and device, terminal equipment and storage medium
CN113703673B (en) Single machine data storage method and related device
JP4390618B2 (en) Database reorganization program, database reorganization method, and database reorganization apparatus
CN114625697A (en) File system recovery method and device, electronic equipment and storage medium
CN114924923A (en) Method, system, equipment and medium for verifying correctness of hard disk write-in point
CN113553215A (en) Erasure code data recovery optimization method and device based on environmental information
US11645333B1 (en) Garbage collection integrated with physical file verification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant