Storage system data secure deletion method and device and electronic equipment
By creating a dynamic data storage structure and updating the erase status of logical blocks in real time, the problem of data not being physically erased immediately in the eMMC protocol is solved, achieving the effects of secure erasure and resource conservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BIWIN STORAGE TECH CO LTD
- Filing Date
- 2025-07-02
- Publication Date
- 2026-05-12
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. Furthermore, the secure deletion command can easily lead to the accidental erasure of valid data, increasing system resource consumption.
Create a dynamic data storage structure to store the erase address range and the erase status of logical blocks. Detect and update the erase status in real time to ensure that logical blocks that are being written to are not erased, and that safe erasure is only performed within the legal range.
It enables secure data erasure at the physical level, avoids accidental erasure of valid data, reduces system resource consumption, and improves data security and stability.
Smart Images

Figure CN120406860B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage system technology, and in particular to methods, apparatus and electronic devices for securely deleting data in storage systems. Background Technology
[0002] In the eMMC protocol, the erasure function of the Trim command is essentially a logical marking rather than a physical erasure. When the system issues a Trim command, the controller marks the logical address corresponding to the deleted data as "reclaimable" and updates the internal address mapping table to inform the flash memory that these spaces can be used to write new data. However, the old data is not immediately erased from the physical storage unit at this time, but waits for the subsequent garbage collection mechanism to process it uniformly when it is idle.
[0003] After the Trim command is executed, the physical layer data is not immediately deleted; it is only marked as "invalid" through the mapping table. If the device is powered off or removed in an emergency at this time, the old data may still remain in the flash memory cells. Even if the device is running normally, before the garbage collection mechanism processes these logical blocks, attackers 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. Secure delete is performed in two steps: first, the erase area is marked, and second, the marked area is physically erased. However, while providing a secure delete command ensures data security, it can also lead to the accidental erasure of valid data, resulting in increased system resource consumption. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method, apparatus and electronic device for securely deleting data in a storage system, so as to realize the physical erasure of data, improve data security and reduce system resource consumption.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0007] Create dynamic data storage structures;
[0008] During the erase range marking stage, the erase address range and the erase state corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase state is set to be erased by default.
[0009] In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase.
[0010] During the erase operation execution phase, secure erasure is performed based on the latest erase address range and the erase status of each logical block.
[0011] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0012] Storage system data secure deletion device, including:
[0013] The erase management module is configured as follows:
[0014] Create dynamic data storage structures;
[0015] During the erase range marking stage, the erase address range and the erase state corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase state is set to be erased by default.
[0016] In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase.
[0017] The erase execution module performs secure erasure based on the latest erase address range and the erase status of each logic block during the erase action execution phase.
[0018] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0019] An electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of the storage system data secure deletion method described above.
[0020] The beneficial effects of this invention are as follows: it provides a method, apparatus, and electronic device for securely deleting data in a storage system, sets up a dynamic data storage structure to store the erase address range, and before erasing, it removes logic blocks that are already being written to by the write function by modifying the erase state of the logic blocks, thereby avoiding the accidental erasure of valid data during subsequent erasure, realizing dynamic modification of the erase range, adapting to the characteristics of secure erasure, reducing system resource consumption, realizing data erasure at the physical level, and improving data security. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the steps of the data security deletion method in a storage system according to an embodiment of the present invention.
[0022] Figure 2 This is a schematic diagram of the linked list composition of the data security deletion method in the storage system according to an embodiment of the present invention;
[0023] Figure 3This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention.
[0024] Label Explanation:
[0025] 1. Electronic device; 2. Memory; 3. Processor. Detailed Implementation
[0026] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0027] Please refer to Figure 1 and Figure 2 The method for securely deleting data in a storage system includes the following steps:
[0028] Create dynamic data storage structures;
[0029] During the erase range marking stage, the erase address range and the erase state corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase state is set to be erased by default.
[0030] In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase.
[0031] During the erase operation execution phase, secure erasure is performed based on the latest erase address range and the erase status of each logical block.
[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 to store the erase address range, and before erasure, the erase state of the logic block is modified to exclude the logic block that has already been written to by the write function, so as to avoid the accidental erasure of valid data during subsequent erasure, realize the dynamic modification of the erase range, adapt to the characteristics of secure erasure, reduce system resource consumption, realize data erasure at the physical level, and improve data security.
[0033] Furthermore, the creation of the dynamic data storage structure specifically involves:
[0034] Create a linked list consisting of a control head and at least two member nodes, wherein each member node corresponds one-to-one with the logic block;
[0035] The control head contains a pointer to the first member node and the total number of member nodes.
[0036] The member node is configured with an erase start address, an erase end address, an erase state, and a pointer to the next member node.
[0037] As described above, creating a linked list consisting of a control head and member nodes as a dynamic data storage structure enables the orderly management of logical block erasure information. The control head sets a pointer to the first member node and the total number of member nodes, facilitating quick location and counting of logical blocks and improving data retrieval efficiency. Each member node contains the erase start address, erase end address, erase status, and a pointer to the next member node, accurately recording the erase range and status of each logical block, providing accurate data support for subsequent erase operations.
[0038] Furthermore, the secure erasure based on the latest erase address range and the erase status of each logic block specifically involves:
[0039] If the erase state of the currently pointed member node is pending erase, then the logical block corresponding to the member node is physically erased, and the member node is deleted from the linked list.
[0040] If the erase status of the currently pointed-to member node is canceled, then the member node is deleted from the linked list.
[0041] As described above, different operations are performed based on the erase status of member nodes, further optimizing the data erasure process. When a member node is in the "to be erased" state, the corresponding logical block is physically erased and the member node is deleted, ensuring that the data to be erased is completely cleared, thus guaranteeing data security at the physical level. If the erase status is "cancel erase," the member node is directly deleted, avoiding unnecessary processing of invalid data and reducing system resource consumption.
[0042] Furthermore, it also includes:
[0043] In response to the system power-on command, determine whether there are any member nodes in the linked list that have not yet been safely erased. If so, continue to safely erase the member nodes.
[0044] As described above, the system responds to power-on commands by checking if any un-safely erased member nodes exist in the linked list and then proceeds with the safe erasure process. This effectively solves the problem of incomplete data erasure caused by system power outages or abnormal interruptions. This mechanism ensures the integrity and continuity of the data erasure task. Regardless of any unforeseen circumstances during system operation, as long as the system is powered on again, the incomplete erasure task can continue to execute, avoiding security risks caused by data residue. This guarantees the reliability and stability of the storage system's safe data deletion and enhances the system's data security capabilities in complex operating environments.
[0045] Furthermore, it also includes:
[0046] After traversing all member nodes of the linked list, release the linked list and initialize the pointer of the linked list.
[0047] As described above, traversing all member nodes of the linked list and then releasing the list and initializing the pointers effectively reclaims resources from the dynamic data storage structure. Timely release of the memory space occupied by the linked list after the data erasure task prevents memory leaks, improves the utilization of system memory resources, and prevents performance degradation or even crashes due to excessive memory usage. Simultaneously, initializing the pointers prepares for the next data erasure operation, ensuring the reusability of the dynamic data storage structure.
[0048] Furthermore, it also includes:
[0049] During the erase operation execution phase, while performing a secure erase, it is determined whether there is a target logic block within the operation area of the write function within the erase address range. If so, the erase status of the target logic block is updated to cancel erase.
[0050] As described above, during the erase operation phase, it is simultaneously determined whether the logical blocks within the erase address range fall within the write function operation area, and the erase state is updated accordingly, further enhancing the dynamic adaptability of secure data erasure. Even during the erase process, if a new data write operation involves logical blocks within the erase range, the erase state can be adjusted in a timely manner to avoid accidentally erasing valid data being written.
[0051] Furthermore, it also includes:
[0052] In response to the preset range marking command, the erase range marking stage is entered;
[0053] In response to a preset erase execution command, the erase action execution phase begins.
[0054] As described above, the preset range marking command and preset erase execution command respectively control the entry into the erase range marking stage and the erase action execution stage, corresponding to a two-step process for secure erasure, providing a clear process control method for secure data deletion operations. This command triggering mechanism makes data erasure operations more standardized and controllable. Users or the system can flexibly initiate the data erasure process according to actual needs, avoiding accidental operations and unnecessary data erasure.
[0055] Furthermore, the storage of the erase address range within the dynamic data storage structure further includes:
[0056] Determine whether the erase address range is valid; if so, store the erase address range in the dynamic data storage structure.
[0057] As described above, determining the validity of the storage erase address range before storage ensures the effectiveness and security of the data erase operation from the source. If the erase address range is invalid, such as exceeding the storage device's address space or containing logical errors, the system will refuse to store the range, preventing the accidental erasure of valid data or damage to the storage device due to incorrect erase addresses.
[0058] Another embodiment of the present invention provides a storage system data secure deletion device, comprising:
[0059] The erase management module is configured as follows:
[0060] Create dynamic data storage structures;
[0061] During the erase range marking stage, the erase address range and the erase state corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase state is set to be erased by default.
[0062] In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase.
[0063] The erase execution module performs secure erasure based on the latest erase address range and the erase status of each logic block during the erase action execution phase.
[0064] 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 to store the erase address range, and before erasure, the erase state of the logic block is modified to exclude the logic block that has already been written to by the write function, so as to avoid the accidental erasure of valid data during subsequent erasure, realize the dynamic modification of the erase range, adapt to the characteristics of secure erasure, reduce system resource consumption, realize data erasure at the physical level, and improve data security.
[0065] 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 the various steps in the storage system data secure deletion method described above.
[0066] 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 to store the erase address range, and before erasure, the erase state of the logic block is modified to exclude the logic block that has already been written to by the write function, so as to avoid the accidental erasure of valid data during subsequent erasure, realize the dynamic modification of the erase range, adapt to the characteristics of secure erasure, reduce system resource consumption, realize data erasure at the physical level, and improve data security.
[0067] The storage system data secure deletion method, apparatus, and electronic device provided by this invention can be applied to scenarios involving the erasure of stored data. The following detailed embodiments illustrate these methods:
[0068] Example 1
[0069] Please refer to Figure 1 and Figure 2 Storage system data secure deletion method 100, including steps;
[0070] In step 102, a dynamic data storage structure is created;
[0071] In this embodiment, the dynamic data storage structure can dynamically adjust its capacity and organization according to data changes, including but not limited to linked lists, queue structures, dynamic arrays, and hash tables. Combined with... Figure 2 As shown in the example, this embodiment uses a linked list, and the content is created as follows:
[0072] Create a linked list consisting of a control head and at least two member nodes, with each member node corresponding to a logic block;
[0073] Set a pointer to the first member node and the total number of member nodes in the control header;
[0074] Set the erase start address, erase end address, erase status, and pointer to the next member node within the member node.
[0075] In step 104, during the erase range marking stage, the erase address range and the erase status corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase status is set to be erased by default.
[0076] In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase.
[0077] In this embodiment, in response to a preset range marking instruction, the system enters the erase range marking stage. 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. During storage, it is determined whether the erase address range is valid. If so, the erase address range is stored in the dynamic data storage structure. The validity determination includes whether the selected range exceeds the storage limit value, whether it includes a specific area that is not allowed to be erased, etc.
[0078] After storage is completed, until the erase operation is executed, it is checked in real time whether there is a target logic block within the operation area of the write function within the erase address range. If so, the erase status of the target logic block is updated to cancel erase. Taking a linked list as an example, by traversing each member node of the linked list, it is checked whether the write operation involves the relevant area. If it does, the erase status of the corresponding member node is changed to cancel erase.
[0079] In step 106, during the erase operation execution phase, a secure erase is performed based on the latest erase address range and the erase status of each logical block.
[0080] In this embodiment, in response to a preset erase execution command, the erase action execution phase begins. The preset erase execution command is generally issued automatically by the system. Taking a linked list as an example, each member node of the linked list is traversed. If the erase status of the currently pointed-to member node is "to be erased," then the logical block corresponding to the member node is physically erased, and the member node is deleted from the linked list; if the erase status of the currently pointed-to member node is "cancel erase," then the member node is deleted from the linked list.
[0081] During the secure erase process, the system may interrupt the erase due to power failure, receiving an external reset signal, or other reasons. Upon power-on, in response to the system power-on command, it checks if there are any member nodes in the linked list that have not yet been securely erased. If so, it continues to securely erase the member nodes. The linked list is only released and its pointers initialized after traversing all member nodes.
[0082] Furthermore, during the erase operation execution phase, while performing a safe erase, it is determined whether there is a logical block within the erase address range that falls into the operation area of the write function. If so, the erase status of the logical block is updated to cancel erase.
[0083] Example 2
[0084] Storage system data secure deletion device, including:
[0085] The erase management module is configured as follows:
[0086] Create dynamic data storage structures;
[0087] During the erase range marking stage, the erase address range and the erase status corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase status is set to be erased by default.
[0088] In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase.
[0089] The erase execution module performs secure erasure based on the latest erase address range and the erase status of each logical block during the erase action execution phase.
[0090] Example 3
[0091] Electronic device 1, such as Figure 3 As shown, it 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 the various steps in the storage system data secure deletion method as described in Embodiment 1.
[0092] In summary, the data secure deletion method, apparatus, and electronic device for storage systems provided by this invention employ a dynamic data storage structure to store the erase address range. Before erasure, the erase state of logical blocks is modified to exclude those already being written to in the write function, preventing accidental erasure of valid data during subsequent erasure. This dynamically modifies the erase range, adapting to the characteristics of secure erasure, reducing system resource consumption, and achieving data erasure at the physical level, thus improving data security. Specifically, the dynamic data storage structure uses a linked list. The linked list structure allows for flexible addition and deletion of member nodes, adapting to the dynamic changes in data storage and erasure requirements within the storage system. Compared to a fixed data structure, this reduces memory waste, improves system resource utilization, and lays a reliable data storage foundation for secure data erasure. During secure erasure, the linked list is released and pointers are initialized after traversing all member nodes, achieving reasonable reclamation of resources from the dynamic data storage structure. After completing the data erasure task, the memory space occupied by the linked list is released promptly, avoiding memory leaks, improving system memory resource utilization, and preventing system performance degradation or even crashes due to excessive memory resource consumption.
[0093] In the embodiments provided in this application, it should be understood that the disclosed methods, apparatuses, computer-readable storage media, and electronic devices can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple components or modules may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be indirect couplings or communication connections between devices, components, or modules through some interfaces, and may be electrical, mechanical, or other forms.
[0094] The components described as separate parts may or may not be physically separate. The components shown as components may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the components can be selected to achieve the purpose of this embodiment according to actual needs.
[0095] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each component can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0096] If the integrated module is implemented as 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 the 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 cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0097] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0098] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0099] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for securely deleting data in a storage system, characterized in that, Includes the following steps: Create dynamic data storage structures; During the erase range marking stage, the erase address range and the erase state corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase state is set to be erased by default. In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase. During the erase operation execution phase, secure erasure is performed based on the latest erase address range and the erase status of each logical block; During the erase operation execution phase, while performing a secure erase, it is determined whether there is a target logic block within the operation area of the write function within the erase address range. If so, the erase status of the target logic block is updated to cancel erase. The creation of the dynamic data storage structure specifically involves: Create a linked list consisting of a control head and at least two member nodes, wherein each member node corresponds one-to-one with the logic block; The control head contains a pointer to the first member node and the total number of member nodes. The member node is configured with an erase start address, an erase end address, an erase state, and a pointer to the next member node. The secure erasure based on the latest erase address range and the erase status of each logic block is specifically as follows: If the erase state of the currently pointed-to member node is pending erase, then after physically erasing the logical block corresponding to the member node, the member node is deleted from the linked list. If the erase status of the currently pointed-to member node is canceled, then delete the member node from the linked list; In response to the system power-on command, determine whether there are any member nodes in the linked list that have not yet been safely erased. If so, continue to safely erase the member nodes.
2. The method for securely deleting data in a storage system according to claim 1, characterized in that, Also includes: In response to the preset range marking command, the erase range marking stage is entered; In response to a preset erase execution command, the erase action execution phase begins.
3. The method for securely deleting data in a storage system according to claim 1, characterized in that, The storage of the erase address range within the dynamic data storage structure also includes: Determine whether the erase address range is valid; if so, store the erase address range in the dynamic data storage structure.
4. A data security deletion device for a storage system, characterized in that, include: The erase management module is configured as follows: Create dynamic data storage structures; During the erase range marking stage, the erase address range and the erase state corresponding to each logical block within the erase address range are stored in the dynamic data storage structure. The erase state is set to be erased by default. In real time, determine whether there is a target logic block within the operation area of the write function within the erase address range. If so, update the erase status of the target logic block to cancel erase. The erase execution module performs secure erasure based on the latest erase address range and the erase status of each logic block during the erase action execution phase.
5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements each step of the data secure deletion method for the storage system according to any one of claims 1 to 3.