CN111008159A - Data protection method, device, equipment and storage medium for storage equipment - Google Patents

Data protection method, device, equipment and storage medium for storage equipment Download PDF

Info

Publication number
CN111008159A
CN111008159A CN201911189037.2A CN201911189037A CN111008159A CN 111008159 A CN111008159 A CN 111008159A CN 201911189037 A CN201911189037 A CN 201911189037A CN 111008159 A CN111008159 A CN 111008159A
Authority
CN
China
Prior art keywords
map
storage area
writing
data
power
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911189037.2A
Other languages
Chinese (zh)
Other versions
CN111008159B (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.)
Beijing WatchData System Co Ltd
Beijing WatchSmart Technologies Co Ltd
Original Assignee
Beijing WatchSmart Technologies 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 Beijing WatchSmart Technologies Co Ltd filed Critical Beijing WatchSmart Technologies Co Ltd
Priority to CN201911189037.2A priority Critical patent/CN111008159B/en
Publication of CN111008159A publication Critical patent/CN111008159A/en
Application granted granted Critical
Publication of CN111008159B publication Critical patent/CN111008159B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/16Protection against loss of memory contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The embodiment of the application provides a data protection method, a data protection device, equipment and a storage medium of storage equipment. In some embodiments of the present application, a write instruction is received for a memory region; in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area; and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table. Writing data aiming at a storage area into a backup area, and storing the mapping relation between the storage area and the backup area into a power-off MAP mapping table to provide byte protection and page protection for the storage area, reduce the loss of the backup area and prevent the data loss caused by power-off.

Description

