CN113641532B - Solid state disk data backup and restoration method based on paging mode - Google Patents
Solid state disk data backup and restoration method based on paging mode Download PDFInfo
- Publication number
- CN113641532B CN113641532B CN202010342238.8A CN202010342238A CN113641532B CN 113641532 B CN113641532 B CN 113641532B CN 202010342238 A CN202010342238 A CN 202010342238A CN 113641532 B CN113641532 B CN 113641532B
- Authority
- CN
- China
- Prior art keywords
- data
- solid state
- page
- backup
- state disk
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1471—Saving, restoring, recovering or retrying involving logging of persistent data for recovery
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention discloses a solid state disk based on paging mode backup data, which comprises a controller and a flash memory. The controller comprises a main control chip and firmware, wherein the main control chip controls the data access of the solid state disk, and the main control chip controls the firmware to execute the activation instruction. The flash memory comprises a lower data page and an upper data page, wherein the lower data page is used for storing data of the solid state disk. And executing an activation instruction by the firmware to form corresponding backup data in the upper data pages of the data of the solid state disk stored in the lower data pages, wherein a plurality of upper data pages and a plurality of lower data pages form a block, the upper data pages of the backup data are stored, and the lower data pages corresponding to the data access of the solid state disk are positioned in the same block.
Description
Technical Field
The present invention relates to a data backup and restore mechanism for a solid state disk, and more particularly to a data backup and restore mechanism for a solid state disk based on a paging mode.
Background
The operation mode of the solid state disk composed of the existing NAND flash memory basically adopts a multi-Page (Page) storage mode, and the same Block (Block) comprises a plurality of pages. For example, in a solid state disk composed of a Multi-Level Cell (MLC) flash memory, the pages may be composed of Single-Level Cell (SLC) mode pages and MLC mode pages, and when the solid state disk considers the access speed of data, only SLC mode pages are used for writing and reading data, the paired MLC mode pages will not be used, so the capacity will be reduced by half, and this part of hard disk space will be wasted.
As can be seen from the above description, the above problem of waste of the paged hard disk space except for the paging in the SLC mode also occurs in the solid state disk composed of the Triple-Level Cell (TLC) flash memory.
Disclosure of Invention
In order to solve the problems generated by the prior art, the invention discloses a solid state disk based on paging mode backup data, which comprises a controller and a flash memory. The controller comprises a main control chip and firmware. The main control chip controls the data access of the solid state disk, and the main control chip controls the firmware to execute the activation instruction.
Flash memory includes lower data pages (lower pages) and upper data pages (upper pages). The lower data page is used for storing data of the solid state disk, the firmware executes the activation instruction to form corresponding backup data in the upper data page by the data of the solid state disk stored in the lower data page, wherein a plurality of upper data pages and a plurality of lower data pages form a block, the upper data page stores the backup data, and the lower data page corresponding to data access of the solid state disk is located in the same block.
Preferably, the controller further includes executing a restore instruction by the control firmware of the main control chip to restore the backup data to the corresponding lower data page.
Preferably, the lower Page of data corresponds to a Single-Level Cell Page (SLC Page).
Preferably, the upper Page of data corresponds to a double-Level Cell Page (MLC Page).
The invention also discloses a solid state disk data backup method based on the paging mode, which is applicable to the solid state disk based on the paging mode backup data and at least comprises the following steps: the main control chip controls the firmware to execute the initialization instruction to change the upper data paging from the access forbidden state to the backup allowed state. The main control chip controls the firmware to execute the activation instruction, so that the lower data page is converted from the normal operation state to the data backup state, and the data stored in the lower data page is formed into backup data in the corresponding upper data page. After the execution of the activation instruction is completed, the main control chip controls the data paging to return to the normal operation state from the data backup state.
Preferably, the solid state disk data backup method further comprises the following steps:
the main control chip controls the firmware to execute the restore instruction, so as to change the lower data page from the normal operation state to the data restore state, and the backup data of the upper data page is formed into restore data in the corresponding lower data page. After the restoring instruction is executed, the main control chip controls the data paging to return to the normal operation state from the data backup state.
Preferably, wherein the activate instruction and the restore instruction comprise a logical block address map between a lower data page and an upper data page.
Preferably, the activate instruction and the restore instruction are included in the logical block address map, and then the differential data migration operation is performed.
In the above description, the method for restoring the solid state disk backup based on the paging mode and the solid state disk device based on the backup restoration of the paging mode have the following advantages:
(1) By using the solid state disk backup and restore method based on the paging mode, the upper data pages in the flash memory, such as MLC Page, TLC Page and the combination thereof, can be used as the hard disk space for backing up and restoring data, and no extra storage device space is needed, so that the waste of the hard disk space can be reduced.
(2) Through the solid state disk device based on the paging mode backup, the firmware directly backs up and restores the data, and the data is not required to be read and written into the system, so that the efficiency can be improved, the operation time can be shortened, and the defect of slower reading and writing speeds of the MLC Page and the TLC Page in the prior art can be overcome.
Drawings
The above and other objects, features, advantages and embodiments of the present invention will become more apparent by the following description of the drawings in which:
FIG. 1 is a schematic diagram of a solid state disk according to an embodiment of the invention.
FIG. 2 is a flowchart of a method for backing up data in a solid state disk according to an embodiment of the invention.
FIG. 3 is a diagram illustrating data backup and data restore for a solid state disk according to an embodiment of the present invention. Wherein, each reference sign in the figure:
100: solid state disk
110: controller for controlling a power supply
111: main control chip
112: firmware
120: flash memory
121: lower data paging
122: upper data paging
123: storing data
124: backup data
125: restoring data
300: block block
301. 303, 305: single level cell paging
302. 304, 306: double-level cell paging
S0 to S4: working procedure
Detailed Description
An embodiment of the present invention will be described below with reference to fig. 1 to 3. The description is not intended to limit the embodiments of the invention, but is merely exemplary of the invention.
Referring to fig. 1, which is a schematic diagram of a solid state disk according to an embodiment of the present invention, and referring to fig. 3, which is a schematic diagram of data backup and data restore of a paged solid state disk according to an embodiment of the present invention. As shown in fig. 1, a solid state disk 100 for performing data backup based on a paging mode includes a controller 110 and a flash memory 120. The controller 110 includes a main control chip 111 and a firmware 112. The main control chip 111 controls the data access of the solid state disk 100, and the main control chip 111 controls the firmware 112 to execute the activation instruction.
Flash memory 120 includes a lower data page 121 (lower page) and an upper data page 122 (upper page). The lower data page 121 is used for storing data of the solid state disk 100, and the firmware 112 executes the activation instruction to form corresponding backup data in the upper data page 122 from the data of the solid state disk 100 stored in the lower data page 121. As shown in FIG. 3, the upper data pages 122 and the lower data pages 121 form a block 300, and the upper data pages 122 storing the backup data are located in the same block 300 as the lower data pages 121 corresponding to the data access of the solid state disk 100.
The above-mentioned blocks are usually used as the minimum unit of data Erase (Erase) in the flash memory 120, and are different from the minimum unit of Page (Page) for the data read and data write.
Preferably, the controller 110 further includes a restore instruction executed by the control firmware 112 through the main control chip 111 to restore the backup data to the corresponding lower data page 121.
Preferably, the lower data page 121 described above may correspond to the single layer cell page 301. The Single-Level Cell page 301 referred to herein may be constituted by a Single-Level Cell (SLC) directly, or may be constituted by a Multi-Level Cell (MLC) having a low access speed for cost reasons, and then the Single-Level Cell page 301 is simulated by modification of the operation mode, so that the lower data page 121 may be used for reading data and writing data.
Preferably, the upper data page 122 described above may correspond to the dual-level cell page 302. The double-level cell page 302 referred to herein is a pair of pages after the above-described page formed by the double-level cells is emulated as the single-level cell page 301.
The above example single-level cell page 301 and double-level cell page 302 are embodiments of the flash memory 120 composed of double-level cells. Similarly, the flash memory 120 composed of Three Layers of Cells (TLC) may be used as an embodiment, the flash memory 120 simulates the pages composed of three layers of cells into the single-layer Cell pages 301, but the capacity will become one third of the original capacity.
Fig. 2 is a flowchart of a method for backing up data of a solid state disk according to an embodiment of the invention. As shown in the figure, the solid state disk backup method is applicable to the solid state disk 100 based on the paging mode backup data, and at least comprises the following steps (S0 to S2):
step S0: the upper data page 122 is changed from the access disabled state to the backup enabled state by the main control chip 111 controlling the firmware 112 to execute the initialization command.
Step S1: the firmware 112 is controlled by the main control chip 111 to execute the activation instruction, so as to change the lower data page 121 from the normal operation state to the data backup state, and the data stored in the lower data page 121 forms backup data in the corresponding upper data page 122.
Step S2: after the execution of the activation instruction is completed, the main control chip 111 controls the data page 121 to return from the data backup state to the normal operation state.
Preferably, the solid state disk data backup method further comprises the following steps:
step S3: the main control chip 111 controls the firmware 112 to execute the restore instruction to change the lower data page 121 from the normal operation state to the data restore state, and the backup data of the upper data page 122 is formed into the restore data in the corresponding lower data page 121.
Step S4: after the restore instruction is executed, the main control chip 111 controls the data page 121 to return from the data backup state to the normal operation state.
In view of the foregoing steps S0 to S4, it can be appreciated that the method for backing up data of a solid state disk based on a paging mode according to the embodiments of the present invention can enable a user to reuse the solid state disk space (for example, the upper data page 122 corresponding to the embodiment of the present invention) wasted by considering the access speed in a general solid state disk.
For example, in a typical solid state disk in a notebook computer, a portion of space is reserved for backup of data required for maintaining normal operation of the system, so that a user cannot access the portion of space.
The existence of the step S0 can be understood as the difference between the advanced solid state disk user and the general solid state disk user, that is, for the advanced user, it can be determined whether to use the upper data page in the flash memory as the backup space by himself, when the step S0 is executed, the advanced user sends an initialization command through the firmware to convert the upper data page which cannot be read and written in the flash memory into the data backup and the data restoration. For a general user, the operation of the step S0 is already performed by the developer, and the general user can perform the operation of data backup or data restoration on the upper data page of the flash memory without sending an initialization command through the firmware.
Preferably, the activate and restore instructions include a logical block address map between the lower data page 121 and the upper data page 122. This means that when data recovery is performed, the address of the data in the lower data page 121 is first informed to the upper data page 122, so that the data backed up in the upper data page 122 can be recovered to the correct corresponding position in the lower data page 121.
Preferably, the activation instruction and the restore instruction are included in the logical block address map, and then the differentiated data migration operation is performed. The above-mentioned differentiated data transfer operation refers to that after mapping the logical block address of the data in the lower data page 121 to the upper data page 122, each data in the upper data page 122 is not necessarily restored to the lower data page 121, but the data in the lower data page 121 is compared with the data in the corresponding logical block address in the upper data page 122, and only when the two data are different, the corresponding data in the upper data page 122 is restored to the lower data page 121.
For a more detailed understanding of the data backup and data restore process of the solid state disk 100 of the present invention, reference may be made to parts (3 a) to (3 d) of fig. 3 in sequence. Referring first to section (3 a), before the initialization instruction is executed by firmware 112, data read and data write are performed only in single-level cell pages 301, 303, and 305 in block 300, and the space of double-level cell pages 302, 304, and 306 is not available. After the initialization instructions are executed by the firmware 112, the space of the dual level cell pages 302, 304, and 306 will be available for use as data backup and data restore.
The initialization command may be executed by the manufacturer before the solid state disk 100 is sold to the user, or may be executed by the advanced user. The flash memory 120 is maintained in a normal operation state before the firmware 112 executes the initialization instruction, or after the firmware 112 executes the initialization instruction and before the activation instruction, and only data reading and data writing can be performed on the lower data page 121 (corresponding to the single-layer cell pages 301, 303, and 305 of fig. 3).
Referring to section 3B, when the user wants to perform data backup, the firmware 112 is used to execute an activate command, and the data (e.g., corresponding to data a, data B, and data C) in the single-layer cell pages 301, 303, and 305 in the flash memory 120 is backed up to the corresponding double-layer cell pages 302, 304, and 306 (e.g., corresponding to data a, data B, and data C, respectively). After the data backup is completed, the flash memory 120 returns to the normal operation state.
Referring to section (3C), after the data in the single-layer cell pages 301, 303 and 305 in the flash memory 120 is accessed, the data state is changed (e.g., corresponding to data a ", data B and data C", respectively), and the user decides to perform the data restore operation at this time, so that the restore instruction is executed through the firmware 112.
Referring to section (3 d), after executing the restore instruction, firmware 112 restores the data (e.g., corresponding to data a, data B, and data C) in the two-level cell pages 302, 304, and 306 to the single-level cell pages 301, 303, and 305, respectively, thereby completing one cycle of data backup and data restore. Then, the firmware 112 may wait for the next execution of the activation instruction, and then perform the operations of data backup and data restoration from the process S1 to the process S4 sequentially.
The foregoing is by way of example only and is not intended as limiting. Any equivalent modifications or variations to the present invention without departing from the spirit and scope thereof are intended to be included in the following claims.
Claims (8)
1. The utility model provides a solid state hard disk based on paging mode backup data which characterized in that:
a controller, comprising:
the main control chip controls the data access of the solid state disk; and is also provided with
The main control chip controls the firmware to execute an activation instruction; and is also provided with
A flash memory, comprising:
a lower data page, wherein the lower data page is used for storing the data of the solid state disk; and is also provided with
And the firmware forms corresponding backup data in the upper data pages by executing the activating instruction to the data of the solid state disk stored in the lower data pages, wherein a plurality of upper data pages and a plurality of lower data pages form a block, the upper data pages of the backup data are stored, and the lower data pages corresponding to the data access of the solid state disk are located in the same block.
2. The solid state disk of claim 1, wherein the controller further comprises a restore instruction for restoring the backup data to the corresponding lower data page by controlling the firmware to execute the restore instruction through the main control chip.
3. The solid state disk of claim 1, wherein the lower data Page corresponds to a Single-Level Cell Page.
4. The solid state disk of claim 1, wherein the upper data Page corresponds to a double-Level Cell Page.
5. The method for backing up data of a solid state disk based on a paging mode is characterized by being applicable to the solid state disk according to any one of claims 1 to 4, and comprises the following steps:
the main control chip is used for controlling the firmware to execute an initialization instruction, and the initialization instruction changes the upper data paging from an access forbidden state to a backup allowed state;
the firmware is controlled to execute the activation instruction through the main control chip, the activation instruction changes the lower data paging from a normal operation state to a data backup state, and the data stored in the lower data paging form the backup data in the corresponding upper data paging; and is also provided with
And after the execution of the activation instruction is finished, the main control chip controls the lower data paging to return to the normal operation state from the data backup state.
6. The method for backing up data in a solid state disk of claim 5, further comprising the steps of:
the firmware is controlled by the main control chip to execute a restore instruction, the restore instruction converts the lower data page from the normal operation state to a data restore state, and the backup data of the upper data page forms restore data in the corresponding lower data page; and is also provided with
And after the restoration instruction is executed, the main control chip controls the lower data paging to return to the normal operation state from the data backup state.
7. The method of claim 6, wherein the activate command and the restore command comprise a logical block address map between the lower data page and the upper data page.
8. The method as claimed in claim 7, wherein the activating instruction and the restoring instruction include performing a differential data migration operation after the logical block address mapping.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010342238.8A CN113641532B (en) | 2020-04-27 | 2020-04-27 | Solid state disk data backup and restoration method based on paging mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010342238.8A CN113641532B (en) | 2020-04-27 | 2020-04-27 | Solid state disk data backup and restoration method based on paging mode |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113641532A CN113641532A (en) | 2021-11-12 |
CN113641532B true CN113641532B (en) | 2023-06-20 |
Family
ID=78414924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010342238.8A Active CN113641532B (en) | 2020-04-27 | 2020-04-27 | Solid state disk data backup and restoration method based on paging mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113641532B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101483067A (en) * | 2008-01-11 | 2009-07-15 | 群联电子股份有限公司 | Flash memory data writing method and flash memory controller |
CN101814318A (en) * | 2009-02-25 | 2010-08-25 | 群联电子股份有限公司 | Multi level cell NAND flash storage system as well as controller and access method thereof |
CN102591807A (en) * | 2011-12-30 | 2012-07-18 | 记忆科技(深圳)有限公司 | Processing method for power down and abnormal writing of solid state disc and system |
CN102591748A (en) * | 2011-12-29 | 2012-07-18 | 记忆科技(深圳)有限公司 | Solid state disc and power failure protection method and system thereof |
CN106557273A (en) * | 2015-09-30 | 2017-04-05 | 宇瞻科技股份有限公司 | The data managing method of solid state hard disc, write management system and its method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7149890B2 (en) * | 2003-11-21 | 2006-12-12 | Intel Corporation | Initializing system memory |
-
2020
- 2020-04-27 CN CN202010342238.8A patent/CN113641532B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101483067A (en) * | 2008-01-11 | 2009-07-15 | 群联电子股份有限公司 | Flash memory data writing method and flash memory controller |
CN101814318A (en) * | 2009-02-25 | 2010-08-25 | 群联电子股份有限公司 | Multi level cell NAND flash storage system as well as controller and access method thereof |
CN102591748A (en) * | 2011-12-29 | 2012-07-18 | 记忆科技(深圳)有限公司 | Solid state disc and power failure protection method and system thereof |
CN102591807A (en) * | 2011-12-30 | 2012-07-18 | 记忆科技(深圳)有限公司 | Processing method for power down and abnormal writing of solid state disc and system |
CN106557273A (en) * | 2015-09-30 | 2017-04-05 | 宇瞻科技股份有限公司 | The data managing method of solid state hard disc, write management system and its method |
Also Published As
Publication number | Publication date |
---|---|
CN113641532A (en) | 2021-11-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101562973B1 (en) | Memory apparatus and method for operating thereof | |
EP2299364B1 (en) | Metadata redundancy schemes for non-volatile memories | |
TWI375962B (en) | Data writing method for flash memory and storage system and controller using the same | |
US10372619B2 (en) | Data backup method, data recovery method and storage controller | |
US8131911B2 (en) | Data writing method, and flash storage system and controller using the same | |
US20100042773A1 (en) | Flash memory storage system and data writing method thereof | |
US8296502B2 (en) | Data management method for flash memory and storage system and controller using the same | |
US8296504B2 (en) | Data management method and flash memory storage system and controller using the same | |
TW200929224A (en) | Data writing method for flash memory and controller thereof | |
US20140189198A1 (en) | Memory allocation for fast platform hibernation and resumption of computing systems | |
DE102008015034A1 (en) | Memory card, memory card system, method for controlling a host, and method for operating a memory card | |
JP2005011317A5 (en) | ||
CN111399752B (en) | Control device and method for different types of storage units | |
US9384125B2 (en) | Method for accessing flash memory having pages used for data backup and associated memory device | |
CN112015341A (en) | Data storage method, storage system and storage medium | |
CN111324290A (en) | Memory device | |
CN108614744A (en) | Power-off protection method based on NAND flash and device | |
CN113641532B (en) | Solid state disk data backup and restoration method based on paging mode | |
CN113886279A (en) | Electronic device, flash memory controller and method for garbage collection operation of module | |
US11579770B2 (en) | Volatility management for memory device | |
TWI738308B (en) | Solid-state disk backuping data based on page mode and data backup method of solid-statedisk based on page mode | |
JPH0518143B2 (en) | ||
CN112988069B (en) | Memory management method, memory storage device and memory controller | |
TWI738235B (en) | Method for performing resuming management, and memory device and controller thereof and electronic device | |
JP2007310548A (en) | Disk array device and data management method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |