Recording device with intelligent FAT table restore funcitons
Technical field
The utility model relates to a kind of recording pen, relate in particular to a kind of can intelligence restoration FAT the recording device of table.
Background technology
FAT (file allocation table, FAT) table is the file system that designs for FLASH and simple bibliographic structure, therefore, the file system organization of portable electronic device is also finished by simple file allocation table.
The FAT table generally is placed in the boot sector back of disk; In the file allocation table back is root folder, has wherein comprised the inlet of All Files and file under the partition root catalogue.After the root folder is other file and file, depositing of file or folder do not have any rule, each file takies 1 to a plurality of bunches fully, if certain bunch is not last bunch of this document, then should comprise next bunch positional information, otherwise have the sign (OxFFFF) of ending cluster.The title of file and starting cluster then are recorded in the file allocation table of front, find starting cluster by the position of certain file starting cluster in this table, and all the other of file bunch then are to form a chain belt according to this.FAT relies on this chain type access and file allocation table to manage the whole magnetic disk subregion.
The wrong situation of FAT table read-write when for example recording pen power down occurs in the sound recording process, takes place through regular meeting and takes place in recording device.FAT shows to damage, and recording device just can't find the file in the storage medium, and this is unsafe to the user.
Recording device under the prior art, in a single day its FAT table is damaged, and the user can't find file destination after recording device is started shooting, and the recording electronic installation equals to be scrapped.
Therefore, there is defective in prior art, needs further improvement and develops.
The utility model content
The purpose of this utility model is to provide a kind of recording device with intelligent FAT table restore funcitons, and the FAT table of recording device can be recovered automatically, increases the security performance of recording device.
The technical solution of the utility model is as follows:
Have the recording device of intelligent FAT table restore funcitons, comprise the storage unit that is connected on the microcontroller, described storage unit comprises the FAT table module of include file folder title, file name and file name starting cluster corresponding relation, wherein,
Described storage unit also comprises backup FAT table module, and in the described recording device course of normal operation, the content synchronization in described backup FAT table module and the described FAT table module is upgraded;
Described storage unit also comprises the recovery module, described recovery module is under the control of described microcontroller, described backup FAT table module is revised as content in the described FAT table module, perhaps is the content in the described backup FAT table module with the content modification in the described FAT table module.
Described recording device, wherein, described storage unit also comprises FAT table read module.
Described recording device, wherein, described microcontroller comprises the 2nd FAT table reading unit, also comprises the bootstrap module that reads described FAT table read module and the content replication of described FAT table is arrived described the 2nd FAT table reading unit.
Described recording device, wherein, described the 2nd FAT table reading unit is connected with described FAT table unit or FAT table backup units, is used to judge whether described FAT table or FAT table backup units be normal.
Described recording device, wherein, described microcontroller is connected with described recovery module, and when described FAT table or FAT table backup units were unusual, the described recovery module of described microprocessor controls started.
Described recording device, wherein, described recording device also comprises the start button that is connected on the microcontroller.
Described recording device, wherein, described recording device is a recording pen.
Described recording device, wherein, the medium of described storage unit is FLASH.
Compared with prior art, the utility model provides a kind of recording device with intelligent FAT table restore funcitons, backup FAT table unit is set in storage unit and recovers module, when the FAT table unit is unusual, can be by the unusual FAT table unit of backup FAT table unit reparation, improve the security performance of recording device, prolonged the serviceable life of recording device.
Description of drawings
Fig. 1 is the structural representation that the utlity model has intelligent FAT table restore funcitons recording device.
Embodiment
Below in conjunction with accompanying drawing, preferred embodiment of the present utility model is described in further detail.
The recording device 100 with intelligent FAT table restore funcitons that the utility model provides as shown in Figure 1, comprises the storage unit 120 that is connected on the microcontroller 110, and described storage unit 120 is used to store the audio file of recording; Described storage unit 120 comprises the FAT table module 121 of include file folder title, file name and file name starting cluster corresponding relation.
Storage unit 120 described in the utility model also comprises backup FAT table module 122.Described recording device 100 is in the read-write process, described microcontroller 110 writes described backup FAT with the information of relevant bunch of the Folder Name, file name and the file name that change earlier and shows module 122, again the information of relevant with it bunch of the file of described change and/or file name is write FAT afterwards and shows module 121; Just upgrade described backup FAT table module 122 earlier, upgrade described FAT table module 121 again.The content synchronization of the variation in described FAT table module 121 of described microcontroller 110 controls and the described backup FAT table module 122 is upgraded.
Described storage unit 120 also comprises recovers module 123 and FAT table read module 124, described recovery module 123 can be under the control of described microcontroller 110, back up the content replication in the FAT table module 122 and cover described FAT table module 121 described, making the content modification in the described FAT table module 121 is that described backup FAT shows the content in the module.
Described recording device 100 also comprises the start button 130 that is connected on the described microcontroller 110, and after start button 130 was opened, the bootstrap module 111 in the described microcontroller 110 started.Described bootstrap module 111 is with the content in the described FAT table read module 124, and the 2nd FAT that the content that reads is write in the described microcontroller 110 shows read module 112.
FAT table in described FAT table module 121 and the backup FAT table module 122 damages and occurs in mostly under the situation of described recording device 100 power down.When recording device 100 power down, described FAT table module 121 is writing data, and the damage of described FAT table module 121 will take place; Described backup FAT table module 122 is writing data, and the damage of described backup FAT table module 122 will take place.Device 100 is provided with two FAT table modules in the recording of the present utility model, has guaranteed the normal of at least one FAT table, has increased the security of described recording device 100.
Described the 2nd FAT table read module 112 reads described FAT table module 121, judges whether described FAT table module 121 is normal.
If the result that described the 2nd FAT mark read module 112 is judged is that described FAT table module 121 is normal, described microcontroller 110 can continue to operate the utility model recording device 100 recording, duplicate, function such as deletion.Correct in described FAT table module 121, described backup FAT table module 122 is damaged, described microcontroller 110 can demonstrate information on the display unit of described recording device 110, the user need be connected recording device 100 with exterior PC, the described standby FAT table 122 of repaired by hand repeats no more here.
If the result that described the 2nd FAT mark read module 112 is judged is that described FAT table module 121 is unusual, described microcontroller 110 or the 2nd FAT table read module 112 start described recovery module 123; Described recovery module 123 is with the content replication in the described backup FAT table module 122 and cover described FAT table module 121, makes the content reparation in the described FAT table module 121 be the normal content before damaging.
After described recovery module 123 was shown FAT content in the module 121 and automatically recovered, described the 2nd FAT mark read module 112 read FAT table module 121 once more, judges whether described FAT table 121 is normal.
After described recovery module 123 is shown FAT content in the module 121 and is automatically recovered, described microcontroller 110 can be controlled described recording device 110 and shut down automatically, after the user used described start button 130 to start shooting once more, described recording device 100 can normal recording, deletion or read-write.
The utlity model has the recording device of intelligent FAT table restore funcitons, can be recording pen, be with other electronic installations of sound-recording function etc., the storage medium of described storage unit can be FLASH.Described recording device, in storage unit, be provided with backup FAT table unit, when the FAT table unit was damaged, described microcontroller can be controlled described recovery module utilization backup FAT table unit automatically and repair described FAT table unit, guarantees normal operation, work after described recording device is started shooting.The utility model adopts the FAT table unit of backup, has strengthened the recording device security performance, has prolonged the serviceable life of recording device, and the rejuvenation of FAT table do not need the user to operate, and executable operations is easy to use voluntarily.
Should be understood that above-mentioned statement at the utility model preferred embodiment is comparatively detailed, can not therefore think the restriction to the utility model scope of patent protection, scope of patent protection of the present utility model should be as the criterion with claims.