CN112463071B - Method and device for selectively clearing nonvolatile storage - Google Patents

Method and device for selectively clearing nonvolatile storage Download PDF

Info

Publication number
CN112463071B
CN112463071B CN202011460034.0A CN202011460034A CN112463071B CN 112463071 B CN112463071 B CN 112463071B CN 202011460034 A CN202011460034 A CN 202011460034A CN 112463071 B CN112463071 B CN 112463071B
Authority
CN
China
Prior art keywords
data
clearing
cleared
hash value
variable containing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011460034.0A
Other languages
Chinese (zh)
Other versions
CN112463071A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011460034.0A priority Critical patent/CN112463071B/en
Publication of CN112463071A publication Critical patent/CN112463071A/en
Application granted granted Critical
Publication of CN112463071B publication Critical patent/CN112463071B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a method for selectively clearing nonvolatile storage, which comprises the following steps: defining a clear flag constant; setting a hash value list in a nonvolatile storage medium, wherein a plurality of hash values are stored in the hash value list; when data clearing operation is executed, if the variable containing data is not cleared, calculating a clear flag constant and a corresponding hash value of the variable containing data which is not cleared; comparing the calculated hash value with the corresponding hash value stored in the hash value list, and if the comparison is consistent, not clearing the variable containing the data; if the comparison is inconsistent, the variable containing the data is cleared, the invention also provides a device for selectively clearing the nonvolatile storage, which can set important configuration data such as a digital certificate and the like as non-clearing data and store the non-clearing data into a nonvolatile storage medium, thereby effectively improving the flexibility and the safety of data storage and data clearing and preventing the important data from being cleared under the conditions of battery power failure and the like.

Description

Method and device for selectively clearing nonvolatile storage
Technical Field
The present invention relates to the field of data storage, and in particular, to a method and apparatus for selectively clearing nonvolatile memory.
Background
With the development of server technology, the customization requirements of clients on the servers are more and more, and some clients can customize the servers with different models according to different service requirements.
Generally, different types of servers often have different data (which can be maintained after power failure) to be stored in a Non-Volatile Random Access Memory (NVRAM), and the data of all NVRAMs to be cleared cannot meet the requirements of clients even when a main board battery is powered off or a special jumper is used.
Based on the current situation, currently, a method for dividing the NVRAM into a clearable area and a holding area exists, so that the size of the partition of the clearable area and the holding area needs to be considered, the configuration before the partition is not compatible, and the situation of false clearing exists, so that important data is lost, and the flexibility and the safety of data storage and data clearing are not facilitated.
Disclosure of Invention
The invention aims to solve the problems in the prior art, and innovatively provides a method and a device for selectively clearing nonvolatile storage, so that the problems that the size of a partition area needs to be considered and mistaken clearing exists in the data clearing process in a nonvolatile storage medium in the prior art are effectively solved, the flexibility and the safety of data storage and data clearing are effectively improved, and important data are prevented from being cleared under the conditions of power failure of a battery and the like.
A first aspect of the present invention provides a method of selectively clearing non-volatile storage, comprising:
defining a clearing mark constant, wherein each mark bit of the clearing mark constant represents a mark whether a corresponding variable containing data in the nonvolatile storage is cleared or not;
setting a hash value list in a nonvolatile storage medium, wherein the hash value list stores a plurality of hash values, each hash value is obtained by performing hash operation on a clear flag constant and a variable containing non-clear data, and a flag bit of the clear flag constant corresponding to the variable containing the non-clear data represents that the variable is not cleared;
when data clearing operation is executed, whether the variable containing the data is not cleared is judged through a corresponding zone bit in a clearing zone constant, if the variable containing the data is not cleared, the clearing zone constant and the corresponding hash value of the variable containing the data which is not cleared are calculated; comparing the calculated hash value with the corresponding hash value stored in the hash value list, and if the comparison is consistent, not clearing the variable containing the data; if the comparison is inconsistent, the variable containing the data is cleared.
Optionally, the nonvolatile storage medium includes a plurality of data-containing variables, and the data-containing variables are in one-to-one correspondence with the flag bits of the clear flag constant.
Optionally, when a variable containing data is stored in the nonvolatile storage medium, querying whether a flag bit of the variable containing data to be stored in the removal flag constant is not removed, if not, performing hash operation on the corresponding variable containing data not to be removed and the removal flag constant, and storing an obtained hash value into a hash value list; if the variable is cleared, the corresponding variable containing the cleared data is directly stored in the nonvolatile storage medium.
Optionally, the method further comprises: if the variable containing data is clearable, the variable containing data is cleared.
Optionally, the non-volatile storage medium includes NVRAM.
Optionally, defining the clear flag constant and setting the hash value list in the nonvolatile storage medium are both implemented by configuring the BIOS.
The second aspect of the present invention provides an apparatus for selectively clearing nonvolatile memory, which is implemented based on the method for selectively clearing nonvolatile memory according to the first aspect of the present invention, including:
the definition module is used for defining a clearing mark constant, and each mark bit of the clearing mark constant represents a mark whether a corresponding variable containing data in the nonvolatile storage is cleared or not;
the setting module is used for setting a hash value list in a nonvolatile storage medium, wherein a plurality of hash values are stored in the hash value list, each hash value is obtained by carrying out hash operation on a clear flag constant and a variable containing non-clear data, and a flag bit of the clear flag constant corresponding to the variable containing the non-clear data represents that the data is not cleared;
the first clearing module is used for judging whether the variable containing the data is not cleared or not through the corresponding zone bit in the clearing zone constant when the data clearing operation is executed, and calculating the hash value of the clearing zone constant and the corresponding variable containing the data which is not cleared if the variable containing the data is not cleared; comparing the calculated hash value with the corresponding hash value stored in the hash value list, and if the comparison is consistent, not clearing the variable containing the data; if the comparison is inconsistent, the variable containing the data is cleared.
Optionally, the nonvolatile storage medium includes a plurality of data-containing variables, and each data-containing variable corresponds to each flag bit of the clear flag constant.
Optionally, when a variable containing data is stored in the nonvolatile storage medium, querying whether a flag bit of the variable containing data to be stored in the removal flag constant is not removed, if not, performing hash operation on the corresponding variable containing data not to be removed and the removal flag constant, and storing an obtained hash value into a hash value list; if the variable is cleared, the corresponding variable containing the cleared data is directly stored in the nonvolatile storage medium.
Optionally, the method further comprises: and the second clearing module is used for clearing the variable containing the data if the variable containing the data is cleanable.
The technical scheme adopted by the invention comprises the following technical effects:
1. the invention effectively solves the problems that the size of a divided area needs to be considered and mistaken clearing exists in the data clearing process in the nonvolatile storage medium caused by the prior art, can set important configuration data such as a digital certificate and the like as unremovable data and store the unremovable data in the nonvolatile storage medium, effectively improves the flexibility and safety of data storage and data clearing, and prevents the important data from being cleared under the conditions of power failure of a battery and the like.
2. According to the technical scheme, the flag bit for judging whether the variable containing the data is cleared or not is set, and the hash value obtained by carrying out hash operation on the cleared flag constant and the variable containing the data which is not cleared is compared with the hash value stored in the hash value list in advance for verification, so that the data is further prevented from being cleared by mistake, and the safety of data storage is improved.
3. In the technical scheme of the invention, the nonvolatile storage medium comprises a plurality of variables containing data, and the variables containing data correspond to the zone bits of the clearing flag constant one by one, so that the corresponding relation between each data variable in the nonvolatile storage medium and the zone bit of the clearing flag constant is ensured, and the reliability of data storage and data clearing is effectively improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without any creative effort.
FIG. 1 is a schematic flow diagram of a process according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating variable storage in a non-volatile storage medium according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating variable removal in a non-volatile storage medium according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device in a third embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example one
As shown in FIG. 1, the present invention provides a method for selectively clearing non-volatile storage, comprising:
s11, defining a clear flag constant, wherein each flag bit of the clear flag constant represents a mark for indicating whether a corresponding variable containing data in the nonvolatile storage is cleared;
s12, setting a hash value list in the nonvolatile storage medium, wherein the hash value list stores a plurality of hash values, each hash value is obtained by performing hash operation on a clear flag constant and a variable containing data which is not cleared, and the flag bit of the clear flag constant corresponding to the variable containing data which is not cleared represents that the data is not cleared;
s13, when executing data clearing operation, judging whether the variable containing data is not cleared by clearing the corresponding flag bit in the flag constant, if so, executing step S14; if the judgment result is no, executing step S15;
s14, calculating the hash value of the removing mark constant and the corresponding variable containing the data not to be removed; comparing the calculated hash value with the corresponding hash value stored in the hash value list to determine whether the calculated hash value is consistent with the corresponding hash value, if so, executing the step S16, otherwise, executing the step S15;
s15, clearing the variable containing data;
s16, the variable containing the data is not cleared.
In step S11, the nonvolatile storage medium includes a plurality of data-containing variables, and the data-containing variables are in one-to-one correspondence with the flag bits of the clear flag constant. The arrangement order of the flag bits of the clear flag constant corresponds to the position order of the plurality of data-containing variables in the nonvolatile storage medium. Specifically, the flag bit may be represented by 0 or 1, where 0 represents not to be cleared, 1 represents to be cleared, or 0 represents to be cleared, and 1 represents not to be cleared, or may be marked in other manners, which is not limited herein.
The specific implementation manner may be to define the clear flag constant, BIOS (Basic Input Output System ), as the manager of the most direct hardware setting and control at the bottom layer of the server motherboard, and to provide more simple usability functions for the server by configuring the BIOS program. The BIOS is a set of programs solidified on a ROM chip on a mainboard, which stores the most important basic input and output programs of the computer, system setting information, a self-checking program after power-on and a system self-starting program, and the main function of the BIOS is to provide the bottommost and most direct hardware setting and control for the computer. The non-volatile storage medium is a storage area which can still store data after power failure, and stores some important configuration and safety related data of the server. The server motherboard is generally provided with a jumper and a motherboard battery, and the data stored in the nonvolatile storage medium can be cleared by using the jumper and the motherboard battery to power down. Some data may not be erased when the non-volatile storage medium is erased.
In step S12, the setting of the hash value list may also be implemented by configuring the BIOS, that is, the setting of the BIOS is implemented by setting a script program in the BIOS, the hash value list is not limited in the setting position in the nonvolatile storage medium, and the hash value list stores a plurality of hash values, where each hash value is a value obtained by performing a hash operation on the purge flag constant and a variable including non-purge data, that is, one hash value obtained by performing a hash operation on the purge flag constant and a variable including non-purge data is stored in the hash value list, and each hash value in the hash value list corresponds to one variable including non-purge data in the nonvolatile storage medium, and a mapping relationship between the variable including non-purge data and the hash value may be obtained, so as to facilitate later comparison and verification.
When storing a variable containing data in a nonvolatile storage medium, as shown in fig. 2, first, inquiring whether a flag bit of the variable containing data to be stored in a clear flag constant is not clear, if not, performing hash operation on the corresponding variable containing non-clear data and the clear flag constant, and storing an obtained hash value into a hash value list; if the variable is cleared, the corresponding variable containing the cleared data is directly stored in the nonvolatile storage medium.
In steps S13-S16, before the data erasing operation is performed, when the server receives an instruction to erase the nonvolatile storage medium, such as a jumper or a power failure of the motherboard battery, the server restarts and determines whether the variable including the data in the nonvolatile storage medium needs to be erased.
When the action of clearing the data in the nonvolatile storage medium is executed, as shown in fig. 3, first, the variable containing the data in the nonvolatile storage medium is traversed, and whether the variable containing the data needs to be cleared at present is determined according to whether the corresponding flag bit of the variable containing the data in the clearing flag constant is not cleared at present.
If the current variable containing data does not need to be cleared, calculating a clear flag constant and a corresponding hash value of the variable containing data which is not cleared; comparing the calculated hash value with the corresponding hash value stored in the hash value list to determine whether the hash value is consistent, and if so, not clearing the current variable containing the data; if the comparison is inconsistent, clearing the current variable containing the data; and then traversing the next variable containing the data until the variable containing the data in the nonvolatile storage medium is traversed to end.
In this embodiment of the present invention, the nonvolatile storage medium may include an NVRAM (Non-Volatile Random Access Memory), or may be another nonvolatile storage medium, which is not limited herein.
It should be noted that, each step of the technical solution of the present invention can be implemented by programming in a programming language, and the implementation idea corresponds to the step in the solution, and can also be implemented by other ways, and the present invention is not limited herein.
The invention effectively solves the problems that the size of a divided area needs to be considered and mistaken clearing exists in the data clearing process in the nonvolatile storage medium caused by the prior art, can set important configuration data such as a digital certificate and the like as unremovable data and store the unremovable data in the nonvolatile storage medium, effectively improves the flexibility and safety of data storage and data clearing, and prevents the important data from being cleared under the conditions of power failure of a battery and the like.
According to the technical scheme, the flag bit for judging whether the variable containing the data is cleared or not is set, and the hash value obtained by carrying out hash operation on the cleared flag constant and the variable containing the data which is not cleared is compared with the hash value stored in the hash value list in advance for verification, so that the data is further prevented from being cleared by mistake, and the safety of data storage is improved.
In the technical scheme of the invention, the nonvolatile storage medium comprises a plurality of variables containing data, and the variables containing data correspond to the zone bits of the clearing flag constant one by one, so that the corresponding relation between each data variable in the nonvolatile storage medium and the zone bit of the clearing flag constant is ensured, and the reliability of data storage and data clearing is effectively improved.
Example two
As shown in fig. 4, the technical solution of the present invention further provides a device for selectively clearing a nonvolatile memory, which is implemented based on the first embodiment, and includes:
a defining module 101, configured to define a clear flag constant, where each flag bit of the clear flag constant represents a flag indicating whether a corresponding variable including data in the nonvolatile memory is cleared;
the setting module 102 is configured to set a hash value list in a nonvolatile storage medium, where the hash value list stores multiple hash values, each hash value is a value obtained by performing a hash operation on a clear flag constant and a variable including non-clear data, and a flag bit of the clear flag constant corresponding to the variable including the non-clear data represents that the variable is not clear;
the first clearing module 103, when performing data clearing operation, determines whether the variable containing data is not cleared by a corresponding flag bit in the clearing flag constant, and calculates a hash value of the clearing flag constant and the corresponding variable containing data if the variable containing data is not cleared; comparing the calculated hash value with the corresponding hash value stored in the hash value list, and if the comparison is consistent, not clearing the variable containing the data; if the comparison is inconsistent, the variable containing the data is cleared.
The nonvolatile storage medium comprises a plurality of variables containing data, and each variable containing data is in one-to-one correspondence with each flag bit of the clear flag constant.
When variables containing data are stored in a nonvolatile storage medium, inquiring whether flag bits of the variables containing data to be stored in a clearing flag constant are not cleared, if the flag bits are not cleared, performing hash operation on the corresponding variables containing data not to be cleared and the clearing flag constant, and storing an obtained hash value into a hash value list; if the variable is cleared, the corresponding variable containing the cleared data is directly stored in the nonvolatile storage medium.
The invention effectively solves the problems that the size of a divided area needs to be considered and mistaken clearing exists in the data clearing process in the nonvolatile storage medium caused by the prior art, can set important configuration data such as a digital certificate and the like as unremovable data and store the unremovable data in the nonvolatile storage medium, effectively improves the flexibility and safety of data storage and data clearing, and prevents the important data from being cleared under the conditions of power failure of a battery and the like.
According to the technical scheme, the flag bit for judging whether the variable containing the data is cleared or not is set, and the hash value obtained by carrying out hash operation on the cleared flag constant and the variable containing the data which is not cleared is compared with the hash value stored in the hash value list in advance for verification, so that the data is further prevented from being cleared by mistake, and the safety of data storage is improved.
In the technical scheme of the invention, the nonvolatile storage medium comprises a plurality of variables containing data, and the variables containing data correspond to the zone bits of the clearing flag constant one by one, so that the corresponding relation between each data variable in the nonvolatile storage medium and the zone bit of the clearing flag constant is ensured, and the reliability of data storage and data clearing is effectively improved.
EXAMPLE III
As shown in fig. 5, the present invention further provides an apparatus for selectively clearing a nonvolatile memory, wherein the defining module 101 defines a clearing flag constant, and each flag bit of the clearing flag constant represents a flag indicating whether a corresponding variable containing data in the nonvolatile memory is cleared;
the setting module 102 is configured to set a hash value list in a nonvolatile storage medium, where the hash value list stores multiple hash values, each hash value is a value obtained by performing a hash operation on a clear flag constant and a variable including non-clear data, and a flag bit of the clear flag constant corresponding to the variable including the non-clear data represents that the variable is not clear;
the first clearing module 103, when performing data clearing operation, determines whether the variable containing data is not cleared by a corresponding flag bit in the clearing flag constant, and calculates a hash value of the clearing flag constant and the corresponding variable containing data if the variable containing data is not cleared; comparing the calculated hash value with the corresponding hash value stored in the hash value list, and if the comparison is consistent, not clearing the variable containing the data; if the comparison is inconsistent, clearing the variable containing the data;
the second purge module 104 purges the variable containing data if the variable containing data is purgeable.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

1. A method for selectively clearing non-volatile storage, comprising:
defining a clearing mark constant, wherein each mark bit of the clearing mark constant represents a mark whether a corresponding variable containing data in the nonvolatile storage is cleared or not;
setting a hash value list in a nonvolatile storage medium, wherein the hash value list stores a plurality of hash values, each hash value is obtained by performing hash operation on a clear flag constant and a variable containing non-clear data, and a flag bit of the clear flag constant corresponding to the variable containing the non-clear data represents non-clear;
when data clearing operation is executed, whether the variable containing the data is not cleared is judged through a corresponding zone bit in a clearing zone constant, if the variable containing the data is not cleared, the clearing zone constant and the corresponding hash value of the variable containing the data which is not cleared are calculated; comparing the calculated hash value with the corresponding hash value stored in the hash value list, and if the comparison is consistent, not clearing the variable containing the data; if the comparison is inconsistent, the variable containing the data is cleared.
2. The method of claim 1, wherein the nonvolatile storage medium includes a plurality of data-containing variables, and the data-containing variables are in one-to-one correspondence with flag bits of the clear flag constant.
3. The method according to claim 1, wherein when storing a variable containing data in a nonvolatile storage medium, querying whether a flag bit of the variable containing data to be stored in a clear flag constant is not clear, if the flag bit is not clear, performing a hash operation on the corresponding variable containing data not to be cleared and the clear flag constant, and storing an obtained hash value in a hash value list; if the variable is cleared, the corresponding variable containing the cleared data is directly stored in the nonvolatile storage medium.
4. The method of selectively clearing nonvolatile memory as claimed in claim 1, further comprising: if the variable containing data is clearable, the variable containing data is cleared.
5. The method of selectively clearing non-volatile storage according to any of claims 1-4, wherein the non-volatile storage medium comprises NVRAM.
6. The method of any of claims 1-4, wherein defining the purge flag constant and setting the hash value list in the non-volatile storage medium are performed by configuring the BIOS.
7. An apparatus for selectively erasing non-volatile storage, implemented on the basis of the method for selectively erasing non-volatile storage according to any one of claims 1 to 6, comprising:
the definition module is used for defining a clearing mark constant, and each mark bit of the clearing mark constant represents a mark whether a corresponding variable containing data in the nonvolatile storage is cleared or not;
the setting module is used for setting a hash value list in a nonvolatile storage medium, wherein a plurality of hash values are stored in the hash value list, each hash value is obtained by carrying out hash operation on a clear flag constant and a variable containing data which is not cleared, and a flag bit of the clear flag constant corresponding to the variable containing the data which is not cleared represents that the data is not cleared;
the first clearing module is used for judging whether the variable containing the data is not cleared or not through the corresponding zone bit in the clearing zone constant when the data clearing operation is executed, and calculating the hash value of the clearing zone constant and the corresponding variable containing the data which is not cleared if the variable containing the data is not cleared; comparing the calculated hash value with the corresponding hash value stored in the hash value list, and if the comparison is consistent, not clearing the variable containing the data; if the comparison is inconsistent, the variable containing the data is cleared.
8. The apparatus of claim 7, wherein the nonvolatile storage medium includes a plurality of data-containing variables, each data-containing variable corresponding to a flag bit of the clear flag constant.
9. The apparatus according to claim 7, wherein when storing the variable containing data in the nonvolatile storage medium, querying whether the flag bit of the variable containing data to be stored in the clear flag constant is not clear, if not, performing a hash operation on the corresponding variable containing data not to be cleared and the clear flag constant, and storing an obtained hash value in the hash value list; if the variable is cleared, the corresponding variable containing the cleared data is directly stored in the nonvolatile storage medium.
10. The apparatus for selectively clearing nonvolatile memory as in claim 7, further comprising: and the second clearing module is used for clearing the variable containing the data if the variable containing the data is cleanable.
CN202011460034.0A 2020-12-11 2020-12-11 Method and device for selectively clearing nonvolatile storage Active CN112463071B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011460034.0A CN112463071B (en) 2020-12-11 2020-12-11 Method and device for selectively clearing nonvolatile storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011460034.0A CN112463071B (en) 2020-12-11 2020-12-11 Method and device for selectively clearing nonvolatile storage

