CN105446664B - A kind of pair of memory carries out file memory method and storage device - Google Patents

A kind of pair of memory carries out file memory method and storage device Download PDF

Info

Publication number
CN105446664B
CN105446664B CN201510876978.9A CN201510876978A CN105446664B CN 105446664 B CN105446664 B CN 105446664B CN 201510876978 A CN201510876978 A CN 201510876978A CN 105446664 B CN105446664 B CN 105446664B
Authority
CN
China
Prior art keywords
address
data
block
file
memory
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.)
Expired - Fee Related
Application number
CN201510876978.9A
Other languages
Chinese (zh)
Other versions
CN105446664A (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.)
Guowei Group Shenzhen Co ltd
Original Assignee
Shenzhen State Micro Technology 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 State Micro Technology Co Ltd filed Critical Shenzhen State Micro Technology Co Ltd
Priority to CN201510876978.9A priority Critical patent/CN105446664B/en
Publication of CN105446664A publication Critical patent/CN105446664A/en
Application granted granted Critical
Publication of CN105446664B publication Critical patent/CN105446664B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of pair of memories to carry out file memory method, and the file memory method includes the following steps:Memory is divided into two regions, one of region is storage configuration area, another region is storage data area;Storage data area is divided into two file areas, one of region is file data area, another region is exchange files area;Exchange files area is written to memory, and updates storage mapping table, wherein the memory map assignments are used to indicate the relationship of the logical address and physical address in the file data area and exchange files area;Judge whether file data successfully writes, if it does, the file data of write-in is updated to the file data area;Updated memory map assignments are saved into the storage configuration area.The file memory method may insure the integrality of file.

Description

