CN114327269A - Data erasing mode setting method and system, electronic equipment and storage medium - Google Patents

Data erasing mode setting method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN114327269A
CN114327269A CN202111612478.6A CN202111612478A CN114327269A CN 114327269 A CN114327269 A CN 114327269A CN 202111612478 A CN202111612478 A CN 202111612478A CN 114327269 A CN114327269 A CN 114327269A
Authority
CN
China
Prior art keywords
erasing
data
target memory
erased
target
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.)
Pending
Application number
CN202111612478.6A
Other languages
Chinese (zh)
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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Optical 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 Goertek Optical Technology Co Ltd filed Critical Goertek Optical Technology Co Ltd
Priority to CN202111612478.6A priority Critical patent/CN114327269A/en
Publication of CN114327269A publication Critical patent/CN114327269A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The application discloses a data erasing mode setting method, which is applied to a driving layer and comprises the following steps: inquiring the erasing times of the Block in the target memory; judging whether the abrasion degree of the target memory is greater than a preset degree or not according to the erasing times; if so, setting the current erasing mode of the target memory to be a Vendor erasing mode so as to erase the data in the target memory in the Vendor erasing mode; if not, setting the current erasing mode of the target memory as a physical erasing mode so as to erase the data in the target memory in the physical erasing mode. The method and the device can prolong the service life of the memory on the basis of being compatible with various types of memories. The application also discloses a data erasing mode setting system, a storage medium and an electronic device, which have the beneficial effects.

Description

Data erasing mode setting method and system, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data storage technologies, and in particular, to a method and a system for setting a data erasure mode, an electronic device, and a storage medium.
Background
The memory is an important basic element of the electronic device, and the memory is crucial to the stability, safety and service life of the electronic device. The erasing manner of the memory is a key factor influencing the service life of the memory, and the service life of the memory is generally prolonged by adjusting a data erasing mode in the related art.
Although the storage-class device needs to follow the JEDEC protocol, manufacturers have great differences in factory configuration of the memory due to differences in manufacturing processes of the memories of the manufacturers, and the like, and thus it is difficult to provide a solution for extending the service life of the memory compatible with multiple types of memories.
Therefore, how to prolong the service life of the memory based on the compatibility of multiple types of memories is a technical problem that needs to be solved by those skilled in the art at present.
Disclosure of Invention
The application aims to provide a data erasing mode setting method, a data erasing mode setting system, electronic equipment and a storage medium, and the service life of a memory can be prolonged on the basis of being compatible with various types of memories.
In order to solve the above technical problem, the present application provides a data erasure mode setting method, which is applied to a drive layer, and includes:
inquiring the erasing times of the Block in the target memory;
judging whether the abrasion degree of the target memory is greater than a preset degree or not according to the erasing times;
if so, setting the current erasing mode of the target memory to be a Vendor erasing mode so as to erase the data in the target memory in the Vendor erasing mode;
if not, setting the current erasing mode of the target memory as a physical erasing mode so as to erase the data in the target memory in the physical erasing mode.
Optionally, judging whether the wear degree of the target memory is greater than a preset degree according to the erasing times includes:
determining the maximum value of the actual erasing times of all the Block blocks in the target memory;
judging whether the maximum value of the actual erasing times is larger than an erasing threshold value or not;
if so, judging that the abrasion degree of the target memory is greater than the preset degree;
if not, the abrasion degree of the target memory is judged to be smaller than or equal to the preset degree.
Optionally, before determining whether the maximum value of the actual erasing times is greater than the erasing threshold, the method further includes:
inquiring the memory model of the target memory;
determining the maximum erasing times of the target memory according to the memory model;
determining the erasing threshold value according to the maximum erasing times; wherein the maximum erasing times is positively correlated with the erasing threshold value.
Optionally, judging whether the wear degree of the target memory is greater than a preset degree according to the erasing times includes:
setting the Block with N names before the erasing times in the target memory as a target Block; wherein N is greater than 1;
determining the average erasing times of all the target Block blocks;
judging whether the average erasing times of all the target Block blocks are larger than an erasing threshold value or not;
if so, judging that the abrasion degree of the target memory is greater than the preset degree;
if not, the abrasion degree of the target memory is judged to be smaller than or equal to the preset degree.
Optionally, the method further includes:
receiving a data erasing instruction, and determining data to be erased corresponding to the data erasing instruction; the data to be erased comprises a file header and data content;
if the current erasing mode of the target memory is set to the Vendor erasing mode, erasing the file header in the data to be erased, and setting the erasing state of the data to be erased;
or, if the current erasing mode of the target memory is set as the physical erasing mode, erasing the file header and the data content in the data to be erased, and setting the erasing state of the data to be erased as erased.
Optionally, erasing the file header in the data to be erased includes:
obtaining a target value from a target field; wherein the target value is 0 or 1;
and setting all data of the file header in the data to be erased as the target value.
Optionally, after setting all data of the file header in the data to be erased as the target value, the method further includes:
judging whether the data in the file header in the data to be erased are the target values;
if yes, judging that the data to be erased are completely erased;
if not, judging that the data to be erased is not erased completely.
The present application further provides a data erasure mode setting system, applied to a driving layer, including:
the query module is used for querying the erasing times of the Block in the target memory;
the judging module is used for judging whether the abrasion degree of the target memory is greater than a preset degree or not according to the erasing times;
the first erasing control module is used for setting the current erasing mode of the target memory to be a Vendor erasing mode if the abrasion degree of the target memory is greater than the preset degree, so that data in the target memory can be erased in the Vendor erasing mode;
and the second erasing control module is used for setting the current erasing mode of the target memory to be a physical erasing mode if the abrasion degree of the target memory is less than or equal to the preset degree, so that the data in the target memory is erased in the physical erasing mode.
The application also provides a storage medium, on which a computer program is stored, which when executed implements the steps performed by the above data erasure pattern setting method.
The application also provides an electronic device, which comprises a memory and a processor, wherein the memory is stored with a computer program, and the processor realizes the steps executed by the data erasing mode setting method when calling the computer program in the memory.
The application provides a data erasing mode setting method, which comprises the following steps: inquiring the erasing times of the Block in the target memory; judging whether the abrasion degree of the target memory is greater than a preset degree or not according to the erasing times; if so, setting the current erasing mode of the target memory to be a Vendor erasing mode so as to erase the data in the target memory in the Vendor erasing mode; if not, setting the current erasing mode of the target memory as a physical erasing mode so as to erase the data in the target memory in the physical erasing mode.
The method and the device determine the wear degree of the target memory according to the erasing times of the Block in the target memory, and then determine the current erasing mode of the target memory based on the wear degree. Specifically, when the wear degree is greater than a preset degree, the current erasing mode of the target memory is set to be a Vendor erasing mode; and when the wear degree is less than or equal to a preset degree, setting the current erasing mode of the target memory as a physical erasing mode. When the wear degree is greater than the preset degree, it is indicated that the remaining life of the target memory is short, the data in the target memory is erased in the Vendor Erase mode, only the file header can be erased without erasing the file content, and the increase rate of the P/E (Program/Erase) value of the Block can be reduced. The scheme can be realized on a driving layer, and the service life of the memory can be prolonged on the basis of being compatible with various types of memories. The application also provides a data erasing mode setting system, a storage medium and an electronic device, which have the beneficial effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a data erasure pattern setting method according to an embodiment of the present application;
fig. 2 is a flowchart of a method for determining a wear level of a memory according to an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating dynamic adjustment of a method for securely erasing a memory of a driver layer according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a data erasure mode setting system according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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.
Referring to fig. 1, fig. 1 is a flowchart of a data erasure mode setting method according to an embodiment of the present application.
The specific steps may include:
s101: inquiring the erasing times of the Block in the target memory;
the memory comprises a plurality of Block blocks, each Block has a life, the residual life of the Block is related to the P/E value (namely, the erasing times) of the Block, and the higher the P/E value of the erasing times is, the lower the residual life of the Block is. The lifetime of a storage class device depends on the minimum remaining lifetime of all blocks. Before this step, statistics may also be performed on the P/E value of each Block, and in this embodiment, the erasing times of each Block in the target memory may be queried according to a preset period.
S102: judging whether the abrasion degree of the target memory is greater than a preset degree or not according to the erasing times; if yes, entering S103; if not, entering S104;
in this step, the wear degree of the target memory may be determined according to the number of erasing times of the Block blocks, and as a feasible implementation manner, this embodiment may set a plurality of levels for the wear degree of the target memory from high to low, and then determine the level of the wear degree of the target storage area according to the number of erasing times of all the Block blocks. The present embodiment may also determine the level of the wear level of the target storage area according to the number of erasures of the top N Block blocks of all Block blocks. The present embodiment may also determine the level of the wear level of the target storage area according to the maximum number of erasures of all Block blocks. As another possible implementation, the present embodiment may also use the number of times of erasing as information describing the degree of wear of the target memory.
S103: setting the current erasing mode of the target memory to be a Vendor erasing mode so as to erase the data in the target memory in the Vendor erasing mode;
s104: and setting the current erasing mode of the target memory to be a physical erasing mode so as to erase the data in the target memory in the physical erasing mode.
The target memory erase mode includes a Vendor erase mode and a physical erase mode, and the current erase mode is set according to the wear level of the target memory. In the Vendor erase mode, only the header (i.e., the index of the file) is erased but the contents of the file are not erased; in the physical erase mode, the header and contents of the file may be erased.
The present embodiment determines the wear level of the target memory according to the erasing times of the Block in the target memory, and then determines the current erasing mode of the target memory based on the wear level. Specifically, when the wear degree is greater than the preset degree, the current erasing mode of the target memory is set to the Vendor erasing mode; and when the wear degree is less than or equal to a preset degree, setting the current erasing mode of the target memory as a physical erasing mode. When the wear degree is greater than the preset degree, it is indicated that the remaining life of the target memory is short, the data in the target memory is erased in the Vendor Erase mode, only the file header can be erased without erasing the file content, and the increase rate of the P/E (Program/Erase) value of the Block can be reduced. The scheme can be realized on a driving layer, and the service life of the memory can be prolonged on the basis of being compatible with various types of memories.
Referring to fig. 2, fig. 2 is a flowchart of a method for determining a memory wear level according to an embodiment of the present disclosure, where the embodiment further describes S102 in the embodiment corresponding to fig. 1, and specifically includes the following steps:
s201: and inquiring the memory model of the target memory.
S202: and determining the maximum erasing times of the target memory according to the memory model.
The maximum erasing times of the target memory are determined according to the type of the memory, and the maximum erasing times of the target memory refer to the maximum value which can be reached by the erasing times of a single Block in the target memory. When the erasing frequency of a certain Block reaches the maximum erasing frequency, the residual life of the target Block is judged to be 0.
S203: and determining the erasing threshold value according to the maximum erasing times.
Wherein, the maximum erasing times are positively correlated with the erasing threshold value, for example, the maximum erasing times are 10000 times, and the erasing threshold value is 5000 times; the maximum erasing times is 8000 times, and the erasing threshold value is 4000 times.
S204: and determining the maximum value of the actual erasing times of all the Block blocks in the target memory.
The maximum value of the actual erasing times refers to the maximum actual erasing times in all Block blocks, the maximum actual erasing times is a measured value, and the maximum erasing times is a preset value.
S205: judging whether the maximum value of the actual erasing times is larger than an erasing threshold value or not; if yes, entering S206; if not, the process proceeds to S207.
S206: and determining that the wear degree of the target memory is greater than the preset degree.
S207: determining that the degree of wear of the target memory is less than or equal to the preset degree.
In the process, the wear degree of the target memory is judged by using the maximum value of the actual erasing times in each Block, so that the determining efficiency of the wear degree of the memory can be improved.
As a possible implementation, the embodiment shown in fig. 1 may further determine the wear level of the target memory by: setting the Block with N names before the erasing times in the target memory as a target Block; wherein N is greater than 1; determining the average erasing times of all the target Block blocks; judging whether the average erasing times of all the target Block blocks are larger than an erasing threshold value or not; if so, judging that the abrasion degree of the target memory is greater than the preset degree; if not, the abrasion degree of the target memory is judged to be smaller than or equal to the preset degree. In the process, the average erasing times in the Block with higher erasing times are used for judging the abrasion degree of the target memory, so that the determination accuracy of the abrasion degree of the memory can be improved.
As a possible implementation manner, the present embodiment may implement the erasing operation of data by: receiving a data erasing instruction, and determining data to be erased corresponding to the data erasing instruction; the data to be erased comprises a file header and data content; if the current erasing mode of the target memory is set to the Vendor erasing mode, erasing the file header in the data to be erased, and setting the erasing state of the data to be erased; or, if the current erasing mode of the target memory is set as the physical erasing mode, erasing the file header and the data content in the data to be erased, and setting the erasing state of the data to be erased as erased.
Specifically, in the Vendor erase mode, the erasing of the file header in the data to be erased may be performed in the following manner, including: obtaining a target value from a target field; wherein the target value is 0 or 1; and setting all data of the file header in the data to be erased as the target value. After all data of the file header in the data to be erased are set as the target value, whether the data in the file header in the data to be erased are the target value can be judged; if yes, judging that the data to be erased are completely erased; if not, judging that the data to be erased is not erased completely.
In the physical erase mode, a target value may be obtained from a target field; wherein the target value is 0 or 1; and setting all data of the file header in the data to be erased as the target value, and setting all data of the data content in the data to be erased as the target value. After the above operation is executed, it can also be judged whether the data of the file header and the data content in the data to be erased are both the target values; if yes, judging that the data to be erased are completely erased; if not, judging that the data to be erased is not erased completely.
The flow described in the above embodiment is explained below by an embodiment in practical use.
Due to the limitations of manufacturing cost, storage space, etc., it is an important issue how to extend the service life of the device as much as possible based on the existing electronic devices. The erasing manner of the memory is one of the key factors influencing the service life of the memory. Although the storage class device needs to follow the JEDEC protocol, manufacturers have large differences in factory configuration of the memory due to differences in memory manufacturing processes of the manufacturers. How to adapt to the memories of various manufacturers to find the optimal memory erasing mode becomes a technical point which restricts the service life of the memories.
In order to improve the service life of the storage device, the embodiment provides a dynamic adjustment scheme of a storage device safe erasing method of a drive layer.
From the viewpoint of the lifetime of the memory, the main factor affecting the lifetime is the P/E value. Each Block is life-long and their erase times are limited. The lifetime of a storage class device is similar to the "barrel principle", depending on the minimum lifetime among all blocks. If a block is erased frequently, its lifetime is reduced to a minimum. Thus, the art has reduced the rate of life loss by introducing a wear balance. However, no matter whether the Block with the smaller P/E value is selected preferentially for dynamic balance or the static balance is realized by moving the data of the Block with the lower P/E value into the Block with the higher P/E value, the realization process is greatly influenced by the algorithm of a vendor manufacturer, and the actual increase and decrease of the P/E value are not influenced actually.
The present embodiment provides a dynamic adjustment technique for a memory security erase method of a driving layer, which adjusts the security erase method by recording and determining a maximum P/E value. And the actual physical erasing mode is adopted when the P/E value is lower than the threshold value by 50 percent, and the Vendor erasing mode is adopted when the P/E value is higher than the threshold value by 50 percent, so that the increasing rate of the P/E value is fundamentally reduced, and the purpose of prolonging the service life of the storage equipment is achieved.
In the Vendor ERASE mode, the electronic device may define the START address of the address range through an ERASE _ GROUP _ START (CMD35) command, define the END address of the address range through an ERASE _ GROUP _ END (CMD36) command, and finally set all the parameters to 0 through an ERASE (CMD38) command, and set 1 to the bit31 of the secure ERASE CMD38 for actual ERASE according to the JEDEC protocol flow. Fig. 3 is a flowchart of a dynamic adjustment of a method for securely erasing a memory in a driver layer according to an embodiment of the present application, and the method specifically includes the following steps:
s301: a Block erase instruction is accepted.
S302: the maximum erasing times are determined according to the manufacturer of the memory.
S303: judging whether the actual erasing times of the Block in the memory are larger than 50% of the maximum erasing times; if yes, entering S304; if not, the process proceeds to S305.
S304: and erasing data by adopting a Vendor erasing mode.
S305: and erasing the data by adopting a physical erasing mode.
S306: and erasing data confirmation.
The area after the erase operation erase is specifically 0 or 1, and can be known by looking at the target field ecsd [181], where the target field is predefined according to the process of the memory manufacturer. The data of the read erase area is compared with the target field ecsd [181], and if they are the same, it indicates that the erase is successful, and the erase data confirmation is completed.
According to the embodiment, through modification of the bottom software code, user intervention is not needed, and an original factory adjustment algorithm is not needed. The P/E value of the storage equipment is reduced fundamentally, so that the service life of the storage equipment is effectively prolonged, and the user experience effect is improved. In the embodiment, the dynamic adjustment of the memory safe erasing method is realized on the drive layer, and the scheme can prolong the service life of the storage device on the premise of ensuring the data safety.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a data erasure mode setting system according to an embodiment of the present application, where the system may include:
a query module 401, configured to query the erasing times of the Block in the target memory;
a determining module 402, configured to determine whether the wear degree of the target memory is greater than a preset degree according to the erasing frequency;
a first erasing control module 403, configured to set a current erasing mode of the target memory to a Vendor erasing mode if the wear degree of the target memory is greater than the preset degree, so as to erase data in the target memory in the Vendor erasing mode;
a second erasure control module 404, configured to set the current erasure mode of the target memory to a physical erasure mode if the wear-out degree of the target memory is less than or equal to the preset degree, so as to erase the data in the target memory in the physical erasure mode.
The present embodiment determines the wear level of the target memory according to the erasing times of the Block in the target memory, and then determines the current erasing mode of the target memory based on the wear level. Specifically, when the wear degree is greater than the preset degree, the current erasing mode of the target memory is set to the Vendor erasing mode; and when the wear degree is less than or equal to a preset degree, setting the current erasing mode of the target memory as a physical erasing mode. When the wear degree is greater than the preset degree, it is indicated that the remaining life of the target memory is short, the data in the target memory is erased in the Vendor Erase mode, only the file header can be erased without erasing the file content, and the increase rate of the P/E (Program/Erase) value of the Block can be reduced. The scheme can be realized on a driving layer, and the service life of the memory can be prolonged on the basis of being compatible with various types of memories.
Further, the determining module 402 is configured to determine a maximum value of actual erasing times of all the Block blocks in the target memory; the method is also used for judging whether the maximum value of the actual erasing times is larger than an erasing threshold value or not; if so, judging that the abrasion degree of the target memory is greater than the preset degree; if not, the abrasion degree of the target memory is judged to be smaller than or equal to the preset degree.
Further, the method also comprises the following steps:
a threshold value determining module, configured to query the memory model of the target memory before determining whether the maximum value of the actual erase times is greater than the erase threshold value; the memory is also used for determining the maximum erasing times of the target memory according to the memory model; the erasing threshold value is also determined according to the maximum erasing times; wherein the maximum erasing times is positively correlated with the erasing threshold value.
Further, the determining module 402 is configured to set a Block of N names before the erasing times in the target memory as a target Block; wherein N is greater than 1; the average erasing times of all the target Block blocks are determined; the device is also used for judging whether the average erasing times of all the target Block blocks are larger than an erasing threshold value or not; if so, judging that the abrasion degree of the target memory is greater than the preset degree; if not, the abrasion degree of the target memory is judged to be smaller than or equal to the preset degree.
Further, the method also comprises the following steps:
the erasing instruction receiving module is used for receiving a data erasing instruction and determining data to be erased corresponding to the data erasing instruction; the data to be erased comprises a file header and data content;
the first erasing execution module is used for erasing the file header in the data to be erased and setting the erasing state of the data to be erased as erased if the current erasing mode of the target memory is set to be the Vendor erasing mode;
or, the second erasing execution module is configured to erase the file header and the data content in the data to be erased and set the erasing state of the data to be erased as erased if the current erasing mode of the target memory is set to the physical erasing mode.
Further, the process of erasing the file header in the data to be erased by the first erasing execution module or the second erasing execution module includes: obtaining a target value from a target field; wherein the target value is 0 or 1; and setting all data of the file header in the data to be erased as the target value.
Further, the method also comprises the following steps:
the erasing state detection module is used for judging whether the data in the file header in the data to be erased are the target values or not after all the data in the file header in the data to be erased are set as the target values; if yes, judging that the data to be erased are completely erased; if not, judging that the data to be erased is not erased completely.
Since the embodiment of the system part corresponds to the embodiment of the method part, the embodiment of the system part is described with reference to the embodiment of the method part, and is not repeated here.
The present application also provides a storage medium having a computer program stored thereon, which when executed, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application further provides an electronic device, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided by the foregoing embodiments when calling the computer program in the memory. Of course, the electronic device may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A data erasing mode setting method is applied to a driving layer and comprises the following steps:
inquiring the erasing times of the Block in the target memory;
judging whether the abrasion degree of the target memory is greater than a preset degree or not according to the erasing times;
if so, setting the current erasing mode of the target memory to be a Vendor erasing mode so as to erase the data in the target memory in the Vendor erasing mode;
if not, setting the current erasing mode of the target memory as a physical erasing mode so as to erase the data in the target memory in the physical erasing mode.
2. The method of claim 1, wherein determining whether the wear level of the target memory is greater than a predetermined level according to the erase/write count comprises:
determining the maximum value of the actual erasing times of all the Block blocks in the target memory;
judging whether the maximum value of the actual erasing times is larger than an erasing threshold value or not;
if so, judging that the abrasion degree of the target memory is greater than the preset degree;
if not, the abrasion degree of the target memory is judged to be smaller than or equal to the preset degree.
3. The method of claim 2, before determining whether the maximum value of the actual erase count is greater than the erase threshold, further comprising:
inquiring the memory model of the target memory;
determining the maximum erasing times of the target memory according to the memory model;
determining the erasing threshold value according to the maximum erasing times; wherein the maximum erasing times is positively correlated with the erasing threshold value.
4. The method of claim 1, wherein determining whether the wear level of the target memory is greater than a predetermined level according to the erase/write count comprises:
setting the Block with N names before the erasing times in the target memory as a target Block; wherein N is greater than 1;
determining the average erasing times of all the target Block blocks;
judging whether the average erasing times of all the target Block blocks are larger than an erasing threshold value or not;
if so, judging that the abrasion degree of the target memory is greater than the preset degree;
if not, the abrasion degree of the target memory is judged to be smaller than or equal to the preset degree.
5. The data erasure pattern setting method according to any one of claims 1 to 4, further comprising:
receiving a data erasing instruction, and determining data to be erased corresponding to the data erasing instruction; the data to be erased comprises a file header and data content;
if the current erasing mode of the target memory is set to the Vendor erasing mode, erasing the file header in the data to be erased, and setting the erasing state of the data to be erased;
or, if the current erasing mode of the target memory is set as the physical erasing mode, erasing the file header and the data content in the data to be erased, and setting the erasing state of the data to be erased as erased.
6. The data erasing mode setting method of claim 5, wherein erasing the header in the data to be erased comprises:
obtaining a target value from a target field; wherein the target value is 0 or 1;
and setting all data of the file header in the data to be erased as the target value.
7. The data erasure pattern setting method according to claim 6, further comprising, after setting all data of a header in the data to be erased to the target value:
judging whether the data in the file header in the data to be erased are the target values;
if yes, judging that the data to be erased are completely erased;
if not, judging that the data to be erased is not erased completely.
8. A data erasure mode setting system, applied to a drive layer, comprising:
the query module is used for querying the erasing times of the Block in the target memory;
the judging module is used for judging whether the abrasion degree of the target memory is greater than a preset degree or not according to the erasing times;
the first erasing control module is used for setting the current erasing mode of the target memory to be a Vendor erasing mode if the abrasion degree of the target memory is greater than the preset degree, so that data in the target memory can be erased in the Vendor erasing mode;
and the second erasing control module is used for setting the current erasing mode of the target memory to be a physical erasing mode if the abrasion degree of the target memory is less than or equal to the preset degree, so that the data in the target memory is erased in the physical erasing mode.
9. An electronic device, comprising a memory in which a computer program is stored and a processor, wherein the processor implements the steps of the data erasure pattern setting method according to any one of claims 1 through 7 when calling the computer program in the memory.
10. A storage medium having stored thereon computer-executable instructions which, when loaded and executed by a processor, carry out the steps of a data erasure pattern setting method as claimed in any one of claims 1 to 7.
CN202111612478.6A 2021-12-27 2021-12-27 Data erasing mode setting method and system, electronic equipment and storage medium Pending CN114327269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111612478.6A CN114327269A (en) 2021-12-27 2021-12-27 Data erasing mode setting method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111612478.6A CN114327269A (en) 2021-12-27 2021-12-27 Data erasing mode setting method and system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114327269A true CN114327269A (en) 2022-04-12

