CN110825714A - File storage control method and device, file storage device and electronic device - Google Patents

File storage control method and device, file storage device and electronic device Download PDF

Info

Publication number
CN110825714A
CN110825714A CN201911088130.4A CN201911088130A CN110825714A CN 110825714 A CN110825714 A CN 110825714A CN 201911088130 A CN201911088130 A CN 201911088130A CN 110825714 A CN110825714 A CN 110825714A
Authority
CN
China
Prior art keywords
data
storage
file
stored
additional 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
CN201911088130.4A
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.)
Zhuhai Pantum Electronics Co Ltd
Original Assignee
Zhuhai Pantum Electronics 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 Zhuhai Pantum Electronics Co Ltd filed Critical Zhuhai Pantum Electronics Co Ltd
Priority to CN201911088130.4A priority Critical patent/CN110825714A/en
Publication of CN110825714A publication Critical patent/CN110825714A/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/18File system types
    • G06F16/1847File system types specifically adapted to static storage, e.g. adapted to flash memory or SSD
    • 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

Abstract

The invention provides a file storage control method and device, a file storage device and an electronic device, wherein the file storage control method comprises the following steps: receiving a data storage request, wherein the data storage request comprises data to be stored and a storage address of the data to be stored in a file storage device, the data to be stored comprises additional information, and the storage address of the additional information corresponds to a main storage area in the file storage device; based on the received data storage request, in combination with a preset data storage rule, sending a data storage instruction to the file storage device, so as to store the data to be stored in the file storage device, so as to solve the technical problem that a file system cannot correctly identify the additional information to cause that the file in the file storage device cannot be correctly read when the file reading is subsequently performed due to insufficient storage space for storing the additional information in the prior art.

Description

File storage control method and device, file storage device and electronic device
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of file storage technologies, and in particular, to a file storage control method and apparatus, a file storage apparatus and electronic apparatus, an electronic device, and a readable storage medium.
[ background of the invention ]
In the prior art, in electronic devices such as computers, smart phones, tablet computers, image forming devices, etc., file data is stored in a NAND flash memory chip, which is a whole block read-write storage device (block), a minimum readable unit called page (page), and a minimum erasable unit called storage block or block (block), as shown in fig. 1, a block often consists of many pages, each page consists of a plurality of storage units, and a page inside the erased block can be written into (program) individually, as shown in fig. 2, a page space in the NAND flash memory chip usually includes a main storage area and a spare storage area, wherein the main storage area is used for storing file content data, the spare storage area is used for storing bad block mark information and other additional information, for a certain NAND flash memory chip, a size of the page space is fixed, that is, for a certain NAND flash memory chip, the sizes of the main storage area and the spare storage area are fixed, and when data are actually stored in the NAND flash memory chip, the data are preferentially stored in the main storage area, as shown in fig. 2.
The main controller of the electronic device comprises a NAND controller for controlling the NAND flash memory chip.
Referring to fig. 3, a main controller and a NAND flash memory chip are disposed in the electronic device, and the main components involved in implementing data storage include application software, an operating system, NAND driving and management software, and a NAND controller for controlling the NAND flash memory chip, and a process of storing data in the NAND flash memory chip is described below with reference to fig. 3.
At the software level, the architecture of file storage in an electronic device is generally as follows:
the application software sends file opening, closing, reading and writing instructions to an operating system;
the file system part in the operating system converts the commands of reading and writing files into the commands of reading and writing the storage blocks;
the NAND driving and management software receives the instruction of reading and writing the storage block area, optimizes the cache, the write balance and the like, and sends the instruction of reading the page, writing the block and the like to the NAND controller;
and based on the received instructions of reading page, writing page, erasing block and the like, the NAND controller performs reading, writing and erasing operations on the NAND flash memory chip.
The file system is an important part in operating system software, is responsible for solving the storage problem of files, and is used for indicating the storage rule of the files in the NAND flash memory chip. Aiming at each block of file data, the file system also sets bad block mark information and other additional information in a targeted manner, wherein the file system information is consistent with the file system used by the electronic device; the bad block flag information is used to indicate whether the block file is a "bad block", and if the block data is a bad block, the block data is a data block in which data cannot be read or written.
For example, if the NAND flash memory chip used in the electronic device is TC58BVG0S3HTA00, each page has a size of 2112 bytes, wherein 2048 bytes is a main storage area and 64 bytes is a spare storage area, the file system divides the file into a data block having a size of 2112 bytes, and for each data block, data is indicated to be stored in the main storage area of one page storage unit in the NAND flash memory chip, and other information such as file system information and bad block flag information is indicated to be stored in the spare storage area of one page storage unit in the NAND flash memory chip. After the file system divides the file, the file system information sends a data storage request to the NAND controller through the NAND driving and management software, based on the received data storage request, the NAND controller sends a data storage instruction to the NAND flash memory chip so as to store the data in the NAND flash memory chip, wherein the data storage request comprises the data to be stored and the storage address of the data to be stored, according to the division rule of the file system, part of the data to be stored can be stored in the main storage area, and the additional information to be stored can be stored in the spare storage area.
However, in the process of implementing the above technical solution, the inventor finds that there is a part of the NAND controller, and when the storage instruction rule of the file system for the file is not consistent during the data storage, there is a possibility that when the file storage is actually performed, there is a part of the data to be stored, which is partially stored in the spare storage area of the NAND flash memory chip, so that the spare storage area is occupied, and thus a space for storing additional information is insufficient, so that when the file stored in the NAND flash memory chip is subsequently read, the file cannot be correctly read from the NAND flash memory chip due to the file system, and thus the reading of the file fails, and even more, if the file stored in the NAND flash memory chip is an important file, the electronic device cannot operate.
For example, if the NAND flash memory chip used in the electronic device is TC58BVG0S3HTA00 and the file system is yaffs2, the data size of a page is 2048 bytes, the file system information size is 28 bytes, and the bad block flag information is 1 byte. yaffs2 file system indicates a storage rule of a block of file data as shown in fig. 4, the data is stored in the main storage area, and the spare storage area includes a storage unit 21, a storage unit 22, and a storage unit 23, wherein the storage unit 22 stores bad block flag information, and the storage unit 23 stores file system information, i.e., as shown in fig. 4, the file system indicates that 2048 bytes are occupied for storing the data in the main storage area, 1 byte is occupied for storing the bad block flag information in the storage unit 21, and 28 bytes is occupied for storing the file system information in the storage unit 22. A rule when a certain NAND controller performs file storage on a page space size area in a NAND flash memory chip is shown in fig. 5, that is, when data storage is actually performed, 2048 bytes of data are divided into 4 parts, each part has a data size of 512 bytes, and check data with a size of 11 bytes is set for each part, so that each part of data and the check data for each part of data occupy 2092 bytes during data storage, wherein the space size of 44 bytes of a spare storage area is occupied, and considering that the space size of the spare storage area is 64 bytes, that is, only 20 bytes of the spare storage area remain, which is insufficient to store file system information with a size of 28 bytes, then when accessing a file in the NAND flash memory chip, the file system cannot acquire correct file system information from the NAND flash memory chip, the data of the data stored in the NAND flash memory chip is read out in a failed manner, and if the data of the data is the main control program of the electronic device, the electronic device cannot operate normally.
[ summary of the invention ]
The embodiment of the invention provides a file storage control method and device, a file storage device, an electronic device, electronic equipment and a readable storage medium, which are used for solving the technical problem that files in the file storage device cannot be read correctly due to the fact that a file system cannot correctly identify additional information when the storage space for storing the additional information in the prior art is insufficient so that the files are read subsequently.
In order to solve the above technical problem, a first aspect of the present invention provides a file storage control method, including:
receiving a data storage request, wherein the data storage request comprises data to be stored and a storage address of the data to be stored in a file storage device, the data to be stored comprises additional information, the storage address of the additional information corresponds to a main storage area in the file storage device, the main storage area and a spare storage area form a storage area of unit data in the file storage device, the spare storage area and the main storage area both have fixed data sizes, and when data storage is carried out, the data is preferentially stored in the main storage area;
and sending a data storage instruction to the file storage device based on the received request, so as to store the data to be stored in the file storage device.
A second aspect of the present invention provides a file storage control apparatus, including:
the data storage device comprises a receiving unit and a storing unit, wherein the receiving unit is used for receiving a data storage request, the data storage request comprises data to be stored and a storage address of the data to be stored in a file storage device, the data to be stored comprises additional information, the storage address of the additional information corresponds to a main storage area in the file storage device, the main storage area and a spare storage area form a storage area of unit data in the file storage device, the spare storage area and the main storage area both have fixed data sizes, and when data storage is carried out, the data are preferentially stored in the main storage area;
a sending unit, configured to send a data storage instruction to the file storage device based on the data storage request received by the receiving unit, so as to store the data to be stored in the file storage device.
A third aspect of the present invention provides a file storage apparatus comprising:
a plurality of first storage units for storing file content data;
a plurality of second storage units for storing the check data;
a third storage unit for storing additional information;
wherein there is the first storage unit connected to the third unit.
A fourth aspect of the present invention provides an electronic apparatus comprising: the file storage control device and/or the file storage device.
The fifth aspect of the present invention also provides an electronic device, including: a memory, a processor, and a computer program, wherein the computer program is stored in the memory, and the processor executes the computer program to execute the file storage control method according to any one of the first aspect.
The sixth aspect of the present invention also provides a readable storage medium, wherein the readable storage medium stores therein a computer program, and the computer program is used to implement the storage control method according to any one of the first aspects when executed by a processor.
Compared with the prior art, the method has the following beneficial effects:
1. the files stored in the file storage device can be correctly read without replacing a file storage control device in the electronic device;
2. the file storage control device stores data based on the received request for storing the additional information into the main storage area of the file storage device, so that the additional information can be correctly identified by a file system when the file in the file storage device is subsequently read, and the technical problem that the file in the file storage device cannot be correctly read due to the fact that the file system cannot correctly identify the additional information when the storage space for storing the additional information is insufficient so that the file in the file storage device can not be correctly read when the file is subsequently read is effectively solved;
3. the file storage control device stores data based on a received request for storing additional information into a main storage area of the file storage device, when the additional information is stored in the main storage area, the available space in a spare storage area in the file storage device is enlarged and can be used for storing check data with larger data bits, so that the reliability of the data stored in the file storage device is larger, the service life of the file storage device is prolonged, and other functions can be expanded;
4. the file storage control device stores data based on the received request for storing the additional information into the main storage area of the file storage device, and the file system reduces one-time access to the file storage device in the access process of small data volume when reading the file in the file storage device subsequently, so that the reading efficiency of the file system can be accelerated;
5. the file storage control device stores data based on the received request for storing the additional information into the main storage area of the file storage device, so that the actual data storage rule in the file storage device is inconsistent with the rule in the data storage request, the protection of the data is enhanced, and the information safety is facilitated;
6. the file storage control device stores the additional information into the main storage area of the file storage device based on the received additional information, so that data is stored, the size of the file system information is reduced, the label verification data in the file system information is removed, the file system does not need to perform verification calculation when the file in the file storage device is read subsequently, and the reading efficiency of the file system can be improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic diagram illustrating an arrangement of physical pages in a NAND flash memory chip according to the present application.
FIG. 2 is a schematic diagram of an arrangement of physical pages in another NAND flash memory chip according to the present application.
FIG. 3 is a schematic diagram of the architecture of the present application in which files are stored at the software level.
Fig. 4 is a schematic diagram illustrating a storage rule indicating a block of file data by a file system according to the present application.
Fig. 5 is a schematic diagram illustrating rules when a NAND controller stores a file in a page space size area of a NAND flash memory chip according to the present application.
Fig. 6 is a flowchart of a file storage control method according to an embodiment of the present invention.
Fig. 7 is a schematic diagram illustrating rules when a NAND controller stores a file in a page space size area of a NAND flash memory chip according to an embodiment of the present invention.
Fig. 8 is a schematic diagram illustrating another rule when a NAND controller stores a file in a page space size area of a NAND flash memory chip according to an embodiment of the present invention.
Fig. 9 is a block diagram of a file storage device according to an embodiment of the present invention.
Fig. 10 is a block diagram of an electronic device according to another embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. 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.
As shown in fig. 6, an embodiment of the present invention provides a file storage control method, including:
s601, receiving a data storage request, wherein the data storage request comprises data to be stored and a storage address of the data to be stored in a file storage device, the data to be stored comprises additional information, the storage address of the additional information corresponds to a main storage area in the file storage device, the main storage area and a spare storage area form a storage area of unit data in the file storage device, the spare storage area and the main storage area both have fixed data size, and when the data storage is carried out, the data is preferentially stored in the main storage area;
and S602, sending a data storage instruction to the file storage device based on the received data storage request, so as to store the data to be stored in the file storage device.
Specifically, the document storage control method is executed by a document storage controller, which is a part of a main controller of an electronic apparatus, which may be an electronic apparatus such as a mobile phone, a computer, an image forming apparatus including a printer, a copier, a scanner, and the like.
The additional information includes one or more of file system information, a key for encrypting or decrypting data, a hash value and the like, that is, in the data storage request, the data stored in the main storage area may be one or more of file system information, a key for encrypting or decrypting data, and a hash value.
One storage area of unit data of the file storage device is a storage area of one page data in the file storage device. For example, when the model of the NAND flash memory chip is TC58BVG0S3HTA00, the storage area size of one unit of data of the file storage device is 2112 bytes.
The file storage device is a memory used for storing data in the electronic device, the file system sends a data storage request to the file storage controller through the driver, and the file storage controller sends a data storage instruction to the file storage device based on the received request, so that the data is stored.
As shown in fig. 3, when the file storage device may be a NAND flash memory, the file storage controller is a NAND controller, the driver is NAND driving and managing software, the file system sends a data storage request to the NAND controller through the NAND driving and managing software, and based on the received data storage request, the NAND controller sends a data storage instruction to the NAND flash memory, so as to store data to be stored in the file storage device.
In S601, in the data storage request, the storage address of the additional information corresponds to the main storage area, for example, if the model of the NAND flash memory used in the electronic device is TC58BVG0S3HTA00, the file system is yaffs2 file system, and the additional information is file system information, the storage rule of the data in the data storage request, as shown in fig. 7, stores the file system information in the main storage area of the NAND flash memory, and of course, the storage location of the file system information in the main storage area is not limited in the embodiment of the present invention, and may be at the beginning portion of the main storage area, the ending portion of the main storage area, or the middle portion of the main storage area.
For S602, after the NAND controller receives the data storage request and before sending the data storage instruction to the NAND flash memory, the NAND controller sets a storage rule of the data to be stored in the file storage device according to its own characteristics, specifically, the NAND controller splits the data indicated by the file system to be stored in the main storage area of the NAND flash memory into a plurality of data portions and sets check data for each data portion, when the data storage is performed, each split data portion is connected to a storage area of the respective check data, that is, when the data storage request received by the NAND controller includes storing additional information in the main storage area, after the NAND controller adjusts according to its own characteristics, a storage address of the additional information corresponds to any storage area of the file storage device, that is, the additional information is stored in the file storage device, furthermore, in the embodiment of the present invention, the storage location of the additional information may be at the beginning of the main storage area, at the end of the main storage area, at the middle of the main storage area, or at the beginning of the spare storage area.
For example, when the NAND controller splits the data in the main storage area into 4 shares, and the size of each share of data is 512 bytes, the data storage rule indicated by the NAND controller is as shown in fig. 8, that is, when the data storage rule in the data storage request is as shown in fig. 7, the data storage rule is as shown in fig. 8 after the NAND controller adjusts the data storage rule.
Further, for S601, in the data storage request, the size of the data that can be stored in the primary storage area, that is, the primary storage area, is reduced, and specifically, if the storage address of the data to be stored in the file storage device corresponds to N1+1 storage units in the file storage device, the data size of the additional information is N2, and the storage space of one unit data of the file storage device is N3, the size of the data other than the additional information corresponding to the primary storage area address is N3-N2 for any one of N1 storage units, where N1 is an integer greater than or equal to 0.
For example, when the space size of the main storage area in a single data storage area in the file storage device is 2048 bytes, and the data size of the additional information is 28 bytes, the size of the file content data that can be stored in the data request to be stored is 2020 bytes.
Through the above manner, in the data storage request, the additional information is stored in the main storage area, and then through the adjustment of the NAND controller, the NAND controller splits the data stored in the main storage area into a plurality of data parts, so that the additional information becomes a part of a certain data part and is stored in the NAND flash memory chip, that is, in the data storage instruction, the storage address of the additional information is connected with the address of one storage unit in which the file data is stored.
As can be seen from the above description, in the data storage request, the additional information is stored in the main storage area, so that the size of the file content data in the storage area of one unit data that can be stored in the NAND flash memory is reduced, and when data is stored, the additional information can be stored in the file storage device, and then when a file is subsequently read, the file system can read the correct additional information in the file storage device, thereby effectively avoiding the technical problem that the file in the file storage device cannot be correctly read due to insufficient storage space for storing the additional information and the fact that the file system cannot correctly identify the additional information; furthermore, the files stored in the file storage device can be correctly read without replacing a file storage control device in the electronic device; furthermore, the file storage control device stores data based on the received request for storing the additional information into the main storage area of the file storage device, when the additional information is stored into the main storage area of the file storage device, the available space in the spare storage area in the file storage device is enlarged, and the spare storage area can be used for storing check data with larger data bit number, so that the reliability of the data stored in the file storage device is larger, the service life of the file storage device is prolonged, and the file storage control device can also be used for expanding other functions.
Further, after the data is stored in the file storage device, when the data is read, the file storage controller receives a data reading request, so as to obtain the data from the file storage device, and after the data is obtained, the file storage controller obtains each data part split during the data storage, and sends the obtained data part to the file system, and the file system obtains the file content data from each data part and sends the file content data to the application software, so that the file storage controller stores the additional information into the main storage area of the file storage device based on the received additional information, so as to store the data, and subsequently, when the file in the file storage device is read, the file system can directly obtain the additional information from each data part obtained by the file storage controller during the access process of small data amount, the spare storage area is not required to be accessed once again to obtain the additional information as in the prior art, so that the access to the file storage device once can be reduced, and the reading efficiency of a file system can be improved; and the file storage control device stores the data based on the received request for storing the additional information into the main storage area of the file storage device, so that the actual data storage rule in the file storage device is inconsistent with the rule in the data storage request, the protection of the data is enhanced, and the information safety is facilitated.
Further, the additional information includes file system information, and when the additional information is file system information, the file system information may further be tag data, specifically including an index number of the page data in the entire file, a sequence number of the file, an effective byte number, and flag information of the file.
By the method, the check number in the file system information is removed, so that the size of the file system information is further reduced, the file system does not need to perform label check calculation operation, and the reading efficiency of the file system can be improved.
As shown in fig. 9, an embodiment of the present invention provides a file storage control apparatus, including:
a receiving unit 901, configured to receive a data storage request, where the data storage request includes data to be stored and a storage address of the data to be stored in a file storage device, where the data to be stored includes additional information, the storage address of the additional information corresponds to a main storage area in the file storage device, the main storage area and a spare storage area form a storage area of unit data in the file storage device, and both the spare storage area and the main storage area have fixed data sizes, and when data storage is performed, the data is preferentially stored in the main storage area;
a sending unit 902, configured to send, based on the received data storage request, an instruction for data storage to the file storage device, so as to store the data to be stored in the file storage device.
Further, if the storage address of the data to be stored in the file storage device corresponds to N1+1 storage units in the file storage device, the data size of the additional information is N2, and the space size of the main storage area in one unit data storage area of the file storage device is N3, the size of data other than the additional information corresponding to the address of the main storage area is N3-N2 for any one of the N1 storage units, where N1 is an integer greater than or equal to 0.
Further, the data storage instruction comprises data to be stored and a storage address of the data to be stored in the file storage device, the data to be stored comprises file content data and additional information, wherein the storage address of the additional information is connected with an address of a storage unit in which the file data is stored.
Further, the additional information includes file system information,
further, the file system information may be tag data.
The file storage control device provided in this embodiment can be used to execute the method of the above embodiment, and the execution manner and the beneficial effects are similar, and are not described herein again.
An embodiment of the present invention further provides a file storage apparatus, including:
a plurality of first storage units for storing file content data;
a plurality of second storage units for storing the check data;
a third storage unit for storing additional information;
wherein there is a first memory cell connected to the third cell.
Specifically, the plurality includes 2 or more.
The additional information is consistent with the foregoing description and will not be redundantly described here.
Two memory locations are connected, i.e. the beginning of one memory location is the end of the other memory location, or the end of one memory location is the beginning of the other memory location.
The verification data is data for verifying the file content data stored in the first storage unit.
The file storage device provided by the embodiment of the invention stores the additional information, so that the problem of file reading failure caused by the fact that a file system cannot acquire correct additional information can be avoided when the file stored in the file storage device is read subsequently; in addition, when the additional information is stored in the main storage area of the file storage device, the available space in the spare storage area in the file storage device is enlarged and can be used for storing the check data with larger data bit number, so that the reliability of the data stored in the file storage device is larger, the service life of the file storage device is prolonged, and other functions can be expanded; moreover, when the additional information is stored in the main storage area and the file in the file storage device is read subsequently, the file system reduces one access to the file storage device in the access process of small data volume, so that the reading efficiency of the file system can be improved; finally, the storage rule of the additional information in the file storage device is inconsistent with the storage rule indicated by the file system, so that the protection of data is enhanced, and the information security is facilitated.
Further, the additional information includes file system information;
further, the file system information may be tag data.
When the file storage device provided by the embodiment of the invention stores the additional information as the tag data, and the subsequent reading of the file in the file storage device is carried out, the file system does not need to carry out verification calculation, so that the reading efficiency of the file system can be improved.
An embodiment of the present invention provides an electronic device, including the file storage control device and/or the file storage device.
The electronic device provided by this embodiment includes the file storage control device and/or the file storage device, and the execution manner and the beneficial effects thereof are similar to those described above, and are not described herein again.
As shown in fig. 10, an embodiment of the present invention provides an electronic device, including: the file storage control method includes a memory, a processor, and a computer program, the computer program being stored in the memory, and the processor executing the computer program.
An embodiment of the present invention provides a readable storage medium, in which a computer program is stored, where the computer program is used for the above-mentioned file storage control method when executed by a processor.
The execution mode and the beneficial effects of the electronic device and the readable storage medium provided by the embodiment are similar to those of the file storage control method described above, and are not described again here.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (16)

