Data security deletion method and system, computer equipment and storage medium

By monitoring the data migration path and optimizing the erase sequence, the problem of incomplete data deletion in solid-state drives is solved, the risk of data leakage is reduced, and data is safely erased before power outage is eliminated, improving erase efficiency.

CN119088303APending Publication Date: 2024-12-06SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411193694.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The prior art ignores the data migration to other blocks when deleting data in solid-state drives, resulting in the risk of data leakage and low erasing efficiency.

Method used

By monitoring the data migration path, tracking migration information, optimizing the erase order of data blocks, ensuring complete data deletion, and dynamically adjusting tasks to maintain write performance when the SSD is powered off.

Benefits of technology

It realizes the complete deletion of data in solid-state drives, reduces the risk of data leakage, and ensures safe data erasure before power outage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088303A_ABST
    Figure CN119088303A_ABST
Patent Text Reader

Abstract

The invention discloses a data security deletion method and system, computer equipment and a storage medium, and relates to the technical field of data processing, and the method comprises the steps: receiving a deletion request, and analyzing the deletion request to obtain the current position of to-be-deleted data in the deletion request; acquiring data frame information of the to-be-deleted data at the current position, and confirming that the to-be-deleted data at the current position migrates; after it is confirmed that the to-be-deleted data at the current position is migrated, the pre-migration position of the to-be-deleted data is obtained based on the data frame information; and combining the to-be-deleted data at the current position and the to-be-deleted data at the position before migration to obtain a data block where the to-be-deleted data is located, and in response to execution of erasing operation, erasing the data block where the to-be-deleted data is located. According to the method, the migration path of the data in the hard disk is monitored, the migration information of the data is tracked, even if the data is migrated, it can still be ensured that the data is really deleted, and the safety of the data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a data secure deletion method, system, computer device and storage medium. Background Art

[0002] Data storage on solid-state drives usually uses non-volatile storage technology. Each storage unit must be erased before writing data. The unit of erasing data is a block. However, due to garbage collection, wear leveling, and bad block processing in solid-state drives, when part of the data is erased on the current data block, it may already exist on other data blocks. For the host user, the data block has been erased, but in fact it still exists on other data blocks.

[0003] In some related technologies, in order to completely parameterize data, a corresponding erasure operation is usually performed after a data block is marked as erasable or bad. However, this operation ignores the situation where data is migrated to other data blocks due to the existence of internal mechanisms. In fact, the deleted data still exists in other data blocks, which poses a risk of data leakage. Summary of the invention

[0004] In order to solve at least one of the problems mentioned in the above background technology, the present application provides a data security deletion method, system, computer device and storage medium, which monitors the migration path of data in the hard disk and tracks the migration information of the data. Even if the data has been migrated, it can still ensure that the data is truly deleted; by optimizing the erasure order of data blocks and giving priority to deleting data, the efficiency of erasing data operations is improved, and the risk of data leakage is further reduced.

[0005] The specific technical solutions provided by the embodiments of this application are as follows:

[0006] In a first aspect, a data secure deletion method is provided, which is applied to a solid state drive, and the method comprises:

[0007] A deletion request is received, and the deletion request is parsed to obtain the current position of the data to be deleted in the deletion request, obtain the data frame information where the data to be deleted at the current position is located, and confirm that the data to be deleted at the current position has been migrated; after confirming that the data to be deleted at the current position has been migrated, obtain the pre-migration position of the data to be deleted based on the data frame information; combine the data to be deleted at the current position and the data to be deleted at the pre-migration position to obtain the data block where the data to be deleted is located, and in response to executing an erase operation, erase the data block where the data to be deleted is located.

[0008] In a specific embodiment, the data frame information includes a hash value field, and the method further includes: obtaining the hash value field in the data frame information where the data to be deleted at the current position is located, and determining whether the hash value fields are all 1; if the hash value fields are not all 1, confirming that the data to be deleted at the current position has been migrated; or, if the hash value fields are all 1, the data to be deleted at the current position has not been migrated.

[0009] In a specific embodiment, after confirming that the data to be deleted at the current location has been migrated, obtaining the location of the data to be deleted before migration based on the data frame information specifically includes:

