CN102541969A - File protection method and system based on file allocation table (FAT) file system, and memory - Google Patents

File protection method and system based on file allocation table (FAT) file system, and memory Download PDF

Info

Publication number
CN102541969A
CN102541969A CN2011100770811A CN201110077081A CN102541969A CN 102541969 A CN102541969 A CN 102541969A CN 2011100770811 A CN2011100770811 A CN 2011100770811A CN 201110077081 A CN201110077081 A CN 201110077081A CN 102541969 A CN102541969 A CN 102541969A
Authority
CN
China
Prior art keywords
file
write
storer
folder
bunch
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.)
Granted
Application number
CN2011100770811A
Other languages
Chinese (zh)
Other versions
CN102541969B (en
Inventor
陈进光
钟衍徽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZHONGSHAN JIANGBOLONG ELECTRONICS CO., LTD.
Original Assignee
Shenzhen Netcom 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 Shenzhen Netcom Electronics Co Ltd filed Critical Shenzhen Netcom Electronics Co Ltd
Priority to CN201110077081.1A priority Critical patent/CN102541969B/en
Publication of CN102541969A publication Critical patent/CN102541969A/en
Application granted granted Critical
Publication of CN102541969B publication Critical patent/CN102541969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The invention is suitable for the technical field of storage, and provides a file protection method and a file protection system based on a file allocation table (FAT) file system, and a memory. The file protection method comprises the following steps of: performing disk formatting on the memory; writing a file or a file folder requesting for writing protection into a cluster distributed by the memory for the file or the file folder, and acquiring an FAT; setting a table value of a residual register item of a section, in which the FAT is positioned, as an end-of-file marker; acquiring a file catalog table, in which a catalog item corresponding to the file or the file folder is positioned, and setting the residual bytes of contents behind the catalog item corresponding to the file or the file folder in the section, in which the file catalog table is positioned, as ineffective character; and setting a main guide recording area of the memory, a guide recording area of an operating system, sectors corresponding to the FAT and the file catalog table and the cluster distributed by the memory for the file or the file folder requesting for writing protection as data writing protection areas. According to the method and the system, the writing protection processing flow for memory data is simplified, and the safety of the memory data is improved.

Description

Document protection method, system and storer based on the FAT file system
Technical field
The invention belongs to technical field of memory, relate in particular to a kind of document protection method, system and storer based on the FAT file system.
Background technology
Storage card is a kind of memory device of based semiconductor fast-flash memory device; Mainly contain safe digital card (SD card); Smart media card (SM card) is used on mancarried device at present widely, for example digital camera, mobile phone, personal digital assistant (PDA) and multimedia player etc.
At present, Data Protection can realize through write-protect switch in the storage card, when dialling write-protect switch; Storage card will receive write-protect, can only carry out read operation to the data of storage card stored, can't carry out the write operation of data; Deleted or replace to prevent that data from being missed, thereby reach the Data Protection to storage, other storer great majority then can't carry out write-protect to the data of store memory storage; Therefore, when the user need carry out read and write to the data in the storeies such as storage card, need hardware such as operation write-protect switch; And storer plugged, yet because write-protect switch is made and use is loaded down with trivial details, and under the write-protect state, can't carry out write operation to storer; Cause the memory data security not high, the write-protect complicated operation has reduced user experience.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of document protection method based on the FAT file system, system and storer, and it is not high to be intended to solve the memory data security, the write-protect complex disposal process of memory data, the problem of poor user experience.
The embodiment of the invention is achieved in that a kind of document protection method based on the FAT file system, and said method comprises the steps:
Storer is carried out the disk formatting operation;
With the write-protected file or folder of request write said storer be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file;
The list item value of the residue entry of sector, said file allocation table place is set to end of file sign, and it is bunch corresponding that said residue entry and said storer are not assigned with;
Obtain the FDT at the corresponding directory entry of this document or file place, the content of the remainder bytes in the sector at said FDT place after this document or the corresponding directory entry of file is set to idle character;
With MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of said storer, and said storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed.
Another purpose of the embodiment of the invention is to provide a kind of file protecting system based on the FAT file system, and said system comprises:
Formatting unit is used for storer is carried out the disk formatting operation;
The file allocation table acquiring unit, be used for the write-protected file or folder write store of request be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file;
The list item value is provided with the unit, is used for the list item value that file allocation table belongs to the residue entry of sector and is set to end of file sign, and it is bunch corresponding that said residue entry and said storer are not assigned with;
Content is provided with the unit; The FDT that is used to the corresponding directory entry of the write-protected file or folder of the request of obtaining place, the content of the remainder bytes in the sector at said FDT place after this document or the corresponding directory entry of file is set to idle character; And
The data protection zone is provided with the unit; Be used for MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT, and said storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed with storer.
Another purpose of the embodiment of the invention is to provide a kind of storer that comprises above-mentioned file protecting system based on the FAT file system.
When the embodiment of the invention is carried out write-protect at needs to data; Through storer is carried out disk formatting; Obtain the file allocation table at the entry place of last bunch of storing the write-protected file or folder of request; The list item value of the residue entry of sector, this document allocation table place is set to end of file sign; Obtain the FDT at the corresponding directory entry of this document or file place; The content of the remainder bytes in the sector at this document catalogue listing place after the corresponding directory entry of this document or file is set to idle character, and with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, and storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed; Thereby simplified the write-protect processing procedure of memory data, improved safety of data.
Description of drawings
Fig. 1 is the realization flow figure based on the document protection method of FAT file system that first embodiment of the invention provides;
Fig. 2 is the realization flow figure based on the document protection method of FAT file system that second embodiment of the invention provides;
Fig. 3 a, Fig. 3 b and Fig. 3 c are the instance graphs based on the document protection method of FAT file system that third embodiment of the invention provides;
Fig. 4 is the structural drawing based on the file protecting system of FAT file system that fourth embodiment of the invention provides.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
When the embodiment of the invention is carried out write-protect at needs to data; Through storer is carried out disk formatting; Obtain the file allocation table at the entry place of last bunch of storing the write-protected file or folder of request; The list item value of the residue entry of sector, this document allocation table place is set to end of file sign; Obtain the FDT at the corresponding directory entry of this document or file place; The content of the remainder bytes in the sector at this document catalogue listing place after the corresponding directory entry of this document or file is set to idle character, and with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, and storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed; Thereby simplified the write-protect processing procedure of memory data, improved safety of data.
The embodiment of the invention provides a kind of document protection method based on the FAT file system, and said method comprises the steps:
Storer is carried out the disk formatting operation;
With the write-protected file or folder of request write said storer be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file;
The list item value of the residue entry of sector, said file allocation table place is set to end of file sign, and it is bunch corresponding that said residue entry and said storer are not assigned with;
Obtain the FDT at the corresponding directory entry of this document or file place, the content of the remainder bytes in the sector at said FDT place after this document or the corresponding directory entry of file is set to idle character;
With MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of said storer, and said storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed.
The embodiment of the invention also provides a kind of file protecting system based on the FAT file system, and said system comprises:
Formatting unit is used for storer is carried out the disk formatting operation;
The file allocation table acquiring unit, be used for the write-protected file or folder write store of request be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file;
The list item value is provided with the unit, is used for the list item value that file allocation table belongs to the residue entry of sector and is set to end of file sign, and it is bunch corresponding that said residue entry and said storer are not assigned with;
Content is provided with the unit; The FDT that is used to the corresponding directory entry of the write-protected file or folder of the request of obtaining place, the content of the remainder bytes in the sector at said FDT place after this document or the corresponding directory entry of file is set to idle character; And
The data protection zone is provided with the unit; Be used for MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT, and said storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed with storer.
The embodiment of the invention also provides a kind of storer that comprises above-mentioned file protecting system based on the FAT file system.
When the embodiment of the invention is carried out write-protect at needs to data; Through storer is carried out disk formatting; Obtain the file allocation table at the entry place of last bunch of storing the write-protected file or folder of request; The list item value of the residue entry of sector, this document allocation table place is set to end of file sign; Obtain the FDT at the corresponding directory entry of this document or file place; The content of the remainder bytes in the sector at this document catalogue listing place after the corresponding directory entry of this document or file is set to idle character, and with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, and storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed; Thereby simplified the write-protect processing procedure of memory data, improved safety of data.
Below in conjunction with specific embodiment concrete realization of the present invention is described in detail:
Embodiment one:
In file allocation table (FAT) file system, the Logical Disk of storer is divided into five parts, is MBR district (MBR), booting operating system recording areas (DBR), file allocation table (FAT), FDT (FDT) and data field (DATA district) successively.
Series of parameters and one section boot of having comprised disk among the MBR.The main effect of disk bootstrap program wherein is whether the inspection partition table correctly and at system hardware accomplishes the later operating system that guides on the subregion with activation marker of self check, and gives start-up routine with control.DBR is first sector that operating system can directly be visited, and it comprises a boot and this subregion reference record table that is called as BPB (Bios Parameter Block).File allocation table (FAT) file system is used for file is carried out Organization And Management.Wherein, the FAT table has write down the operating position of each bunch of storer in order successively, and in the FAT table, every bunch operating position representes that with entry its corresponding value is the list item value.The list item value of corresponding entry bunch in FAT table that is not assigned with in the storer is zero, and the list item value of bad bunch of corresponding entry in the FAT table is then inserted the particular value of system definition, and the list item value of corresponding entry bunch in the FAT table of having distributed is then inserted nonzero value; Be specially:, then insert end of file sign, for example if this bunch is the last cluster of file; 0XFF; If this bunch be not the last cluster of file, the value of inserting be the next one that takies of this document bunch bunch number, thereby; All bunches that file takies then constitute a bunch of chain, are kept in the FAT table.The FDT table is used to write down the start element of each file (catalogue) under the root directory, the attribute of file etc.The data field is used for the file data of storing write protection, is positioned at after the FDT table, occupies the most of data space on the hard disk.
The realization flow that Fig. 1 shows that first embodiment of the invention provides based on the document protection method of FAT file system, details are as follows:
In step S101, storer is carried out the disk formatting operation.
In embodiments of the present invention; In order in the readable storer of writing, to realize the write-protect storage of file, preventing that the user from replacing, revising or mistake is deleted this document, when the user will need before write-protected file is written to the readable storer of writing; Tackle this storer and carry out disk formatting; Thereby generate DBR information, and the FAT table is carried out initialization and the mark that carries out the logic bad track.In the practical implementation process, storer can be SD card, SM card, TF card and other disk that adopts the FAT file system etc., at this not in order to restriction the present invention.
In step S102, with the write-protected file or folder write store of request be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file.
In the FAT file system, the FAT table has write down the operating position of each bunch of storer in order successively, and in the FAT table, every bunch operating position representes that with entry its corresponding value is the list item value.Because, there are two identical FAT tables for the importance of system in FAT, FAT shows shared sector and is determined by system, when storer is accomplished bunch allocation of space that writes file, obtains the file allocation table that the entry of last bunch of storage this document belongs to.
In step S103, the list item value of the residue entry of sector, the file allocation table obtained place is set to end of file sign, and it is bunch corresponding that this residue entry and this storer are not assigned with.
Storer after the format is an order assignment for the distribution in bunch space of the write-protected file of needs; The entry entry afterwards of promptly storing last bunch correspondence of this document all is corresponding with bunch institute that is not assigned with; For anti-locking system to the operation of making amendment of this sectors of data; Improve the security of the corresponding FAT table of write-protect file; In embodiments of the present invention, the list item value that the file allocation table of obtaining among the step S102 is belonged to the residue entry of sector all is set to end of file sign, thereby prevents in follow-up file ablation process, this sector to be operated.
In step S104, obtain the FDT at the corresponding directory entry of write-protect file or folder place, the content of the remainder bytes in the sector at this document catalogue listing place after the corresponding directory entry of this document or file is set to idle character.
In embodiments of the present invention; For anti-locking system the FDT table at the corresponding directory entry of the write-protected file or folder of needs place is made amendment, promptly this document or file are carried out possible modification, replacement or deletion action, improve the security of FDT table; In embodiments of the present invention; In the sector, FDT place with this document or the corresponding directory entry of file place, the content of the remainder bytes after the corresponding directory entry of this document or file is set to idle character, thereby prevents in follow-up file ablation process, this sector to be operated; In the practical implementation process, idle character can be invalid long filenames etc.
In step S105, with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, and storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed.
In embodiments of the present invention; Can provide corresponding interface or order with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer to the user, and storer bunch be set to data write-protect zone for the write-protected file allocation of request.
In embodiments of the present invention; The list item value that belongs to the residue entry of sector through the corresponding FAT of write-protected file or folder is set to end of file sign; The content of the remainder bytes in the sector at FDT place after the corresponding directory entry of this document or file is set to idle character; And with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer; And storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed, thereby realizes the file of memory stores is carried out write-protect.
Embodiment two:
The realization flow that Fig. 2 shows that second embodiment of the invention provides based on the document protection method of FAT file system, details are as follows:
In step S201, storer is carried out the disk formatting operation.
In step S202, with the write-protected file or folder write store of request be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file.
In step S203, the list item value of the residue entry of sector, the file allocation table obtained place is set to end of file sign, and it is bunch corresponding that this residue entry and this storer are not assigned with.
In step S204, obtain the FDT at the corresponding directory entry of write-protect file or folder place, the content of the remainder bytes in the sector at this document catalogue listing place after the corresponding directory entry of this document or file is set to idle character.
In step S205, with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, and storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed.
In embodiments of the present invention; Can provide corresponding interface or order with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer to the user, and storer bunch be set to data write-protect zone for what the write-protected file or folder of request distributed.
In step S206, receive the operation requests that file or folder writes, the address that writes that obtains this operation requests file or file.
In step S207, that obtains among the determining step S206 writes the address and whether is arranged in the data write-protect zone that storer is provided with, when being arranged in the data write-protect zone that storer is provided with, and execution in step S208, otherwise execution in step S209.
In step S208, when obtain among the step S206 write the address and be arranged in the data write-protect zone that storer is provided with the time, abandon the operation requests that file or folder writes.
In embodiments of the present invention; When the MBR of storer, DBR, FAT table and FDT show pairing sector, and storer for the write-protected file or folder of request distribute bunch be set to data write-protect zone after, accomplished the write-protect setting of storer file; In the follow-up use of storer; When receiving the write operation request of file or folder, obtain the address that writes of this operation requests, in the practical implementation process; This writes the address possibly be the modification to system file; Need the trial of write-protected file or folder to revise for example to the operation of MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, or to the user, should abandon the write operation request of file or folder this moment; Simultaneously, also can be to user's output function request file or file write the address by write-protected information.
In step S209, when obtain among the step S206 write the address and be not arranged in the data write-protect zone that storer is provided with the time, carry out the write operation of file or folder.
In embodiments of the present invention; After setting up data write-protect zone; When not being positioned at data write-protect zone, then storer is carried out normal write operation, when guaranteeing that storer has the write-protect function as if write operation to storer; Can carry out normal write operation to storer, improve user experience.
Embodiment three:
The instance based on the document protection method of FAT file system that Fig. 3 a, Fig. 3 b and Fig. 3 c show that third embodiment of the invention provides for the ease of explanation, only shows the part relevant with the embodiment of the invention.
Fig. 3 a is the list item value of corresponding entry bunch in FAT table that shows the shared storer of write-protected file; In embodiments of the present invention; File test1.doc, test2.mp3 and file test3 are the write-protect file, use 16 bits to represent the list item value of each entry, and wherein the Offset of first row representes the side-play amount with respect to sector, FAT table place start address; First row is then represented offset address; Both intersections then are the shared list item value of corresponding entry bunch in the FAT table of the write-protect file of storing in the storer, for example, and in embodiments of the present invention; By offset address is the 0x0300 that bunch number is that list item value 0x0300 that 0x3 and 0x4 represent representes following cluster that this list item value is corresponding; The list item value of the corresponding entry of last bunch of storing write protection file test1.doc, test2.mp3 and file test3 (offset address is 0x1E2 and 0x1E3) is 0xFF, finish in order to identification document, the residue entry of sector, FAT table place then with storer be not assigned with bunch corresponding; Use end of file sign 0xFF to fill, the concrete corresponding 0x1E4 to 0x1FF of the residue entry of sector zone.
Fig. 3 b shows the directory entry information of storage in the FDT table.In embodiments of the present invention; The directory entry address of write-protect file and system file catalogue is stored in the byte before the byte 0xC0; The zone of 0xC0 to 0x1FF byte is the content of the remainder bytes after the corresponding directory entry of write-protect file in the sector at FDT table place; Fill with invalid long filenames particularly, for example the invalid long filenames of M1111111.......
Fig. 3 c illustrates the data write-protect zone that is provided with in embodiments of the present invention.In embodiments of the present invention; Represent the write-protected zone of data with the sector; First group address is represented the address of MBR, second group of address of representing DBR and first FAT table, the 3rd group of address of representing second FAT table; The 4th group of address of representing the FDT table, the 5th group of memory address of representing the storing write protection file.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium; Described storage medium is like ROM/RAM, disk, CD etc.
Embodiment four:
The structure based on the file protecting system of FAT file system that Fig. 4 shows that fourth embodiment of the invention provides for the ease of explanation, only shows the part relevant with the embodiment of the invention.
Should can be used for disk based on the file protecting system of FAT file system; Other storeies that perhaps have memory function; For example in disk, the SD card etc.; Can be the software unit that runs in these storeies, also can be used as independently, suspension member be integrated in these storeies or runs in the application system of these storeies, wherein:
After 41 pairs of storeies of formatting unit carry out the disk formatting operation; File allocation table acquiring unit 42 will ask write-protected file or folder write store be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file.
In embodiments of the present invention; In order in the readable storer of writing, to realize the write-protect storage of file, to prevent that the user from replacing, revising or mistake is deleted this document, before the user need be written to this document the readable storer of writing; Tackle this storer and carry out disk formatting; Thereby generate DBR information, the FAT table is carried out initialization and the mark that carries out the logic bad track.In the practical implementation process, storer can be SD card, SM card, TF card and other disk that adopts the FAT file system etc., at this not in order to restriction the present invention.
In the FAT file system, the FAT table has write down the operating position of each bunch of storer in order successively, and in the FAT table, every bunch operating position representes that with entry its corresponding value is the list item value.Because, there are two identical FAT tables for the importance of system in FAT, FAT shows shared sector and is determined by system, when storer is accomplished storage and write bunch allocation of space of file, obtains the file allocation table that the entry of last bunch of storage this document belongs to.
The list item value is provided with unit 43, and the list item value that is used for the residue entry of the sector, file allocation table place that file allocation table acquiring unit 42 obtains is set to end of file sign, and this residue entry is the entry of bunch correspondence that is not assigned with of storer.
Storer after the format is an order assignment for the distribution in bunch space of the write-protected file of needs; The entry entry afterwards of promptly storing last bunch correspondence of this document all is corresponding with bunch institute that is not assigned with; For anti-locking system to the operation of making amendment of this sectors of data; Improve the security of the corresponding FAT table of write-protect file; In embodiments of the present invention, it all is that the end of file identifies that the list item value of the residue entry of the sector, file allocation table place that file allocation table acquiring unit 42 is obtained is provided with, thereby prevents in follow-up file ablation process, this sector to be operated.
Content is provided with the FDT at the corresponding directory entry of the write-protected file or folder of the request of obtaining place, unit 44, and the content of the remainder bytes in the sector at FDT place after the corresponding directory entry of this document or file is set to idle character.
In embodiments of the present invention; FDT to the corresponding directory entry of the write-protected file or folder of needs place makes amendment for anti-locking system; Promptly this document or file are carried out possible modification, replacement or deletion action, improve the security of FDT table, in embodiments of the present invention; The content of the remainder bytes in the sector, FDT place at the corresponding directory entry of this document or file place after this document or the corresponding directory entry of file is set to idle character; Thereby prevent in follow-up file ablation process, this sector to be operated, in the practical implementation process, idle character can be invalid long filenames etc.
The data protection zone is provided with MBR district, booting operating system recording areas, file allocation table and the FDT pairing sector of unit 45 with storer, and storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed.
Write address acquisition unit 46 and receive the operation requests that file or folder writes, the address that writes that obtains operation requests file or file.Judging unit 47 is judged write that address acquisition unit 46 obtains write the address and whether be arranged in the data write-protect zone that storer is provided with.Be positioned at data write-protect when zone when writing the address, operation requests discarding unit 48 abandons the operation requests that file or folder writes.
In embodiments of the present invention; When MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, and storer for the write-protected file or folder of request distribute bunch be set to data write-protect zone after, accomplished the write-protect setting of storer file; In the follow-up use of storer; When receiving the write operation request of file, obtain the address that writes of this operation requests, in the practical implementation process; This writes the address possibly be the modification to system file; Need the trial of write-protected file to revise for example to the operation of MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, or to the user, should abandon the write operation request of file this moment; Simultaneously, also can be to user's output function request file write the address by write-protected information.Therefore, an information output unit can be provided after operation requests discarding unit 48, what be used for output function request file writes the address by write-protected information.
Write operation unit 49 carries out the write operation of file or folder when writing the address and be not positioned at preset data write-protect zone.
In embodiments of the present invention; The list item value that belongs to the residue entry of sector through the corresponding FAT of write-protected file or folder is set to end of file sign; The content of the remainder bytes in the sector at FDT place after the corresponding directory entry of this document is set to idle character, and with MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of storer, and storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed; After setting up data write-protect zone; When not being positioned at data write-protect zone, then storer is carried out normal write operation, when guaranteeing that storer has the write-protect function as if write operation to storer; Can carry out normal write operation to storer, improve user's experience.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. the document protection method based on the FAT file system is characterized in that, said method comprises the steps:
Storer is carried out the disk formatting operation;
With the write-protected file or folder of request write said storer be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file;
The list item value of the residue entry of sector, said file allocation table place is set to end of file sign, and it is bunch corresponding that said residue entry and said storer are not assigned with;
Obtain the FDT at the corresponding directory entry of this document or file place, the content of the remainder bytes in the sector at said FDT place after this document or the corresponding directory entry of file is set to idle character;
With MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT of said storer, and said storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed.
2. the method for claim 1 is characterized in that, said storer adopts the FAT file system.
3. the method for claim 1; It is characterized in that; Said MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT with said storer; And said storer bunch is set to after the step in data write-protect zone for what the write-protected file or folder of request distributed, and said method also comprises the steps:
Receive the operation requests that file or folder writes, the address that writes that obtains said operation requests file or file;
Judge whether the said write address is positioned at said data write-protect zone;
When the said write address is positioned at said data write-protect zone, abandon said operation requests;
When the said write address is not positioned at preset data write-protect zone, carry out the write operation of file or folder.
4. method as claimed in claim 3 is characterized in that, saidly when the said write address is positioned at said data write-protect zone, abandons after the step of said operation requests, and said method also comprises the steps:
That exports said operation requests file or file writes the address by write-protected information.
5. the file protecting system based on the FAT file system is characterized in that, said system comprises:
Formatting unit is used for storer is carried out the disk formatting operation;
The file allocation table acquiring unit, be used for the write-protected file or folder write store of request be this document or folder allocation bunch, obtain the file allocation table at entry place of last bunch of storage this document or file;
The list item value is provided with the unit, is used for the list item value that file allocation table belongs to the residue entry of sector and is set to end of file sign, and it is bunch corresponding that said residue entry and said storer are not assigned with;
Content is provided with the unit; The FDT that is used to the corresponding directory entry of the write-protected file or folder of the request of obtaining place, the content of the remainder bytes in the sector at said FDT place after this document or the corresponding directory entry of file is set to idle character; And
The data protection zone is provided with the unit; Be used for MBR district, booting operating system recording areas, file allocation table and the pairing sector of FDT, and said storer bunch is set to data write-protect zone for what the write-protected file or folder of request distributed with storer.
6. system as claimed in claim 5 is characterized in that, said storer adopts the FAT file system.
7. system as claimed in claim 5 is characterized in that, said system also comprises:
Write address acquisition unit, be used to receive the operation requests that file or folder writes, obtain the address that writes of said operation requests file or file;
Judging unit is used for judging that the said write address acquisition unit obtains writes the address and whether be positioned at the data write-protect zone that storer is provided with;
The operation requests discarding unit is used for when writing the address and be positioned at said data write-protect zone, abandoning the operation requests that file or folder writes; And
The write operation unit is used for when writing the address and be not positioned at preset data write-protect zone, carrying out the write operation of file or folder.
8. system as claimed in claim 7 is characterized in that, said system also comprises:
The information output unit, what be used for output function request file or file writes the address by write-protected information.
9. a storer is characterized in that, said storer comprises each described file protecting system based on the FAT file system of claim 5 to 8.
CN201110077081.1A 2011-03-29 2011-03-29 File protection method and system based on file allocation table (FAT) file system, and memory Active CN102541969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110077081.1A CN102541969B (en) 2011-03-29 2011-03-29 File protection method and system based on file allocation table (FAT) file system, and memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110077081.1A CN102541969B (en) 2011-03-29 2011-03-29 File protection method and system based on file allocation table (FAT) file system, and memory

Publications (2)

Publication Number Publication Date
CN102541969A true CN102541969A (en) 2012-07-04
CN102541969B CN102541969B (en) 2015-04-29

Family

ID=46348883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110077081.1A Active CN102541969B (en) 2011-03-29 2011-03-29 File protection method and system based on file allocation table (FAT) file system, and memory

Country Status (1)

Country Link
CN (1) CN102541969B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198850A (en) * 2013-03-20 2013-07-10 广东欧珀移动通信有限公司 Method and device of intelligent formatting of internal hard disk of Android equipment
CN103678026A (en) * 2012-09-18 2014-03-26 杭州海康威视系统技术有限公司 Storing and repairing method and storing and repairing device for repairable video monitoring data
CN103677875A (en) * 2012-09-11 2014-03-26 联想(北京)有限公司 Method for starting electronic equipment, method for controlling permission and electronic equipment
CN105279094A (en) * 2014-06-09 2016-01-27 中兴通讯股份有限公司 NAND Flash operation processing method, NAND Flash operation processing device and logic device
CN106598481A (en) * 2016-10-13 2017-04-26 武汉长江通信智联技术有限公司 Protection method for vehicle-mounted pre-allocated FAT32 video file system
CN110286859A (en) * 2019-06-28 2019-09-27 中国海洋大学 Date storage method and device based on FAT file system
CN114327292A (en) * 2021-12-31 2022-04-12 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1142080A (en) * 1995-02-17 1997-02-05 罗建平 Method for solidifying hard-disc document of computer
EP1811407A2 (en) * 2006-01-11 2007-07-25 Samsung Electronics Co., Ltd. Apparatus and method of managing hidden area
CN101246534A (en) * 2008-01-29 2008-08-20 北京理工大学 U disk with autorun virus immunity
CN101477469A (en) * 2009-02-06 2009-07-08 杭州华三通信技术有限公司 Reliable reading method, writing method and apparatus for starting code
CN101763426A (en) * 2010-01-08 2010-06-30 浙江大学 Method and device for realizing reliability of file allocation table file system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1142080A (en) * 1995-02-17 1997-02-05 罗建平 Method for solidifying hard-disc document of computer
EP1811407A2 (en) * 2006-01-11 2007-07-25 Samsung Electronics Co., Ltd. Apparatus and method of managing hidden area
CN101246534A (en) * 2008-01-29 2008-08-20 北京理工大学 U disk with autorun virus immunity
CN101477469A (en) * 2009-02-06 2009-07-08 杭州华三通信技术有限公司 Reliable reading method, writing method and apparatus for starting code
CN101763426A (en) * 2010-01-08 2010-06-30 浙江大学 Method and device for realizing reliability of file allocation table file system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677875A (en) * 2012-09-11 2014-03-26 联想(北京)有限公司 Method for starting electronic equipment, method for controlling permission and electronic equipment
CN103678026A (en) * 2012-09-18 2014-03-26 杭州海康威视系统技术有限公司 Storing and repairing method and storing and repairing device for repairable video monitoring data
CN103678026B (en) * 2012-09-18 2017-05-10 杭州海康威视系统技术有限公司 Storing and repairing method and storing and repairing device for repairable video monitoring data
CN103198850A (en) * 2013-03-20 2013-07-10 广东欧珀移动通信有限公司 Method and device of intelligent formatting of internal hard disk of Android equipment
CN105279094A (en) * 2014-06-09 2016-01-27 中兴通讯股份有限公司 NAND Flash operation processing method, NAND Flash operation processing device and logic device
CN106598481A (en) * 2016-10-13 2017-04-26 武汉长江通信智联技术有限公司 Protection method for vehicle-mounted pre-allocated FAT32 video file system
CN106598481B (en) * 2016-10-13 2019-06-14 武汉长江通信智联技术有限公司 A kind of guard method of vehicle-mounted predistribution FAT32 video file system
CN110286859A (en) * 2019-06-28 2019-09-27 中国海洋大学 Date storage method and device based on FAT file system
CN114327292A (en) * 2021-12-31 2022-04-12 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium
CN114327292B (en) * 2021-12-31 2024-02-02 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium

Also Published As

Publication number Publication date
CN102541969B (en) 2015-04-29

Similar Documents

Publication Publication Date Title
US11636032B2 (en) Memory system, data storage device, user device and data management method thereof
CN102541969B (en) File protection method and system based on file allocation table (FAT) file system, and memory
CN101484882B (en) Method for flash-memory management
US8230160B2 (en) Flash memory storage system and flash memory controller and data processing method thereof
KR100987241B1 (en) Memory Device and Recording/Reproducing Apparatus Using the Same
US9563375B2 (en) Method for storing metadata of log-structured file system for flash memory
CN100458699C (en) Method and system for updating fastener
CN101983376B (en) Access device, information recording device, information recording system, file management method, and program
US20080195833A1 (en) Systems, methods and computer program products for operating a data processing system in which a file system's unit of memory allocation is coordinated with a storage system's read/write operation unit
CN106919454B (en) Memory pool problem positioning method and system based on LTE protocol stack
EP1771862B1 (en) Method and device to improve usb flash write performance
US11640244B2 (en) Intelligent block deallocation verification
CN108664482B (en) FLASH memory and storage file management method
US20090112951A1 (en) Apparatus and method of managing files and memory device
KR100954603B1 (en) A log file of file system and method for recovering file system
CN102103597A (en) DSP (digital signal processor) embedded FLASH file storage system
KR100977709B1 (en) A flash memory storage device and a manage method using the same
US20220365677A1 (en) Storage management device, storage management method, and program
JP2015523633A (en) How to delete information
CN102622301A (en) Method and system for reading and updating flash-memory files
KR20140094706A (en) Fat file system and log data storage method of the same
KR101544094B1 (en) Method for managing data in computer memory and system thereof
CN107749307B (en) Rewriting method, device, equipment and storage medium for storage system in failure of writing disk
JP2007018528A (en) Memory device, file management method, and recording and reproducing device
CN116382785A (en) Method and device for data processing, computing equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20171123

Address after: 528400 Zhongshan Zhongshan Torch Development Zone, Guangdong Province, No. 191, No. seven

Patentee after: ZHONGSHAN JIANGBOLONG ELECTRONICS CO., LTD.

Address before: 518000, Guangdong, Nanshan District Province, Shenzhen Road, No. 8 financial services technology innovation base, 8 floor, A, B, C, D, E,, F1

Patentee before: Shenzhen jiangbolong Electronic Co., Ltd.

TR01 Transfer of patent right