CN110597469A - Storage partition write protection method and device and computer readable storage medium - Google Patents
Storage partition write protection method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN110597469A CN110597469A CN201911010177.9A CN201911010177A CN110597469A CN 110597469 A CN110597469 A CN 110597469A CN 201911010177 A CN201911010177 A CN 201911010177A CN 110597469 A CN110597469 A CN 110597469A
- Authority
- CN
- China
- Prior art keywords
- partition
- write
- written
- data
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/78—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
- G06F3/0622—Securing storage systems in relation to access
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0637—Permissions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Storage Device Security (AREA)
Abstract
The application provides a storage partition write protection method, a storage partition write protection device and a computer readable storage medium, wherein when data to be written is received, a target write partition of the data to be written on a memory is determined; writing data to be written into a target writing partition, wherein a writable area in the target writing partition is in a write protection closed state before the data to be written is written; and when the data to be written is written, performing write protection starting processing on the target write partition. Through the implementation of the scheme, the writable area in the memory partition is in the write protection closed state in advance, and the write protection opening processing of the partition is executed after the data are written into the partition, so that the data storage safety is effectively improved, and the write protection process is simplified.
Description
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method and an apparatus for write protection of a storage partition, and a computer-readable storage medium.
Background
As various storage devices are applied more and more widely in various industries, users have higher and higher requirements for reliability of data stored in the storage devices. In order to avoid that important data of a user is lost, tampered or a system is paralyzed due to the fact that data stored in a storage device is attacked, security of data storage is generally improved by means of write protection of the storage device at present.
However, in the currently adopted write protection method, when data is written, the write protection of the partition in which the data has been written is temporarily closed, so that the original data in the storage device still has a risk of being attacked, which causes that the data storage security still cannot be effectively ensured, and a flow of closing and then opening the partition write protection is required to be executed each time data is written, which is tedious in flow.
Disclosure of Invention
The embodiment of the application provides a storage partition write protection method, a storage partition write protection device and a computer readable storage medium, which can at least solve the problems that the data storage security cannot be effectively guaranteed and the flow is relatively tedious when the write protection of storage equipment is performed in the related art.
A first aspect of an embodiment of the present application provides a storage partition write protection method, including:
when receiving data to be written, determining a target writing partition of the data to be written on a memory;
writing the data to be written into the target writing partition; the writable area in the target writing partition is in a write protection closed state before the data to be written is written;
and when the data to be written is written, performing write protection starting processing on the target writing partition.
A second aspect of the embodiments of the present application provides a storage partition write protection apparatus, including:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target writing partition of data to be written on a memory when the data to be written is received;
the writing module is used for writing the data to be written into the target writing partition; the writable area in the target writing partition is in a write protection closed state before the data to be written is written;
and the processing module is used for performing write protection starting processing on the target write partition when the data to be written is written.
A third aspect of embodiments of the present application provides an electronic apparatus, including: the storage partition write protection method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the storage partition write protection method provided in the first aspect of the embodiment of the present application when executing the computer program.
A fourth aspect of the present embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the storage partition write protection method provided in the first aspect of the present embodiment.
In view of the above, according to the storage partition write protection method, device and computer-readable storage medium provided by the scheme of the application, when receiving data to be written, a target write partition of the data to be written on a memory is determined; writing data to be written into a target writing partition, wherein a writable area in the target writing partition is in a write protection closed state before the data to be written is written; and when the data to be written is written, performing write protection starting processing on the target write partition. Through the implementation of the scheme, the writable area in the memory partition is in the write protection closed state in advance, and the write protection opening processing of the partition is executed after the data are written into the partition, so that the data storage safety is effectively improved, and the write protection process is simplified.
Drawings
Fig. 1 is a schematic basic flow chart of a storage partition write protection method according to a first embodiment of the present application;
fig. 2 is a schematic flowchart of a data writing method according to a first embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a detailed flow of a write protection method for a storage partition according to a second embodiment of the present application;
FIG. 4 is a block diagram of a program module of a write protect apparatus for a memory partition according to a third embodiment of the present application;
FIG. 5 is a block diagram of another embodiment of a memory partition write protect apparatus;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. 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.
In order to overcome the defects that the data storage security cannot be effectively guaranteed and the process is relatively tedious when the write protection of the storage device is performed in the related art, a first embodiment of the present application provides a storage partition write protection method, for example, fig. 1 is a basic flowchart of the storage partition write protection method provided in this embodiment, where the storage partition write protection method includes the following steps:
step 101, when receiving data to be written, determining a target writing partition of the data to be written on a memory.
In particular, in practical applications, the memory may be different types of memories such as ROM, RAM, EPROM or EEPROM. In this embodiment, a memory is partitioned according to a preset partition rule in advance, and in the process of writing data, a partition sequenced before in all writable partitions may be determined as a target writing partition, or a writable partition may be randomly selected as a target writing partition, or a data attribute of data to be written and a partition attribute of the writable partition are acquired, and then a partition with a matching attribute is taken as a target writing partition. In addition, it should be noted that, in this embodiment, the number of the target writing partitions needed for the data to be written may be one or more, and is not limited herein.
And 102, writing the data to be written into the target writing partition.
Specifically, the writable area in the target write partition in this embodiment is in a write protection off state before the data to be written is written, that is, the writable area on the memory is defaulted to not start write protection in advance. It should be understood that the writable area in this embodiment is the smallest write unit of the target write partition, and may be, for example, a sub-partition further divided from the target write partition.
As shown in fig. 2, which is a schematic flow chart of a data writing method provided in this embodiment, in an optional implementation manner of this embodiment, when writing data to be written into a target writing partition, the method specifically includes the following steps:
step 1021, obtaining partition attribute information of the target writing partition;
step 1022, judging whether the partition attribute information meets the data writing condition of the data to be written;
and step 1023, writing the data to be written into the target writing partition when the data writing condition is met.
Specifically, in practical applications, the storage performance of all partitions in a storage unit is not reliable, so that the reliability evaluation of the partitions has a large influence on the data storage security.
Further, in an optional implementation manner of this embodiment, the partition attribute information includes: accumulating the number of times of erasing within a preset historical time period; judging whether the partition attribute information meets the data writing condition of the data to be written comprises the following steps: judging whether the accumulated erasing times are lower than a preset erasing time threshold value or not; and when the number of times of erasing is lower than the threshold value of the times of erasing, the data writing condition of the data to be written is met.
Specifically, in this embodiment, the data storage reliability of the partition may be evaluated based on the historical accumulated erasing times of the partition, and since the erasing times of the partition may reflect the aging degree of the partition to a greater extent, the determination of writing based on the accumulated erasing times of the partition has higher accuracy. The accumulated number of times of erasing may be a total number of times of erasing from the time of active use of the memory to the present time, or may be a total number of times of erasing within a certain period of time before, and is not limited herein.
In addition, in practical applications, the partition attribute information may also be determined as other factors, such as an average temperature or an average writing speed when data writing is performed within a preset historical time period, wherein if the average temperature is lower than a temperature standard value or the average writing speed is higher than a speed standard value, the target writing partition satisfies a data writing condition, and data writing is allowed.
And 103, when the data to be written is written completely, performing write protection starting processing on the target writing partition.
Specifically, write protection can protect the original data in the memory to prevent misoperation on one hand, and can avoid the attack of viruses on the data on the other hand. In this embodiment, the writable area in the memory partition is in a write-protection off state in advance, and the write-protection on processing of the partition is executed after data is written into the partition, on one hand, the write-protection on the written data can be realized only by performing the write-protection on processing, and the write-protection process is simplified; on the other hand, the area of the memory partition in which data can be written is not subjected to write protection in advance, so that write protection closing is not involved before data writing, and therefore, the risk that the written data is attacked due to write protection closing does not exist, that is, the writing of new data does not affect the write protection of the existing data in the memory, and the data storage security is effectively improved.
It should be noted that, in practical applications, if a single write of data to be written relates to multiple target write partitions, when performing write protection opening processing, the write protection opening processing may be performed after the write of the single partition is completed, or the write protection opening processing may be performed on all partitions in a unified manner after all partitions are completely written.
In an optional implementation manner of this embodiment, the performing write-protection opening processing on the target write partition includes: determining a write protection opening processing strategy corresponding to a target write partition; and performing write protection opening processing on the target write-in partition according to the write protection opening processing strategy.
Specifically, in this embodiment, the write protection opening processing policy is not unique, and in practical application, according to different practical application scenarios, a plurality of different write protection opening processing policies may be pre-formulated to meet different write protection requirements and data storage requirements.
In a typical embodiment, the write-protect open handling policy may include the following two: firstly, controlling a target write-in partition to integrally start a write-protection state; and secondly, controlling the target to be written into the partition, and starting a write protection state in an area in which data to be written is written.
In practical application, in order to ensure the efficiency of write protection and save processing performance, all partitions into which data to be written are written may be write protected, regardless of whether the partitions are full. And, in another case, in order to ensure the utilization rate of the storage space, when a single partition is not fully written, only the area in which data is written in the partition may be write-protected, and the unwritten area in the partition still maintains the write-protection closed state, for example, there are 10 sub-partitions in the current partition, and 6 of the sub-partitions are used for this data writing, so as to ensure that the storage space is not wasted, and the write-protection open state of the written sub-partitions is not affected when the remaining sub-partitions are written in the following, that is, to improve the utilization rate of the storage space and the data storage security at the same time, only the 6 sub-partitions that have been used may be opened, and the remaining 4 sub-partitions continue to maintain the original write-protection closed state.
In addition, it should be further noted that, in other embodiments of this embodiment, when the write protection enabling processing policy is to control the target write partition to enable the write protection state as a whole, if the target write partition is not full and a write requirement is still met for the non-full area in a subsequent data write process, so as to ensure a space utilization rate of the memory, when data write needs to be performed on a non-data written area of the partition in the subsequent process, the partition is controlled to perform write protection closing, so that data write is facilitated to continue, and then the write protection enabling processing is performed again after data write is completed.
In an optional implementation manner of this embodiment, determining the write protection opening processing policy corresponding to the target write partition includes: acquiring data writing attribute information for writing data to be written; and determining a write protection opening processing strategy corresponding to the target write partition based on the data write attribute information.
Specifically, the write-protection-on processing policy of this embodiment is determined based on the data write attribute information, and in practical application, the data write attribute is associated with a write action of performing data write on the data to be written this time, for example, a space usage amount of the data to be written on the target write partition, a data importance of the data to be written, a read-write frequency of the target write partition within a history time period, and the like, which is not uniquely defined in this embodiment.
For example, taking the data write attribute information as the space usage amount of the to-be-written data to the target write partition as an example, when determining the write protection opening processing policy corresponding to the target write partition based on the data write attribute information, determining whether the space usage amount of the to-be-written data to the target write partition is higher than a preset usage amount threshold, if so, determining that the write protection opening processing policy is to control the whole opening write protection state of the target write partition, and if not, determining that the write protection opening processing policy is to control the whole opening write protection state of the target write partition, and the area in which the to-be-written data is written is to open the write protection state.
In an optional implementation manner of this embodiment, after performing write protection opening processing on the target write partition, the method further includes: determining a write protection maintenance mechanism corresponding to the target write partition; and maintaining the write protection state opened by the target write partition based on a write protection maintaining mechanism.
Specifically, in practical application, the memory may be powered on/reset, so that in order to better meet specific use requirements, different write protection maintenance mechanisms are formulated based on different practical application scenarios to react differently to different operating states of the memory. It should be noted that the write protection maintenance mechanism of the present embodiment may include, but is not limited to, the following three: permanent maintenance, power-on maintenance, temporary maintenance.
The permanent maintenance, that is, the write protection state is always valid and cannot be revoked after being opened, and the opening of the write protection state can be still ensured after the memory is reset. For power-on maintenance, namely after the write protection state is started, the state is maintained before the memory is reset, and after the memory is reset, the write protection state is started to fail. In addition, for temporary maintenance, after the write protection state is started, the start of the write protection state is maintained only in the set maintaining time period, and the temporary maintenance is not influenced by the memory reset.
Based on the technical scheme of the embodiment of the application, when the data to be written is received, determining a target writing partition of the data to be written on the memory; writing data to be written into a target writing partition, wherein a writable area in the target writing partition is in a write protection closed state before the data to be written is written; and when the data to be written is written, performing write protection starting processing on the target write partition. Through the implementation of the scheme, the writable area in the memory partition is in the write protection closed state in advance, and the write protection opening processing of the partition is executed after the data are written into the partition, so that the data storage safety is effectively improved, and the write protection process is simplified.
The method in fig. 3 is a refined storage partition write protection method provided in a second embodiment of the present application, where the storage partition write protection method includes:
step 301, when receiving data to be written, determining a target writing partition of the data to be written on the memory.
Specifically, the memory in this embodiment may be different types of memories such as a ROM, a RAM, an EPROM, or an EEPROM, and one or more target writing partitions corresponding to the data to be written may be needed, which is not limited herein.
Step 302, obtaining the accumulated erasing times of the target writing partition in a preset historical time period, and judging whether the accumulated erasing times is lower than a preset erasing times threshold value.
And step 303, writing the data to be written into the target writing partition when the number of times of erasing is lower than the threshold value.
Specifically, the writable area in the target write partition in this embodiment is in a write-protection off state before the data to be written is written. In this embodiment, the data storage reliability of the partition is evaluated based on the historical accumulated erasing times of the partition, where a lower erasing time indicates that the current partition is aged to a lower degree and is more reliable.
And step 304, when the data to be written is written, acquiring data writing attribute information for writing the data to be written.
Specifically, the data writing attribute in this embodiment is associated with a writing behavior of data writing to the data to be written this time, for example, a space usage amount of the data to be written to the target writing partition, a data importance of the data to be written, a reading and writing frequency of the target writing partition in a historical time period, and the like.
Step 305, determining a write protection opening processing strategy corresponding to the target write partition based on the data write attribute information.
The write-protection opening processing strategy of the embodiment may include the following two types: firstly, controlling a target write-in partition to integrally start a write-protection state; and secondly, controlling the target to be written into the partition, and starting a write protection state in an area in which data to be written is written.
And step 306, performing write protection opening processing on the target write-in partition according to the write protection opening processing strategy.
According to different practical application scenarios, a plurality of different write protection opening processing strategies can be preset so as to meet different write protection requirements and data storage requirements.
Step 307, determining a write protection maintenance mechanism corresponding to the target write partition, and maintaining the write protection state opened by the target write partition based on the write protection maintenance mechanism.
The write protection maintenance mechanism of the present embodiment may include, but is not limited to, the following three: permanent maintenance, power-on maintenance, temporary maintenance. The embodiment makes different write protection maintenance mechanisms based on different practical application scenes so as to make different reactions to different working states of the memory.
It should be understood that, the size of the serial number of each step in this embodiment does not mean the execution sequence of the step, and the execution sequence of each step should be determined by its function and inherent logic, and should not be limited uniquely to the implementation process of the embodiment of the present application.
The embodiment of the application discloses a storage partition write-protection method, which comprises the steps of firstly, when data to be written is received, determining a target write partition of the data to be written on a memory, and writing the data to be written into the target write partition; then when the data to be written is written, determining a write protection opening processing strategy corresponding to the target write partition based on the data write attribute information written in the data to be written so as to perform write protection opening processing on the target write partition; and finally, determining a write protection maintaining mechanism corresponding to the target write-in partition, and maintaining the write protection state started by the target write-in partition based on the write protection maintaining mechanism. Through the implementation of the scheme, the writable area in the memory partition is in the write protection closed state in advance, and the write protection opening processing of the partition is executed after the data are written into the partition, so that the data storage safety is effectively improved, and the write protection process is simplified.
Fig. 4 is a storage partition write protection device according to a third embodiment of the present application. The storage partition write protection device can be used for realizing the storage partition write protection method in the foregoing embodiment. As shown in fig. 4, the storage partition write protection apparatus mainly includes:
a determining module 401, configured to determine, when receiving data to be written, a target write partition of the data to be written on a memory;
a write module 402, configured to write data to be written into a target write partition; the target writing area in the target writing partition is in a writing protection closing state before the data to be written is written;
the processing module 403 is configured to perform write protection opening processing on the target write partition when the data to be written is completely written.
In an optional implementation manner of this embodiment, the processing module 403 is specifically configured to: determining a write protection opening processing strategy corresponding to a target write partition; and performing write protection opening processing on the target write-in partition according to the write protection opening processing strategy.
Further, in an optional implementation manner of this embodiment, when determining the write protection opening processing policy corresponding to the target write partition, the processing module 403 is specifically configured to: acquiring data writing attribute information for writing data to be written; and determining a write protection opening processing strategy corresponding to the target write partition based on the data write attribute information.
Further, in an optional implementation manner of this embodiment, the write protection opening processing policy includes: controlling a target to write into a partition and integrally starting a write protection state; or, controlling the target to write into the partition, and opening a write protection state in the area in which the data to be written is written.
As shown in fig. 5, another storage partition write protection apparatus provided in this embodiment is a selective implementation manner of this embodiment, where the storage partition write protection apparatus further includes: a maintaining module 404, configured to determine, after performing write protection starting processing on the target write partition, a write protection maintaining mechanism corresponding to the target write partition; and maintaining the write protection state opened by the target write partition based on a write protection maintaining mechanism. .
Referring to fig. 5 again, in an alternative implementation manner of this embodiment, the device for write protecting a memory partition further includes: the determining module 405 is configured to obtain partition attribute information of the target write partition before writing the data to be written into the target write partition; and judging whether the partition attribute information meets the data writing condition of the data to be written. Correspondingly, when the data writing condition is satisfied, the writing module 402 performs a function of writing the data to be written into the target writing partition.
Further, in an optional implementation manner of this embodiment, the partition attribute information includes: accumulating the number of times of erasing within a preset historical time period; the determining module 405 is specifically configured to: judging whether the accumulated erasing times are lower than a preset erasing time threshold value or not; and when the number of times of erasing is lower than the threshold value of the times of erasing, the data writing condition of the data to be written is met.
It should be noted that, the storage partition write protection methods in the first and second embodiments can be implemented based on the storage partition write protection device provided in this embodiment, and it can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the storage partition write protection device described in this embodiment may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
According to the storage partition write protection device provided by the embodiment, when data to be written is received, a target write partition of the data to be written on a memory is determined; writing data to be written into a target writing partition, wherein a writable area in the target writing partition is in a write protection closed state before the data to be written is written; and when the data to be written is written, performing write protection starting processing on the target write partition. Through the implementation of the scheme, the writable area in the memory partition is in the write protection closed state in advance, and the write protection opening processing of the partition is executed after the data are written into the partition, so that the data storage safety is effectively improved, and the write protection process is simplified.
Referring to fig. 6, fig. 6 is an electronic device according to a fourth embodiment of the present disclosure. The electronic device may be used to implement the memory partition write protection method in the foregoing embodiments. As shown in fig. 6, the electronic device mainly includes:
memory 601, processor 602, bus 603, and computer programs stored on memory 601 and executable on processor 602, memory 601 and processor 602 connected by bus 603. The processor 602, when executing the computer program, implements the memory partition write protection method in the foregoing embodiments. Wherein the number of processors may be one or more.
The Memory 601 may be a high-speed Random Access Memory (RAM) Memory, or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 601 is used for storing executable program code, and the processor 602 is coupled with the memory 601.
Further, an embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium may be provided in an electronic device in the foregoing embodiments, and the computer-readable storage medium may be the memory in the foregoing embodiment shown in fig. 6.
The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the storage partition write protection method in the foregoing embodiments. Further, the computer-readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned readable storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the storage partition write-protection method, apparatus and computer-readable storage medium provided by the present application, those skilled in the art will recognize that there may be variations in the embodiments and applications of the method and apparatus according to the teachings of the present application.
Claims (10)
1. A method for memory partition write protection, comprising:
when receiving data to be written, determining a target writing partition of the data to be written on a memory;
writing the data to be written into the target writing partition; the writable area in the target writing partition is in a write protection closed state before the data to be written is written;
and when the data to be written is written, performing write protection starting processing on the target writing partition.
2. The storage partition write protection method of claim 1, wherein the performing write protection on the target write partition comprises:
determining a write protection opening processing strategy corresponding to the target write partition;
and performing write protection opening processing on the target write-in partition according to the write protection opening processing strategy.
3. The storage partition write protection method of claim 2, wherein the determining a write protection opening handling policy corresponding to the target write partition comprises:
acquiring data writing attribute information for writing the data to be written;
and determining a write protection opening processing strategy corresponding to the target write partition based on the data write attribute information.
4. The storage partition write protection method of claim 2, wherein the write protection opening handling policy comprises:
controlling the whole starting write protection state of the target write partition;
or, controlling the target to be written into the partition, and starting a write protection state in the area in which the data to be written is written.
5. The method for write protection of a storage partition according to claim 1, further comprising, after the write protection opening process is performed on the target write partition:
determining a write protection maintenance mechanism corresponding to the target write partition;
maintaining the write-protected state opened by the target write partition based on the write-protection maintenance mechanism.
6. The storage partition write protection method according to any one of claims 1 to 5, wherein before writing the data to be written to the target write partition, the method further comprises:
acquiring the partition attribute information of the target write partition;
judging whether the partition attribute information meets the data writing condition of the data to be written;
and when the data writing condition is met, executing the step of writing the data to be written into the target writing partition.
7. The storage partition write protection method of claim 6, wherein the partition attribute information comprises: accumulating the number of times of erasing within a preset historical time period;
the judging whether the partition attribute information meets the data writing condition of the data to be written includes:
judging whether the accumulated erasing times are lower than a preset erasing time threshold value or not; and when the number of times of erasing is lower than the threshold value of the times of erasing, the data writing condition of the data to be written is met.
8. A memory partition write protect apparatus, comprising:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target writing partition of data to be written on a memory when the data to be written is received;
the writing module is used for writing the data to be written into the target writing partition; the writable area in the target writing partition is in a write protection closed state before the data to be written is written;
and the processing module is used for performing write protection starting processing on the target write partition when the data to be written is written.
9. An electronic device, comprising: the system comprises a memory, a processor and a bus, wherein the bus is used for realizing connection communication between the memory and the processor; the processor is configured to execute a computer program stored on the memory, and when the processor executes the computer program, the processor implements the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911010177.9A CN110597469A (en) | 2019-10-23 | 2019-10-23 | Storage partition write protection method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911010177.9A CN110597469A (en) | 2019-10-23 | 2019-10-23 | Storage partition write protection method and device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110597469A true CN110597469A (en) | 2019-12-20 |
Family
ID=68849978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911010177.9A Pending CN110597469A (en) | 2019-10-23 | 2019-10-23 | Storage partition write protection method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110597469A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113836600A (en) * | 2021-11-26 | 2021-12-24 | 上海泰矽微电子有限公司 | Embedded Flash error writing protection method |
CN116992501A (en) * | 2023-07-26 | 2023-11-03 | 深圳市兴威帆电子技术有限公司 | Data write protection method, device, equipment and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160320985A1 (en) * | 2015-04-28 | 2016-11-03 | American Megatrends, Inc. | System and method of dynamic write protect of storage devices exposed by baseboard management controller (bmc) |
CN106201346A (en) * | 2016-06-30 | 2016-12-07 | 联想(北京)有限公司 | A kind of data processing method and storage device |
CN106663063A (en) * | 2014-09-05 | 2017-05-10 | 高通股份有限公司 | Write protection management systems |
WO2017193967A1 (en) * | 2016-05-12 | 2017-11-16 | 华为技术有限公司 | Data inspection method and device in solid state memory |
CN107863127A (en) * | 2017-10-31 | 2018-03-30 | 杭州迪普科技股份有限公司 | A kind of storage device memory cell selecting method and device |
-
2019
- 2019-10-23 CN CN201911010177.9A patent/CN110597469A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106663063A (en) * | 2014-09-05 | 2017-05-10 | 高通股份有限公司 | Write protection management systems |
US20160320985A1 (en) * | 2015-04-28 | 2016-11-03 | American Megatrends, Inc. | System and method of dynamic write protect of storage devices exposed by baseboard management controller (bmc) |
WO2017193967A1 (en) * | 2016-05-12 | 2017-11-16 | 华为技术有限公司 | Data inspection method and device in solid state memory |
CN106201346A (en) * | 2016-06-30 | 2016-12-07 | 联想(北京)有限公司 | A kind of data processing method and storage device |
CN107863127A (en) * | 2017-10-31 | 2018-03-30 | 杭州迪普科技股份有限公司 | A kind of storage device memory cell selecting method and device |
Non-Patent Citations (1)
Title |
---|
贾鑫等: "基于贪婪策略的NAND FLASH存储器的磨损均衡算法研究", 《计算机科学》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113836600A (en) * | 2021-11-26 | 2021-12-24 | 上海泰矽微电子有限公司 | Embedded Flash error writing protection method |
CN116992501A (en) * | 2023-07-26 | 2023-11-03 | 深圳市兴威帆电子技术有限公司 | Data write protection method, device, equipment and computer readable storage medium |
CN116992501B (en) * | 2023-07-26 | 2024-06-07 | 深圳市兴威帆电子技术有限公司 | Data write protection method, device, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9176859B2 (en) | Systems and methods for improving the performance of non-volatile memory operations | |
US8024530B2 (en) | Security erase of a delete file and of sectors not currently assigned to a file | |
CN110032405A (en) | System boot code memory management method, memory device and the electronic system using it | |
CN104285256A (en) | Multiple write operations without intervening erase in non-volatile memory | |
US8417902B2 (en) | One-time-programmable memory emulation | |
CN110597469A (en) | Storage partition write protection method and device and computer readable storage medium | |
CN108897492B (en) | Data writing method and device | |
CN106155568B (en) | A kind of method and terminal of partition holding | |
WO2009088914A2 (en) | Storage sub-system for a computer comprising write-once memory devices and write-many memory devices and related method | |
CA2978927A1 (en) | Data check method and storage system | |
KR102366512B1 (en) | logical block addressing range collision crawler | |
CN103246591B (en) | The method and apparatus of signal transacting | |
CN114253483A (en) | Write cache management method and device based on command, computer equipment and storage medium | |
KR101826778B1 (en) | EEPROM Emulation Method Considering implementation of Flash Life Cycle and Performance Improvement | |
CN107422987B (en) | Method and device for storing data in nonvolatile memory | |
CN101925906B (en) | Method of masking attainment of end of lifetime of electronic device and device comprising corresponding control module | |
CN112204514A (en) | Techniques for preserving life expectancy of non-volatile memory | |
CN114048156A (en) | Multi-channel multi-mapping interrupt controller | |
US20160275011A1 (en) | Microcomputer with built-in flash memory, method for writing data to built-in flash memory of microcomputer, and program for writing data to flash memory | |
CN118394284B (en) | Data processing method, RAID card, product, device and medium | |
CN111324280B (en) | Data writing method and device based on Raid5 | |
CN107346216B (en) | Storage device and data processing method thereof | |
RU2586871C2 (en) | Method for masking transition of end of service life of electronic device and device including corresponding control module | |
CN114254401A (en) | Security chip and switching method of working modes thereof | |
CN117369724A (en) | Nonvolatile memory data read-write control method and device |
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 |