[0010] A free position is reserved in the data frame information, and the free position includes a tracking chain; the tracking chain includes an internal storage unit value of the solid state drive, and the internal storage unit value is set to have a preset number of bits; in response to data migration, the preset number of bits is updated to have a migration identification value; after confirming that the data to be deleted at the current position has been migrated, the migration identification value on the bit of the preset position associated with the data to be deleted at the current position is obtained; according to the migration identification value, the pre-migration position of the data to be deleted is confirmed; the first hash value in the hash value field of the pre-migration position is obtained, and the second hash value in the hash value field of the current position is obtained; it is determined whether the first hash value and the second hash value are the same; if the first hash value and the second hash value are the same, it is confirmed that the data to be deleted has not been modified during the migration; or, if the first hash value and the second hash value are different, it is confirmed that the data to be deleted at the pre-migration position has been deleted.

[0011] In a specific embodiment, the method further includes: obtaining the number of data frames to be deleted and the number of erroneous word line bars in the data block where the data to be deleted is located, and calculating the erase priority parameter according to formula (1), the calculation formula is as follows:

[0012] P=n*N+b*B+f*F (1)

[0013] Wherein, P represents the erase priority parameter; N represents the number of data frames to be deleted; B represents the number of wrong word lines; F represents whether the data block where the data to be deleted is located is a garbage collection block; n, b, f represent various preset coefficients;

[0014] The erasure priority parameters are arranged in descending order to form an erasure sequence; in response to executing an erasure operation, the data blocks where the data to be deleted are located are erased in sequence based on the erasure sequence.

[0015] In a specific embodiment, the method also includes: obtaining a preset number of data blocks to be deleted in the erasure sequence; querying the address values ​​of the data blocks to be deleted and adding the address values ​​to a preset register; in response to executing an erasure operation, erasing the data blocks to be deleted corresponding to the address values ​​in the preset register.

[0016] In a specific embodiment, the method also includes: in response to the power failure of the solid-state hard disk, obtaining the erase data rate of the solid-state hard disk, and calculating the number of erasable data blocks within a preset time range based on the erase data rate; obtaining the number of data blocks to be deleted, and determining whether the number of data blocks to be deleted is greater than or equal to the number of erasable data blocks; if so, setting the solid-state hard disk to only perform an erase operation; or, if not, setting the erase operation to be performed within a first preset time and the write data operation to be performed within a second preset time.

[0017] In a specific embodiment, the second preset time is calculated according to formula (2), which is as follows:

[0018]

[0019] Among them, T2 represents the second preset time; T1 represents the first preset time; v represents the erasing data rate; t represents the preset time range; n0 represents the number of erasable data blocks; and n represents the number of data blocks to be deleted.

[0020] In a second aspect, a data security deletion system is provided. Based on the data security deletion method described above, the system includes:

[0021] A first acquisition unit, configured to receive a deletion request, and parse the deletion request to obtain a current location of the data to be deleted in the deletion request;

[0022] A judgment unit, used for obtaining data frame information where the data to be deleted at the current position is located, and confirming that the data to be deleted at the current position has been migrated;

[0023] A second acquisition unit, configured to acquire a position of the data to be deleted before migration based on the data frame information after confirming that the data to be deleted at the current position has been migrated;

[0024] The execution unit is used to combine the data to be deleted at the current position and the data to be deleted at the position before migration to obtain the data block where the data to be deleted is located, and in response to executing the erasing operation, erase the data block where the data to be deleted is located.

[0025] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0026] Step A: receiving a deletion request, parsing the deletion request to obtain the current location of the data to be deleted in the deletion request;

[0027] Step B: obtaining the data frame information of the data to be deleted at the current position, and confirming that the data to be deleted at the current position has been migrated;

[0028] Step C: after confirming that the data to be deleted at the current location has been migrated, obtaining the location of the data to be deleted before migration based on the data frame information;

[0029] Step D: combining the data to be deleted at the current location and the data to be deleted at the location before migration to obtain the data block where the data to be deleted is located, and in response to executing the erase operation, erasing the data block where the data to be deleted is located.

[0030] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0031] Step A: receiving a deletion request, parsing the deletion request to obtain the current location of the data to be deleted in the deletion request;

[0032] Step B: obtaining the data frame information of the data to be deleted at the current position, and confirming that the data to be deleted at the current position has been migrated;

[0033] Step C: after confirming that the data to be deleted at the current location has been migrated, obtaining the location of the data to be deleted before migration based on the data frame information;

[0034] Step D: combining the data to be deleted at the current location and the data to be deleted at the location before migration to obtain the data block where the data to be deleted is located, and in response to executing the erase operation, erasing the data block where the data to be deleted is located.

[0035] The embodiments of the present application have the following beneficial effects:

[0036] 1. The embodiment of the present application provides the following steps: first, based on the data frame information where the data to be deleted is located, confirm that the data to be deleted at the current position has migrated, and after confirming that the data to be deleted at the current position has migrated, obtain the pre-migration position of the data to be deleted based on the data frame information, thereby obtaining the data blocks where the data to be deleted at the current position and the pre-migration position are located, and erase the above data blocks to achieve complete deletion of the data to be deleted in the solid-state hard disk, and track the migration information of the data by monitoring the migration path of the data in the hard disk. Even in the case of data migration, it is still possible to ensure that the data is truly deleted from the physical level; by optimizing the erasing order of the data blocks and giving priority to the deletion of data, the efficiency of the data erasing operation is improved, and the risk of data leakage is further reduced.

[0037] 2. When an abnormal power outage occurs on the solid-state hard disk, by allocating and managing the execution operations on the solid-state hard disk, when the number of data blocks to be deleted is greater than or equal to the number of erasable data blocks, the number of data blocks to be deleted is large, and the write operation on the solid-state hard disk is set to stop, and only the erase operation is performed; when the number of data blocks to be deleted is less than the number of erasable data blocks and the number of erasable blocks, the tasks on the solid-state hard disk are allocated, that is, the erase operation is performed within the first preset time, and the write operation is performed within the second preset time. The tasks on the hard disk are dynamically adjusted according to the actual data volume to ensure that the data can be safely erased before power is off while maintaining the write performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 A schematic diagram of the application environment according to the present application is shown;

[0040] Figure 2 A schematic diagram of a method for securely deleting data according to the present application is shown;

[0041] Figure 3 A schematic diagram showing the structure of a data frame according to the present application is shown;

[0042] Figure 4 A schematic diagram showing the structure of the tracking chain according to the present application is shown;

[0043] Figure 5 A schematic diagram of a data security deletion system according to the present application is shown;

[0044] Figure 6A schematic diagram showing a computer device according to the present application. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0046] The data security deletion method provided in this application can be applied to Figure 1 In the application environment shown, the client 102 communicates with the host 104 through the network, wherein the host 104 is configured with a solid-state hard disk for reading and writing data. The user sends a deletion request to the host through the client, so that the solid-state hard disk obtains the current position of the data to be deleted in the deletion request, obtains the data frame information where the data to be deleted is located at the current position, and obtains the pre-migration position of the data to be deleted based on the data frame information; combines the data to be deleted at the current position and the data to be deleted at the pre-migration position to obtain the data block where the data to be deleted is located, and in response to executing the erase operation, erases the data block where the data to be deleted is located. Among them, the client 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the host 104 can be implemented with an independent server or a server cluster composed of multiple servers.

[0047] In one embodiment, Figure 2 As shown, a data security deletion method is provided, which is applied to Figure 1 The solid state drive in the example is used as an example to illustrate, including the following steps:

[0048] Step 101: Receive a deletion request, and parse the deletion request to obtain the current location of the data to be deleted in the deletion request.

[0049] The user sends a deletion request to the solid-state drive through the terminal, that is, the deletion request is encapsulated into a corresponding data packet or command and sent to the solid-state drive; after the solid-state drive receives the deletion request, the data packet or command is parsed through the interface module on the solid-state drive to extract relevant information of the deletion request, such as the size of the data to be deleted and the storage location of the data to be deleted, that is, the current location of the data to be deleted in the deletion request is first obtained.

[0050] Among them, the solid-state drive includes multiple levels of internal storage units, namely Lun, Plane, Block, Wordline, Page and DF (Date Frame, referred to as data frame). Since the valid data in the hard disk will be migrated in the solid-state drive according to relevant functional requirements and in units of data frames, in order to ensure the complete deletion of the data to be deleted at the physical level, it is necessary to obtain the storage location of the data to be deleted before migration.

[0051] Step 102: Obtain data frame information where the data to be deleted at the current location is located, and confirm that the data to be deleted at the current location has been migrated.

[0052] Among them, the data frame information includes a hash value field, and this embodiment includes obtaining the hash value field in the data frame information where the data to be deleted at the current position is located, and judging whether the hash value fields are all 1; if the hash value fields are not all 1, confirming that the data to be deleted at the current position has been migrated; or, if the hash value fields are all 1, the data to be deleted at the current position has not been migrated.

[0053] Further, such as Figure 3 As shown, the data frame information includes data, tracking chain, address and hash value fields. When judging whether the data has been migrated, if the hash value field and the tracking chain are both 1, it is confirmed that the valid data has not been migrated; if the hash value field is not all 1, it is confirmed that the valid data has been migrated. At this time, it is necessary to confirm the position before migration based on the data frame information associated with the data to be deleted.

