CN106024046B - Date storage method and device - Google Patents

Date storage method and device Download PDF

Info

Publication number
CN106024046B
CN106024046B CN201610353258.9A CN201610353258A CN106024046B CN 106024046 B CN106024046 B CN 106024046B CN 201610353258 A CN201610353258 A CN 201610353258A CN 106024046 B CN106024046 B CN 106024046B
Authority
CN
China
Prior art keywords
file
cluster number
data
data file
storage device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610353258.9A
Other languages
Chinese (zh)
Other versions
CN106024046A (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.)
SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd
Original Assignee
SHENZHEN SILICONGO SEMICONDUCTOR 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 SILICONGO SEMICONDUCTOR CO Ltd filed Critical SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd
Priority to CN201610353258.9A priority Critical patent/CN106024046B/en
Publication of CN106024046A publication Critical patent/CN106024046A/en
Application granted granted Critical
Publication of CN106024046B publication Critical patent/CN106024046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/10Input/output [I/O] data interface arrangements, e.g. I/O data control circuits, I/O data buffers
    • G11C7/1006Data managing, e.g. manipulating data before writing or reading out, data bus switches or control circuits therefor

Abstract

The invention discloses a kind of date storage method, when the date storage method includes: the modification instruction that movable storage device detects data file, determine that the modification instructs corresponding data file;Determine cluster number of the data file in preset file directory table;When cluster number of the data file in the file directory table is more forward than current markers cluster number, the modification is forbidden to instruct corresponding modification operation, wherein, the current markers cluster number is determined when the movable storage device is powered on according to the maximum critical point of the effectively cluster number of the maximum before powering on.Invention also discloses a kind of data storage device.The present invention improves the safety of data storage.

Description