Data protection method, device, equipment and storage medium for storage equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for protecting data of a storage device.
Background
For smart card embedded systems, storage management of files is one of the most central and complex functions. In practical application, the application scenarios of the smart card are complex and various, and the problem that the voltage of the device is unstable or the power supply voltage is suddenly lost often occurs. In view of economy, a nonvolatile memory (NVM) used in chip design mostly supports a way of erasing a whole page and then writing it by bytes, or erasing a whole page and writing it by a whole page, and thus there is a problem that a whole page erase is required even if one byte is rewritten.
When data is written in, byte protection and page protection are carried out on old data of the NVM, and wear-leveling processing is carried out on hot pages, so that data loss in a storage area caused by power failure can be effectively prevented.
Disclosure of Invention
Aspects of the present disclosure provide a method, an apparatus, a device and a storage medium for protecting data of a storage device, so as to mitigate damage to a nonvolatile memory.
The embodiment of the application provides a data protection method for a storage device, which comprises the following steps:
receiving a write command for the NVM storage area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
Optionally, writing the mapping relation between the NVM storage area and the backup area into a MAP cache area of a power-off MAP table; writing the mapping relationship in the MAP cache to the power down MAP mapping table if a transaction is to be committed in response to the write instruction.
Optionally, in response to the write instruction, generating the NVM storage area storing the newly written data; and storing the data to the backup area according to the power-off MAP mapping table.
Optionally, the MAP mapping table includes: a first field for identifying whether the MAP mapping table is in effect or not in effect;
the writing the mapping relationship in the MAP buffer to the power-off MAP mapping table includes:
modifying a first field zone bit in the power-off MAP mapping table into a valid zone bit;
writing the mapping relation in the MAP cache region of the power-off MAP mapping table into the power-off MAP mapping table.
Optionally, if the transaction in response to the write instruction is not committed, the MAP cache of the power down MAP table is cleared.
Optionally, the data in the backup area is written into the source address according to a mapping relationship between the source address of the storage area and the destination address of the backup area in the power-off MAP mapping table.
Optionally, the MAP buffer of the power-off MAP and the power-off MAP are cleared.
The embodiment of the application provides a data protection device for storage equipment, the device comprises:
the receiving module is used for receiving a writing instruction aiming at the NVM storage area;
the response module is used for responding to the writing instruction and writing data into the backup area which has a mapping relation with the NVM storage area;
and the writing module is used for writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
Embodiments of the present application provide a computer-readable storage medium storing a computer program that, when executed by one or more processors, causes the one or more processors to perform actions comprising:
receiving a write command for the NVM storage area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
An embodiment of the present application provides an electronic device, including: one or more processors, and one or more memories storing computer programs, and sensors;
the one or more processors execute the computer program to:
receiving a write command for the NVM storage area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
In some embodiments of the present application, after the COS system receives a write instruction of a card reader for a specified NVM storage area, in response to the write instruction, data to be written is written into a backup area having a mapping relationship with the NVM storage area, and further, according to a mapping relationship between each NVM storage area preset in a power-off MAP and a corresponding backup area, data in the backup area is written into the corresponding NVM storage area. Writing data written aiming at an NVM (non-volatile memory) storage area into a backup area, and storing the mapping relation between the NVM storage area and the backup area into a power-off MAP (MAP) table to provide transaction protection and page protection for the NVM storage area, reduce the loss of the backup area and prevent the data loss caused by power-off.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart of a data protection method for a storage device according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a power down MAP according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a backup block according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a mapping relationship writing method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for generating a power-off MAP mapping table according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating a power-off outflow of data protection of a storage device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for protecting data of a storage device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
In the present application, a nonvolatile memory is described as an example. In practical application, the reason is that
Fig. 1 is a schematic flowchart illustrating a method for protecting data of a storage device according to an embodiment of the present invention. The method comprises the following steps:
101: a write instruction to a memory region is received.
102: and in response to the writing instruction, writing data into the backup area which has a mapping relation with the NVM storage area.
103: and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
Allocating a power-off MAP mapping table and a corresponding MAP cache region in the RAM, initializing the MAP cache region of the power-off MAP mapping table, and setting the FLAG bit to be invalid during initialization. After receiving an Application Protocol Data Unit (APDU) command, the NVM write function is further called by a Chip Operating System (COS).
In response to a write instruction for a storage area, a backup area having a mapping relation with the storage area is determined, and then data to be written is written into the backup area. In practical application, a transaction operation needs to perform data writing operation on a plurality of pages, and after determining that the transaction needs to be committed, data in a backup area is written into a corresponding storage area. Therefore, the problems of data loss and the like caused by power failure in the middle of transaction progress can be effectively prevented.
For ease of understanding, the following is specifically exemplified. Assume the power down MAP is MAP. Fig. 2 is a schematic diagram of a MAP table according to an embodiment of the present invention. As can be seen from the figure, the MAP includes a plurality of fields, where a first Field (FLAG) is used to identify whether the MAP table is valid or not, and when cFLAG is 0xAA, the MAP table is valid, and the other fields are not valid. The second field Num is used to indicate the number of new and old page mappings, for example, the number of mappings of MAP may be 1 or 2. The third field Data is used to indicate the mapping relationship between the storage area address saddr and the spare area address daddr, and the number of the mapping relationship corresponds to Num. The fourth field is used to represent the checksum of all previous data.
Fig. 3 is a schematic diagram of a storage area according to an embodiment of the present invention. In this memory area, it can be seen that there is a page MAP table and corresponding reserved backup pages. That is, 1+ N of reserved space is allocated in the memory area, where 1 page is used to store the MAP mapping table for managing the power-off memory area, and the remaining N pages are used as backup pages. The specific number of N is determined according to the size of the residual space of the storage area. It is easy to understand that the user can also adjust the number of pages of the MAP table according to the actual use situation, for example, the number of pages of the MAP table can be increased to 3 pages or 4 pages, and the MAP tables can be used alternately. Thereby contributing to the extension of the life span of the nonvolatile memory.
The following description is made with respect to step 102. Fig. 4 is a flowchart illustrating a method for establishing a power-off MAP according to an embodiment of the present invention. The method comprises the following steps:
401: and writing the mapping relation between the NVM storage area and the backup area into an MAP cache area of a power-off MAP mapping table.
402: writing the mapping relationship in the MAP cache to the power down MAP mapping table if a transaction is to be committed in response to the write instruction.
In order to prevent the problem of data loss caused by interruption of electricity during the execution of the instruction, after the mapping relation between the storage area and the backup area is determined, the mapping relation is stored into the MAP cache area of the power-off MAP mapping table, and is not directly stored into the power-off MAP mapping table. Therefore, even if the power failure problem occurs, the power failure MAP mapping table and the MAP cache region can be ensured to store relevant mapping relations respectively.
As an alternative embodiment, after writing the data in the storage area to the MAP cache area of the power-off MAP mapping table, the method further includes: generating the NVM storage area storing the newly written data in response to the write instruction; and storing the data to the backup area according to the power-off MAP mapping table.
After the mapping relation is established, writing data which a user wants to write into a storage area, and if a plurality of pages need to write the data, finishing the data writing of all the pages. And when data is written, backing up the data newly written into the storage area into the corresponding backup area according to the mapping relation between the storage area and the backup area stored in the power-off MAP mapping table.
It should be noted that when backing up the newly written data, it is ensured that the backup area has sufficient storage space to store the newly written data. In order to ensure that the newly written data can be successfully backed up, the size of the reserved backup area can be detected at the beginning; of course, data backup can also be directly performed, and if the backup area space is found to be full and cannot be backed up in the data writing process, a prompt that backup cannot be performed is sent to the user, so that partial data written first can be backed up.
For ease of understanding, the writing of the mapping relationship to the power down MAP table in step 402 is illustrated below. Fig. 5 is a flowchart illustrating a method for generating a power-off MAP according to an embodiment of the present invention. The method mainly comprises the following steps:
501: and modifying the first field flag bit in the power-off MAP mapping table into a valid flag bit.
502: writing the mapping relation in the MAP cache region of the power-off MAP mapping table into the power-off MAP mapping table.
As shown in fig. 2, the MAP table includes: a first field to identify whether the MAP mapping table is in effect or not in effect. After executing the complete write instruction, all pages involved in the transaction have completed writing and backing up the data. Further, modifying the FLAG in the outage MAP table, for example, making FALG 0xAA, indicates that the outage MAP table is valid.
And after the power-off MAP mapping table is confirmed to be effective, writing the mapping relation in the MAP cache region corresponding to the power-off MAP mapping table into the power-off MAP mapping table. As shown in fig. 2, multiple sets of mapping relationships may be included in the power-off MAP, but it should be noted that each mapping relationship in the MAP has a corresponding backup area (backup page).
As an alternative embodiment, if it is determined that the transaction responding to the write instruction is not committed, the MAP cache corresponding to the power-down MAP table needs to be cleared, and then the monitoring is continued to determine whether a new transaction is received.
As an optional embodiment, the data in the backup area is written to a source address according to a mapping relationship between the source address of the storage area and a destination address of the backup area in the power-off MAP mapping table.
And after the data in the backup area is written into the storage area, clearing the MAP cache area of the power-off MAP mapping table and the power-off MAP mapping table.
For ease of understanding, this application will be described with specific examples. Fig. 6 is a flowchart of power-off protection for data in a storage device according to an embodiment of the present invention.
After the COS system is powered on, the power-off MAP cache is initialized, and the MAP table is temporarily set to an invalid state at the moment. Then the COS system receives an Application Protocol Data Unit (APDU) instruction sent by the card reader, if an operation involving writing in NVM pages or bytes exists, the whole page of original Data of a destination address is read into the RAM and rewritten, then new Data is backed up in a backup area, and at the moment, the power-off MAP cache area is set to be valid (note: if the operation of reading the destination page Data exists during the instruction execution, the new Data needs to be fetched from the backup area). An APDU instruction may need to write multiple pages until all data writes are complete. And then, judging whether the transaction is submitted, if not, rolling back the transaction, namely clearing the power-off MAP cache region, and setting the power-off MAP cache region as an invalid MAP mapping table, if the submission is confirmed, writing the power-off MAP cache region into the power-off MAP table in the NVM, and starting to execute the updating operation of the data from the backup address to the destination address.
Based on the same idea, an embodiment of the present invention further provides a storage device data protection apparatus, and fig. 6 is a schematic structural diagram of the apparatus for protecting storage device data according to the embodiment of the present invention. The device includes:
a receiving module 61, configured to receive a write command for the NVM storage area;
a response module 62, configured to respond to the write instruction, write data into the backup area having a mapping relationship with the NVM storage area;
a writing module 63, configured to write the data in the backup area into the NVM storage area according to a mapping relationship between the NVM storage area and the backup area in a power-off MAP table.
Optionally, writing the mapping relation between the NVM storage area and the backup area into a MAP cache area of a power-off MAP table; writing the mapping relationship in the MAP cache to the power down MAP mapping table if a transaction is to be committed in response to the write instruction.
Optionally, in response to the write instruction, generating the NVM storage area storing the newly written data; and storing the data to the backup area according to the power-off MAP mapping table.
Optionally, the MAP mapping table includes: a first field for identifying whether the MAP mapping table is in effect or not in effect;
the writing the mapping relationship in the MAP buffer to the power-off MAP mapping table includes: modifying a first field zone bit in the power-off MAP mapping table into a valid zone bit; writing the mapping relation in the MAP cache region of the power-off MAP mapping table into the power-off MAP mapping table.
Optionally, if the transaction in response to the write instruction is not committed, the MAP cache of the power down MAP table is cleared.
Optionally, the data in the backup area is written into the source address according to a mapping relationship between the source address of the storage area and the destination address of the backup area in the power-off MAP mapping table.
Optionally, the MAP buffer of the power-off MAP and the power-off MAP are cleared.
Based on the same idea, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by one or more processors, causes the one or more processors to perform actions comprising:
receiving a write instruction for a memory area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
Based on the same idea, an embodiment of the present invention further provides an electronic device, including: one or more processors, and one or more memories storing computer programs, and sensors;
the one or more processors execute the computer program to:
receiving a write instruction for a memory area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for data protection of a storage device, the method comprising:
the COS system receives a writing instruction of a card reader for the NVM storage area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
2. The method of claim 1, wherein writing data to the backup area having a mapping relationship with the NVM storage area comprises:
writing the mapping relation between the NVM storage area and the backup area into an MAP cache area of a power-off MAP mapping table;
and if the transaction completed in response to the write instruction is to be submitted, writing the mapping relation in the MAP cache area into the power-off MAP mapping table.
3. The method of claim 2, wherein after writing the data in the NVM storage area to a MAP buffer of a power down MAP table, further comprising:
generating the NVM storage area storing the newly written data in response to the write instruction;
and storing the data to the backup area according to the power-off MAP mapping table.
4. The method of claim 2, wherein the MAP mapping table comprises: a first field for identifying whether the MAP mapping table is in effect or not in effect;
the writing the mapping relationship in the MAP buffer to the power-off MAP mapping table includes:
modifying a first field zone bit in the power-off MAP mapping table into a valid zone bit;
writing the mapping relation in the MAP cache region of the power-off MAP mapping table into the power-off MAP mapping table.
5. The method of claim 2, further comprising:
and if the transaction responding to the write instruction is not submitted, clearing the MAP cache region of the power-off MAP mapping table.
6. The method of claim 1, wherein the writing the data in the backup area to the NVM storage area according to the mapping relationship between the NVM storage area and the backup area in the power-off MAP mapping table comprises:
and writing the data in the backup area into the source address according to the mapping relation between the source address of the storage area and the destination address of the backup area in the power-off MAP mapping table.
7. The method of claim 1, wherein after writing the data in the backup area to the NVM storage area, further comprising:
and clearing the MAP cache region of the power-off MAP mapping table and the power-off MAP mapping table.
8. An apparatus for data protection of a storage device, the apparatus comprising:
the receiving module is used for receiving a writing instruction aiming at the NVM storage area;
the response module is used for responding to the writing instruction and writing data into the backup area which has a mapping relation with the NVM storage area;
and the writing module is used for writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by one or more processors, causes the one or more processors to perform acts comprising:
receiving a write command for the NVM storage area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
10. An electronic device, comprising: one or more processors, and one or more memories storing computer programs;
receiving a write command for the NVM storage area;
in response to the write instruction, writing data to a backup area having a mapping relation with the NVM storage area;
and writing the data in the backup area into the NVM storage area according to the mapping relation between the NVM storage area and the backup area in the power-off MAP mapping table.
CN201911189037.2A 2019-11-28 2019-11-28 Data protection method, device, equipment and storage medium for storage equipment Active CN111008159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911189037.2A CN111008159B (en) 2019-11-28 2019-11-28 Data protection method, device, equipment and storage medium for storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911189037.2A CN111008159B (en) 2019-11-28 2019-11-28 Data protection method, device, equipment and storage medium for storage equipment