[0054] Step 103: After confirming that the data to be deleted at the current location has been migrated, obtain the location of the data to be deleted before migration based on the data frame information.

[0055] In a specific embodiment, the tracking chain includes an internal storage unit value of a solid-state drive, and the internal storage unit value is set to have a preset number of bits; in response to data migration, the preset number of bits is updated to have a migration identification value; after confirming that the data to be deleted at the current position has been migrated, the migration identification value on the bit of the preset position associated with the data to be deleted at the current position is obtained; based on the migration identification value, the pre-migration position of the data to be deleted is confirmed.

[0056] Obtain the first hash value in the hash value field of the pre-migration position, and obtain the second hash value in the hash value field of the current position; determine whether the first hash value and the second hash value are the same; if the first hash value and the second hash value are the same, confirm that the data to be deleted has not been modified during the migration; or, if the first hash value and the second hash value are different, confirm that the data to be deleted at the pre-migration position has been deleted.

[0057] Furthermore, in this embodiment, the data on the data frame is marked by a hash value. Specifically, in response to the first migration of the data, an initial hash value is calculated by a hash function, an updated hash value is generated, and the hash value is stored in a hash value field; in response to the data migration operation, the hash value in the hash value field of the current position is copied to the hash value field in the data frame of the migration position, so as to facilitate the subsequent judgment of the migration status of the valid data through the hash value field.

[0058] Exemplarily, when data is migrated for the first time, this embodiment adopts the lightweight hash function PHOTON in the lightweight cryptographic algorithm international standard ISP / IEC 29192. When calculating the hash value, the PHOTON function is used to generate a 128-bit hash value.

[0059] In this embodiment, the data frame information has reserved free space, and the free space includes data, tracking chain, address and hash value fields. Figure 4 As shown, the tracking chain includes LUN value, Plane value, Block value, Wordline value, Page value, and DF value. The bit length occupied by each value is determined according to the hardware.

[0060] For example, the hardware upper limit is only 2 Luns, 2 Planes, 936 Blocks, 3 Wordlines, 4 Pages, and 4 DFs. Then Lun occupies 1 bit, Plane occupies 1 bit, Block occupies 10 bits, Wordline occupies 2 bits, Page occupies 2 bits, and DF occupies 2 bits. When data is migrated, the position before migration is recorded by tracking each value in the chain, so that the position before migration can be obtained by querying the data frame information after the migration is completed.

[0061] It should be noted that the number of data migrations recorded through the tracking chain is limited. If the number of data migrations exceeds the preset number on the tracking chain, the first hash value in the hash value field of the position before migration and the second hash value in the hash value field of the current position are obtained, and a determination is made as to whether the two hash values ​​are the same. If the two are inconsistent, it means that part of the data has been deleted. At this time, the different parts in the hash value field of the current position are deleted, and the same parts as in the hash value field of the current position are retained.

[0062] Step 104: Combine the data to be deleted at the current location and the data to be deleted at the location before migration to obtain the data block where the data to be deleted is located, and in response to executing an erase operation, erase the data block where the data to be deleted is located.

[0063] In this embodiment, the solid-state hard disk needs to perform data reading and writing operations at the same time. In order to reduce the impact on other tasks on the solid-state hard disk and to achieve data deletion as efficiently as possible, the number of data frames to be deleted and the number of erroneous word lines in the data block where the data to be deleted is located are obtained, and the erase priority parameter is calculated according to formula (1). The calculation formula is as follows:

[0064] P=n*N+b*B+f*F (1)

[0065] Wherein, P represents the erase priority parameter; N represents the number of data frames to be deleted; B represents the number of wrong word lines; F represents whether the data block where the data to be deleted is located is a garbage collection block; n, b, f represent various preset coefficients;

[0066] The erasure priority parameters are arranged in descending order to form an erasure sequence; in response to executing an erasure operation, the data blocks where the data to be deleted are located are erased in sequence based on the erasure sequence.

[0067] Furthermore, an erasure priority parameter is obtained by performing weighted calculation on data blocks in different erasure situations, and an erasure sequence is formed; when executing an erasure operation, a preset number of data blocks to be deleted in the erasure sequence are obtained; the address value of the data block to be deleted is queried, and the address value is added to a preset register; in response to executing an erasure operation, the data block to be deleted corresponding to the address value in the preset register is erased.