1. A file storage control method, comprising:
receiving a data storage request, wherein the data storage request comprises data to be stored and a storage address of the data to be stored in a file storage device, the data to be stored comprises additional information, the storage address of the additional information corresponds to a main storage area in the file storage device, the main storage area and a spare storage area form a storage area of unit data in the file storage device, the spare storage area and the main storage area both have fixed data sizes, and when data storage is carried out, the data is preferentially stored in the main storage area;
and sending a data storage instruction to the file storage device based on the received data storage request, so as to store the data to be stored in the file storage device.
2. The file storage control method according to claim 1, wherein if the storage address of the data to be stored in the file storage device corresponds to N1+1 storage units in the file storage device, the data size of the additional information is N2, and the space size of the main storage area in the storage area of one unit data of the file storage device is N3, the size of the data other than the additional information corresponding to the main storage area address is N3-N2 for any one of the N1 storage units.
3. The file storage control method according to claim 1 or 2, wherein the data storage instruction includes data to be stored and a storage address of the data to be stored in the file storage device, the data to be stored includes file content data and the additional information, and the storage address of the additional information is connected to an address of one storage unit in which the file data is stored.
4. The file storage control method according to claim 1, wherein the additional information is file system information.
5. The file storage control method according to claim 4, wherein the file system information is tag data.
6. A file storage control apparatus, characterized by comprising:
the data storage device comprises a receiving unit and a storing unit, wherein the receiving unit is used for receiving a data storage request, the data storage request comprises data to be stored and a storage address of the data to be stored in a file storage device, the data to be stored comprises additional information, the storage address of the additional information corresponds to a main storage area in the file storage device, the main storage area and a spare storage area form a storage area of unit data in the file storage device, the spare storage area and the main storage area both have fixed data sizes, and when data storage is carried out, the data are preferentially stored in the main storage area;
a sending unit, configured to send, based on the received data storage request, a data storage instruction to the file storage device, so as to store the data to be stored in the file storage device.
7. The file storage control apparatus according to claim 6, wherein if the storage address of the data to be stored in the file storage apparatus corresponds to N1+1 storage units in the file storage apparatus, the data size of the additional information is N2, and the space size of the main storage area in the storage area of one unit data of the file storage apparatus is N3, the size of data other than the additional information corresponding to the main storage area address is N3-N2 for any one of the N storage units.
8. The file storage control device according to claim 6 or 7, wherein the data storage instruction includes data to be stored and a storage address of the data to be stored in the file storage device, the data to be stored includes file content data and the additional information, and the storage address of the additional information is connected to an address of a storage unit in which the file data is stored.
9. The file storage control apparatus according to claim 6, wherein the additional information is file system information.
10. The file storage control device according to claim 10, wherein the file system information is tag data.
11. A file storage device, comprising:
a plurality of first storage units for storing file content data;
a plurality of second storage units for storing the check data;
a third storage unit for storing additional information;
wherein there is the first storage unit connected to the third unit.
12. The file storage device according to claim 11, wherein the additional information includes file system information.
13. The file storage device according to claim 12, wherein the file system information is tag data.
14. An electronic device, comprising a file storage control device according to any one of claims 6 to 10 and/or a file storage device according to any one of claims 11 to 13.
15. An electronic device, comprising: a memory, a processor, and a computer program, the computer program being stored in the memory, the processor running the computer program to perform the file storage control method according to any one of claims 1 to 5.
16. A readable storage medium, characterized in that a computer program is stored therein, which when executed by a processor, is used to implement the file storage control method of any one of claims 1 to 5.
CN201911088130.4A 2019-11-08 2019-11-08 File storage control method and device, file storage device and electronic device Pending CN110825714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911088130.4A CN110825714A (en) 2019-11-08 2019-11-08 File storage control method and device, file storage device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911088130.4A CN110825714A (en) 2019-11-08 2019-11-08 File storage control method and device, file storage device and electronic device