Family

ID=81012045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111612478.6A Pending CN114327269A (en) 2021-12-27 2021-12-27 Data erasing mode setting method and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114327269A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079324A (en) * 2007-06-15 2007-11-28 华为技术有限公司 Storage device, its life monitoring device and monitoring method
CN104951249A (en) * 2014-03-27 2015-09-30 佳能株式会社 Memory control apparatus, information processing apparatus and control method thereof
CN109119108A (en) * 2018-08-15 2019-01-01 杭州阿姆科技有限公司 A method of improving the Nand service life
CN113703670A (en) * 2021-07-21 2021-11-26 苏州浪潮智能科技有限公司 Wear leveling control method, device, equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079324A (en) * 2007-06-15 2007-11-28 华为技术有限公司 Storage device, its life monitoring device and monitoring method
CN104951249A (en) * 2014-03-27 2015-09-30 佳能株式会社 Memory control apparatus, information processing apparatus and control method thereof
CN109119108A (en) * 2018-08-15 2019-01-01 杭州阿姆科技有限公司 A method of improving the Nand service life
CN113703670A (en) * 2021-07-21 2021-11-26 苏州浪潮智能科技有限公司 Wear leveling control method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US20200167083A1 (en) Techniques for controlling recycling of blocks of memory
CN101208753B (en) Method of achieving wear leveling in flash memory using relative grades
JP4812739B2 (en) Non-volatile data storage device static data area detection method, wear leveling method, data unit merging method and device
KR101454817B1 (en) Semiconductor memory devices and wear leveling methods thereof
US8051241B2 (en) Wear leveling technique for storage devices
CN101419842B (en) Loss equalizing method, apparatus and system for hard disc
US8498138B2 (en) Method for modifying data more than once in a multi-level cell memory location within a memory array
JP2011503768A (en) Writing data to different storage devices based on write frequency
KR20020029899A (en) Method, system and computer program for data management on storage medium
US11188261B2 (en) Memory controllers for solid-state storage devices
CN112397128B (en) Control method and device of Flash memory
CN110750466A (en) Method and device for prolonging erasing and writing life of flash memory
CN109240615B (en) Data reading method, device and equipment of solid state disk
CN113703670B (en) Wear balance control method, device, equipment and readable storage medium
CN114327269A (en) Data erasing mode setting method and system, electronic equipment and storage medium
JP2008123314A (en) Information recording method and information recording system to semiconductor storage device
CN110675910B (en) SSD wear leveling mechanism test method, system, medium and terminal
CN114385092B (en) Erasing method of solid state disk flash memory array and solid state disk main control chip
JP2012009112A (en) Nonvolatile semiconductor memory device
CN116774948B (en) Data processing method, device, electronic device and storage medium
CN116820351B (en) Cold and hot data calibration method and device, storage medium and electronic equipment
CN112130763B (en) Solid state disk wear balancing method based on temperature monitoring
CN116627353A (en) File management method, device, equipment and storage medium
CN103778083B (en) Data memory device and non-volatility memorizer control method
CN110659218A (en) Wear leveling method suitable for small data volume Flash

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20221121

Address after: No. 500 Songling Road, Laoshan District, Qingdao City, Shandong Province, 266100

Applicant after: GOERTEK TECHNOLOGY Co.,Ltd.

Address before: 261031 workshop 1, phase III, Geer Photoelectric Industrial Park, 3999 Huixian Road, Yongchun community, Qingchi street, Weifang High tech Zone, Weifang City, Shandong Province

Applicant before: GoerTek Optical Technology Co.,Ltd.