Date storage method and device
Technical field
The present invention relates to field of data storage more particularly to a kind of date storage methods and device.
Background technique
With the development of science and technology, the requirement in field of data storage to data storage is also higher and higher, at present logarithm According to storage, typically by movable storage device for example USB flash disk, terminal hard disk or cloud cloud disk etc. carry out data storage.Mesh After storing data, user can modify to the data stored in USB flash disk preceding common USB flash disk on the market after the power-up, cause non- Method user can modify to the data in USB flash disk after taking USB flash disk by illegal means, lower to the safety of data storage.
Summary of the invention
It is a primary object of the present invention to propose a kind of date storage method and device, it is intended to solve traditional data storage Mode, the lower technical problem of safety.
To achieve the above object, a kind of date storage method provided by the invention, the date storage method include:
When movable storage device detects the modification instruction of data file, determine that the modification instructs corresponding data text Part;
Determine cluster number of the data file in preset file directory table;
When cluster number of the data file in the file directory table is more forward than current markers cluster number, forbid described repair Change the corresponding modification of instruction to operate, wherein the current markers cluster number when the movable storage device is powered on according to powering on before Maximum effectively cluster number maximum critical point determine.
Preferably, when the movable storage device detects the modification instruction of data file, the modification instruction pair is determined Before the step of data file answered, the date storage method further include:
When the movable storage device powers on, scanning the maximum recorded in the file directory table by flash translation layer (FTL) has Imitate cluster number;
Using the maximum critical point of the maximum effectively cluster number as current markers cluster number.
Preferably, described when cluster number of the data file in the file directory table is more forward than current markers cluster number When, after the step of forbidding the modification that corresponding modification is instructed to operate, the date storage method further include:
When the movable storage device detects the write instruction of data file, institute is written in preset file allocation table Data file is stated, and records the identification information and data file occupancy of the data file in the file directory table Cluster number;
If detecting cut-offing instruction, the data file is stored.
Preferably, the movable storage device is written in preset file allocation table after the data file, by institute File allocation table is stated to make a backup store.
Preferably, it is described after the determination data file is the cluster number in preset file directory table the step of Date storage method further include:
When cluster number of the data file in the file directory table rearward than current markers cluster number when, repaired according to described Change instruction to modify to the data file.
In addition, to achieve the above object, the present invention also proposes a kind of data storage device, the data storage device packet It includes:
First determining module when for detecting that the modification of data file instructs, determines that the modification instructs corresponding number According to file;
Second determining module, for determining cluster number of the data file in preset file directory table;
Disabled module, it is more forward than current markers cluster number for working as cluster number of the data file in the file directory table When, forbid the modification to instruct corresponding modification operation, wherein the current markers cluster number is powered in the movable storage device When according to before powering on maximum effectively cluster number maximum critical point determine.
Preferably, the data storage device further include:
Scan module when powering on for the movable storage device, scans the file directory table by flash translation layer (FTL) The effective cluster number of maximum of middle record;
First processing module, for using the maximum critical point of the maximum effectively cluster number as current markers cluster number.
Preferably, the data storage device further include:
Second processing module when being also used to detect the write instruction of data file, is write in preset file allocation table Enter the data file, and record in the file directory table data file identification information and the data file The cluster number of occupancy;
Memory module, if storing the data file for detecting cut-offing instruction.
Preferably, the memory module is also used to be written after the data file in preset file allocation table, will The file allocation table makes a backup store.
Preferably, the data storage device further include:
Modified module, for working as cluster number of the data file in the file directory table rearward than current markers cluster number When, it is modified according to modification instruction to the data file.
Date storage method and device proposed by the present invention, movable storage device detect the modification instruction of data file When, it first determines that the modification instructs corresponding data file, then determines the data file in preset file directory table Cluster number forbid described if cluster number of the data file in the file directory table is more forward than current markers cluster number Modification instructs corresponding modification to operate, wherein the current markers cluster number is when the movable storage device is powered on according to powering on The maximum critical point of preceding maximum effectively cluster number determines, realizes after the movable storage device re-powers, before powering on Data with regard to persistence, be not modified, rather than as traditional movable storage device can modify data at any time, to protect The safety of data storage is demonstrate,proved.
Detailed description of the invention
Fig. 1 is the flow diagram of date storage method first embodiment of the present invention;
Fig. 2 is the flow diagram of date storage method second embodiment of the present invention;
Fig. 3 is the flow diagram of date storage method 3rd embodiment of the present invention;
Fig. 4 is the functional block diagram of data storage device first embodiment of the present invention;
Fig. 5 is the functional block diagram of data storage device second embodiment of the present invention;
Fig. 6 is the functional block diagram of data storage device 3rd embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of date storage method.
Referring to Fig.1, Fig. 1 is the flow diagram of date storage method first embodiment of the present invention.
The present embodiment proposes that a kind of date storage method, the date storage method include:
Step S10 when movable storage device detects the modification instruction of data file, determines that the modification instruction is corresponding Data file;
In the present embodiment, before the step S10, the date storage method is further comprised the steps of:
When the movable storage device powers on, scanning the maximum recorded in the file directory table by flash translation layer (FTL) has Imitate cluster number;
Using the maximum critical point of the maximum effectively cluster number as current markers cluster number.
Firstly, movable storage device is equipped with FAT (File Allocation Table, file configuration table) file system System, and the FAT file system includes each area, such as MBR (Main Boot Record, master boot record area) area, DBR (Dos Boot Record, dos boot record area) area, the area FDT (File Directory Table, file directory Table), (File Allocation Table, the file allocation table) area FAT and DADT (user data area) area etc., and FDT table In, logical start address can be production tool initialization, and also area calculates and learns in the area Ke Cong MBR and DBR, and described The major function of FDT table is to record the information of all data files in the movable storage device (including filename, file are big It is small, the information such as file address, file date).And known before powering on by scanning the FDT table, data file is assigned to described In which position of FDT table, wherein the information of each data file has defined format in the FDT table, passes through phase obstruction and rejection Whether formula scans with the presence of file, and specific format is not described in detail here, also, the FTL in the movable storage device (Flash translation layer, flash translation layer (FTL)) module is used to record the position letter of this last valid data file The location information of breath, the last effective data file actually refers to the maximum data file of cluster number in the FDT table Cluster number, i.e., maximum effective cluster number.In the present embodiment, the FAT table is for storing each data file, each data file It is successively to store the FAT table sequentially in time, also, due to the pipe of the FAT table in the FAT file system Reason unit is cluster, and the dividing unit of each cluster is 2nA byte, wherein 2≤n≤9, therefore it is each in the FAT table Corresponding minimum 4 bytes of byte of a cluster successively can be 8 bytes, 16 bytes, and maximum byte is 512 bytes, It therefore, is successively to store the byte number that each data file occupies when successively storing each data file in the FAT table To the FAT table, in the present embodiment, each of FAT table cluster can be all divided into 4 bytes, even if there are data literary Less than 4 bytes of the capability value of part, it is also desirable to a byte is occupied, if the capability value for having data file is 4.1 bytes, then The data file needs to occupy two bytes at this time, and after each byte divides, cluster number is also determination, therefore, is being incited somebody to action When each data file is written in the FAT table, that is, it can determine the cluster number of each data file, it should be appreciated that this programme In the corresponding cluster number of each data file be substantially cluster number section.
Therefore, in the present embodiment, when the storage of each data file is to the movable storage device, the movable storage device It can record the cluster number of each data file, when the subsequent movable storage device powers on, first pass through flash translation layer (FTL) FTL module Scan the effective cluster number of maximum recorded in the file directory table, then using the maximum critical point of the maximum effectively cluster number as Current markers cluster number.
In the present embodiment, the movable storage device detect data file modification instruction when, first determine described in repair Change the corresponding data file of instruction.
Step S20 determines cluster number of the data file in preset file directory table;
After determining that the modification instructs corresponding data file, determine the data file in preset file directory Cluster number in table.
Step S30 prohibits when cluster number of the data file in the file directory table is more forward than current markers cluster number Only the modification instructs corresponding modification operation, wherein current markers cluster number root when the movable storage device powers on It is determined according to the maximum critical point of the effectively cluster number of the maximum before powering on.
The data file is being determined after the cluster number in the file directory table, by the data file in the text Cluster number in part catalogue listing is compared with current markers cluster number, since the current markers cluster number is the movable storage device When powering on, the effective cluster number of maximum that flash translation layer (FTL) scans in the file directory table, and according to maximum effectively cluster number What maximum critical point determined, therefore, when cluster number of the data file in the file directory table is leaned on than current markers cluster number When preceding, illustrating the time of the data file earlier than the current markers cluster number, i.e., the described data file is legacy data, because This, forbids the modification to instruct corresponding modification operation.
The date storage method that the present embodiment proposes, when movable storage device detects the modification instruction of data file, first It determines that the modification instructs corresponding data file, then determines cluster of the data file in preset file directory table Number, if cluster number of the data file in the file directory table is more forward than current markers cluster number, forbid the modification Instruct corresponding modification to operate, wherein the current markers cluster number when the movable storage device is powered on according to powering on before The maximum critical point of maximum effectively cluster number determines, realizes after the movable storage device re-powers, the number before powering on According to regard to persistence, it is not modified, rather than as traditional movable storage device can modify data at any time, to ensure that The safety of data storage.Further, tradition is not modified in order to protect data, stores number using enciphered mobile storage apparatus According to, since movable storage device uses some complicated encryption technologies, so that cost improves, and in the present embodiment, without using Enciphered mobile storage apparatus storing data can also reduce the cost of data storage.
Further, in order to improve the flexibility that data store, data storage side of the present invention is proposed based on first embodiment The second embodiment of method, in the present embodiment, after reference Fig. 2, the step S30, the date storage method further include:
Step S40, when the movable storage device detects the write instruction of data file, in preset file allocation table The middle write-in data file, and record in the file directory table data file identification information and the data The cluster number that file occupies;
In the present embodiment, when the movable storage device detects the write instruction of data file, first in the file The data content of the data file is written in allocation table, that is, FAT table, is then write in said write file directory table, that is, FDT table Enter the identification information of the data file, such as filename, and records the occupied cluster of the data file in the FDT table Number, the information such as the write time of the data file are finally updated in the FDT table.
Step S50 stores the data file if detecting cut-offing instruction.
Further, it after the step S50, further comprises the steps of: and is updated to the cluster number of the data file most Big effective cluster number.
It is understood that when movable storage device is written in data file, even if the cluster number for the data file being newly written Than the data file being written before cluster number rearward, but since the movable storage device does not power off, at this point, the number being newly written Can also be modified according to file, therefore, in the file directory table maximum effectively cluster number be still last time power-off before most Big effective cluster number, and be written at this after new data file, and when movable storage device power-off, it is just that this is new The cluster number of the data file of write-in is updated to the effective cluster number of maximum of the file directory table.
It is of course also possible to directly store the data file detecting cut-offing instruction.And when re-powering next time, The effective cluster number of maximum recorded in the file directory table is just scanned by the flash translation layer (FTL).
Further, the movable storage device is written in preset file allocation table after the data file, will The file allocation table makes a backup store.
In the present embodiment, the data file is written after the file allocation table in order to prevent, for some reason Loss of data occurs, therefore, the movable storage device is written in preset file allocation table after the data file, will The file allocation table makes a backup store, and when losing in order to data file, the data file of backup storage can be used.
In the present embodiment, after data file write-in, if if the movable storage device is not sent out and powered off at this time, The operation such as can modify to the data file file of write-in, delete, add, at this time the current mark in the FDT table Remember cluster number, is still generates according to powering on maximum cluster number in foregoing description FDT table, it will not be literary due to this new write-in data Part and change.And when the movable storage device detects cut-offing instruction, at this point, storing the data being written after this is powered on File, and by the cluster number of the data file of this write-in be updated to maximum effectively cluster number, it is worth noting that, if this Secondary to have multiple data files that the movable storage device is written, then the cluster number for the data file the last one in this being written is more New is maximum effective cluster number.
In the present embodiment, after powering on, the data file in movable storage device can be read, but cannot be repaired Change or deletes, and after the power-up, data file can newly be written in movable storage device, in the case where not power down, newly write The data file entered can be modified and be deleted, and after power down re-powers, the data being newly written before will be protected Come, cannot be modified and be deleted, in the present embodiment, front and back is powered on by the movable storage device, old number can be distinguished According to file and new data file, prevent the legacy data file of storage from being modified, to realize the protection to data file.
Further, in order to improve the flexibility that data store, data of the present invention are proposed based on first or second embodiments The 3rd embodiment of storage method, in the present embodiment, after reference Fig. 3, the step S20, the date storage method is also Include:
Step S60, when cluster number of the data file in the file directory table rearward than current markers cluster number when, root It modifies according to modification instruction to the data file.
In the present embodiment, the cluster number when the data file in the file directory table is rearward than current markers cluster number When, illustrate that the data file currently read is the data file being newly written after this is powered on, it therefore, can be to the data text Part is modified, and after being equivalent to write-in new data file, wants to modify data before power down (moving disk), or deleting data all is to allow , without that can not be modified once write-in data preservation, to improve the flexibility of data storage.
The present invention further provides a kind of data storage devices.
It is the functional block diagram of data storage device first embodiment of the present invention referring to Fig. 4, Fig. 4.
It is emphasized that it will be apparent to those skilled in the art that functional block diagram shown in Fig. 4 is only one preferably real The exemplary diagram of example is applied, those skilled in the art surrounds the functional module of data storage device shown in Fig. 4, can carry out easily new Functional module supplement;The title of each functional module is self-defined title, is only used for auxiliary and understands the data storage device Each program function block is not used in restriction technical solution of the present invention, and the core of technical solution of the present invention is each self-defined title The function to be reached of functional module.
The present embodiment proposes that a kind of data storage device, the data storage device include:
First determining module 10 when for detecting that the modification of data file instructs, determines that the modification instruction is corresponding Data file;
Second determining module 20, for determining cluster number of the data file in preset file directory table;
Disabled module 30, for being leaned on when cluster number of the data file in the file directory table than current markers cluster number When preceding, the modification is forbidden to instruct corresponding modification operation, wherein the current markers cluster number is on the movable storage device It is determined when electric according to the maximum critical point of the effectively cluster number of the maximum before powering on.
In the present embodiment, the generation of the current markers cluster number has presetting module generation, and the presetting module includes sweeping Retouch module and first processing module;
The scan module when powering on for the movable storage device, scans the file mesh by flash translation layer (FTL) The effective cluster number of maximum recorded in record table;
The first processing module, for using the maximum critical point of the maximum effectively cluster number as current markers cluster number.
Firstly, movable storage device is equipped with FAT (File Allocation Table, file configuration table) file system System, and the FAT file system includes each area, such as MBR (Main Boot Record, master boot record area) area, DBR (Dos Boot Record, dos boot record area) area, the area FDT (File Directory Table, file directory Table), (File Allocation Table, the file allocation table) area FAT and DADT (user data area) area etc., and FDT table In, logical start address can be production tool initialization, and also area calculates and learns in the area Ke Cong MBR and DBR, and described The major function of FDT table is to record the information of all data files in the movable storage device (including filename, file are big It is small, the information such as file address, file date).And known before powering on by scanning the FDT table, data file is assigned to described In which position of FDT table, wherein the information of each data file has defined format in the FDT table, passes through phase obstruction and rejection Whether formula scans with the presence of file, and specific format is not described in detail here, also, the FTL in the movable storage device (Flash translation layer, flash translation layer (FTL)) module is used to record the position letter of this last valid data file The location information of breath, the last effective data file actually refers to the maximum data file of cluster number in the FDT table Cluster number, i.e., maximum effective cluster number.In the present embodiment, the FAT table is for storing each data file, each data file It is successively to store the FAT table sequentially in time, also, due to the pipe of the FAT table in the FAT file system Reason unit is cluster, and the dividing unit of each cluster is 2nA byte, wherein 2≤n≤9, therefore it is each in the FAT table Corresponding minimum 4 bytes of byte of a cluster successively can be 8 bytes, 16 bytes, and maximum byte is 5124 bytes, It therefore, is successively to store the byte number that each data file occupies when successively storing each data file in the FAT table To the FAT table, in the present embodiment, each of FAT table cluster can be all divided into 4 bytes, even if there are data literary Less than 4 bytes of the capability value of part, it is also desirable to a byte is occupied, if the capability value for having data file is 4.1 bytes, then The data file needs to occupy two bytes at this time, and after each byte divides, cluster number is also determination, therefore, is being incited somebody to action When each data file is written in the FAT table, that is, it can determine the cluster number of each data file, it should be appreciated that this programme In the corresponding cluster number of each data file be substantially cluster number section.
Therefore, in the present embodiment, when the storage of each data file is to the movable storage device, that is, each data be can record The cluster number of file, when the subsequent movable storage device powers on, the scan module first passes through flash translation layer (FTL) FTL module scans The effective cluster number of maximum recorded in the file directory table, then the first processing module by the maximum effectively cluster number most Big critical point is as current markers cluster number.
In the present embodiment, first determining module 10 detect data file modification instruction when, first determine described in Modification instructs corresponding data file.
After first determining module 10 determines that the modification instructs corresponding data file, described second determines mould Block 20 determines cluster number of the data file in preset file directory table.
The data file is determined after the cluster number in the file directory table in second determining module 20, by institute It states cluster number of the data file in the file directory table to be compared with current markers cluster number, due to the current markers cluster number When being that the movable storage device powers on, the effective cluster number of maximum that flash translation layer (FTL) scans in the file directory table, and It is determined according to the maximum critical point of maximum effectively cluster number.Therefore, the cluster when the data file in the file directory table When number more forward than current markers cluster number, illustrate the time of the data file earlier than the current markers cluster number, i.e., it is described Data file is legacy data, and therefore, the disabled module 30 forbids the modification to instruct corresponding modification operation.
The data storage device that the present embodiment proposes, when movable storage device detects the modification instruction of data file, first It determines that the modification instructs corresponding data file, then determines cluster of the data file in preset file directory table Number, if cluster number of the data file in the file directory table is more forward than current markers cluster number, forbid the modification Instruct corresponding modification to operate, wherein the current markers cluster number when the movable storage device is powered on according to powering on before The maximum critical point of maximum effectively cluster number determines, realizes after the movable storage device re-powers, the number before powering on According to regard to persistence, it is not modified, rather than as traditional movable storage device can modify data at any time, to ensure that The safety of data storage.Further, tradition is not modified in order to protect data, stores number using enciphered mobile storage apparatus According to, since movable storage device uses some complicated encryption technologies, so that cost improves, and in the present embodiment, without using Enciphered mobile storage apparatus storing data can also reduce the cost of data storage.
Further, in order to improve the flexibility that data store, data storage dress of the present invention is proposed based on first embodiment The second embodiment set, in the present embodiment, referring to Fig. 5, the data storage device further include:
Second processing module 40 when for detecting the write instruction of data file, is write in preset file allocation table Enter the data file, and record in the file directory table data file identification information and the data file The cluster number of occupancy;
In the present embodiment, when the Second processing module 40 detects the write instruction of data file, first in the text The data content of the data file is written in part allocation table, that is, FAT table, then in said write file directory table, that is, FDT table The identification information of the data file, such as filename is written, and records the occupied cluster of the data file in the FDT table Number, the information such as the write time of the data file are finally updated in the FDT table.
Memory module 50, if storing the data file for detecting cut-offing instruction.
Further, the data storage device includes update module, for by the cluster number of the data file more New is maximum effective cluster number.
It is understood that when movable storage device is written in data file, even if the cluster number for the data file being newly written Than the data file being written before cluster number rearward, but since the movable storage device does not power off, at this point, the number being newly written Can also be modified according to file, therefore, in the file directory table maximum effectively cluster number be still last time power-off before most Big effective cluster number, and be written at this after new data file, and when movable storage device power-off, the update mould The cluster number of the data file of this new write-in is just updated to the effective cluster number of maximum of the file directory table by block.
It is of course also possible to which detecting cut-offing instruction, the memory module 50 directly stores the data file.And under It is secondary when re-powering, the maximum recorded in the file directory table is just scanned by the flash translation layer (FTL) by the scan module Effective cluster number.
In the present embodiment, after data file write-in, if if the movable storage device is not sent out and powered off at this time, The operation such as can modify to the data file file of write-in, delete, add, at this time the current mark in the FDT table Remember cluster number, is still generates according to powering on maximum cluster number in foregoing description FDT table, it will not be literary due to this new write-in data Part and change.And when the movable storage device detects cut-offing instruction, it is powered at this point, the memory module 50 stores this The data file being written later, and the cluster number of the data file of this write-in is updated to maximum effectively cluster number, value It is noted that if this has multiple data files to be written the movable storage device, the update module by this most The cluster number of the data file of the latter write-in is updated to maximum effective cluster number.
Further, the memory module 50, be also used to be written in preset file allocation table the data file it Afterwards, the file allocation table is made a backup store.
In the present embodiment, the data file is written after the file allocation table in order to prevent, for some reason Loss of data occurs, therefore, the memory module 50 is written in preset file allocation table after the data file, by institute It states file allocation table to make a backup store, when losing in order to data file, the data file of backup storage can be used.
In the present embodiment, after powering on, the data file in movable storage device can be read, but cannot be repaired Change or deletes, and after the power-up, data file can newly be written in movable storage device, in the case where not power down, newly write The data file entered can be modified and be deleted, and after power down re-powers, the data being newly written before will be protected Come, cannot be modified and be deleted, in the present embodiment, front and back is powered on by the movable storage device, old number can be distinguished According to file and new data file, prevent the legacy data file of storage from being modified, to realize the protection to data file.
Further, in order to improve the flexibility that data store, data of the present invention are proposed based on first or second embodiments The 3rd embodiment of storage device, in the present embodiment, referring to Fig. 6, the data storage device further include:
Modified module 60, for being leaned on when cluster number of the data file in the file directory table than current markers cluster number When afterwards, modified according to modification instruction to the data file.
In the present embodiment, the cluster number when the data file in the file directory table is rearward than current markers cluster number When, illustrate that the data file currently read is the data file being newly written after this is powered on, therefore, the modified module 60 can To modify to the data file, after being equivalent to write-in new data file, want to modify data before power down (moving disk), or delete Except data are all allowed, without that can not be modified once write-in data preservation, to improve the flexibility of data storage.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include the other elements being not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of date storage method, which is characterized in that the date storage method includes:
When movable storage device detects the modification instruction of data file, determine that the modification instructs corresponding data file;
Determine that cluster number of the data file in preset file directory table, the dividing unit of cluster are 2nA byte, 2≤n≤9;
When cluster number of the data file in the file directory table is more forward than the position of current markers cluster number, forbid described Modification instructs corresponding modification to operate, wherein the current markers cluster number is when the movable storage device is powered on according to powering on The maximum critical point of preceding maximum effectively cluster number determines that the maximum effectively cluster number is the maximum data of cluster number in file directory table The cluster number of file.
2. date storage method as described in claim 1, which is characterized in that the movable storage device detects data file Modification instruction when, before the step of determining modification instruction corresponding data file, the date storage method further include:
When the movable storage device powers on, the effective cluster of maximum recorded in the file directory table is scanned by flash translation layer (FTL) Number;
Using the maximum critical point of the maximum effectively cluster number as current markers cluster number.
3. date storage method as claimed in claim 2, which is characterized in that described when the data file is in the file mesh Record cluster number in table it is more forward than the position of current markers cluster number when, the step of forbidding the modification that corresponding modification is instructed to operate it Afterwards, the date storage method further include:
When the movable storage device detects the write instruction of data file, the number is written in preset file allocation table According to the data content of file, and record in the file directory table identification information and data text of the data file The cluster number that part occupies;
If detecting cut-offing instruction, the data file is stored.
4. date storage method as claimed in claim 3, which is characterized in that the movable storage device is in preset file point After the data content of the data file is written in table, the file allocation table is made a backup store.
5. date storage method according to any one of claims 1-4, which is characterized in that the determination data file exists After the step of cluster number in preset file directory table, the date storage method further include:
When cluster number of the data file in the file directory table than current markers cluster number position rearward when, according to described Modification instruction modifies to the data file.
6. a kind of data storage device, which is characterized in that the data storage device includes:
First determining module when for detecting that the modification of data file instructs, determines that the modification instructs corresponding data text Part, the dividing unit of cluster are 2nA byte, 2≤n≤9;
Second determining module, for determining cluster number of the data file in preset file directory table;
Disabled module, for being leaned on when cluster number of the data file in the file directory table than the position of current markers cluster number When preceding, the modification is forbidden to instruct corresponding modification operation, wherein the current markers cluster number is when movable storage device powers on It is determined according to the maximum critical point of the effectively cluster number of the maximum before powering on, the maximum effectively cluster number is that cluster number is most in file directory table The cluster number of big data file.
7. data storage device as claimed in claim 6, which is characterized in that the data storage device further include:
Scan module when powering on for the movable storage device, is scanned in the file directory table by flash translation layer (FTL) and is remembered The effective cluster number of maximum of record;
First processing module, for using the maximum critical point of the maximum effectively cluster number as current markers cluster number.
8. data storage device as claimed in claim 7, which is characterized in that the data storage device further include:
Second processing module, when for detecting the write instruction of data file, in preset file allocation table described in write-in The data content of data file, and record in the file directory table data file identification information and the data The cluster number that file occupies;
Memory module, if storing the data file for detecting cut-offing instruction.
9. data storage device as claimed in claim 8, which is characterized in that the memory module is also used in preset text It is written in part allocation table after the data content of the data file, the file allocation table is made a backup store.
10. data storage device as claim in any one of claims 6-9, which is characterized in that the data storage device also wraps It includes:
Modified module, for being leaned on when cluster number of the data file in the file directory table than the position of current markers cluster number When afterwards, modified according to modification instruction to the data file.
CN201610353258.9A 2016-05-24 2016-05-24 Date storage method and device Active CN106024046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610353258.9A CN106024046B (en) 2016-05-24 2016-05-24 Date storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610353258.9A CN106024046B (en) 2016-05-24 2016-05-24 Date storage method and device