Publications (1)

Publication Number Publication Date
CN110825714A true CN110825714A (en) 2020-02-21

Family

ID=69553637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911088130.4A Pending CN110825714A (en) 2019-11-08 2019-11-08 File storage control method and device, file storage device and electronic device

Country Status (1)

Country Link
CN (1) CN110825714A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259092A (en) * 2021-04-04 2021-08-13 余绍祥 Document distributed encryption system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477469A (en) * 2009-02-06 2009-07-08 杭州华三通信技术有限公司 Reliable reading method, writing method and apparatus for starting code
CN102999436A (en) * 2012-11-28 2013-03-27 华为终端有限公司 Method and device for generating dynamic partition information in Nand flash memory
CN103593216A (en) * 2013-11-12 2014-02-19 上海斐讯数据通信技术有限公司 Method for making system files of ubi format into factory burn image files
CN105760113A (en) * 2016-02-04 2016-07-13 西安科技大学 High-speed storage equipment based on NAND flash memory and file management method
CN108804344A (en) * 2018-05-18 2018-11-13 记忆科技(深圳)有限公司 The flash memory storage method and device of tape file system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477469A (en) * 2009-02-06 2009-07-08 杭州华三通信技术有限公司 Reliable reading method, writing method and apparatus for starting code
CN102999436A (en) * 2012-11-28 2013-03-27 华为终端有限公司 Method and device for generating dynamic partition information in Nand flash memory
CN103593216A (en) * 2013-11-12 2014-02-19 上海斐讯数据通信技术有限公司 Method for making system files of ubi format into factory burn image files
CN105760113A (en) * 2016-02-04 2016-07-13 西安科技大学 High-speed storage equipment based on NAND flash memory and file management method
CN108804344A (en) * 2018-05-18 2018-11-13 记忆科技(深圳)有限公司 The flash memory storage method and device of tape file system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259092A (en) * 2021-04-04 2021-08-13 余绍祥 Document distributed encryption system

