CN111444152A - File system, file system access method, electronic device, and storage medium - Google Patents

File system, file system access method, electronic device, and storage medium Download PDF

Info

Publication number
CN111444152A
CN111444152A CN202010238608.3A CN202010238608A CN111444152A CN 111444152 A CN111444152 A CN 111444152A CN 202010238608 A CN202010238608 A CN 202010238608A CN 111444152 A CN111444152 A CN 111444152A
Authority
CN
China
Prior art keywords
file
data
block
information
key information
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.)
Pending
Application number
CN202010238608.3A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010238608.3A priority Critical patent/CN111444152A/en
Publication of CN111444152A publication Critical patent/CN111444152A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/173Customisation support for file systems, e.g. localisation, multi-language support, personalisation
    • 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/0643Management of files
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

Abstract

The present disclosure relates to a file system, a file system access method, an electronic device, and a storage medium, where the system is applied to a smart television, and the system includes: the multimedia storage block set is used for storing and managing multimedia data; the external storage block set is used for managing data in the accessed external storage equipment; and the traditional media storage block set is used for storing and managing the traditional media data. The utility model provides a new television file system's structure can realize carrying out the management of customization to different TV use scene data, and then the demand of the actual use scene of adaptation intelligent TV that can be better.

Description

File system, file system access method, electronic device, and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a file system, a file system access method, an electronic device, and a storage medium.
Background
The existing television software systems mainly comprise Android TVs and linux systems, and the used file system management software is based on a general file system, such as EXT4, F2FS and the like. However, these file systems are designed and implemented mainly for the use characteristics of mobile storage devices, such as smart phones and tablet computers, and are only simple to adapt and transplant to smart televisions, and cannot well meet the requirements of actual use scenarios of smart televisions.
Disclosure of Invention
To overcome the problems in the related art, embodiments of the present disclosure provide a file system, a file system access method, an electronic device, and a storage medium, so as to solve the defects in the related art.
According to a first aspect of the embodiments of the present disclosure, a file system is provided, where the file system divides a set space in a disk according to functions, and includes:
the multimedia storage block set is used for storing and managing multimedia data;
the external storage block set is used for managing data in the accessed external storage equipment;
and the traditional media storage block set is used for storing and managing the traditional media data.
In one embodiment, the system further comprises:
and the universal storage block set is used for storing and managing the customized data.
In an embodiment, at least one of the multimedia storage block set, the external storage block set, the legacy media storage block set, and the common storage block set extends a corresponding function based on a tree-link structure.
In one embodiment, the storage space of the data file of each data type for different data types stored by different storage block sets comprises:
and the key information block is used for storing the data type information of the corresponding data file, the access index information of the corresponding data file and the access index information of other information blocks in the corresponding storage space of the corresponding data file.
In an embodiment, the key information block includes a main information block and a spare information block;
the main information block is used for storing data type information of a corresponding data file, access index information of the corresponding data file and access index information of other information blocks in a corresponding storage space of the corresponding data file;
the backup information block is used for backing up the content of the main information block and replacing the main information block when the main information block fails.
In an embodiment, the storage space of the data file of each data type further includes:
the debugging information block is used for storing operation history information and/or read-write abnormal information of the corresponding data file;
the bitmap block is used for storing the use condition information of each storage unit of the storage space occupied by the corresponding data file and/or the file data of the data file aiming at the storage block sets except the external storage block set;
the attribute information block is used for storing the attribute information of the corresponding data file;
and the data block is used for storing the file data of the corresponding data file aiming at the storage block set except the external storage block set.
In an embodiment, the key information blocks of the data files of the corresponding types stored in each storage block set are stored in a physical space of a preset size in the set space in the disk.
In an embodiment, the multimedia data comprises at least one of:
an audio data type, a video data type, a panel data type, a power supply data type, and a general data type;
the legacy media data includes television station data and satellite data.
In an embodiment, the key information block is further configured to store a read-write task scheduling policy parameter for an external storage device;
and if the characteristics of the files stored in the external storage equipment are different, the external storage equipment corresponds to different read-write task scheduling strategies.
According to a second aspect of the embodiments of the present disclosure, there is provided a file system access method, which applies to a smart television, including:
receiving a file access instruction;
determining a storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction;
and determining the access index information of the file to be accessed according to the determined storage block set.
In an embodiment, the determining, according to the type of the file to be accessed carried in the file access instruction, a storage block set to which the file to be accessed belongs includes:
determining a first key information block of which the data type information is matched with the type of the file to be accessed in key information blocks of each storage block set;
the determining, according to the determined storage block set, access index information of the file to be accessed includes:
determining file attribute information stored in a key information block according to index information of the key information block stored in the first key information block;
determining a second key information block corresponding to the key information block of which the file attribute information is matched with the file attribute of the file to be accessed;
and determining the access index information of the data file stored in the second key information block as the access index information of the file to be accessed.
In an embodiment, determining a first key information block of key information blocks of each storage block set, where data type information of the first key information block matches a type of the file to be accessed, includes:
reading each key information block from a physical space for storing the key information block of each storage block set in a set space in a disk;
and determining a first key information block with data type information matched with the type of the file to be accessed from each key information block.
In an embodiment, the method further comprises:
and in response to the failure of reading the main information block of any key information block, reading the spare information block according to the index information of the spare information block of the key information block, which is provided by the main information block.
In an embodiment, the method further comprises:
and responding to the recognition of the mounting of the external storage equipment, and performing disk mapping on the peripheral data file stored in the external storage equipment.
In one embodiment, the disk mapping includes:
allocating a storage space for the peripheral data file; the storage space includes: a key information block, further comprising at least one of the following information blocks: debugging information blocks and attribute information blocks;
and correspondingly setting the read-write task scheduling strategy parameters of the peripheral data files in the key information block according to the data characteristics of the peripheral data files.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to:
receiving a file access instruction;
determining a storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction;
and determining the access index information of the file to be accessed according to the determined storage block set.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
receiving a file access instruction;
determining a storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction;
and determining the access index information of the file to be accessed according to the determined storage block set.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the television file system, the multimedia data are subjected to file management through the multimedia storage block set, the data in the accessed external storage device are managed through the external storage block set, and the traditional media data are stored and managed through the traditional media storage block set, so that a novel television file system structure can be provided, customized management of different television use scene data can be realized, and the requirements of actual use scenes of the intelligent television can be better met.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a block diagram illustrating a file system in accordance with an exemplary embodiment;
FIG. 2A is a block diagram illustrating a file system in accordance with yet another exemplary embodiment;
FIG. 2B is a diagram illustrating a file system structure in accordance with an illustrative embodiment;
FIG. 2C is a schematic diagram illustrating a structure of a set of multimedia storage blocks, according to an example embodiment;
FIG. 3 is a flow diagram illustrating a file system access method in accordance with an exemplary embodiment;
FIG. 4 is a flowchart illustrating a file system access method in accordance with yet another exemplary embodiment;
FIG. 5 is a flowchart illustrating how to determine a first key information block of key information blocks of each storage block set whose data type information matches the type of the file to be accessed, according to an example embodiment;
FIG. 6 is a block diagram illustrating a smart device in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Taking an intelligent television as an example, corresponding files are also commonly used file systems of L inux and Android systems, and the demand and consumption of mobile intelligent equipment in the market are far greater than those of an intelligent television, so most of the file systems are customized and optimized in performance for the mobile intelligent equipment, but for the intelligent television, only simple adaptation and transplantation are performed, and the demand of the file systems required by the actual use scene of the intelligent television is not fully considered.
FIG. 1 is a block diagram of a file system shown in accordance with a first exemplary embodiment; the file system can be applied to the smart television. As shown in fig. 1, the system divides the set space in the disk according to functions to obtain the following modules:
a set of multimedia storage blocks 110, a set of external storage blocks 120, and a set of legacy media storage blocks 130.
The set space in the disk targeted by the embodiment of the present disclosure may be the whole disk space, for example: the divided D disk, E disk, and F disk may respectively correspond to different functional storage block sets, or may be each subspace after dividing the entire disk space into subspace, for example: and storing the D disk data according to the functional division mode when the D disk stores the data.
It should be noted that, in this embodiment, the division of the set space in the disk may be based on physical division, that is, the physical space of the disk is divided according to the above functions and the data file is stored, or may be based on logical division, and the data may be stored in a spatial sequence physically, only the type information of the data file is stored in the key information block (that is, the data type stored in each function module is divided according to the function), and when the data file is accessed, the corresponding key information block may be quickly found according to the data type, so that the target data file is quickly found. The multimedia storage block set 110 is used for storing and managing multimedia data.
In this embodiment, the function of the multimedia storage block set 110 may include processing a driver file related to television audiovisual playing.
In an alternative embodiment, the data types that can be stored by the multimedia storage block set obtained by functional division include at least one of the following:
audio data type, video data type, panel data type, power supply data type, and general data type. Wherein:
the audio data type is characterized by more continuous data and can define a corresponding acquisition mode in the file read-write configuration;
the video data type is characterized in that the file space is relatively large, and a pre-reading and caching mode can be adopted in the management of the file;
panel data types, which are characterized by being related to television performance, can pay attention to security in file management, and can consider compatibility;
the power data type is characterized by being related to startup and shutdown, and the requirements on power consumption are customized, so that the file management of the part can consider real-time and fault-tolerant processing;
and the general data types are reserved for other newly added data types. For example, the data required by the factory model, and the data management can be customized by more authority configuration and the like.
And an external storage block set 120 for managing data in the accessed external storage device.
In this embodiment, the role of the external storage block set 120 may include providing an external USB mass storage device with use. In particular, the external storage block set 120 may manage data in the accessed external USB mass storage device.
For example, for the access of the external storage device, the present embodiment may directly map the external storage device to the storage space (that is, a block of storage space is mapped for each file of the peripheral device, and the file storage structure provided by the present embodiment stores the management information of the file of the peripheral device), and further, the data in the external device is read by accessing the file of the file system.
In an optional embodiment, in order to provide efficiency of reading data, when the external storage block set is established, the external storage block set may be configured to be in a read-first mode, and configurations related to corresponding IO are read-first, so as to ensure user experience at the front end.
A legacy media storage block set 130 for storing and managing legacy media data.
In this embodiment, taking smart television as an example, the conventional media storage block set 130 may provide services for conventional functions of television, such as searching channels (i.e., rearranging all available television channels according to the information of local radio arrangement), receiving satellite television signals, and so on.
In an alternative embodiment, the legacy media storage block set 130 may also be used to store corresponding legacy media data, including television station data and satellite data, among others.
In this embodiment, the conventional media storage block set 130 is a file management unit specially provided for conventional television functions, and is mainly used for providing services such as searching for television station signals and receiving satellite transmission signals. It will be appreciated that a large amount of tv station data and satellite data may be stored in the conventional media storage block set 130, and this portion of data is characterized by a low update frequency, but needs to be cleaned up periodically to buffer garbage, and records a large amount of important data related to the channel scanning signal, so there is a customized configuration for security and background file system organization.
In an alternative embodiment, at least one of the multimedia storage block set 110, the external storage block set 120, and the legacy media storage block set 130 may extend the corresponding function based on a tree-chain structure.
According to the technical scheme, the file management is performed on the multimedia data through the multimedia storage block set, the data in the accessed external storage device is managed through the external storage block set, and the traditional media data is stored and managed through the traditional media storage block set, so that a novel television file system structure can be provided, the customized management can be performed on different television use scene data, and the requirements of actual use scenes of the intelligent television can be better met.
FIG. 2A is a block diagram illustrating a file system in accordance with yet another exemplary embodiment; the file system can be applied to the smart television. The functions of the multimedia storage block set 210, the external storage block set 220, and the conventional media storage block set 230 are the same as those of the multimedia storage block set 110, the external storage block set 120, and the conventional media storage block set 130 in the embodiment shown in fig. 1, and are not described herein again.
As shown in fig. 2A, the system may further include:
and a general storage block set 240 for storing and managing the customized data.
In this embodiment, for compatibility with a conventional file system, file management may be performed for the customized data through the common storage block set 240.
It should be noted that the customized data may be set by a developer based on actual business needs, for example, set as driving data of an operating system kernel of the smart television, and the present embodiment does not limit this.
The operating system may include an Android system.
In this embodiment, the common memory block set 240 may also extend corresponding functions based on a tree chain structure.
As shown in fig. 2A, in an optional embodiment, a file storage structure of a file system according to an embodiment of the present disclosure is further provided, where for different data types stored in the different storage block sets, a storage space of a data file of each data type includes:
and the key information block is used for storing the data type information of the corresponding data file, the access index information of the corresponding data file and the access index information of other information blocks in the corresponding storage space of the corresponding data file.
In an alternative embodiment, the key information block may include a main information block and a spare information block (i.e., a key information block a and a key information block B shown in fig. 2A), wherein:
the key information block A is used for storing data type information of a corresponding data file, access index information of the corresponding data file and access index information of other information blocks in a corresponding storage space of the corresponding data file;
and the key information block B is used for backing up the content of the main information block and replacing the main information block when the main information block fails.
It can be understood that, in this embodiment, by backing up one key information block, it can be prevented that when the master information block is subjected to a read-write error and cannot be normally accessed, the key information is lost and a file cannot be accessed, for example: the television is suddenly powered off, so that the problem that the main information block cannot be recovered after being damaged is caused.
In an optional embodiment, the storage space of the data file of each data type may further include:
and the debugging information block 212 is used for storing the operation history information and/or the read-write abnormal information of the corresponding data file.
And a bitmap block 213, configured to store, for a storage block set other than the external storage block set, usage information of each storage unit of the storage space occupied by the corresponding data file and/or the file data of the data file.
That is, the bitmap block 213 can store the usage of the storage space of each storage unit of the space occupied by the data file itself, that is, the usage of the storage space of the data block 215, for example, the audio file itself, and can also store the usage of the storage space of each storage unit of the space occupied by the data file (including both the data file itself and the management data of the data file), for example, the audio file itself, that is, the data block 215 and one or more of the following management blocks: the audio file corresponds to a key information block A211, a debugging information block 212, a bitmap block 213, an attribute information block 214 and a key information block B216.
The size of the storage unit can be determined according to actual conditions, for example, the usage condition of the disk space of 512 bytes (byte) can be identified by one bit, for example, the used or unused tag is 1, and the unused tag is 0.
An attribute information block 214 for storing attribute information of the corresponding data file.
In this embodiment, the attribute information block may be used to store user information, file access right information, and the like of some created processes.
A data block 215 for storing the file data itself of the corresponding data file for a set of storage blocks other than the external set of storage blocks.
It can be seen that although the data files stored in different storage block sets divided according to different functions may be of different data types, the data files of each data type may be stored according to the above file storage structure. However, different functional modules have their own characteristics, and have some differences in the storage process. Taking the external storage block set as an example, when mapping the external storage device to the external storage block set of the disk, the file in the external storage device may be stored according to the above file storage structure, but in order to improve the access efficiency, the external file data itself may not be mapped to the external storage block set of the disk, that is, the external file data itself does not need to be stored in the data block, and the management data of the file may be mapped, for example: one or more of the following blocks of information: a key information block A, a debugging information block, an attribute information block and a key information block B. The access index and the type of the file in the external storage block and the index information of other information blocks in the file can be obtained and stored in the key information block A, so that when an access instruction is received, the file can be accessed according to the index to the external storage device.
In an optional embodiment, the master information blocks of the key information blocks of the data files of the corresponding types stored in the storage block sets may be collectively stored in a preset area of a set space in the disk, for example: in a physical space of a pre-set size. Similarly, the spare information blocks may be stored centrally.
Further, the key information block (including key information block a and key information block B) is also used for storing read-write task scheduling policy parameters for the external storage device;
the characteristics of the files stored in the external storage device are different, and the external storage device corresponds to different read-write task scheduling strategies.
The File System of the external storage device mainly adopts a general format, such as a File Allocation Table 32(FAT32, File Allocation Table 32), an extended File Allocation Table (EXFAT, extended File Allocation Table), or a New Technology File System (NTFS). When the device identifies the external storage device, the format type of the external storage device is judged through a Virtual File System (VFS) layer in a kernel space, then the external storage device is mounted in mounting manners of different formats, and then the mounted external storage device is mapped to the local storage space (that is, a storage space is mapped to each File of the peripheral device, and the management information of the peripheral File is stored according to the File storage structure provided by the embodiment), so that the data in the peripheral device is read by accessing the File of the File System.
During implementation, corresponding structure parameters can be reserved in a key information block of each file, and can be assigned as read priority, write priority and read-write balance (balance _ rw).
In one implementation, a read-write task scheduling policy with read priority may be configured for a continuous characteristic data file (e.g., a multimedia file such as an audio/video file), a read-write task scheduling policy with write priority may be configured for a discrete characteristic data file (e.g., a text file), and a read-write task scheduling policy with read-write balance may be configured for other data files. Wherein, each strategy can be realized by setting corresponding parameters in the key information block.
Reading priority: the system is informed by the parameter that if the read task and other tasks exist, the read task is given higher priority in the task queue.
Write first: the system is informed of the write task and other tasks if the write task and other tasks exist through the parameter, and the write task is given higher priority in the task queue.
Read-write equalization: the parameter tells the system that if a plurality of read-write tasks exist, the system needs to averagely schedule task processing time to give the read-write tasks according to the current system load. For example, the same time slice may be allocated for reading and writing to be performed sequentially in turn.
It should be noted that the preset size may be set by a developer based on actual business needs, and this embodiment does not limit this.
FIG. 2B is a diagram illustrating a file system structure in accordance with an illustrative embodiment; as shown in fig. 2B, the structure of the File System (File System) of this embodiment is a tree chain structure, and the Disk (Disk) may include a global unique identifier Partition Table (GPT), four partitions (Partition 1-Partition 4), taking Partition2 as an example, and the television File System (TVFS) provided in this disclosure may be used, that is, Partition2 is mainly divided into four storage block sets, that is, a General storage block set (General block Hub), a multimedia storage block set (Multi-media block Hub), an External storage block set (External block Hub), and a traditional media storage block set (e.g., TV block Hub).
In addition, each of the four storage block sets may also extend the corresponding function by a tree chain structure.
For example, as shown in fig. 2C, taking a multimedia storage block set (Multi-media block Hub) as an example, a file storage structure stored in the storage block set may include a main information block (Critical Message a) of a key information block, a Debug information block (Debug L og), a Bitmap block (Hub Bitmap may store usage of each storage unit of a total space occupied by a Data file), an inode Bitmap may store usage of each storage unit of a space occupied by Data file Data itself, an attribute information block (inode table), a Data block (Data Blocks), and a spare information block (Critical Message B) of the key information block.
For the functions of each storage block set and each information block, reference may be made to the above embodiments, which are not described herein again.
According to the technical scheme, the special file system is customized for the use scene of the smart television in the embodiment, the use characteristics of the smart television can be matched by setting the traditional media storage block set and the external storage block set, for example, the external storage device is frequently read, the requirement of the smart television on video playing can be met by setting the multimedia storage block set, the network resources can be acquired in real time, and the like.
FIG. 3 is a flowchart illustrating a file system access method according to a first exemplary embodiment; the file system access method can be applied to the file system of the smart television in the above embodiment. As shown in fig. 3, the file system access method includes the following steps S101 to S103:
in step S101: a file access instruction is received.
In this embodiment, when a user needs to access the file system of the smart television, an access instruction may be sent through the terminal application layer, and the application layer sends the file access instruction to the file system.
In an optional embodiment, the terminal device may include a remote controller or a smart phone, and the embodiment does not limit this.
In step S102: and determining a storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction.
In this embodiment, after the file system receives the file access instruction, the storage block set to which the file to be accessed belongs may be determined according to the type of the file to be accessed carried in the file access instruction.
For example, after the file system receives the file access instruction, the type of the file to be accessed may be determined based on the text content carried in the file access instruction, and then the storage block set to which the file to be accessed belongs may be determined according to the type of the file to be accessed. The implementation can be determined by comparing the file type information stored in the master information block.
In step S103: and determining the access index information of the file to be accessed according to the determined storage block set.
In this embodiment, after determining the storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction, the access index information of the file to be accessed may be determined according to the determined storage block set. In implementation, after the corresponding main information module is determined, the storage position may be determined according to the index information stored in the main information module.
For example, after determining the storage block set to which the current file to be accessed belongs, the access index information of the file to be accessed may be determined according to the determined storage block set and a preset storage rule.
According to the technical scheme, the file access instruction is received, the storage block set to which the file to be accessed belongs is determined according to the type of the file to be accessed carried in the file access instruction, and the access index information of the file to be accessed is determined according to the determined storage block set, so that the file in the system can be quickly and accurately accessed based on the type of the file, and the file access requirement of a user can be met.
FIG. 4 is a flowchart illustrating a file system access method in accordance with yet another exemplary embodiment; the file system access method can be applied to the file system of the smart television in the above embodiment. As shown in fig. 4, the file system access method may include the following steps S401 to S405:
in step S401, a file access instruction is received.
For the explanation and explanation of step S401, reference may be made to the above embodiments, which are not described herein again.
In step S402, a first key information block, of the key information blocks in each storage block set, whose data type information matches the type of the file to be accessed is determined.
In this embodiment, after receiving the file access instruction, a first key information block of the key information blocks of each storage block set, where data type information of the first key information block is matched with the type of the file to be accessed, may be determined.
For example, after receiving a file access instruction, the type of a file to be accessed may be determined, and then a first key information block whose data type information matches the type of the file to be accessed may be determined in the key information blocks of each storage block set.
In step S403, file attribute information stored in the key information block is determined according to the index information of the key information block stored in the first key information block.
In this embodiment, after determining a first key information block of which data type information matches the type of the file to be accessed in the key information blocks of each storage block set, file attribute information stored in the key information block may be determined according to index information of the key information block stored in the first key information block.
For example, after determining a first key information block whose data type information matches the type of the file to be accessed in the key information blocks of each storage block set, index information of the key information block stored in the first key information block may be obtained, and file attribute information stored in the key information block may be determined according to the index information.
In step S404, a second key information block corresponding to the key information block whose file attribute information matches the file attribute of the file to be accessed is determined.
In this embodiment, after determining the file attribute information stored in the key information block according to the index information of the key information block stored in the first key information block, a second key information block corresponding to the key information block whose file attribute information matches the file attribute of the file to be accessed may be determined.
For example, after determining the file attribute information stored in the key information block, the file attribute information of each key information block may be matched with the file attribute of the file to be accessed, and then the second key information block corresponding to the key information block whose file attribute information matches with the file attribute of the file to be accessed may be determined.
In step S405, the access index information of the data file stored in the second key information block is determined as the access index information of the file to be accessed.
In this embodiment, after determining a second key information block corresponding to a key information block whose file attribute information matches a file attribute of a file to be accessed, access index information of a data file stored in the second key information block may be determined as the access index information of the file to be accessed.
For example, after determining a second key information block corresponding to a key information block matched with a file attribute of a file to be accessed, access index information of a data file stored in the second key information block may be obtained, and the access index information may be determined as access index information of the file to be accessed.
According to the technical scheme, in the embodiment, by determining the first key information block of each storage block set, the data type information of which is matched with the type of the file to be accessed, determining the file attribute information stored in the key information block according to the index information of the key information block stored in the first key information block, then determining the second key information block of which the file attribute information is matched with the file attribute of the file to be accessed, and determining the access index information of the data file stored in the second key information block as the access index information of the file to be accessed, the access index information of the file to be accessed can be accurately determined according to the determined storage block set, so that a foundation can be laid for subsequently accessing the file to be accessed based on the access index information.
Fig. 5 is a flowchart illustrating how to determine a first key information block of key information blocks of each storage block set, where data type information of the first key information block matches with a type of the file to be accessed, according to an exemplary embodiment. The present embodiment takes how to determine the first key information block matching the type of the file to be accessed in the key information blocks of each storage block set as an example based on the above embodiment. As shown in fig. 5, the determining, in step S402, a first key information block whose data type information matches the type of the file to be accessed, in the key information blocks of each storage block set, may include the following steps S501 to S502:
in step S501, each key information block is read from a physical space in the set space in the disk for storing the key information blocks of each storage block set.
In this embodiment, after the file system receives the file access instruction, each key information block may be read from a physical space in the set space in the disk, where the physical space is used to store the key information blocks of each storage block set.
In an alternative embodiment, when the main information block of any key information block fails to be read, the spare information block may be read according to the index information of the spare information block of the key information block provided by the main information block.
In step S502, a first key information block whose data type information matches the type of the file to be accessed is determined from the key information blocks.
In this embodiment, after each key information block is read from a physical space in a set space in a disk, where the physical space is used for storing the key information blocks of each storage block set, a first key information block whose data type information matches the type of the file to be accessed may be determined from each key information block.
For example, after each key information block is read from the physical space of the key information block in the set space of the disk, the data type information of each key information block may be matched with the type of the file to be accessed, and then the first key information block whose data type information is matched with the type of the file to be accessed may be determined from each key information block.
As can be seen from the above-described technical solutions, in this embodiment, by reading each key information block from a physical space in a set space in a disk, where the physical space is used for storing the key information blocks of each storage block set, and determining a first key information block, of which data type information matches the type of the file to be accessed, from each key information block, it is possible to accurately determine the first key information block, of which data type information matches the type of the file to be accessed, in the key information blocks of each storage block set, and further it is possible to subsequently determine file attribute information stored in the key information block based on index information of the key information block stored in the first key information block.
Further, in response to recognizing that the external storage device is mounted, disk mapping may also be performed for the peripheral data file stored in the external storage device. A disk mapping step, comprising:
allocating storage space for the peripheral data files; the storage space includes: a key information block, further comprising at least one of the following information blocks: debugging information blocks and attribute information blocks;
and correspondingly setting read-write task scheduling strategy parameters of the external data files in the key information blocks according to the data characteristics of the external data files.
That is, after the external storage device is mounted to the local disk, the step of disk mapping may be performed, and as described above, disk space may be allocated for each file in the external storage device according to the data storage structure provided in the present embodiment, but management data of the file may be stored in the allocated disk space, and the data file itself may still be stored in the external storage device. However, a read-write task scheduling policy may be set for the data file of the external storage device. The read-write task scheduling policy related parameters can be set in the key information block, the corresponding read-write task scheduling policy is determined according to the characteristics of the file data, and the parameters are set correspondingly, so that the access efficiency of the external storage device is improved.
With regard to the system in the above embodiment, the specific manner in which the respective modules perform operations has been described in detail in the embodiment related to the system, and will not be elaborated here.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 900 may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing element 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the device 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 906 provides power to the various components of device 900. The power components 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 comprises a screen that provides an output interface between the device 900 and a user, in some embodiments, the screen may comprise a liquid crystal display (L CD) and a Touch Panel (TP). if the screen comprises a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, sensor assembly 914 may detect an open/closed state of device 900, the relative positioning of components, such as a display and keypad of device 900, the change in position of device 900 or a component of device 900, the presence or absence of user contact with device 900, the orientation or acceleration/deceleration of device 900, and the change in temperature of device 900. The sensor assembly 914 may also include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communications between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), programmable logic devices (P L D), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for executing the file systems described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as memory 904 comprising instructions, executable by processor 920 of device 900 to implement the file system described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A file system is characterized in that the system divides a set space in a disk according to functions, and comprises the following parts:
the multimedia storage block set is used for storing and managing multimedia data;
the external storage block set is used for managing data in the accessed external storage equipment;
and the traditional media storage block set is used for storing and managing the traditional media data.
2. The system of claim 1, further comprising:
and the universal storage block set is used for storing and managing the customized data.
3. The system according to claim 1 or 2, wherein the storage space of the data file of each data type for different data types stored by different storage block sets comprises:
and the key information block is used for storing the data type information of the corresponding data file, the access index information of the corresponding data file and the access index information of other information blocks in the corresponding storage space of the corresponding data file.
4. The system of claim 3, wherein the key information block comprises a main information block and a spare information block;
the main information block is used for storing data type information of a corresponding data file, access index information of the corresponding data file and access index information of other information blocks in a corresponding storage space of the corresponding data file;
the backup information block is used for backing up the content of the main information block and replacing the main information block when the main information block fails.
5. The system of claim 3, wherein the storage space for the data file of each data type further comprises:
the debugging information block is used for storing operation history information and/or read-write abnormal information of the corresponding data file;
the bitmap block is used for storing the use condition information of each storage unit of the storage space occupied by the corresponding data file and/or the file data of the data file aiming at the storage block sets except the external storage block set;
the attribute information block is used for storing the attribute information of the corresponding data file;
and the data block is used for storing the file data of the corresponding data file aiming at the storage block set except the external storage block set.
6. The system according to claim 3, wherein the key information blocks of the data file of the corresponding type stored in each storage block set are stored in a physical space of a preset size before the set space in the disk.
7. The system of claim 1, wherein the multimedia data comprises at least one of: an audio data type, a video data type, a panel data type, a power supply data type, and a general data type;
the legacy media data includes television station data and satellite data.
8. The system according to claim 3, wherein the key information block is further configured to store a read-write task scheduling policy parameter for an external storage device;
and if the characteristics of the files stored in the external storage equipment are different, the external storage equipment corresponds to different read-write task scheduling strategies.
9. A file system access method applied to the file system according to any one of claims 1 to 8, comprising:
receiving a file access instruction;
determining a storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction;
and determining the access index information of the file to be accessed according to the determined storage block set.
10. The method according to claim 9, wherein the determining, according to the type of the file to be accessed carried in the file access instruction, the storage block set to which the file to be accessed belongs includes:
determining a first key information block of which the data type information is matched with the type of the file to be accessed in key information blocks of each storage block set;
the determining, according to the determined storage block set, access index information of the file to be accessed includes:
determining file attribute information stored in a key information block according to index information of the key information block stored in the first key information block;
determining a second key information block corresponding to the key information block of which the file attribute information is matched with the file attribute of the file to be accessed;
and determining the access index information of the data file stored in the second key information block as the access index information of the file to be accessed.
11. The method according to claim 10, wherein the determining a first key information block of the key information blocks of each storage block set, the data type information of which matches with the type of the file to be accessed, comprises:
reading each key information block from a physical space for storing the key information block of each storage block set in a set space in a disk;
and determining a first key information block with data type information matched with the type of the file to be accessed from each key information block.
12. The method according to claim 10 or 11, characterized in that the method further comprises:
and in response to the failure of reading the main information block of any key information block, reading the spare information block according to the index information of the spare information block of the key information block, which is provided by the main information block.
13. The method of claim 9, further comprising:
and responding to the recognition of the mounting of the external storage equipment, and performing disk mapping on the peripheral data file stored in the external storage equipment.
14. The method of claim 13, wherein the disk mapping comprises:
allocating a storage space for the peripheral data file; the storage space includes: a key information block, further comprising at least one of the following information blocks: debugging information blocks and attribute information blocks;
and correspondingly setting the read-write task scheduling strategy parameters of the peripheral data files in the key information block according to the data characteristics of the peripheral data files.
15. An electronic device, comprising:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to:
receiving a file access instruction;
determining a storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction;
and determining the access index information of the file to be accessed according to the determined storage block set.
16. A computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, carries out the steps of:
receiving a file access instruction;
determining a storage block set to which the file to be accessed belongs according to the type of the file to be accessed carried in the file access instruction;
and determining the access index information of the file to be accessed according to the determined storage block set.
CN202010238608.3A 2020-03-30 2020-03-30 File system, file system access method, electronic device, and storage medium Pending CN111444152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010238608.3A CN111444152A (en) 2020-03-30 2020-03-30 File system, file system access method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010238608.3A CN111444152A (en) 2020-03-30 2020-03-30 File system, file system access method, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN111444152A true CN111444152A (en) 2020-07-24