[0068] Exemplarily, before executing the erase operation, the first six data blocks in the erase sequence are set to be obtained, and data blocks of a preset number and position are obtained by querying the erase sequence, and then the address values ​​of the queried six data blocks are placed in a register for subsequent execution of the erase operation.

[0069] In a specific embodiment, the tasks on the hard disk are dynamically adjusted according to the actual data volume to ensure that the data can be safely erased before power is turned off while maintaining the write performance, which specifically includes:

[0070] In response to the power failure of the solid state drive, the erase data rate of the solid state drive is obtained, and the number of erasable data blocks within a preset time range is calculated according to the erase data rate; the number of data blocks to be deleted is obtained, and it is determined whether the number of data blocks to be deleted is greater than or equal to the number of erasable data blocks; if so, the solid state drive is set to perform only an erase operation; or, if not, the erase operation is set to be performed within a first preset time, and the write data operation is performed within a second preset time. The second preset time is calculated according to formula (2), and the calculation formula is as follows:

[0071]

[0072] Among them, T2 represents the second preset time; T1 represents the first preset time; v represents the erasing data rate; t represents the preset time range; n0 represents the number of erasable data blocks; and n represents the number of data blocks to be deleted.

[0073] When allocating tasks to be executed on the solid-state drive, if n≥n0, no read / write operations are performed, only erase operations are performed until n<n0; if n<n0, since read / write and erase operations cannot be performed at the same time, erase data blocks are performed first within the unit time, and the unit time is set to the time to erase a data block, and then times the unit time to read and write, and dynamically adjust the read and write operations in real time according to the current number of n.

[0074] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0075] In one embodiment, Figure 5 As shown, a data security deletion system, based on the data security deletion method as described above, includes a solid state drive, the solid state drive is communicatively connected to a host end to enable the host end to read and write data to the solid state drive, and the system includes:

[0076] A first acquisition unit, configured to receive a deletion request, and parse the deletion request to obtain a current location of the data to be deleted in the deletion request;

[0077] A judgment unit, used for obtaining data frame information where the data to be deleted at the current position is located, and confirming that the data to be deleted at the current position has been migrated;

[0078] A second acquisition unit, configured to acquire a position of the data to be deleted before migration based on the data frame information after confirming that the data to be deleted at the current position has been migrated;

[0079] The execution unit is used to combine the data to be deleted at the current position and the data to be deleted at the position before migration to obtain the data block where the data to be deleted is located, and in response to executing the erasing operation, erase the data block where the data to be deleted is located.

[0080] In a specific embodiment, the solid state drive is configured as NAND Flash, and the solid state drive includes an FTL and an interface unit, wherein the FTL is used to manage the read and write operations of the NAND Flash memory.

[0081] In a specific embodiment, the data frame information includes a hash value field, and the judgment unit is also used to obtain the hash value field in the data frame information where the data to be deleted at the current position is located, and judge whether the hash value fields are all 1; if the hash value fields are not all 1, it is confirmed that the data to be deleted at the current position has been migrated; or, if the hash value fields are all 1, the data to be deleted at the current position has not been migrated.

[0082] In a specific embodiment, the second acquisition unit is used to reserve a free position in the data frame information, and the free position includes a tracking chain; the tracking chain includes an internal storage unit value of the solid-state hard disk, and the internal storage unit value is set to have a preset number of bits; in response to data migration, the preset number of bits is updated to have a migration identification value; after confirming that the data to be deleted at the current position has been migrated, the migration identification value on the bit of the preset position associated with the data to be deleted at the current position is obtained; according to the migration identification value, the pre-migration position of the data to be deleted is confirmed; the first hash value in the hash value field of the pre-migration position is obtained, and the second hash value in the hash value field of the current position is obtained; it is determined whether the first hash value and the second hash value are the same; if the first hash value and the second hash value are the same, it is confirmed that the data to be deleted has not been modified during the migration; or, if the first hash value and the second hash value are different, it is confirmed that the data to be deleted at the pre-migration position has been deleted.

[0083] In a specific embodiment, it also includes an erasure sorting unit, which is used to obtain the number of data frames to be deleted and the number of erroneous word lines in the data block where the data to be deleted is located, and calculate the erasure priority parameter according to formula (1), which is as follows:

[0084] P=n*N+b*B+f*F (1)

[0085] Wherein, P represents the erase priority parameter; N represents the number of data frames to be deleted; B represents the number of wrong word lines; F represents whether the data block where the data to be deleted is located is a garbage collection block; n, b, f represent various preset coefficients;

