TECHNICAL FIELD

The present disclosure relates to the field of solid-state drive, and more particularly to method, system, and solid-state drive for data processing.

BACKGROUND

At present, the solid-state drives (SSD) on the market mainly provide storage functions for data reading and writing, and they do not provide the backup and recovery functions for the deleting data. The backup and recovery functions of SSD data mainly depends on the management and maintenance by the upper operating system layer, the application layer, or the storage system layer. Although the upper management schemes can meet the requirements of the data backup and recovery under normal circumstances, they can not provide effective detection and data recovery in the case that the data was deleted because of malevolence or wrong operation by the privileged system users who can modify or disable the upper management schemes. In addition, due to the garbage collection algorithm and TRIM deletion mechanism of the SSD, the retention time of the data deleted by the operating system is unpredictable. The traditional data forensics and recovery technology applied to the mechanical hard disk will face an unprecedented challenge when it is applied to solid-state drives.

SUMMARY OF THE DISCLOSURE

The present disclosure relates to a method, system, and solid-state drive for data processing that can backup data and also recover the deleted data.

In order to solve the above problems, one aspect of the present disclosure provides a method for data processing in the solid-state drive. The method includes detecting the user operations on a first storage area, which is visible to an operating system in the solid-state drive; if the user operation is a reading or writing operation, keeping the data of the first storage area and the data of a mirrored data storage area of a second storage area synchronized; and if the user operation is a deleting operation or a TRIM operation, keeping the data of the first storage area and the data of the mirrored data storage area of the second storage area synchronized, and backing up the deleted data from the first storage area to a deleted data storage area of the second storage area. The second storage area can be set to be invisible to the operating system in the solid-state disk.

In some embodiments, after the step of detecting the user operations on the first storage area which is visible to the operating system in the solid-state drive, the method further includes when the operation on the first storage area is an abnormal operation, stopping the data synchronization between the first storage area and the mirrored data storage area, and then recording the abnormal operation event.

In some embodiments, after the step of backing up the deleted data from the first storage area to the deleted data storage area of the second storage area, the method further includes adding an information identifier to the deleted data from the first storage area.

In some embodiments, after the step of backing up the deleted data from the first storage area to the deleted data storage area of the second storage area, the method further includes processing the newly deleted data according to a preset storage rule when the storage medium space of the second storage area is detected to be less than or equal to a preset space.

In some embodiments, the method further includes verifying a visible authentication command; if and only if the verification is successful, setting the second storage area, which is not visible to the operating system, to be visible to the operating system; and enabling a first type of operating functions to the second storage area at the same time. The first type of operating functions includes restoring the data of the deleted data storage area to a storage medium, and reading the data of the second storage area.

In some embodiments, the method further includes verifying a function enable authentication command that sent by the user; if and only if the verification is successful, enabling a second type of operation function for the second storage area corresponding to the function enable authentication command; and if the validation is failed, disabling the operation corresponding to the function enable authentication command and returning an error code.

In some embodiments, the second type of operating functions includes resetting the second storage area to be invisible to the operating system; erasing the data in the second storage area; writing data to the second storage area; and reading specific information from the second storage area.

Another aspect of the present disclosure provides a system for data processing in a solid-state drive. The system includes an operation detection module configured to detect the user operations on a first storage area, which is visible to an operating system in the solid-state drive; a data synchronization module configured to keep the data of the first storage area and the data of the mirrored data storage area of the second storage area synchronized when the operation detection module detects that the operation is a reading or writing operation; and a storage module for deleted data configured to keep the data of the first storage area and the data of the mirrored data storage area of the second storage area synchronized, and back up the deleted data from the first storage area to the deleted data storage area of the second storage area when the operation detection module detects that the user operation is a deleting operation or the TRIM operation.

In some embodiments, the system further includes a synchronization stopping module configured to stop the data synchronization between the first storage area and the mirrored data storage area, and record the abnormal operation event when the operation detection module detects that the operation on the first storage area is an abnormal operation.

In some embodiments, the system further includes an identifier adding module configured to add an information identifier to the data deleted from the first storage area.

In some embodiments, the system further includes a visibility setting module configured to verify a visible authentication command sent by the user; if and only if the verification is successful, set the second storage area, which is not visible to the operating system, to be visible to the operating system, and enable the first type of operating functions to the second storage area at the same time. In some embodiments, the first type of operating functions includes restoring the data of the deleted data storage area to a storage medium; and reading data of the second storage area.

In some embodiments, the system further includes a functional enable module configured to verify the function enable authentication command sent by the user; if and only if the verification is successful, enable the second type of operation functions of second storage area corresponding to the function enable authentication command; and if the verification is failed, refuse the operation corresponding to the function enable authentication command and return an error code.

In some embodiments, the second type of operating functions include resetting the second storage area to be invisible to the operating system; erasing the data in the second storage area; writing data to the second storage area; and reading the specific information from the second storage area.

In some embodiments, the system further includes a volume detection module configured to detect the storage volume of the second storage area. The storage module for deleted data is also configured to process the new deleted data according to a preset storage rule when the storage volume of the second storage area is detected to be less than or equal to a preset volume.

Still another aspect of the present disclosure provides a solid-state drive. The solid-state drive includes a first storage area, which is visible to the operating system in the solid-state drive; a second storage area, which is set to be invisible to the operating system; and a Flash controller configured to execute the following program modules: an operation detection module configured to detect the user operations on the first storage area; a data synchronization module configured to keep the data of the first storage area and the data of the mirrored data storage area of the second storage area synchronized when the operation detection module detects that the operation is a reading or writing operation; and a storage module for deleted data configured to keep the data of the first storage area and the data of the mirrored data storage area of the second storage area synchronized, and back up the deleted data from the first storage area to the deleted data storage area of the second storage area when the operation detection module detects that the user operation is a deleting operation or a TRIM operation.

Compared with known solutions, the first storage area in the present disclosure is visible to the operating system, the second storage area is invisible to the operating system, and the second storage area is used to synchronize the first storage area data and the deleted data stored in the first storage area. The data processing method provided by the present disclosure synchronizes data written in the first storage area to the mirrored data storage area of the second storage area when performing reading and writing operations in the first storage area. When the user operation of the first storage area is detected to be a deletion operation or a TRIM operation, the deleted data is saved into the deleted data storage area of the second storage area, thereby avoiding the problem that the deleted data cannot be recovered caused by malicious Flash data or erroneous operation. And the Flash controller can be used to achieve data backing up and recovering in the SSD.