Publications (2)

Publication Number Publication Date
CN106024046A CN106024046A (en) 2016-10-12
CN106024046B true CN106024046B (en) 2019-09-20

Family

ID=57093292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610353258.9A Active CN106024046B (en) 2016-05-24 2016-05-24 Date storage method and device

Country Status (1)

Country Link
CN (1) CN106024046B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112446061A (en) * 2020-11-18 2021-03-05 合肥致存微电子有限责任公司 Data undeletable method, mobile terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794261A (en) * 2009-11-24 2010-08-04 深圳市硅格半导体有限公司 Mapping table data recovery method and device
CN101853275A (en) * 2010-05-05 2010-10-06 北京中星微电子有限公司 Data management method of FAT file system and system
CN102054148A (en) * 2009-11-06 2011-05-11 深圳市研祥通讯终端技术有限公司 File protection module and system
CN102184368A (en) * 2011-06-13 2011-09-14 上海置水软件技术有限公司 Method for safely using mobile storage device
CN102243636A (en) * 2010-05-13 2011-11-16 深圳市朗科科技股份有限公司 Method and device for storing file information to be protected and protecting file
CN102622357A (en) * 2011-01-27 2012-08-01 赛酷特(北京)信息技术有限公司 Method for single write-in on basis of fat32 file system format

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003272389A (en) * 2002-03-20 2003-09-26 Sony Corp Data storage circuit, data write-in method in the data storage circuit, and data storage device
US7590807B2 (en) * 2003-11-03 2009-09-15 Netapp, Inc. System and method for record retention date in a write once read many storage system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102054148A (en) * 2009-11-06 2011-05-11 深圳市研祥通讯终端技术有限公司 File protection module and system
CN101794261A (en) * 2009-11-24 2010-08-04 深圳市硅格半导体有限公司 Mapping table data recovery method and device
CN101853275A (en) * 2010-05-05 2010-10-06 北京中星微电子有限公司 Data management method of FAT file system and system
CN102243636A (en) * 2010-05-13 2011-11-16 深圳市朗科科技股份有限公司 Method and device for storing file information to be protected and protecting file
CN102622357A (en) * 2011-01-27 2012-08-01 赛酷特(北京)信息技术有限公司 Method for single write-in on basis of fat32 file system format
CN102184368A (en) * 2011-06-13 2011-09-14 上海置水软件技术有限公司 Method for safely using mobile storage device