[0086] The erasure priority parameters are arranged in descending order to form an erasure sequence; in response to executing an erasure operation, the data blocks where the data to be deleted are located are erased in sequence based on the erasure sequence.

[0087] In a specific embodiment, the execution unit is also used to obtain a preset number of data blocks to be deleted in the erase sequence; query the address value of the data block to be deleted, and add the address value to a preset register; in response to executing an erase operation, erase the data block to be deleted corresponding to the address value in the preset register.

[0088] In a specific embodiment, it also includes an erase arbitration unit, which is used to obtain the erase data rate of the solid-state hard disk in response to power failure of the solid-state hard disk, and calculate the number of erasable data blocks within a preset time range according to the erase data rate; obtain the number of data blocks to be deleted, and determine whether the number of data blocks to be deleted is greater than or equal to the number of erasable data blocks; if so, set the solid-state hard disk to only perform an erase operation; or, if not, set the erase operation to be performed within a first preset time and the write data operation to be performed within a second preset time.

[0089] In a specific embodiment, the erase arbitration unit is further configured to calculate the second preset time according to formula (2), and the calculation formula is as follows:

[0090]

[0091] Among them, T2 represents the second preset time; T1 represents the first preset time; v represents the erasing data rate; t represents the preset time range; n0 represents the number of erasable data blocks; and n represents the number of data blocks to be deleted.

[0092] For the specific definition of the data security deletion system, please refer to the definition of the data security deletion method above, which will not be repeated here. Each module in the above-mentioned data security deletion system can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0093] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the current location of the data to be deleted and the location data before migration of the data to be deleted. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for secure data deletion is implemented.

[0094] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0095] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0096] Step 201: receiving a deletion request, parsing the deletion request to obtain the current location of the data to be deleted in the deletion request;

[0097] Step 202: Acquire the data frame information where the data to be deleted at the current location is located, and confirm that the data to be deleted at the current location has been migrated;

[0098] Step 203: after confirming that the data to be deleted at the current location has been migrated, obtaining the location of the data to be deleted before migration based on the data frame information;

[0099] Step 204: Combine the data to be deleted at the current location and the data to be deleted at the location before migration to obtain the data block where the data to be deleted is located, and in response to executing the erase operation, erase the data block where the data to be deleted is located.

[0100] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0101] The data frame information includes a hash value field. The hash value field in the data frame information where the data to be deleted at the current position is located is obtained to determine whether the hash value fields are all 1; if the hash value fields are not all 1, it is confirmed that the data to be deleted at the current position has been migrated; or, if the hash value fields are all 1, the data to be deleted at the current position has not been migrated.

[0102] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0103] A free position is reserved in the data frame information, and the free position includes a tracking chain; the tracking chain includes an internal storage unit value of the solid state drive, and the internal storage unit value is set to have a preset number of bits; in response to data migration, the preset number of bits is updated to have a migration identification value; after confirming that the data to be deleted at the current position has been migrated, the migration identification value on the bit of the preset position associated with the data to be deleted at the current position is obtained; according to the migration identification value, the pre-migration position of the data to be deleted is confirmed; the first hash value in the hash value field of the pre-migration position is obtained, and the second hash value in the hash value field of the current position is obtained; it is determined whether the first hash value and the second hash value are the same; if the first hash value and the second hash value are the same, it is confirmed that the data to be deleted has not been modified during the migration; or, if the first hash value and the second hash value are different, it is confirmed that the data to be deleted at the pre-migration position has been deleted.

[0104] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0105] The number of data frames to be deleted and the number of word lines with errors in the data block where the data to be deleted is located are obtained, and the erasure priority parameter is calculated according to formula (1), and the calculation formula is as follows:

[0106] P=n*N+b*B+f*F (1)

[0107] Wherein, P represents the erase priority parameter; N represents the number of data frames to be deleted; B represents the number of wrong word lines; F represents whether the data block where the data to be deleted is located is a garbage collection block; n, b, f represent various preset coefficients;

[0108] The erasure priority parameters are arranged in descending order to form an erasure sequence; in response to executing an erasure operation, the data blocks where the data to be deleted are located are erased in sequence based on the erasure sequence.

[0109] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0110] Acquire a preset number of to-be-deleted data blocks in the erasing sequence; query address values ​​of the to-be-deleted data blocks and add the address values ​​to a preset register; in response to executing an erasing operation, erase the to-be-deleted data blocks corresponding to the address values ​​in the preset register.