Family

ID=71652626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010238608.3A Pending CN111444152A (en) 2020-03-30 2020-03-30 File system, file system access method, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN111444152A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140013051A1 (en) * 2012-03-12 2014-01-09 Huawei Technologies Co., Ltd Data Storage Method and Data Storage Apparatus
CN106021125A (en) * 2016-05-16 2016-10-12 北京珠穆朗玛移动通信有限公司 Data sharing method and system between dual user systems, and mobile terminal
US20170337229A1 (en) * 2016-05-19 2017-11-23 Oracle International Corporation Spatial indexing for distributed storage using local indexes
CN107784108A (en) * 2017-10-31 2018-03-09 郑州云海信息技术有限公司 A kind of data storage and management method, device and equipment
CN108062200A (en) * 2016-11-08 2018-05-22 杭州海康威视数字技术股份有限公司 A kind of data in magnetic disk reading/writing method and device
CN108154463A (en) * 2017-12-06 2018-06-12 中国航空工业集团公司西安航空计算技术研究所 A kind of modelling GPU video memory method for managing system
CN109408222A (en) * 2017-08-18 2019-03-01 深圳天珑无线科技有限公司 Intelligent terminal and its space management, the device with store function
CN109614040A (en) * 2018-11-26 2019-04-12 武汉烽火信息集成技术有限公司 Storage method, storage medium, electronic equipment and system with more storage pools
CN109979498A (en) * 2019-01-24 2019-07-05 深圳市景阳信息技术有限公司 The method and device of the write-in of disk video data, reading
CN110221782A (en) * 2019-06-06 2019-09-10 重庆紫光华山智安科技有限公司 Video file processing method and processing device
CN110262836A (en) * 2019-04-29 2019-09-20 华为技术有限公司 Built-in multimedia device and communication equipment for Vehicle telematics processor
CN110471623A (en) * 2019-07-31 2019-11-19 深圳市博实结科技有限公司 Fixed disk file wiring method, device, computer equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140013051A1 (en) * 2012-03-12 2014-01-09 Huawei Technologies Co., Ltd Data Storage Method and Data Storage Apparatus
CN106021125A (en) * 2016-05-16 2016-10-12 北京珠穆朗玛移动通信有限公司 Data sharing method and system between dual user systems, and mobile terminal
US20170337229A1 (en) * 2016-05-19 2017-11-23 Oracle International Corporation Spatial indexing for distributed storage using local indexes
CN108062200A (en) * 2016-11-08 2018-05-22 杭州海康威视数字技术股份有限公司 A kind of data in magnetic disk reading/writing method and device
CN109408222A (en) * 2017-08-18 2019-03-01 深圳天珑无线科技有限公司 Intelligent terminal and its space management, the device with store function
CN107784108A (en) * 2017-10-31 2018-03-09 郑州云海信息技术有限公司 A kind of data storage and management method, device and equipment
CN108154463A (en) * 2017-12-06 2018-06-12 中国航空工业集团公司西安航空计算技术研究所 A kind of modelling GPU video memory method for managing system
CN109614040A (en) * 2018-11-26 2019-04-12 武汉烽火信息集成技术有限公司 Storage method, storage medium, electronic equipment and system with more storage pools
CN109979498A (en) * 2019-01-24 2019-07-05 深圳市景阳信息技术有限公司 The method and device of the write-in of disk video data, reading
CN110262836A (en) * 2019-04-29 2019-09-20 华为技术有限公司 Built-in multimedia device and communication equipment for Vehicle telematics processor
CN110221782A (en) * 2019-06-06 2019-09-10 重庆紫光华山智安科技有限公司 Video file processing method and processing device
CN110471623A (en) * 2019-07-31 2019-11-19 深圳市博实结科技有限公司 Fixed disk file wiring method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107291626B (en) Data storage method and device
CN110704202B (en) Multimedia recording data sharing method and terminal equipment
CN103530186A (en) Method and system for achieving multi-position storage supported by camera application
CN110865837B (en) Method and terminal for system upgrade
KR20150066876A (en) Method for controlling an user interface and an electronic device
CN110781149A (en) Method, device, equipment and storage medium for managing live broadcast room information
KR102071530B1 (en) Apparatas and method for proposing a response manual of occurring denial in an electronic device
KR20150057309A (en) Broadcasting cheannel information sharing method of electronic apparatus and electronic appparatus thereof
CN111212227B (en) Method, device and equipment for configuring video resolution of camera and storage medium
CN111857531A (en) Mobile terminal and file display method thereof
CN111258952A (en) Data storage control method, device and storage medium
CN107506496B (en) Defragmentation method, defragmentation device and computer-readable storage medium
CN111444152A (en) File system, file system access method, electronic device, and storage medium
KR20190098516A (en) Method for managing data related to application and electronic device thereof
CN114489471A (en) Input and output processing method and electronic equipment
CN110018985B (en) Snapshot deleting method, device and system
CN116738073B (en) Method, equipment and storage medium for identifying residence
WO2024022119A1 (en) Data synchronization method, electronic device and system
CN111414130B (en) Computing node system, data acquisition method thereof and electronic equipment
CN111241097B (en) Method for processing object, device for processing object and storage medium
CN111142648B (en) Data processing method and intelligent terminal
CN113641533A (en) Terminal and short message processing method
CN117520279A (en) File storage method and electronic equipment
CN115981573A (en) Data management method, electronic device and computer readable and writable storage medium
CN117707755A (en) Thread identifier distribution method, electronic equipment and storage medium

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