A kind of pair of memory carries out file memory method and storage device
Technical field
The present invention relates to peace electronics fields more particularly to a kind of pair of memory to carry out file memory method and storage dress It sets.
Background technique
Current many electronic products can be increased by way of upgrading software package or the function of upgrading products Can, the demand for making product be able to satisfy client under the premise of not needing replacement product.
As the continuous renewal of product upgrades, the individual data stored in product is also increasing, to depositing in product The demand of reservoir is also increasing, on the one hand will increase the cost of product in this way, on the other hand due to the increasing of single data Add, what data updated crosses the probability that data update failure in kind will also increase therewith, since the data of update are largely programs Software, if updating failure, it would be possible to cause the serious consequence of damage of product.
Currently used memory technology, one is a kind of better simply modes, i.e., are storing all data to be updated On device distribute two sections of memory spaces, update when, this two sector addresses space-alternating use, may insure so entire file by After function is updated into storage equipment, then delete old data.This method can ensure that entire file is updated by correct to storage In equipment, but the demand that will cause in this way to memory is very big, increases the cost of product.
Another way, i.e., general file system, such as FAT32, JFFS2 etc., this kind of file system can be very good It solves the problems, such as memory space, but can only ensure the integrality of presently written monolithic data, cannot ensure the complete of entire file Whole property, if occurring exception in data writing process, for example unexpected power down, the then data for the file for needing to update may have one Portion be it is old, some is newly written, and causes entire data not and be complete, i.e., is new data entirely or is old number entirely According to.Although this method can save memory space, the cost of product is reduced, cannot ensure the integrality of entire file data, It will likely cause the serious consequence of damage of product.
Summary of the invention
The purpose of the present invention aims to solve at least one of above-mentioned technological deficiency, provides a kind of pair of memory and carries out file storage Method and storage device.
The present invention provides a kind of pair of memory and carries out file memory method, and the file memory method includes the following steps:
Memory is divided into two regions, one of region is storage configuration area, another region is storing data Area;
Storage data area is divided into two file areas, one of region is file data area, another region is Exchange files area;
Exchange files area is written to memory, and updates storage mapping table, wherein the memory map assignments are used to indicate institute State the relationship of the logical address and physical address in file data area and exchange files area;
Judge whether file data successfully writes, if it does, the file data of write-in is updated to the file data area;
Updated memory map assignments are saved into the storage configuration area.
Scheme from the above can be seen that all data one-time writes when file, and all data successes After write-in, then memory map assignments are deposited and are saved in memory map assignments memory block.Before data are not written successfully, old data Also always present in memory, what memory map assignments were directed toward is also old data, and only after data are completely written, storage is reflected Firing table can just be directed toward new data, and old data will be invalid, so that it is guaranteed that the integrality and reliability of data.
1, the present invention also provides a kind of pair of memories to carry out file storage device, and the file storage device includes:
First division module, for memory to be divided into two regions, one of region is storage configuration area, another A region is storage data area;
Second division module, for storage data area to be divided into two file areas, one of region is number of files According to area, another region is exchange files area;
Writing module for exchange files area to be written to memory, and updates storage mapping table, wherein the storage mapping Table is used to indicate the relationship of the logical address and physical address in the file data area and exchange files area;
Judgment module, judges whether file data successfully writes;
First update module, for when the result of judgment module, which is, is, the file data of write-in to be updated to the text Part data field;
Second update module, for saving updated memory map assignments into the storage configuration area.
It can be seen that all data one-time writes when file, and all data successes from the scheme of above-mentioned apparatus After write-in, then memory map assignments are deposited and are saved in memory map assignments memory block.Before data are not written successfully, old data Also always present in memory, what memory map assignments were directed toward is also old data, and only after data are completely written, storage is reflected Firing table can just be directed toward new data, and old data will be invalid, so that it is guaranteed that the integrality and reliability of data.
Detailed description of the invention
Fig. 1 is a kind of flow chart of embodiment of file memory method of the present invention;
Fig. 2 is the structural schematic diagram of memory of the present invention;
Fig. 3 is the structural schematic diagram of memory map assignments of the present invention;
Fig. 4 is a kind of flow chart of embodiment of write operation of file data process of the present invention;
Fig. 5 is the flow chart of file memory method another kind embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of embodiment of file storage device of the present invention.
Specific embodiment
In order to which the technical problems, technical solutions and beneficial effects solved by the present invention is more clearly understood, below in conjunction with Accompanying drawings and embodiments, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used To explain the present invention, it is not intended to limit the present invention.
What the present invention provided a kind of embodiment carries out file memory method to memory, as shown in Figure 1, the file stores Method includes:
Memory is divided into two regions by step S01, and one of region is storage configuration area, another region is Storage data area;
Storage data area is divided into two file areas by step S02, and one of region is file data area, another A region is exchange files area;
Step S03 is written exchange files area to memory, and updates storage mapping table, wherein the memory map assignments are used In the relationship for the logical address and physical address for indicating the file data area and exchange files area;
Step S04, judges whether file data successfully writes, if so, S05 is entered step, if not, entering step S03;
The file data of write-in is updated to the file data area by step S05;
Step S06 saves updated memory map assignments into the storage configuration area.
In step S01 and S02, as shown in Fig. 2, the memory includes storage configuration area 120, it is used to refer to this method Storage parameter;Storage data area 110, for storing actual data;File data area 112, for storing actual text Number of packages evidence;Exchange files area 111 is used to the interim storage file data in file write-in, first writes data into exchange area, etc. After file data is all successfully written, then swap with the memory block in file data area;Information table memory 122, is used to refer to Some informations parameter of storage;Memory map assignments 121 are used to refer to the logical address and object in file data area and exchange files area Manage the relationship of address.
In specific implementation, the physical storage locations of storage data area are had recorded in the information table memory 122, storage is reflected The physical storage locations of firing table, the size of memory map assignments, the size of memory block, file storage area size and exchange files area are big It is small;
The size of the memory map assignments can determine that how many a storing data blocks can be mapped;
The size of memory block indicates file storage area and the size of data exchanged minimum in exchange files area;
File storage area size indicates the maximum capacity that can be stored, the size of as practical energy storing data;
Exchange files area size indicates the size for the maximum single file that can be written, which is configured as may write-in Maximum file size.
In specific implementation, as shown in figure 3, the record of the memory map assignments 121 and instruction logical memory blocks address institute are right The address for the physical storage block answered, including file data area 112 and exchange files area 111, in the final area of memory map assignments There is a memory map assignments end mark, which will be used to be confirmed whether it is when restoring memory map assignments effectively, if It is not end mark, then is shown as the memory map assignments that current page did not save memory map assignments or mistake.
In specific implementation, described that exchange files area, and the step of updating storage mapping table is written to memory, it is specific to wrap Include following steps:
Memory map assignments are searched, the physical address of a swap block is obtained in the exchange files area;
Empty the original data in the corresponding swap block of the physical address;
It writes file data in the corresponding swap block of the physical address;
When the data of the corresponding swap block of the physical address have write full, with updating the physical address counterlogic Location;
Update storage mapping table.
In specific implementation, the step write file data in the corresponding swap block of the physical address, packet Include following steps:
Judge write-in initial address whether be swap block initial address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
Data are copied to the initial address of swap block from the initial address of script physical block, and wherein size of data is currently to want The address of data is written to the initial address of the swap block;
File data is to the exchange block address.
In specific implementation, as shown in figure 4, described write file data in the corresponding swap block of the physical address The step of, include the following steps:
Step S041, judge write-in initial address whether be swap block initial address;If not, entering step S042, if so, step S044;
Step S042, if not, searching memory map assignments, with obtaining the corresponding physical block of original data logical block address Location;
Step S043, from the initial address of script physical block copy data to the initial address of swap block, wherein data are big Small is that the address of data is currently written to the initial address of the swap block;
Step S044, file data to the exchange block address;
Step S045, judges whether the end address of write-in is the end address of swap block, if not, entering step S046, if so, entering step S048;
Step S046, if not, searching memory map assignments, with obtaining the corresponding physical block of original data logical block address Location;
Step S047, from the initial address of script physical block copy data to the current end address of swap block, wherein counting It is end address to the end address that data are currently written of the swap block according to size;
Step S048 updates the physical address when the data of the corresponding swap block of the physical address have write full Counterlogic address, i.e. logical address add 1 certainly.
That is, first passing through memory map assignments 121 in exchange files area when carrying out write operation of file data process The physical address of a swap block is obtained, is then write data into the physical storage block.Write operation each time all will be with Memory block is updated for unit, i.e., if the initial address for writing data is not memory block initial address, will can currently write number New memory block is copied to according to the legacy data before initial address, followed by the current data of write-in;If current data are write After complete, which is not write also completely, by copying to corresponding legacy data in new memory block.If data are written successfully, The memory map assignments in memory are updated, the physical address of swap block are written to corresponding logical memory blocks position, then by before The corresponding physical store block address of logical memory blocks is written to the position of swap block;If the data of this document by all at Function is write, then the memory map assignments in memory is finally written to corresponding position in memory.
In specific implementation, described the step of updating storage mapping table, include the following steps:
The physical address of the swap block is written to corresponding logical memory blocks position;
The corresponding physical store block address of logical memory blocks is written to the position of swap block.
That is, the memory block for saving memory map assignments is referred to as memory map assignments memory block;By memory map assignments Memory block is divided into several memory map assignments pages that size is storage mapping table size.Memory map assignments memory block is in actual reality In existing memory map assignments can be alternately stored using two memory blocks;Memory map assignments update every time will be written to it is currently stored In next new storage mapping page in block.If the memory block is fully written, it is written to first of another memory block In storage mapping page, such two memory blocks alternately store memory map assignments, after all data of file are successfully written to, It then needs for the memory map assignments of update to be saved in memory, to confirm the final data of file as latest data, if will Memory map assignments are saved in memory, then when restoring memory map assignments next time, the data that this document is directed toward will also be memory Old data.
In specific implementation, as shown in figure 5, the file memory method is further comprising the steps of:
Step S07 searches memory map assignments when reading file data, with obtaining the corresponding physical block of logical block address Location;
Step S08 reads data from the physical block acquired;
Step S09 updates physical address counterlogic address;
Step S10, judges whether file data has all run through, if so, S11 is entered step, if not, entering step Rapid S07;
Step S11, file reading terminate.
That is, first passing through memory map assignments 121 when reading file data and finding the corresponding logical memory blocks of file Physical store block address, then read corresponding data from actual physical storage block.
In addition, the size in exchange files area is configured as the size for the maximum data file that may be written, so each The data of file can disposably be completed to be written to exchange files area.When all data one-time writes of file, and it is all Data be successfully written after, then memory map assignments are deposited and are saved in memory map assignments memory block.It is not written successfully in data Before, old data are also always present in memory, and what memory map assignments were directed toward is also old data, only when data are completely write After entering, memory map assignments can just be directed toward new data, and old data will be invalid.By above processing, so that it is guaranteed that data Integrality and reliability.Moreover, because all files are all to share same file exchange area, do not need as each file An exchange files area is distributed, so greatly saving memory space, and the space that file more more piece saves is more.
Scheme from the above can be seen that all data one-time writes when file, and all data successes After write-in, then memory map assignments are deposited and are saved in memory map assignments memory block.Before data are not written successfully, old data Also always present in memory, what memory map assignments were directed toward is also old data, and only after data are completely written, storage is reflected Firing table can just be directed toward new data, and old data will be invalid, so that it is guaranteed that the integrality and reliability of data.
In specific implementation, what the present invention provided a kind of embodiment carries out file storage device to memory, such as Fig. 6 institute Show, the file storage device includes:
First division module 61, for memory to be divided into two regions, one of region is storage configuration area 120, another region is storage data area 110;
Second division module 62, for storage data area 110 to be divided into two file areas, one of region is File data area 112, another region are exchange files area 111;
Writing module 63 for exchange files area 111 to be written to memory, and updates storage mapping table 121, wherein described Memory map assignments are used to indicate the relationship of the logical address and physical address in the file data area and exchange files area;
Judgment module 64, judges whether file data successfully writes;
First update module 65, for the file data of write-in being updated to described when the result of judgment module, which is, is File data area 112;
Second update module 66, for saving updated memory map assignments 121 into the storage configuration area 120.
As shown in Fig. 2, the memory 100 includes storage configuration area 120, it is used to refer to the parameter of the storage of this method; Storage data area 110, for storing actual data;File data area 112, for storing actual file data;File is handed over Area 111 is changed, is used to the interim storage file data in file write-in, first writes data into exchange area, wait file datas whole After being successfully written, then swap with the memory block in file data area;Information table memory 122 is used to refer to some letters of storage Cease parameter;Memory map assignments 121 are used to refer to the pass of the logical address and physical address in file data area and exchange files area System.
In specific implementation, the physical storage locations of storage data area are had recorded in the information table memory 122, storage is reflected The physical storage locations of firing table, the size of memory map assignments, the size of memory block, file storage area size and exchange files area are big It is small;
The size of the memory map assignments can determine that how many a storing data blocks can be mapped;
The size of memory block indicates file storage area and the size of data exchanged minimum in exchange files area;
File storage area size indicates the maximum capacity that can be stored, the size of as practical energy storing data;
Exchange files area size indicates the size for the maximum single file that can be written, which is configured as may write-in Maximum file size.
In specific implementation, as shown in figure 3, the record of the memory map assignments 121 and instruction logical memory blocks address institute are right The address for the physical storage block answered, including file data area 112 and exchange files area 111, in the final area of memory map assignments There is a memory map assignments end mark, which will be used to be confirmed whether it is when restoring memory map assignments effectively, if It is not end mark, then is shown as the memory map assignments that current page did not save memory map assignments or mistake.
In specific implementation, the write module 63 is also used to:
Memory map assignments are searched, the physical address of a swap block is obtained in the exchange files area;
Empty the original data in the corresponding swap block of the physical address;
It writes file data in the corresponding swap block of the physical address;
When the data of the corresponding swap block of the physical address have write full, with updating the physical address counterlogic Location;
Update storage mapping table 121.
In specific implementation, the write module 63 is also used to:
Judge write-in initial address whether be swap block initial address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
Data are copied to the initial address of swap block from the initial address of script physical block, and wherein size of data is currently to want The address of data is written to the initial address of the swap block;
File data is to the exchange block address.
In specific implementation, the write module 63 is also used to:
The write module is also used to:
Judge write-in initial address whether be swap block initial address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
Data are copied to the initial address of swap block from the initial address of script physical block, and wherein size of data is currently to want The address of data is written to the initial address of the swap block;
File data is to the exchange block address;
Judge write-in end address whether be swap block end address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
From the initial address of script physical block copy data to the current end address of swap block, wherein size of data is institute State end address to the end address that data are currently written of swap block;
If so, update is described physically into when the data of the corresponding swap block of the physical address have write full The step of location counterlogic address.
That is, first passing through memory map assignments 121 in exchange files area when carrying out write operation of file data process The physical address of a swap block is obtained, is then write data into the physical storage block.Write operation each time all will be with Memory block is updated for unit, i.e., if the initial address for writing data is not memory block initial address, will can currently write number New memory block is copied to according to the legacy data before initial address, followed by the current data of write-in;If current data are write After complete, which is not write also completely, by copying to corresponding legacy data in new memory block.If data are written successfully, The memory map assignments in memory are updated, the physical address of swap block are written to corresponding logical memory blocks position, then by before The corresponding physical store block address of logical memory blocks is written to the position of swap block;If the data of this document by all at Function is write, then the memory map assignments in memory is finally written to corresponding position in memory.
In addition, the size in exchange files area is configured as the size for the maximum data file that may be written, so each The data of file can disposably be completed to be written to exchange files area.When all data one-time writes of file, and it is all Data be successfully written after, then memory map assignments are deposited and are saved in memory map assignments memory block.It is not written successfully in data Before, old data are also always present in memory, and what memory map assignments were directed toward is also old data, only when data are completely write After entering, memory map assignments can just be directed toward new data, and old data will be invalid.By above processing, so that it is guaranteed that data Integrality and reliability.Moreover, because all files are all to share same file exchange area, do not need as each file An exchange files area is distributed, so greatly saving memory space, and the space that file more more piece saves is more.
It can be seen that all data one-time writes when file, and all data successes from the scheme of above-mentioned apparatus After write-in, then memory map assignments are deposited and are saved in memory map assignments memory block.Before data are not written successfully, old data Also always present in memory, what memory map assignments were directed toward is also old data, and only after data are completely written, storage is reflected Firing table can just be directed toward new data, and old data will be invalid, so that it is guaranteed that the integrality and reliability of data.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (7)