Publications (2)

Publication Number Publication Date
CN111008159A true CN111008159A (en) 2020-04-14
CN111008159B CN111008159B (en) 2022-01-28

Family

ID=70112542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911189037.2A Active CN111008159B (en) 2019-11-28 2019-11-28 Data protection method, device, equipment and storage medium for storage equipment

Country Status (1)

Country Link
CN (1) CN111008159B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112698785A (en) * 2020-12-10 2021-04-23 北京握奇智能科技有限公司 Data updating method of storage device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251826A (en) * 2007-02-27 2008-08-27 深圳市同洲电子股份有限公司 Flash memory, method and apparatus for data management of flash memory
US20090265505A1 (en) * 2008-04-18 2009-10-22 Phison Electronics Corp. Data writing method, and flash storage system and controller using the same
CN104090730A (en) * 2014-07-08 2014-10-08 飞天诚信科技股份有限公司 Method and device for conducting data reading and writing on storage device
US20150046670A1 (en) * 2013-08-08 2015-02-12 Sangmok Kim Storage system and writing method thereof
CN104461964A (en) * 2014-12-12 2015-03-25 杭州华澜微科技有限公司 Memory device
CN105117306A (en) * 2015-08-31 2015-12-02 联想(北京)有限公司 Information processing method and electronic apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251826A (en) * 2007-02-27 2008-08-27 深圳市同洲电子股份有限公司 Flash memory, method and apparatus for data management of flash memory
US20090265505A1 (en) * 2008-04-18 2009-10-22 Phison Electronics Corp. Data writing method, and flash storage system and controller using the same
US20150046670A1 (en) * 2013-08-08 2015-02-12 Sangmok Kim Storage system and writing method thereof
CN104090730A (en) * 2014-07-08 2014-10-08 飞天诚信科技股份有限公司 Method and device for conducting data reading and writing on storage device
CN104461964A (en) * 2014-12-12 2015-03-25 杭州华澜微科技有限公司 Memory device
CN105117306A (en) * 2015-08-31 2015-12-02 联想(北京)有限公司 Information processing method and electronic apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112698785A (en) * 2020-12-10 2021-04-23 北京握奇智能科技有限公司 Data updating method of storage device
CN112698785B (en) * 2020-12-10 2024-03-29 北京握奇智能科技有限公司 Data updating method of storage device

