IP Library › Granted Patent US 10,514,848
Granted Patent B2
US 10,514,848 · App. 14/974,885 · Granted Dec 24, 2019

Data storage method for selectively storing data in a buffer preset in a memory of an electronic device or an inherent buffer in an SSD

Inventor: Qingtao Sun (Beijing, CN)
Assignees: Beijing Lenovo Software Ltd.; Lenovo (Beijing) Co., Ltd.
G06F3/061G06F3/065G06F3/068G06F3/0619G06F3/0656G06F12/0866G06F2212/217
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,514,848
App. No.
14/974,885
Granted
Dec 24, 2019
Kind
B2
Abstract

A data storage method and a solid state disk (SSD) are provided. The method comprises: obtaining, by the SSD, target data; determining a target buffer for storing the target data between a first buffer and a second buffer based on a data type of the target data, wherein the first buffer is a buffer preset in a memory of an electronic device which includes the SSD, and the second buffer is an inherent buffer in the SSD; and caching the target data into the target buffer. The method further includes: obtaining state information of the electronic device, wherein the state information indicates a current status of the electronic device, and includes a utilization rate of a central processing unit of the electronic device; determining whether a status of the electronic device has changed, based on the state information, to obtain a determination result; and transferring first data from the second buffer to a specified region in a storage medium of the SSD, or from the specified region in the storage medium to the second buffer, according to the determination result, wherein the storage medium is a flash memory in the SSD.

Claims (36)

1. A data storage method applied to a solid state disk (SSD) comprising a controller, a second buffer and a storage medium, and performed by the controller, comprising:

obtaining target data to be written;

determining a target buffer for storing the target data between a first buffer and a second buffer, wherein the first buffer is a buffer preset in a memory in an electronic device coupled to the SSD, and the second buffer is an inherent buffer in the SSD;

caching the target data into the target buffer,

obtaining state information of the electronic device, wherein the state information indicates a current status of the electronic device and includes a utilization rate of a central processing unit (CPU) of the electronic device;

determining, based on the state information of the electronic device, whether the status of the electronic device has changed, to obtain a determination result; and

transferring first data from the second buffer to a specified region in a storage medium of the SSD, or from the specified region in the storage medium to the second buffer, according to the determination result, wherein the storage medium is a flash memory in the SSD,

wherein a speed of reading data in the specified region in the storage medium is higher than a speed of reading data in the other storage regions, and a service life of the specified region in the storage medium is longer than a service life of the other storage regions,

wherein the determining the target buffer for storing the target data between the first buffer and the second buffer comprises:

determining a data type of the target data, wherein the data type comprises a first data type and a second data type, wherein an estimated access frequency of data of the first data type is higher than that of data of the second data type; and

determining the first buffer to be the target buffer or determining the second buffer to be the target buffer based on the data type of the target data.

2. The method according to claim 1 , wherein after the caching the target data into the target buffer, the method further comprises:

counting an access frequency of the target data; and

updating the data type of the target data.

3. The method according to claim 2 , wherein after it is determined, based on the access frequency of the target data, that the data type of the target data changes, the method further comprises:

transferring the target data into a buffer corresponding to a current target data type, based on the data type of the target data.

4. The method according to claim 1 , wherein the first data stored in the second buffer is transferred into the specified region in the storage medium in a case that the determination result indicates that the status of the electronic device changes from a second state to a first state.

5. The method according to claim 4 , wherein after the first data stored in the second buffer is transferred into the specified region in the storage medium, the method further comprises: controlling the second buffer to be powered off.

6. The method according to claim 1 , wherein the first data stored in the specified region in the storage medium is transferred into the second buffer in a case that the determination result indicates that the status of the electronic device changes from a first state to a second state.

7. A solid state disk, comprising:

a controller; a second buffer; and a storage medium,

wherein the controller is configured to:

obtain target data to be written;

determine a target buffer for storing the target data between a first buffer and the second buffer, wherein the first buffer is a buffer preset in a memory in an electronic device coupled to the solid state disk, and the second buffer is a memory in the solid state disk;

cache the target data into the target buffer;

obtain state information of the electronic device, wherein the state information indicates a current status of the electronic device and includes a utilization rate of a central processing unit (CPU) of the electronic device;

determine, based on the state information of the electronic device, whether the status of the electronic device has changed, to obtain a determination result; and

transfer first data from the second buffer to a specified region in the storage medium of the solid state disk, or from the specified region in the storage medium to the second buffer, according to the determination result, wherein the storage medium is a flash memory in the SSD,

wherein a speed of reading data in the specified region in the storage medium is higher than a speed of reading data in the other storage regions, and a service life of the specified region in the storage medium is longer than a service life of the other storage regions,

wherein the determining the target buffer for storing the target data between the first buffer and the second buffer comprises:

determining a data type of the target data, wherein the data type comprises a first data type and a second data type, wherein an estimated access frequency of data of the first data type is higher than that of data of the second data type; and

determining the first buffer to be the target buffer or determining, by the controller, the second buffer to be the target buffer based on the data type of the target data.

8. The solid state disk according to claim 7 , wherein the controller is further configured to count an access frequency of the target data after the target data is cached into the target buffer; and update the data type of the target data.

9. The solid state disk according to claim 8 , wherein the controller is further configured to transfer the target data into a buffer corresponding to a current target data type, based on the data type of the target data, after it is determined, based on the access frequency of the target data, that the data type of the target data changes.

10. The solid state disk according to claim 7 , wherein the controller is configured to transfer the first data stored in the second buffer into the specified region in the storage medium, in a case that the determination result indicates that the status of the electronic device changes from a second state to a first state.

11. The solid state disk according to claim 10 , wherein the controller is configured to control the second buffer to be powered off, after the first data stored in the second buffer is transferred into the specified region in the storage medium.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 18, 2015
From: SUN, QINGTAO
To: BEIJING LENOVO SOFTWARE LTD.; LENOVO (BEIJING) CO., LTD.
Reel/Frame 037332/0507 →
Priority Claims (2)
CN 2015 1 0627623 · Sep 28, 2015 · national
CN 2015 1 0631699 · Sep 29, 2015 · national
Continuity (1)
Related Publication 20170090755A1 · Mar 30, 2017