1. a kind of pair of memory carries out file memory method, it is characterised in that:The file memory method includes the following steps:
Memory is divided into two regions, one of region is storage configuration area, another region is storage data area;
Storage data area is divided into two file areas, one of region is file data area, another region is file Exchange area;
File data is written to the exchange files area of memory, and updates storage mapping table, wherein the memory map assignments are used for Indicate the relationship of the logical address and physical address in the file data area and exchange files area;
Judge whether file data successfully writes, if it does, the file data of write-in is updated to the file data area;
Updated memory map assignments are saved into the storage configuration area;
Wherein, described that exchange files area, and the step of updating storage mapping table is written to memory, specifically include following steps:
Memory map assignments are searched, the physical address of a swap block is obtained in the exchange files area;
Empty the original data in the corresponding swap block of the physical address;
It writes file data in the corresponding swap block of the physical address;
When the data of the corresponding swap block of the physical address have write full, physical address counterlogic address is updated;
Update storage mapping table.
2. file memory method as described in claim 1, it is characterised in that:It is described write file data to it is described physically Step in the corresponding swap block in location, includes the following steps:
Judge write-in initial address whether be swap block initial address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
Data are copied to the initial address of swap block from the initial address of script physical block, and wherein size of data is currently to be written The address of data to the swap block initial address;
File data is to the exchange block address.
3. file memory method as described in claim 1, it is characterised in that:It is described write file data to it is described physically Step in the corresponding swap block in location, includes the following steps:
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
File data is to the exchange block address;
Judge write-in end address whether be swap block end address;
Data are copied to the current end address of swap block from the initial address of script physical block, and wherein size of data is the friendship Change end address to the end address that data are currently written of block;
If so, updating the physical address pair into when the data of the corresponding swap block of the physical address have write full The step of answering logical address.
4. file memory method as described in claim 1, it is characterised in that:It is further comprising the steps of:
When reading file data, memory map assignments are searched, obtain the corresponding physical block address of logical block address;
Data are read from the physical block acquired;
Update physical address counterlogic address;
Judge whether file data has all run through, if so, obtaining logical block address into the lookup memory map assignments The step of corresponding physical block address.
5. a kind of pair of memory carries out file storage device, it is characterised in that:The file storage device includes:
First division module, for memory to be divided into two regions, one of region is storage configuration area, another area Domain is storage data area;
Second division module, for storage data area to be divided into two file areas, one of region is file data area, Another region is exchange files area;
Writing module for exchange files area to be written to memory, and updates storage mapping table, wherein the memory map assignments are used In the relationship for the logical address and physical address for indicating the file data area and exchange files area;
Judgment module, judges whether file data successfully writes;
First update module, for when the result of judgment module, which is, is, the file data of write-in to be updated to the number of files According to area;
Second update module, for saving updated memory map assignments into the storage configuration area;
Wherein, the write module is also used to:
Memory map assignments are searched, the physical address of a swap block is obtained in the exchange files area;
Empty the original data in the corresponding swap block of the physical address;
It writes file data in the corresponding swap block of the physical address;
When the data of the corresponding swap block of the physical address have write full, physical address counterlogic address is updated;
Update storage mapping table.
6. file storage device as claimed in claim 5, it is characterised in that:The write module is also used to:
Judge write-in initial address whether be swap block initial address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
Data are copied to the initial address of swap block from the initial address of script physical block, and wherein size of data is currently to be written The address of data to the swap block initial address;
File data is to the exchange block address.
7. file storage device as claimed in claim 5, it is characterised in that:The write module is also used to:
Judge write-in initial address whether be swap block initial address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
Data are copied to the initial address of swap block from the initial address of script physical block, and wherein size of data is currently to be written The address of data to the swap block initial address;
File data is to the exchange block address;
Judge write-in end address whether be swap block end address;
If not, searching memory map assignments, the corresponding physical block address of original data logical block address is obtained;
Data are copied to the current end address of swap block from the initial address of script physical block, and wherein size of data is the friendship Change end address to the end address that data are currently written of block;
If so, updating the physical address pair into when the data of the corresponding swap block of the physical address have write full The step of answering logical address.
CN201510876978.9A 2015-12-03 2015-12-03 A kind of pair of memory carries out file memory method and storage device Expired - Fee Related CN105446664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510876978.9A CN105446664B (en) 2015-12-03 2015-12-03 A kind of pair of memory carries out file memory method and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510876978.9A CN105446664B (en) 2015-12-03 2015-12-03 A kind of pair of memory carries out file memory method and storage device