Similar Documents

Publication Publication Date Title
CN109634517B (en) Method for performing access management, memory device, electronic device and controller thereof
CN109933545B (en) Data storage device and data processing method of memory device
US20120005557A1 (en) Virtual copy and virtual write of data in a storage device
US20070214309A1 (en) Nonvolatile storage device and data writing method thereof
US9483396B2 (en) Control apparatus, storage device, and storage control method
US20100077135A1 (en) Memory wear leveling method, system and device
US8769243B2 (en) Apparatus with smart card chip for storing communication file in non-volatile memory
US9772937B2 (en) Data processing method, memory controller and memory storage apparatus
US8819387B2 (en) Memory storage device, memory controller, and method for identifying valid data
US8812756B2 (en) Method of dispatching and transmitting data streams, memory controller and storage apparatus
US20220050606A1 (en) Method and apparatus for performing access management of memory device in host performance booster architecture with aid of device side table information
KR20170010810A (en) Method, device and user equipment for reading/writing data in nand flash
CN107045423B (en) Memory device and data access method thereof
US8607123B2 (en) Control circuit capable of identifying error data in flash memory and storage system and method thereof
WO2016173470A1 (en) Storage method and system based on embedded multi-media card
US8527733B2 (en) Memory system
US20100115004A1 (en) Backup system that stores boot data file of embedded system in different strorage sections and method thereof
US20130019056A1 (en) Data Storing Method and Apparatus Applied to Flash Memory Storage Device
CN110825714A (en) File storage control method and device, file storage device and electronic device
US10289334B2 (en) Valid data merging method, memory controller and memory storage apparatus
US7257030B2 (en) Operating a storage component
KR20100036743A (en) Method for setting mode, and method for initializing in memory storage device
CN101470666B (en) Data memory method
CN112346771A (en) Upgrade file generation method and device
CN113792020A (en) Data processing method, device, terminal 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200221