[0111] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0112] In response to the power failure of the solid-state hard disk, the erase data rate of the solid-state hard disk is obtained, and the number of erasable data blocks within a preset time range is calculated according to the erase data rate; the number of data blocks to be deleted is obtained, and it is determined whether the number of data blocks to be deleted is greater than or equal to the number of erasable data blocks; if so, the solid-state hard disk is set to perform only an erase operation; or, if not, the erase operation is set to be performed within a first preset time, and the write data operation is performed within a second preset time.

[0113] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0114] The second preset time is calculated according to formula (2), and the calculation formula is as follows:

[0115]

[0116] Among them, T2 represents the second preset time; T1 represents the first preset time; v represents the erasing data rate; t represents the preset time range; n0 represents the number of erasable data blocks; and n represents the number of data blocks to be deleted.

[0117] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0118] Step 301: receiving a deletion request, parsing the deletion request to obtain the current location of the data to be deleted in the deletion request;

[0119] Step 302: Obtain data frame information where the data to be deleted at the current location is located, and confirm that the data to be deleted at the current location has been migrated;

[0120] Step 303: after confirming that the data to be deleted at the current location has been migrated, obtaining the location of the data to be deleted before migration based on the data frame information;

[0121] Step 304: Combine the data to be deleted at the current location and the data to be deleted at the location before migration to obtain the data block where the data to be deleted is located, and in response to executing the erase operation, erase the data block where the data to be deleted is located.

[0122] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0123] Obtain the hash value field in the data frame information where the data to be deleted at the current position is located, and determine whether the hash value fields are all 1; if the hash value fields are not all 1, confirm that the data to be deleted at the current position has been migrated; or, if the hash value fields are all 1, the data to be deleted at the current position has not been migrated.

[0124] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0125] A free position is reserved in the data frame information, and the free position includes a tracking chain; the tracking chain includes an internal storage unit value of the solid state drive, and the internal storage unit value is set to have a preset number of bits; in response to data migration, the preset number of bits is updated to have a migration identification value; after confirming that the data to be deleted at the current position has been migrated, the migration identification value on the bit of the preset position associated with the data to be deleted at the current position is obtained; according to the migration identification value, the pre-migration position of the data to be deleted is confirmed; the first hash value in the hash value field of the pre-migration position is obtained, and the second hash value in the hash value field of the current position is obtained; it is determined whether the first hash value and the second hash value are the same; if the first hash value and the second hash value are the same, it is confirmed that the data to be deleted has not been modified during the migration; or, if the first hash value and the second hash value are different, it is confirmed that the data to be deleted at the pre-migration position has been deleted.

[0126] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0127] The number of data frames to be deleted and the number of word lines with errors in the data block where the data to be deleted is located are obtained, and the erasure priority parameter is calculated according to formula (1), and the calculation formula is as follows:

[0128] P=n*N+b*B+f*F (1)

[0129] Wherein, P represents the erase priority parameter; N represents the number of data frames to be deleted; B represents the number of wrong word lines; F represents whether the data block where the data to be deleted is located is a garbage collection block; n, b, f represent various preset coefficients;

[0130] The erasure priority parameters are arranged in descending order to form an erasure sequence; in response to executing an erasure operation, the data blocks where the data to be deleted are located are erased in sequence based on the erasure sequence.

[0131] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0132] Acquire a preset number of to-be-deleted data blocks in the erasing sequence; query address values ​​of the to-be-deleted data blocks and add the address values ​​to a preset register; in response to executing an erasing operation, erase the to-be-deleted data blocks corresponding to the address values ​​in the preset register.

[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0134] In response to the power failure of the solid-state hard disk, the erase data rate of the solid-state hard disk is obtained, and the number of erasable data blocks within a preset time range is calculated according to the erase data rate; the number of data blocks to be deleted is obtained, and it is determined whether the number of data blocks to be deleted is greater than or equal to the number of erasable data blocks; if so, the solid-state hard disk is set to perform only an erase operation; or, if not, the erase operation is set to be performed within a first preset time, and the write data operation is performed within a second preset time.

[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0136] The second preset time is calculated according to formula (2), and the calculation formula is as follows:

[0137]

[0138] Among them, T2 represents the second preset time; T1 represents the first preset time; v represents the erasing data rate; t represents the preset time range; n0 represents the number of erasable data blocks; and n represents the number of data blocks to be deleted.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0141] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A data security deletion method, characterized in that: Applied to a solid state drive, the method comprises: Receiving a deletion request, parsing the deletion request to obtain a current location of the data to be deleted in the deletion request; Acquire the data frame information where the data to be deleted at the current position is located, and confirm that the data to be deleted at the current position has been migrated; After confirming that the data to be deleted at the current location has been migrated, obtaining the location of the data to be deleted before migration based on the data frame information; The data to be deleted at the current position and the data to be deleted at the position before migration are combined to obtain the data block where the data to be deleted is located, and in response to executing the erase operation, the data block where the data to be deleted is located is erased.