Publications (2)

Publication Number Publication Date
CN105446664A CN105446664A (en) 2016-03-30
CN105446664B true CN105446664B (en) 2018-11-20

Family

ID=55556924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510876978.9A Expired - Fee Related CN105446664B (en) 2015-12-03 2015-12-03 A kind of pair of memory carries out file memory method and storage device

Country Status (1)

Country Link
CN (1) CN105446664B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107315533A (en) * 2016-04-26 2017-11-03 杭州海康威视数字技术股份有限公司 A kind of date storage method and device
CN106339431B (en) * 2016-08-18 2019-09-06 佛山智能装备技术研究院 Robot program's document handling method and system based on text block
CN111143899A (en) * 2018-11-06 2020-05-12 中兴通讯股份有限公司 Method and device for storing data, storage medium and electronic device
CN109783440B (en) * 2018-12-19 2023-09-19 爱云保(上海)科技有限公司 Data storage method, data retrieval method, data storage device, medium and electronic equipment
CN111897744B (en) * 2019-05-05 2024-06-14 兆易创新科技集团股份有限公司 Data writing method and device, electronic equipment and storage medium
CN113553005B (en) * 2021-07-06 2023-12-22 杭州宏杉科技股份有限公司 Data read-write method, device and equipment for simplifying LUN

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1183842A (en) * 1995-05-09 1998-06-03 软体未来设计股份有限公司 Interface circuit and data processing apparatus and method
WO2010070427A2 (en) * 2008-12-17 2010-06-24 Sandisk Il Ltd. Ruggedized memory device
CN102572330A (en) * 2010-12-29 2012-07-11 厦门华侨电子股份有限公司 Method for reading, writing and erasing data of liquid crystal television Flash chip
CN102929563A (en) * 2012-10-12 2013-02-13 大唐微电子技术有限公司 Transaction data processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8151060B2 (en) * 2006-11-28 2012-04-03 Hitachi, Ltd. Semiconductor memory system having a snapshot function

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1183842A (en) * 1995-05-09 1998-06-03 软体未来设计股份有限公司 Interface circuit and data processing apparatus and method
WO2010070427A2 (en) * 2008-12-17 2010-06-24 Sandisk Il Ltd. Ruggedized memory device
CN102572330A (en) * 2010-12-29 2012-07-11 厦门华侨电子股份有限公司 Method for reading, writing and erasing data of liquid crystal television Flash chip
CN102929563A (en) * 2012-10-12 2013-02-13 大唐微电子技术有限公司 Transaction data processing method and device