Also Published As

Publication number Publication date
CN106024046A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
KR101780891B1 (en) System and method of blocking ransomware based on white list and black list
CN104156414B (en) A kind of method for cleaning of garbage files, device and terminal
JP2003177947A5 (en)
EP2955633A1 (en) Data erasing method and device for flash memory
CN110674477A (en) Document source tracing method and device based on electronic file security identification
US20130132447A1 (en) Document management apparatus improved in efficiency of deletion of files, method of controlling the same, and storage medium
US20120204268A1 (en) Method and apparatus for protecting information based on data card
CN103942126B (en) Electronic equipment and its data back up method
CN101154173A (en) Method for policy-based data placement when restoring files from off-line storage
CN106155596A (en) Method for writing data and device
CN107391308A (en) Data processing method and device, terminal and computer-readable recording medium
CN102280134B (en) Method for improving data security in removable storage device
CN109496292A (en) A kind of disk management method, disk management device and electronic equipment
KR101181980B1 (en) Method for deleting data permanently with enhanced security
CN106547823A (en) Without drive crime scene investigation device data acquisition unit and method
CN106024046B (en) Date storage method and device
CN101409946A (en) Method capable of thoroughly deleting data of mobile phone memory card
CN106021027A (en) Terminal data processing method and system
CN107562898A (en) A kind of method that recycle bin is created based on KUX operating systems
CN107704337A (en) Method, mobile terminal and the device with store function of factory reset
CN101986662A (en) Widget instance operation method and system
CN110555314A (en) File data processing method and solid state disk
CN105657552A (en) Set top box upgrading method capable of reserving user configuration
CN108962321A (en) A kind of method and device for wiping storage chip
CN107169333A (en) File management method, mobile terminal and storage medium based on fingerprint

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Units 05-2 and 06-08, 6th floor, Changhong Science and Technology Building, 18 Science and Technology South 12 Road, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen SiliconGo Semiconductor Co., Ltd.

Address before: Units 05-2 and 06-08, 6th floor, Changhong Science and Technology Building, 18 Science and Technology South 12 Road, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SILICONGO MICROELECTRONICS CO., LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant