Method and device for safely deleting data of storage system and electronic equipment
By using dynamic data storage structure and logical block state adjustment, the problem of data not being immediately physically erased in the eMMC protocol is solved, achieving secure data erasure at the physical layer, reducing resource waste, and improving data security and system stability.
Patent Information
- Application Number
- CN202510906725.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-02
AI Technical Summary
In the existing eMMC protocol, data is not immediately physically deleted after the Trim command is executed, which poses a data security risk, and the secure deletion command can easily lead to resource waste.
A dynamic data storage structure is adopted to determine the erase status of logical blocks in real time to avoid accidental erasure. The erase range is dynamically adjusted by modifying the erase status of logical blocks to ensure that data is erased at the physical level.
It improves data security, reduces system resource consumption, ensures data integrity and stability in complex environments, and avoids memory leaks and system performance degradation.
Smart Images

Figure CN120406860A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of storage systems, and particularly to a method, device, and electronic device for securely deleting data in a storage system. Background Art
[0002] In the eMMC protocol, the essence of the Trim command's erasure is logical marking rather than physical clearing. When the system issues a Trim instruction, the controller marks the logical addresses corresponding to the deleted data as "recyclable" and updates the internal address mapping table to inform the flash memory that these spaces are available for writing new data. However, at this time, the old data is not immediately erased in the physical storage unit but waits to be uniformly processed by the subsequent garbage collection mechanism when there is free space.
[0003] After the Trim command is executed, the physical layer data is not immediately cleared and is only marked as "invalid" through the mapping table. At this time, if the device is powered off or removed emergently, the old data may still remain in the flash memory cells; even if the device is operating normally, before the garbage collection mechanism processes these logical blocks, an attacker can bypass the mapping table and directly read the original data by physically accessing the storage chip or exploiting underlying vulnerabilities, posing a data security risk.
[0004] To ensure data security, the eMMC protocol provides a secure delete command to physically erase data. The secure delete is executed in two steps: the first step is to mark the erasure range, and the second step is to physically erase the previously marked range. However, although providing the secure delete command can ensure data security, it is also prone to accidentally erasing valid data, resulting in an increase in system resource consumption. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method, device, and electronic device for securely deleting data in a storage system, which can physically erase data, improve data security, and reduce system resource consumption.
[0006] To solve the above technical problem, the technical solution adopted by the present invention is as follows: Create a dynamic data storage structure; In the erasure range marking stage, store the erasure address range and the erasure status corresponding to each logical block within the erasure address range in the dynamic data storage structure, and the erasure status is defaulted to to-be-erased; Real-time determine whether there is a target logical block within the erasure address range that falls into the operation area of the write function. If so, update the erasure status of the target logical block to cancelled erasure; In the erasure action execution stage, perform secure erasure according to the latest erasure address range and the erasure status of each logical block.
[0007] To solve the above technical problems, another technical solution adopted by the present invention is as follows: A storage system data secure deletion device, comprising: An erasure management module, configured to: Create a dynamic data storage structure; In the erasure range marking stage, store an erasure address range and an erasure status corresponding to each logical block within the erasure address range in the dynamic data storage structure, and the erasure status is defaulted to to-be-erased; Real-time determine whether there is a target logical block within the erasure address range that falls into the operation area of the write function. If so, update the erasure status of the target logical block to cancelled erasure; An erasure execution module, in the erasure action execution stage, performs secure erasure according to the latest erasure address range and the erasure status of each logical block.
[0008] To solve the above technical problems, yet another technical solution adopted by the present invention is as follows: An electronic device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the processor executes the computer program, it implements each step in the above-mentioned storage system data secure deletion method.
[0009] The beneficial effects of the present invention are as follows: Provide a storage system data secure deletion method, device, and electronic device. Set up a dynamic data storage structure to store the erasure address range, and before erasure, exclude the logical blocks that have been written in the write function by modifying the erasure status of the logical blocks, avoid accidentally erasing valid data during subsequent erasure, realize dynamic modification of the erasure range, adapt to the characteristics of secure erasure, reduce system resource consumption, physically erase data, and improve data security. Description of the Drawings
[0010] Figure 1 It is a step flow chart of the storage system data secure deletion method in an embodiment of the present invention; Figure 2 It is a schematic diagram of the linked list composition of the storage system data secure deletion method in an embodiment of the present invention; Figure 3 It is a schematic diagram of the structure of the electronic device in an embodiment of the present invention.
[0011] Label Description: 1. Electronic device; 2. Memory; 3. Processor. Detailed Embodiments
[0012] To describe in detail the technical content, achieved objectives, and effects of the present invention, the following is described in conjunction with the embodiments and with reference to the drawings.
[0013] Please refer to Figure 1 and Figure 2 , a method for securely deleting data in a storage system, comprising the following steps: Create a dynamic data storage structure; In the erasure range marking stage, store the erasure address range and the erasure status corresponding to each logical block within the erasure address range in the dynamic data storage structure, and the erasure status is defaulted to to-be-erased; Real-time determine whether there is a target logical block within the erasure address range that falls into the operation area of the write function. If so, update the erasure status of the target logical block to cancelled erasure; In the erasure action execution stage, perform secure erasure according to the latest erasure address range and the erasure status of each logical block.
[0014] As can be seen from the above description, the beneficial effects of the present invention are as follows: A dynamic data storage structure is set up to store the erasure address range, and before erasure, by modifying the erasure status of the logical block, the logical blocks that have already been written in the write function are excluded, avoiding accidental erasure of valid data during subsequent erasure, realizing dynamic modification of the erasure range, adapting to the characteristics of secure erasure, reducing system resource consumption, physically erasing data, and improving data security.
[0015] Further, the creation of the dynamic data storage structure is specifically as follows: Create a linked list composed of a control header and at least two member nodes, and the member nodes correspond to the logical blocks one by one; Set a pointer to the first member node and the total number of member nodes in the control header; Set the erasure start address, erasure end address, the erasure status, and a pointer to the next member node in the member node.
[0016] As can be seen from the above description, creating a linked list composed of a control header and member nodes as the dynamic data storage structure realizes the orderly management of the erasure information of logical blocks. The control header sets a pointer to the first member node and the total number of member nodes, which is convenient for quickly locating and counting the number of logical blocks and improving data retrieval efficiency; the member node sets the erasure start address, erasure end address, erasure status, and a pointer to the next member node, which can accurately record the erasure range and status of each logical block and provide accurate data support for subsequent erasure operations.
[0017] Further, performing secure erasure according to the latest erasure address range and the erasure status of each logical block is specifically as follows: If the erasure status of the currently pointed member node is to be erased, physically erase the logical block corresponding to the member node, and delete the member node from the linked list; If the erasure status of the currently pointed member node is to cancel the erasure, delete the member node from the linked list.
[0018] As can be seen from the above description, different operations are performed according to the erasure status of the member node, further optimizing the data erasure process. When the erasure status of the member node is to be erased, the corresponding logical block is physically erased and the member node is deleted, ensuring that the data to be erased is completely cleared and guaranteeing data security at the physical level; if the erasure status is to cancel the erasure, the member node is directly deleted, avoiding unnecessary processing of invalid data and reducing system resource consumption.
[0019] Furthermore, it also includes: In response to the system power-on instruction, determine whether there are member nodes in the linked list that have not been securely erased. If so, continue to perform secure erasure on the member nodes.
[0020] As can be seen from the above description, determining whether there are member nodes in the linked list that have not been securely erased in response to the system power-on instruction and continuing with the secure erasure effectively solves the problem of incomplete data erasure caused by system power-off or abnormal interruption. This mechanism ensures the integrity and continuity of the data erasure task. No matter what unexpected situation occurs during the system operation, as long as the system is powered on again, the unfinished erasure tasks can continue to be executed, avoiding the security risks brought by data residue, guaranteeing the reliability and stability of the secure deletion of data in the storage system, and enhancing the data security guarantee ability of the system in a complex operating environment.
[0021] Furthermore, it also includes: After traversing all member nodes of the linked list, release the linked list and initialize the pointer of the linked list.
[0022] As can be seen from the above description, releasing the linked list and initializing the pointer after traversing all member nodes of the linked list realizes the reasonable recycling of resources of the dynamic data storage structure. After completing the data erasure task, the memory space occupied by the linked list is released in a timely manner, avoiding memory leakage problems, improving the utilization rate of system memory resources, and preventing system performance degradation or even crash caused by excessive occupation of memory resources. At the same time, initializing the pointer prepares for the next data erasure operation, ensuring that the dynamic data storage structure can be reused.
[0023] Furthermore, it also includes: During the erasure operation execution phase, while performing a secure erasure, it is determined whether there is a target logical block within the erasure address range that falls within the operation area of the write function. If so, the erasure status of the target logical block is updated to cancel the erasure.
[0024] As can be seen from the above description, during the erasure operation execution phase, it is synchronously determined whether the logical blocks within the erasure address range fall within the operation area of the write function, and the erasure status is updated, further enhancing the dynamic adaptability of data secure erasure. Even during the erasure process, if there are new data write operations involving the logical blocks within the erasure range, the erasure status can be adjusted in a timely manner to avoid accidentally erasing the valid data being written.
[0025] Furthermore, it further includes: In response to a preset range marking instruction, enter the erasure range marking phase; In response to a preset erasure execution instruction, enter the erasure operation execution phase.
[0026] As can be seen from the above description, by using the preset range marking instruction and the preset erasure execution instruction to control entering the erasure range marking phase and the erasure operation execution phase respectively, it corresponds to the two-step process of secure erasure, providing a clear process control method for data secure deletion operations. This instruction trigger mechanism makes the data erasure operation more standardized and controllable. Users or systems can flexibly start the data erasure process according to actual needs, avoiding misoperations and unnecessary data erasures.
[0027] Furthermore, the storing of the erasure address range in the dynamic data storage structure further includes: Determine whether the erasure address range is legal. If so, store the erasure address range in the dynamic data storage structure.
[0028] As can be seen from the above description, determining the legality of the erasure address range before storing it ensures the effectiveness and security of the data erasure operation from the source. If the erasure address range is illegal, such as exceeding the address space of the storage device or having logical errors, the system will reject storing this range, avoiding accidentally erasing valid data or damaging the storage device due to incorrect erasure addresses.
[0029] Another embodiment of the present invention provides a data secure deletion device for a storage system, including: An erasure management module, configured to: Create a dynamic data storage structure; During the erasure range marking phase, store the erasure address range and the erasure status corresponding to each logical block within the erasure address range in the dynamic data storage structure, and the erasure status defaults to to-be-erased; Determine in real time whether there is a target logical block within the erasure address range that falls within the operation area of the write function. If so, update the erasure status of the target logical block to cancel erasure. An erasure execution module, during the erasure action execution phase, performs secure erasure according to the latest erasure address range and the erasure status of each logical block.
[0030] As can be seen from the above description, the beneficial effects of the present invention are as follows: A dynamic data storage structure is set up to store the erasure address range. Before erasure, by modifying the erasure status of the logical block, the logical blocks that have already been written in the write function are excluded, avoiding accidental erasure of valid data during subsequent erasure, realizing dynamic modification of the erasure range, adapting to the characteristics of secure erasure, reducing system resource consumption, physically erasing data, and improving data security.
[0031] Another embodiment of the present invention provides an electronic device 1, including a memory 2, a processor 3, and a computer program stored on the memory 2 and capable of running on the processor 3. When the processor executes the computer program, it implements each step in the above-mentioned data security deletion method for a storage system.
[0032] As can be seen from the above description, the beneficial effects of the present invention are as follows: A dynamic data storage structure is set up to store the erasure address range. Before erasure, by modifying the erasure status of the logical block, the logical blocks that have already been written in the write function are excluded, avoiding accidental erasure of valid data during subsequent erasure, realizing dynamic modification of the erasure range, adapting to the characteristics of secure erasure, reducing system resource consumption, physically erasing data, and improving data security.
[0033] The data security deletion method, device, and electronic device provided by the present invention can be applied to the scenario of storing data erasure, which will be described below through specific embodiments: Embodiment 1 Please refer to Figure 1 and Figure 2 , the data security deletion method 100 for a storage system includes steps; In step 102, create a dynamic data storage structure; In this embodiment, the dynamic data storage structure is a data storage method that can dynamically adjust its own capacity and organizational form according to data changes, specifically including but not limited to linked lists, queue structures, dynamic arrays, hash tables, etc. Combining Figure 2 as shown, in this embodiment, taking a linked list as an example, the creation is as follows: Create a linked list composed of a control header and at least two member nodes, and the member nodes correspond to logical blocks one by one; Set a pointer to the first member node and the total number of member nodes in the control header; Set the erase start address, erase end address, erase status, and a pointer to the next member node within the member node.
[0034] In step 104, during the erase range marking phase, store the erase address range and the erase status corresponding one by one to each logical block within the erase address range in the dynamic data storage structure. The erase status is defaulted to to-be-erased. Continuously determine whether there is a target logical block within the erase address range that falls into the operation area of the write function. If so, update the erase status of the target logical block to cancelled erase. In this embodiment, in response to a preset range marking instruction, enter the erase range marking phase. The preset range marking instruction is generally issued by the user, and the erase address range can be automatically generated by the system or set by the user. When storing, determine whether the erase address range is legal. If so, store the erase address range in the dynamic data storage structure. Among them, the legal judgment includes whether the selected range exceeds the storage limit value, whether it includes specific areas that are not allowed to be erased, and so on.
[0035] After storage is completed, until before entering the erase action execution phase, continuously determine whether there is a target logical block within the erase address range that falls into the operation area of the write function. If so, update the erase status of the target logical block to cancelled erase. Taking the linked list as an example, by traversing each member node of the linked list, check whether the write operation involves the relevant area. If so, modify the erase status of the corresponding member node to cancelled erase.
[0036] In step 106, during the erase action execution phase, perform secure erase according to the latest erase address range and the erase status of each logical block.
[0037] In this embodiment, in response to a preset erase execution instruction, enter the erase action execution phase. The preset erase execution instruction is generally automatically issued by the system. Taking the linked list as an example, traverse each member node of the linked list. If the erase status of the currently pointed member node is to-be-erased, after physically erasing the logical block corresponding to the member node, delete the member node from the linked list. If the erase status of the currently pointed member node is cancelled erase, delete the member node from the linked list.
[0038] During the secure erase process, the system may interrupt the erase due to reasons such as power failure or receiving an external reset signal. When power is restored, in response to the system power-on instruction, determine whether there are member nodes in the linked list that have not been securely erased. If so, continue to perform secure erase on the member nodes. Only after traversing all member nodes of the linked list, release the linked list and initialize the pointer of the linked list.
[0039] Moreover, during the execution stage of the erasure operation, while performing secure erasure, it is determined whether there is a logical block within the erasure address range that falls into the operation area of the write function. If so, the erasure status of the logical block is updated to cancel erasure.
[0040] Embodiment 2 A storage system data secure deletion device, comprising: An erasure management module, configured to: Create a dynamic data storage structure; During the erasure range marking stage, store the erasure address range and the erasure status corresponding to each logical block within the erasure address range in the dynamic data storage structure. The erasure status is defaulted to to-be-erased; Continuously determine whether there is a target logical block within the erasure address range that falls into the operation area of the write function. If so, update the erasure status of the target logical block to cancel erasure; An erasure execution module, during the erasure operation execution stage, perform secure erasure according to the latest erasure address range and the erasure status of each logical block.
[0041] Embodiment 3 An electronic device 1, as Figure 3 shown, includes a memory 2, a processor 3, and a computer program stored on the memory 2 and executable on the processor 3. When the processor 3 executes the computer program, it implements each step in the storage system data secure deletion method in Embodiment 1.
[0042] In summary, the storage system data secure deletion method, device, and electronic device provided by the present invention set up a dynamic data storage structure to store the erasure address range. Before erasure, by modifying the erasure status of the logical block, the logical blocks that have been written in the write function are excluded, avoiding accidental erasure of valid data during subsequent erasure, realizing dynamic modification of the erasure range, adapting to the characteristics of secure erasure, reducing system resource consumption, physically erasing data, and improving data security. Among them, the dynamic data storage structure specifically adopts a linked list. The linked list structure can flexibly add and delete member nodes, adapting to the dynamic change requirements of data storage and erasure in the storage system. Compared with the fixed data structure, it reduces the waste of memory space, improves the utilization rate of system resources, and also lays a reliable data storage foundation for secure data erasure. When performing secure erasure, after traversing all member nodes of the linked list, the linked list is released and the pointer is initialized, realizing reasonable recycling of the resources of the dynamic data storage structure. After completing the data erasure task, the memory space occupied by the linked list is released in a timely manner, avoiding memory leakage problems, improving the utilization rate of system memory resources, and preventing system performance degradation or even crash caused by excessive occupation of memory resources.
[0043] In the above embodiments provided in this application, it should be understood that the disclosed methods, devices, computer-readable storage media, and electronic devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only for logical function division. In actual implementation, there may be other division methods. For example, multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of devices or components or modules can be in electrical, mechanical, or other forms.
[0044] The components described as separate components may or may not be physically separated. The components displayed as components may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the components can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0045] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing module, or each component can exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0046] If the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. And the foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0047] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0048] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0049] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in the relevant technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for securely deleting data in a storage system, characterized in that, It includes the following steps: Create a dynamic data storage structure; In the erasure range marking stage, store the erasure address range and the erasure status corresponding to each logical block within the erasure address range in the dynamic data storage structure, and the erasure status is default to be erased; Judge in real time whether there is a target logical block within the erasure address range that falls into the operation area of the write function. If so, update the erasure status of the target logical block to cancelled erasure; In the erasure action execution stage, perform secure erasure according to the latest erasure address range and the erasure status of each logical block.
2. The method for securely deleting data in a storage system according to claim 1, wherein The creation of the dynamic data storage structure is specifically: Create a linked list composed of a control header and at least two member nodes, and the member nodes correspond to the logical blocks one by one; Set a pointer to the first member node and the total number of member nodes in the control header; Set the erasure start address, erasure end address, the erasure status and a pointer to the next member node in the member node.
3. The method for securely deleting data in a storage system according to claim 2, wherein Performing secure erasure according to the latest erasure address range and the erasure status of each logical block is specifically: If the erasure status of the currently pointed member node is to be erased, after physically erasing the logical block corresponding to the member node, delete the member node in the linked list; If the erasure status of the currently pointed member node is cancelled erasure, delete the member node in the linked list.
4. The method for securely deleting data in a storage system according to claim 3, characterized in that, It also includes: In response to the system power-on instruction, judge whether there are member nodes in the linked list that have not been securely erased. If so, continue to perform secure erasure on the member nodes.
5. The method for securely deleting data in a storage system according to claim 2, wherein It also includes: After traversing all member nodes of the linked list, release the linked list and initialize the pointer of the linked list.
6. The method for securely deleting data of a storage system according to claim 1, wherein It also includes: In the erasure action execution stage, while performing secure erasure, judge whether there is a target logical block within the erasure address range that falls into the operation area of the write function. If so, update the erasure status of the target logical block to cancelled erasure.
7. The method for securely deleting data in a storage system according to claim 1, wherein It also includes: In response to a preset range marking instruction, enter the erasure range marking stage; In response to a preset erasure execution instruction, enter the erasure action execution stage.
8. The method for securely deleting data in a storage system according to claim 1, wherein The storing of the erasure address range in the dynamic data storage structure also includes: Judge whether the erasure address range is legal. If so, store the erasure address range in the dynamic data storage structure.
9. Data security deletion device for storage system, characterized in that, It includes: An erasure management module, configured to: Create a dynamic data storage structure; In the erasure range marking stage, store the erasure address range and the erasure status corresponding to each logical block within the erasure address range in the dynamic data storage structure, and the erasure status is default to be erased; Judge in real time whether there is a target logical block within the erasure address range that falls into the operation area of the write function. If so, update the erasure status of the target logical block to cancelled erasure; An erasure execution module, in the erasure action execution stage, perform secure erasure according to the latest erasure address range and the erasure status of each logical block.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements each step in the method for securely deleting storage system data described in any one of claims 1 to 8.
Citation Information
Patent Citations
Data management with modular erase in a data storage system
CN106170833A
Storage space erasing method and device, storage equipment and storage medium
CN110908593A
Data erasing method, data processing method, memory, electronic equipment and computer readable storage medium
CN117632014A
Memory device, controller, host apparatus, data processing system, computer-readable non-transitory recording medium, operation method of memory device, and operation method of host apparatus
US20180165012A1