Also Published As

Publication number Publication date
CN105446664A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN105446664B (en) A kind of pair of memory carries out file memory method and storage device
CN102508784B (en) Data storage method of flash memory card in video monitoring equipment, and system thereof
CN112328435B (en) Method, device, equipment and storage medium for backing up and recovering target data
CN108874298B (en) Data storage method and device
CN107239526B (en) File system implementation method, defragmentation method and operation position positioning method
WO2016086819A1 (en) Method and apparatus for writing data into shingled magnetic record smr hard disk
CN101645043B (en) Methods for reading and writing data and memory device
CN106326229B (en) File storage method and device of embedded system
CN110032521A (en) For enhancing flash translation layer (FTL) mapping flexibility to obtain performance and service life improved method and system
CN103049224B (en) By the methods, devices and systems of data importing physical tape
CN104750565A (en) NAND bad block processing method and NAND flash memory device
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
CN102629234A (en) Fast retrieval method for data of built-in Flash of single chip microcomputer
CN104360914A (en) Incremental snapshot method and device
CN109634873A (en) Solid-state disk host system log information method, apparatus, equipment and medium
CN106648463A (en) Nand Flash block management method and system
CN110147203A (en) A kind of file management method, device, electronic equipment and storage medium
CN109408416B (en) Address mapping table entry page management method and device
CN113641630A (en) FLASH memory
CN114327270A (en) Request processing method, device, equipment and readable storage medium
CN109542860B (en) Service data management method based on HDFS and terminal equipment
CN110286859B (en) Data storage method and device based on FAT file system
US9003129B1 (en) Techniques for inter-storage-processor cache communication using tokens
CN103593259A (en) Snapshot method and snapshot device for memories virtual clusters
CN110795031A (en) Data deduplication method, device and system based on full flash storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 22A, Guoshi building, 1801 Shahe West Road, high tech Zone, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: GUOWEI GROUP (SHENZHEN) Co.,Ltd.

Address before: 518000 Guangdong city of Shenzhen province Nanshan District high tech Industrial Park South high SSMEC building two floor

Patentee before: SHENZHEN STATE MICRO TECHNOLOGY Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181120