2. The data security deletion method according to claim 1, characterized in that: The data frame information includes a hash value field, and the method further includes: Obtain the hash value field in the data frame information where the data to be deleted at the current position is located, and determine whether the hash value fields are all 1; If the hash value fields are not all 1, it is confirmed that the data to be deleted at the current location has been migrated; Alternatively, if all the hash value fields are 1, the data to be deleted at the current location has not been migrated.

3. The data security deletion method according to claim 2, characterized in that: After confirming that the data to be deleted at the current location has been migrated, obtaining the location of the data to be deleted before migration based on the data frame information specifically includes: An idle position is reserved in the data frame information, and the idle position includes a tracking chain; The tracking chain includes an internal storage unit value of the solid state drive, and the internal storage unit value is set to have a preset number of bits; In response to data migration, updating the bits of the preset number of bits to have a migration identification value; After confirming that the data to be deleted at the current position has been migrated, obtaining a migration identification value on a bit of a preset position associated with the data to be deleted at the current position; According to the migration identification value, confirming the pre-migration position of the to-be-deleted data; Obtaining a first hash value in the hash value field of the pre-migration position, and obtaining a second hash value in the hash value field of the current position; Determine whether the first Hash value and the second Hash value are the same; If the first hash value and the second hash value are the same, confirming that the to-be-deleted data has not been modified during the migration; Alternatively, if the first Hash value and the second Hash value are different, it is confirmed that the number to be deleted at the position before migration has been deleted.

4. The data security deletion method according to claim 1 or 2, characterized in that: The method further comprises: The number of data frames to be deleted and the number of word lines with errors in the data block where the data to be deleted is located are obtained, and the erasure priority parameter is calculated according to formula (1), and the calculation formula is as follows: P=n*N+b*B+f*F (1) Wherein, P represents the erase priority parameter; N represents the number of data frames to be deleted; B represents the number of wrong word lines; F represents whether the data block where the data to be deleted is located is a garbage collection block; n, b, f represent various preset coefficients; Arranging the erasure priority parameters in descending order to form an erasure sequence; In response to executing the erasing operation, the data blocks where the to-be-deleted data is located are erased in sequence based on the erasing sequence.

5. The data security deletion method according to claim 4, characterized in that: The method further comprises: Obtaining a preset number of to-be-deleted data blocks in the erasure sequence; Querying the address value of the data block to be deleted, and adding the address value to a preset register; In response to executing the erase operation, the to-be-deleted data block corresponding to the address value in the preset register is erased.

6. The data secure deletion method according to claim 1 or 2, characterized in that: The method further comprises: In response to the solid state drive being powered off, acquiring an erasure data rate of the solid state drive, and calculating the number of erasable data blocks within a preset time range according to the erasure data rate; Obtaining the number of data blocks to be deleted, and determining whether the number of data blocks to be deleted is greater than or equal to the number of erasable data blocks; If yes, setting the solid state hard disk to perform only an erase operation; Or, if not, it is set that the erasing operation is performed within the first preset time, and the data writing operation is performed within the second preset time.

7. The data secure deletion method according to claim 6, characterized in that: The method further comprises: The second preset time is calculated according to formula (2), and the calculation formula is as follows: Among them, T2 represents the second preset time; T1 represents the first preset time; v represents the erasing data rate; t represents the preset time range; n0 represents the number of erasable data blocks; and n represents the number of data blocks to be deleted.

8. A data security deletion system, based on the data security deletion method according to any one of claims 1 to 7, characterized in that: The system comprises: A first acquisition unit, configured to receive a deletion request, and parse the deletion request to obtain a current location of the data to be deleted in the deletion request; A judgment unit, used for obtaining data frame information where the data to be deleted at the current position is located, and confirming that the data to be deleted at the current position has been migrated; A second acquisition unit, configured to acquire a position of the data to be deleted before migration based on the data frame information after confirming that the data to be deleted at the current position has been migrated; The execution unit is used to combine the data to be deleted at the current position and the data to be deleted at the position before migration to obtain the data block where the data to be deleted is located, and in response to executing the erasing operation, erase the data block where the data to be deleted is located.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.