Publications (2)

Publication Number Publication Date
CN112463071A CN112463071A (en) 2021-03-09
CN112463071B true CN112463071B (en) 2022-06-07

Family

ID=74803433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011460034.0A Active CN112463071B (en) 2020-12-11 2020-12-11 Method and device for selectively clearing nonvolatile storage

Country Status (1)

Country Link
CN (1) CN112463071B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599262A (en) * 2016-12-21 2017-04-26 深圳市易特科信息技术有限公司 Medical informatization medical file redundancy removal system and method
CN111143904B (en) * 2018-11-02 2024-03-29 嘉楠明芯(北京)科技有限公司 Data decryption method, device and computer readable storage medium
CN111736763B (en) * 2020-05-25 2022-05-13 瑞芯微电子股份有限公司 Storage data reading control method and device

Also Published As

Publication number Publication date
CN112463071A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN105760200A (en) Terminal device and system updating method thereof
CN110442473B (en) Nonvolatile data storage method and device, electronic equipment and medium
US20090037646A1 (en) Method of using a flash memory for a circular buffer
US20060224874A1 (en) Method for updating system management basic input output system (SMBIOS) data
CN109828774B (en) Server system and starting method thereof
CN109189342A (en) A kind of disk hanging method, device, equipment and storage medium
CN112732310A (en) Firmware upgrading method, system, equipment and medium based on embedded boot partition
CN113254286A (en) Log output method and system of server and related device
CN109766140A (en) A kind of localization method and device that set-top box starting is abnormal
CN103455750B (en) The high peace verification method of a kind of embedded device and device
CN112463071B (en) Method and device for selectively clearing nonvolatile storage
CN113238790A (en) Firmware program updating method and system based on SD card and EEPROM
CN112631621A (en) Dependency package management method, device, server and storage medium
CN109388617B (en) Method and device for judging reliability of file timestamp
CN112463042B (en) Data volume import data verification method, device, terminal and storage medium
CN113704177B (en) Storage method, system and related components of server firmware upgrade file
CN115827069A (en) Starting control method, system and device for server mainboard
CN113094107B (en) Data protection method, device, equipment and computer storage medium
CN115328851A (en) Data protection method, device, equipment and medium
CN111611000B (en) High-reliability firmware air upgrading method and system
CN113568581A (en) Multi-application resource recovery method and system for embedded equipment
CN111190627A (en) System upgrading method and device
CN107193581B (en) Firmware upgrading method and device, storage medium and computer equipment
CN110647455A (en) Storage device restart recording method and system
CN109657476A (en) The verification method and relevant apparatus of BIOS recovery file credible

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