Also Published As

Publication number Publication date
CN111008159B (en) 2022-01-28

Similar Documents

Publication Publication Date Title
US9645894B2 (en) Data storage device and flash memory control method
KR100531192B1 (en) Non-volatile memory control method
US7188210B2 (en) Method of writing, erasing, and controlling memory for memory device
US8180953B2 (en) Data accessing method for flash memory, and storage system and controller system thereof
CN110895514A (en) Mapping table updating method
CN113785275B (en) Flash data power-down protection method and device
US20200089435A1 (en) Volatility management for non-volatile memory device
KR100672996B1 (en) Memory apparatus with meta data stored fram
KR20130010447A (en) Non-volatile temporary data handling
US20210209017A1 (en) Using a common pool of blocks for user data and a system data structure
CN110989931A (en) Bad block processing method, device and equipment for storage equipment and storage medium
US20130179627A1 (en) Method for managing buffer memory, memory controllor, and memory storage device
CN111008159B (en) Data protection method, device, equipment and storage medium for storage equipment
CN110032526B (en) Page caching method, system and equipment based on nonvolatile medium
KR101548452B1 (en) Method and apparatus for recovering metadata in electronic device based on non-volatile memeory
CN114005476A (en) Flash memory, flash memory erasing and writing counting method, electronic equipment and computer storage medium
CN101526922B (en) Flash data access method and device thereof
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
CN112634975A (en) Data storage error correction method and device and electronic equipment
CN111164694B (en) Memory device and method for volatile management of a memory device
CN103377132A (en) Memory space management method, memory controller and memory storage device
CN110471626B (en) Nor Flash management layer and method applied to Java Card
CN109960611B (en) Data recovery method and device, electronic equipment and machine-readable storage medium
CN108509295B (en) Operation method of memory system
EP1344224B1 (en) Method for the secure updating of data areas in a non volatile memory and device to perform such a 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