CN105117180B - A kind of date storage method and device and solid state disk - Google Patents

A kind of date storage method and device and solid state disk Download PDF

Info

Publication number
CN105117180B
CN105117180B CN201510627623.6A CN201510627623A CN105117180B CN 105117180 B CN105117180 B CN 105117180B CN 201510627623 A CN201510627623 A CN 201510627623A CN 105117180 B CN105117180 B CN 105117180B
Authority
CN
China
Prior art keywords
caching
data
target data
target
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510627623.6A
Other languages
Chinese (zh)
Other versions
CN105117180A (en
Inventor
孙清涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Beijing Legend Core Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Legend Core Technology Co Ltd filed Critical Beijing Legend Core Technology Co Ltd
Priority to CN201510627623.6A priority Critical patent/CN105117180B/en
Publication of CN105117180A publication Critical patent/CN105117180A/en
Priority to US14/974,885 priority patent/US10514848B2/en
Priority to DE102016101311.0A priority patent/DE102016101311A1/en
Application granted granted Critical
Publication of CN105117180B publication Critical patent/CN105117180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present application provides a kind of date storage method and device and solid state disk, this method include:Solid state disk obtains current target data to be written;If it is determined that target data is the data for needing to cache, then from the first caching and the second caching, the target cache for storing target data is determined, wherein the first caching is preset buffer area in the host memory, and the second caching is the intrinsic caching in SSD;Target data is cached to target cache.This method and device can improve the storage performance of SSD.

Description

A kind of date storage method and device and solid state disk
Technical field
This application involves electronic information technical field, more particularly to a kind of date storage method and device and Solid state disk.
Background technology
Solid state disk (SSD, Solid State Disk) is fast, low in energy consumption because having the characteristics that the speed of read-write, and wide It is general to be applied in the electronic equipments such as notebook and desktop computer.
Existing SSD may include:Controller, flash memory and caching.Wherein, the memory in the SSD can be used for data Caching and the storage to the mapping table used in algorithm.SSD can be improved by carrying out data buffer storage by using the caching of the SSD Overall performance and the service life.However the buffer memory capacity general finite and capacity of SSD are smaller, the processing storage that cannot be satisfied SSD is wanted It asks, affects the hit rate of data access.
Invention content
In view of this, this application provides a kind of date storage method and device and solid state disk, to improve depositing for SSD Store up performance.
To achieve the above object, the application provides the following technical solutions:A kind of date storage method is applied to solid state disk SSD, the method includes:
Obtain current target data to be written;
If it is determined that the target data is the data for needing to cache, then from the first caching and the second caching, determine Target cache for storing the target data, wherein first caching is preset buffer area in host memory, described Second caching is the intrinsic caching in the SSD;
The target data is cached to the target cache.
It is preferably, described to determine the target cache for storing the target data from the first caching and the second caching, Including:
Determine that the data type belonging to the target data, the data type include first kind data and Second Type The access frequency of estimating of data, the first kind data estimates access frequency more than the Second Type data;
When the target data is first kind data, first caching is determined as target cache;
When the target data is Second Type data, second caching is determined as target cache.
Preferably, the target data is cached to the target cache, further includes:
Count the access frequency of the target data;
When the access frequency based on the target data determines that the data type belonging to the target data changes When, update the data type belonging to the target data.
Preferably, when the access frequency based on the target data determines that the data type belonging to the target data is sent out After changing, further include:
Based on the current affiliated target data type of the target data, the target data is transferred to and the target In the corresponding caching of data type.
Preferably, further include:
Monitor whether current residual space in first caching and the second caching is less than preset value respectively;
If current residual space is less than preset value in first caching, chosen at least from first buffer area Partial data is migrated to second caching;
If current residual space is less than preset value in second caching, chosen at least from second buffer area Partial data is migrated to first caching.
Preferably, further include:
Based on the digital independent frequency of first caching and the second caching, the first adjustment amount of first caching is determined With the second adjustment amount of the second buffer area;
According to the first adjustment amount, the spatial cache size of adjustment first caching;
According to the second adjustment amount, the spatial cache size of adjustment second caching.
On the other hand, present invention also provides a kind of data storage devices, are applied to solid-state hard disk SSD, described device packet It includes:
Data capture unit, for obtaining current target data to be written;
Determination unit is cached, for if it is determined that the target data is the data for needing to cache, then from the first caching In the second caching, the target cache for storing the target data is determined, wherein first caching is in host memory Preset buffer area, second caching are the intrinsic caching in the SSD;
Data write unit, for caching the target data to the target cache.
Preferably, the caching determination unit, including:
Type determination unit, for determining the data type belonging to the target data, the data type includes the One categorical data and Second Type data, the first kind data estimate access frequency more than the Second Type data Estimate access frequency;
First caching subelement, for when the target data is first kind data, first caching to be determined For target cache;
Second caching subelement, for when the target data is Second Type data, second caching to be determined For target cache.
Preferably, further include:
Frequency statistics unit, for the data write unit by the target data cache to the target cache it Afterwards, the access frequency of the target data is counted;
Type changing unit, for being determined belonging to the target data when the access frequency based on the target data When data type changes, the data type belonging to the target data is updated.
Preferably, further include:
Data transfer unit, for determining that the data type belonging to the target data is sent out in the type changing unit After changing, based on the target data it is current belonging to target data type, by the target data be transferred to it is described In the corresponding caching of target data type.
Preferably, further include:
Space monitoring unit, for monitoring whether current residual space in first caching and the second caching is less than respectively Preset value;
First migration units, if being less than preset value for current residual space in first caching, from described the Chosen in one buffer area at least partly Data Migration to it is described second caching;
Second migration units, if being less than preset value for current residual space in second caching, from described the Chosen in two buffer areas at least partly Data Migration to it is described first caching.
Preferably, further include:
Adjustment amount determination unit, for based on it is described first caching and second caching digital independent frequency, determine described in The second adjustment amount of the first adjustment amount and the second buffer area of first caching;
The first adjustment unit, for according to the first adjustment amount, the spatial cache size of adjustment first caching;
Second adjustment unit, for according to the second adjustment amount, the spatial cache size of adjustment second caching.
On the other hand, present invention also provides a kind of solid state disks, including:
Controller and the second caching;
Wherein, the controller, for obtaining current target data to be written;If it is determined that the target data is The data cached are needed, then from the first caching and second caching, determine that the target for storing the target data is slow It deposits;The target data is cached to the target cache;Wherein, first caching is preset caching in host memory Area.
Preferably, the controller determines the mesh for storing the target data from the first caching and the second caching Mark caching, specially:
The controller determines that the data type belonging to the target data, the data type include first kind data With the access frequency of estimating of Second Type data, the first kind data access frequency is estimated more than the Second Type data Rate;When the target data is first kind data, first caching is determined as target cache;When the target data For Second Type data when, by it is described second caching be determined as target cache.
Preferably, the controller is additionally operable to:It is cached to the target cache by the target data, counts institute State the access frequency of target data;When the access frequency based on the target data determines the data belonging to the target data When type changes, the data type belonging to the target data is updated.
Preferably, the controller is additionally operable to:When the access frequency based on the target data determines the number of targets After changing according to affiliated data type, based on the current affiliated target data type of the target data, by the mesh Mark data are transferred in caching corresponding with the target data type.
Preferably, the controller is additionally operable to:Current residual space in first caching and the second caching is monitored respectively Whether preset value is less than;If current residual space is less than preset value in first caching, from first buffer area Choose at least partly Data Migration to it is described second caching;If current residual space is less than preset value in second caching, Then chosen from second buffer area at least partly Data Migration to it is described first caching.
Preferably, the controller is additionally operable to:Based on the digital independent frequency of first caching and the second caching, determine The second adjustment amount of the first adjustment amount and the second buffer area of first caching;According to the first adjustment amount, described in adjustment The spatial cache size of first caching;According to the second adjustment amount, the spatial cache size of adjustment second caching.
It can be seen via above technical scheme that get current target data to be written be when data cached, then from Target cache is determined in first caching and the second caching, and the target data is cached to the target cache, due to the first caching For preset buffer area in host memory, and the second caching is caching intrinsic in the SSD, and therefore, target data can basis Need to store buffer area intrinsic in preset buffer area either SSD in host memory, to using in host memory Buffer area, realize to SSD be used for data cached spatial cache extension, the available spatial caches of SSD are increased, to have Conducive to the storage performance of raising SSD.
Description of the drawings
In order to illustrate more clearly of the technical solution of the embodiment of the present application, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only embodiments herein, for this field For those of ordinary skill, without creative efforts, it can also be obtained according to the attached drawing of offer other attached Figure.
Fig. 1 shows a kind of flow diagram of date storage method one embodiment of the application;
Fig. 2 shows a kind of flow diagrams of another embodiment of date storage method of the application;
Fig. 3 shows a kind of flow diagram of another embodiment of date storage method of the application;
Fig. 4 shows a kind of flow diagram of another embodiment of date storage method of the application;
Fig. 5 shows a kind of structural schematic diagram of data storage device one embodiment of the application;
Fig. 6 shows a kind of structural schematic diagram of another embodiment of data storage device of the application;
Fig. 7 shows a kind of structural schematic diagram of solid state disk one embodiment of the application.
Specific implementation mode
The embodiment of the present application provides a kind of date storage method and device, using the partial memory in host as SSD Caching improve the storage performance of SSD to extend the spatial cache of SSD.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
A kind of date storage method of the application is introduced first.
Referring to Fig. 1, it illustrates a kind of flow diagram of date storage method one embodiment of the application, the present embodiment Method can be applied to solid-state hard disk SSD, this method may include:
101, obtain current target data to be written.
Wherein, the process of the current target data to be written of SSD acquisitions can be similar to existing mode, as SSD is obtained The target data to be written of processor transmission.
102, if it is determined that it is the data for needing to cache to go out the target data, then from the first caching and the second caching, really The fixed target cache for storing the target data.
Wherein, which is preset buffer area in host memory, which is intrinsic slow in the SSD It deposits.
Unlike existing, in the present embodiment, which can operate the spatial cache accessed in other words actually There are two parts, a caching is spatial cache intrinsic in the SSD, that is, the caching is current SSD data cached used, and position Spatial cache inside the SSD;Another caching is preset buffer area in host memory, which is the host memory A part of space.For the ease of distinguishing, in the embodiment of the present application, by the preset buffer memory in the addressable host memories of SSD Area is known as the first caching, and by inherently caching is known as the second caching in the SSD.
The part of cache of host memory is extended to the available cachings of the SSD in the embodiment of the present application, to be conducive to Improve the caching performance of SSD.
In practical applications, SSD is got after the target data cached, can be from the first caching and the second caching, really Fixed one is currently used in the caching for storing the target data, to store the target data to the caching determined.In order to Convenient for distinguishing, the caching for being stored to the target data in the first caching and the second caching is known as target cache.
It is understood that after getting target data to be determined, determine what whether the target data needed to cache Mode equally can be similar to existing mode, if target data is according to the difference of access frequency or the purposes of target data Difference, then the storage mode for being directed to the target data may be different, and e.g., data necessary to being run for processor are then It may need to be buffered, and the data that some are not frequently used then are not necessarily to caching.
103, which is cached to the target cache.
In the embodiment of the present application, it is then to delay from first when data cached to get current target data to be written It deposits and determines target cache in the second caching, and the target data is cached to the target cache, since the first caching is host Preset buffer area in memory, and the second caching is caching intrinsic in the SSD, therefore, target data can deposit as needed Buffer area intrinsic in preset buffer area either SSD in host memory is stored up, to utilize the caching in host memory Area realizes the extension for being used for data cached spatial cache to SSD, the available spatial caches of SSD is increased, to be conducive to carry The storage performance of high SSD.
It should be noted that in the application any one embodiment, preset buffer area can be managed in the host memory Solution is the space that can be accessed by the SSD reserved in the host memory, and the space which reserves can not be led again Machine acts on memory.Specifically, by the BIOS program of host area reporting can will be specified in memory during opening host To the host, which does not include the preset buffer area, then after host-initiated, can only be used only in the memory Specified region, without using the preset buffer area in memory.
It is understood that determining the target cache for storing the target data from the first caching and the second caching Mode can there are many.
In one possible implementation, SSD can determine target cache at random.
In alternatively possible realization method, SSD can be according to first caching and the second caching current residual The size in available cache memory space determines the target cache for being currently used in and storing the target data.Such as, the original based on load balancing Reason chooses remaining available cache memory space the greater, as the target cache from the first caching and the second caching.
It is, of course, also possible to there are other to determine the mode of target cache, it is equally applicable to the application.
Below in the way of a kind of determining target cache for, describe in detail.Referring to Fig. 2, it illustrates the application A kind of flow diagram of another embodiment of date storage method, the method for the present embodiment can be applied to solid-state hard disk SSD, This method may include:
201, obtain current target data to be written.
202, if it is determined that it is the data for needing to cache to go out the target data, determines the data class belonging to the target data Type.
Wherein, data type can characterize the accessed frequency of the data, which may include first kind number According to Second Type data.The access frequency of estimating of first kind data estimates access frequency more than the Second Type data.
For SSD, some data are frequently necessary to be read, and some data then can't may often be read It takes, and for the data often transferred, if the reading speed to such data is excessively slow, also influence whether electronic equipment Data processing performance.Therefore, in the embodiment of the present application, target data to be stored is classified, with according to data type Determine that target cache is arrived in storage needed for target storage.
203, when the target data is first kind data, the first caching is determined as target cache.
204, when the target data is Second Type data, which is determined as target cache.
Wherein, which is preset buffer area in host memory, which is intrinsic slow in the SSD It deposits.
It is understood that the reading and writing data performance of the buffer area in host memory is higher than and is inherently cached in the SSD Therefore reading and writing data performance if target data is the higher data of access frequency, illustrates that such data wants readwrite performance It asks higher, the target data can be stored at this time into first caching;And other class data then can be stored directly Into the second caching of the SSD.
It wherein, in the embodiment of the present application can be according to the data access frequency of storage record and preset data type Corresponding access frequency determines the data type belonging to the target data;Can also be to preset belonging to different data Data type.
205, which is cached to the target cache.
After determining target cache, can directly it store data into the target cache.
Optionally, since the first caching readwrite performance is higher than the readwrite performance of the second caching, when the target data is When first kind data, the first data write rate can be based on, target data is written into first caching;And work as the mesh When mark data are Second Type data, the second data write rate can be based on, the target data is written into the second caching, Wherein, which is more than second data write rate.
Optionally, on the basis of embodiment shown in Fig. 2, after caching the target data to the target cache, also May include:Count the access frequency of the target data.Then when the access frequency based on the target data determines the target When data type belonging to data changes, the data type belonging to the target data is updated.
The access frequency of data is counted after storing target data, to determine the data class of target data The change of type is conducive to the follow-up accurate data type for determining data to be stored, and from the first caching and the second caching, rationally Determine store the target data buffer area.
Further, when the access frequency based on target data determines that the data type belonging to the target data becomes After change, can also include:
Based on the current affiliated target data type of the target data, which is transferred to and the target data class In the corresponding caching of type.
According to the variation of the data type of target data, dynamic adjustment stores the target cache of the target data, realizes Dynamic is conducive to more reasonably distribute solid inside SSD using the fixed caching in preset buffer memory area in host memory and the SSD There is the use of memory and host memory.
It is understood that in any of the above one embodiment, target data is stored specifically can be with to the first caching Direct memory access (DMA, the Direct Memory Access) operation for borrowing host carries out data-moving, without warp Cross host interface module.
And storing the target data to the second caching can be:Target data is stored to by host interface module Two cachings..
Referring to Fig. 3, it illustrates a kind of flow diagram of another embodiment of date storage method of the application, this implementations The method of example can be applied to solid-state hard disk SSD, and this method may include:
301, obtain current target data to be written.
302, if it is determined that it is the data for needing to cache to go out the target data, then from the first caching and the second caching, really The fixed target cache for storing the target data.
Wherein, which is preset buffer area in host memory, which is intrinsic slow in the SSD It deposits.
303, which is cached to the target cache.
Above step 301 to 303 may refer to the related introduction of any one embodiment of front, and details are not described herein.
304, based on first caching and second caching digital independent frequency, determine this first caching the first adjustment amount and The second adjustment amount of second buffer area.
In the present embodiment according to the digital independent frequency of the first caching, to judge the current memory space of first caching Whether disclosure satisfy that the corresponding digital independent frequency of the first caching, if the digital independent frequency of the first caching is higher, illustrates Higher to the frequency of use of the first caching, the first buffer memory a large amount of data being often accessed.In order to adapt to digital independent Demand then can suitably increase the spatial content of first caching, then the second adjustment amount can be that the first caching needs to increase Memory space;Correspondingly, if the reading frequency of the first caching is relatively low, the storage that can suitably reduce first caching is empty Between size.
It is similar for the second caching, can according to its digital independent frequency, come determine the need for increasing or decreasing this The capacity of two cachings.
305, according to the first adjustment amount, adjust the spatial cache size of first caching.
First caching is adjusted based on the first adjustment amount, can be by the first adjustment amount and to first caching The request that is adjusted of spatial cache size be sent to host, so as to host BIOS program after detecting host-initiated, Reconfigure the capacity of first caching.
306, according to the second adjustment amount, adjust the spatial cache size of second caching.
Adjustment for second caching, then can reconfigure the size of the second caching, such as increase the appearance of the second caching Amount, then can accordingly reduce the size of other memory spaces in SSD;Accordingly and, such as reduce the capacity of the second caching, then it can be corresponding Increase the size of other memory spaces in SSD.
The present embodiment realizes the dynamic modification to the space size of the first caching and the second caching, is conducive to adapt to data Access requirement.
Referring to Fig. 4, it illustrates a kind of flow diagram of another embodiment of date storage method of the application, this implementations The method of example can be applied to solid-state hard disk SSD, and this method may include:
401, obtain current target data to be written.
402, if it is determined that it is the data for needing to cache to go out the target data, then from the first caching and the second caching, really The fixed target cache for storing the target data.
Wherein, which is preset buffer area in host memory, which is intrinsic slow in the SSD It deposits.
403, which is cached to the target cache.
Above step 401 to 403 may refer to the related introduction of any one embodiment of front, and details are not described herein.
404, monitor whether current residual space in the first caching and the second caching is less than preset value respectively.
Wherein, which can be set as needed, and the first caching and the corresponding preset value of the second caching can be with It is identical to can also be different.
By the monitoring of this step, it can reduce due to the first caching and the second cache residual space deficiency and lead to data Store abnormal situation.
405, if current residual space is less than preset value in first caching, chosen at least from first buffer area Partial data is migrated to second caching.
406, if current residual space is less than preset value in second caching, chosen at least from second buffer area Partial data is migrated to first caching.
It, can will be in one of caching if current residual space is less than preset value in the first caching or the second caching In the Data Migration of storage to another caching.
It, can be according to the access frequency of data in the caching for the Data Migration in any one caching, it is determined whether It will be in the Data Migration to another caching.
Such as, for by the Data Migration in the first caching to the second caching the case where, when the residue for detecting the first caching When memory space is less than preset value, determine cached during current time first caches stored data estimate access frequency;Root The sequence of access frequency from high to low is estimated according to the target data stored in target data storage region, by the finger of sequence rearward The target data of fixed number amount is transferred in the second caching.
For another example, for by the Data Migration in the second caching to the first caching the case where, when detecting the surplus of the second caching When remaining memory space is less than preset value, determine cached during current time second caches stored data estimate access frequency; The sequence of access frequency from high to low is estimated according to the target data stored in target data storage region, it is forward by sorting The target data of specified quantity is transferred in first caching.
A kind of date storage method of corresponding the application, the embodiment of the present application also provides a kind of data processing equipments.
Referring to Fig. 5, it illustrates a kind of structural schematic diagram of data storage device one embodiment of the application, the present embodiment Device be applied to solid-state hard disk SSD, described device may include:
Data capture unit 501, for obtaining current target data to be written;
Determination unit 502 is cached, for if it is determined that the target data be to need the data that cache, then delaying from first It deposits in the second caching, determines the target cache for storing the target data, wherein first caching is the host Preset buffer area in memory, second caching are the intrinsic caching in the SSD;
Data write unit 503, for caching the target data to the target cache.
In the embodiment of the present application, it is then to delay from first when data cached to get current target data to be written It deposits and determines target cache in the second caching, and the target data is cached to the target cache, since the first caching is host Preset buffer area in memory, and the second caching is caching intrinsic in the SSD, therefore, target data can deposit as needed Buffer area intrinsic in preset buffer area either SSD in host memory is stored up, to utilize the caching in host memory Area realizes the extension for being used for data cached spatial cache to SSD, the available spatial caches of SSD is increased, to be conducive to carry The storage performance of high SSD.
Referring to Fig. 6, it illustrates a kind of structural schematic diagram of another embodiment of data storage device of the application, this implementations Device and the previous one embodiment of example the difference is that:
The caching determination unit 502, including:
Type determination unit 5021, for determining the data type belonging to the target data, the data type packet First kind data and Second Type data are included, the access frequency of estimating of the first kind data is more than the Second Type number According to estimate access frequency;
First caching subelement 5022, for when the target data is first kind data, described first to be cached It is determined as target cache;
Second caching subelement 5023, for when the target data is Second Type data, described second to be cached It is determined as target cache.
Optionally, the present embodiment can also include:
Frequency statistics unit, for the data write unit by the target data cache to the target cache it Afterwards, the access frequency of the target data is counted;
Type changing unit, for being determined belonging to the target data when the access frequency based on the target data When data type changes, the data type belonging to the target data is updated.
Further, the device of the present embodiment can also include:
Data transfer unit, for determining that the data type belonging to the target data is sent out in the type changing unit After changing, based on the target data it is current belonging to target data type, by the target data be transferred to it is described In the corresponding caching of target data type.
Optionally, in the embodiment of one device of any of the above, which can also include:
Space monitoring unit, for monitoring whether current residual space in first caching and the second caching is less than respectively Preset value;
First migration units, if being less than preset value for current residual space in first caching, from described the Chosen in one buffer area at least partly Data Migration to it is described second caching;
Second migration units, if being less than preset value for current residual space in second caching, from described the Chosen in two buffer areas at least partly Data Migration to it is described first caching.
Optionally, in the embodiment of one device of any of the above, which can also include:
Adjustment amount determination unit, for based on it is described first caching and second caching digital independent frequency, determine described in The second adjustment amount of the first adjustment amount and the second buffer area of first caching;
The first adjustment unit, for according to the first adjustment amount, the spatial cache size of adjustment first caching;
Second adjustment unit, for according to the second adjustment amount, the spatial cache size of adjustment second caching.
On the other hand, present invention also provides a kind of solid state disks.
Referring to Fig. 7, it illustrates a kind of structural schematic diagram of solid state disk one embodiment of the application, the present embodiment is consolidated State hard disk 70 may include:
The caching of controller 701 and second 702;
Wherein, the controller 701, for obtaining current target data to be written;If it is determined that the number of targets According to need the data cached, then from the first caching 801 and second caching 702, determine for storing the number of targets According to target cache;The target data is cached to the target cache;Wherein, first caching is pre- in host memory If buffer area.
It is understood that the solid state disk can also include storage medium, which can be flash memory.
Wherein, the controller of the solid state disk and the first caching of the host memory can pass through host interface module phase Even,
Optionally, the controller determines the mesh for storing the target data from the first caching and the second caching Mark caching, specially:
The controller determines that the data type belonging to the target data, the data type include first kind data With the access frequency of estimating of Second Type data, the first kind data access frequency is estimated more than the Second Type data Rate;When the target data is first kind data, first caching is determined as target cache;When the target data For Second Type data when, by it is described second caching be determined as target cache.
Optionally, the controller is additionally operable to:It is cached to the target cache by the target data, counts institute State the access frequency of target data;When the access frequency based on the target data determines the data belonging to the target data When type changes, the data type belonging to the target data is updated.
Further, the controller can be also used for:Described in being determined when the access frequency based on the target data It, will based on the current affiliated target data type of the target data after data type belonging to target data changes The target data is transferred in caching corresponding with the target data type.
Optionally, the controller is additionally operable to:Current residual space in first caching and the second caching is monitored respectively Whether preset value is less than;If current residual space is less than preset value in first caching, from first buffer area Choose at least partly Data Migration to it is described second caching;If current residual space is less than preset value in second caching, Then chosen from second buffer area at least partly Data Migration to it is described first caching.
Optionally, the controller is additionally operable to:Based on the digital independent frequency of first caching and the second caching, determine The second adjustment amount of the first adjustment amount and the second buffer area of first caching;According to the first adjustment amount, described in adjustment The spatial cache size of first caching;According to the second adjustment amount, the spatial cache size of adjustment second caching.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with other The difference of embodiment, just to refer each other for identical similar portion between each embodiment.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related place is said referring to method part It is bright.
The foregoing description of the disclosed embodiments enables professional and technical personnel in the field to realize or use the application. Various modifications to these embodiments will be apparent to those skilled in the art, as defined herein General Principle can in other embodiments be realized in the case where not departing from spirit herein or range.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest range caused.

Claims (15)

1. a kind of date storage method, which is characterized in that it is applied to solid-state hard disk SSD, the method includes:
Obtain current target data to be written;
If it is determined that the target data is the data for needing to cache, then from the first caching and the second caching, determination is used for Store the target cache of the target data, wherein first caching is preset buffer area in host memory, the caching Area is the space that can be accessed by the SSD that reserves in host memory, in the space reserved cannot be used as by host Deposit use;Second caching is the intrinsic caching in the SSD;
The target data is cached to the target cache;
Wherein, described from the first caching and the second caching, determine the target cache for storing the target data, including:
Determine that the data type belonging to the target data, the data type include first kind data and Second Type number According to the access frequency of estimating of the first kind data estimates access frequency more than the Second Type data;
When the target data is first kind data, first caching is determined as target cache;
When the target data is Second Type data, second caching is determined as target cache.
2. according to the method described in claim 1, it is characterized in that, delaying in described cache the target data to the target After depositing, further include:
Count the access frequency of the target data;
When the data type belonging to the access frequency based on the target data determines the target data changes, more Data type belonging to the new target data.
3. according to the method described in claim 2, it is characterized in that, when the access frequency based on the target data determines institute It states after the data type belonging to target data changes, further includes:
Based on the current affiliated target data type of the target data, the target data is transferred to and the target data In the corresponding caching of type.
4. according to the method described in claim 1, it is characterized in that, further including:
Monitor whether current residual space in first caching and the second caching is less than preset value respectively;
If current residual space is less than preset value in first caching, chooses from first caching and at least partly count It is cached according to migrating to described second;
If current residual space is less than preset value in second caching, chooses from second caching and at least partly count It is cached according to migrating to described first.
5. according to the method described in claim 1, it is characterized in that, further including:
Based on the digital independent frequency of first caching and the second caching, the first adjustment amount and the of first caching is determined The second adjustment amount of two cachings;
According to the first adjustment amount, the spatial cache size of adjustment first caching;
According to the second adjustment amount, the spatial cache size of adjustment second caching.
6. a kind of data storage device, which is characterized in that be applied to solid-state hard disk SSD, described device includes:
Data capture unit, for obtaining current target data to be written;
Determination unit is cached, for if it is determined that the target data be to need the data that cache, then from the first caching and the In two cachings, the target cache for storing the target data is determined, wherein first caching is to be preset in host memory Buffer area, the buffer area is the space that can be accessed by the SSD that reserves in host memory, the space reserved It cannot be used as memory by host;Second caching is the intrinsic caching in the SSD;
Data write unit, for caching the target data to the target cache;
Wherein, the caching determination unit, including:
Type determination unit, for determining that the data type belonging to the target data, the data type include the first kind Type data and Second Type data, the first kind data estimate access frequency estimating more than the Second Type data Access frequency;
First caching subelement, for when the target data is first kind data, first caching to be determined as mesh Mark caching;
Second caching subelement, for when the target data is Second Type data, second caching to be determined as mesh Mark caching.
7. device according to claim 6, which is characterized in that further include:
Frequency statistics unit, for the target data to be cached to the target cache in the data write unit, Count the access frequency of the target data;
Type changing unit, for determining the data belonging to the target data when the access frequency based on the target data When type changes, the data type belonging to the target data is updated.
8. device according to claim 7, which is characterized in that further include:
Data transfer unit, for determining that the data type belonging to the target data becomes in the type changing unit After change, based on the current affiliated target data type of the target data, the target data is transferred to and the target In the corresponding caching of data type.
9. device according to claim 6, which is characterized in that further include:
Space monitoring unit is preset for monitoring first caching respectively with whether current residual space in the second caching is less than Value;
First migration units, it is slow from described first if being less than preset value for current residual space in first caching Middle selection at least partly Data Migration is deposited to second caching;
Second migration units, it is slow from described second if being less than preset value for current residual space in second caching Middle selection at least partly Data Migration is deposited to first caching.
10. device according to claim 6, which is characterized in that further include:
Adjustment amount determination unit determines described first for the digital independent frequency based on first caching and the second caching The second adjustment amount of the first adjustment amount of caching and the second caching;
The first adjustment unit, for according to the first adjustment amount, the spatial cache size of adjustment first caching;
Second adjustment unit, for according to the second adjustment amount, the spatial cache size of adjustment second caching.
11. a kind of solid state disk, which is characterized in that including:
Controller and the second caching;
Wherein, the controller, for obtaining current target data to be written;If it is determined that the target data is to need The data of caching determine the target cache for storing the target data then from the first caching and second caching;It will The target data is cached to the target cache;Wherein, first caching is preset buffer area in host memory, described Buffer area is the space that can be accessed by the solid state disk reserved in host memory, and the space reserved cannot be led Machine is used as memory;
Wherein, the controller determines the target cache for storing the target data from the first caching and the second caching, Specially:
The controller determines that the data type belonging to the target data, the data type include first kind data and The access frequency of estimating of two categorical datas, the first kind data estimates access frequency more than the Second Type data; When the target data is first kind data, first caching is determined as target cache;When the target data is When Second Type data, second caching is determined as target cache.
12. solid state disk according to claim 11, which is characterized in that the controller is additionally operable to:By the target After data buffer storage to the target cache, the access frequency of the target data is counted;When the visit based on the target data When asking that the data type that frequency is determined belonging to the target data changes, the data class belonging to the target data is updated Type.
13. solid state disk according to claim 12, which is characterized in that the controller is additionally operable to:When based on the mesh After the access frequency of mark data determines that the data type belonging to the target data changes, it is based on the target data Target data type belonging to current, the target data is transferred in caching corresponding with the target data type.
14. solid state disk according to claim 11, which is characterized in that the controller is additionally operable to:Respectively described in monitoring Whether current residual space is less than preset value in first caching and the second caching;If current residual space in first caching Less than preset value, then from it is described first caching in choose at least partly Data Migration to it is described second caching;If described second Current residual space is less than preset value in caching, then chooses at least partly Data Migration to described first from second caching Caching.
15. solid state disk according to claim 11, which is characterized in that the controller is additionally operable to:Based on described first The digital independent frequency of caching and the second caching determines the second adjustment of the first adjustment amount and the second caching of first caching Amount;According to the first adjustment amount, the spatial cache size of adjustment first caching;According to the second adjustment amount, adjustment The spatial cache size of second caching.
CN201510627623.6A 2015-09-28 2015-09-28 A kind of date storage method and device and solid state disk Active CN105117180B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201510627623.6A CN105117180B (en) 2015-09-28 2015-09-28 A kind of date storage method and device and solid state disk
US14/974,885 US10514848B2 (en) 2015-09-28 2015-12-18 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
DE102016101311.0A DE102016101311A1 (en) 2015-09-28 2016-01-26 Data storage method, data storage device and solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510627623.6A CN105117180B (en) 2015-09-28 2015-09-28 A kind of date storage method and device and solid state disk

Publications (2)

Publication Number Publication Date
CN105117180A CN105117180A (en) 2015-12-02
CN105117180B true CN105117180B (en) 2018-08-17

Family

ID=54665183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510627623.6A Active CN105117180B (en) 2015-09-28 2015-09-28 A kind of date storage method and device and solid state disk

Country Status (1)

Country Link
CN (1) CN105117180B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760199B (en) * 2016-02-23 2019-07-16 腾讯科技(深圳)有限公司 A kind of application resource loading method and its equipment
CN106708444A (en) * 2017-01-17 2017-05-24 北京联想核芯科技有限公司 Data storage method and hard disc controller
CN108319654B (en) * 2017-12-29 2021-12-21 中国银联股份有限公司 Computing system, cold and hot data separation method and device, and computer readable storage medium
CN109324761A (en) * 2018-10-09 2019-02-12 郑州云海信息技术有限公司 A kind of data cache method, device, equipment and storage medium
CN109634875A (en) * 2018-12-12 2019-04-16 深圳忆联信息系统有限公司 Order data method for caching and processing, device, computer equipment and storage medium
CN109697037A (en) * 2019-01-22 2019-04-30 深圳忆联信息系统有限公司 Save method, apparatus, computer equipment and the storage medium of local DRAM
CN110716885B (en) * 2019-10-23 2022-02-18 北京字节跳动网络技术有限公司 Data management method and device, electronic equipment and storage medium
CN111125583A (en) * 2019-12-20 2020-05-08 中国移动通信集团江苏有限公司 Data access method, device and equipment and computer storage medium
CN113127515A (en) * 2021-04-12 2021-07-16 中国电力科学研究院有限公司 Power grid-oriented regulation and control data caching method and device, computer equipment and storage medium
CN113867641B (en) * 2021-09-29 2023-06-02 杭州海康存储科技有限公司 Host memory buffer management method and device and solid state disk
CN115981548A (en) * 2021-10-14 2023-04-18 华为技术有限公司 Flow control method and device
CN115686372B (en) * 2022-11-07 2023-07-25 武汉麓谷科技有限公司 ZNS solid state disk ZRWA function-based data management method
CN115543221B (en) * 2022-11-29 2023-03-14 苏州浪潮智能科技有限公司 Data migration method and device for solid state disk, electronic equipment and storage medium
CN116149550A (en) * 2022-12-29 2023-05-23 北京趋动智能科技有限公司 Data management method, device, storage medium and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117248A (en) * 2011-03-09 2011-07-06 浪潮(北京)电子信息产业有限公司 Caching system and method for caching data in caching system
CN103049394A (en) * 2012-11-30 2013-04-17 记忆科技(深圳)有限公司 Method and system for data caching of solid state disk

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103377161A (en) * 2012-04-24 2013-10-30 鸿富锦精密工业(深圳)有限公司 Main board and data processing method applied to same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117248A (en) * 2011-03-09 2011-07-06 浪潮(北京)电子信息产业有限公司 Caching system and method for caching data in caching system
CN103049394A (en) * 2012-11-30 2013-04-17 记忆科技(深圳)有限公司 Method and system for data caching of solid state disk

Also Published As

Publication number Publication date
CN105117180A (en) 2015-12-02

Similar Documents

Publication Publication Date Title
CN105117180B (en) A kind of date storage method and device and solid state disk
US11698857B2 (en) Storage system for migrating data between tiers
TWI740110B (en) Workload-adaptive overprovisioning in solid state storage drive arrays
US9026765B1 (en) Performing write operations in a multi-tiered storage environment
US9952803B1 (en) Techniques for automated evaluation and moment of data between storage tiers
US9940024B1 (en) Techniques for determining workload skew
US9898224B1 (en) Automatic adjustment of capacity usage by data storage optimizer for data migration
US9785353B1 (en) Techniques for automated evaluation and movement of data between storage tiers for thin devices
US9575668B1 (en) Techniques for selecting write endurance classification of flash storage based on read-write mixture of I/O workload
US8868797B1 (en) Techniques for automated discovery of storage devices and their performance characteristics
US8838931B1 (en) Techniques for automated discovery and performing storage optimizations on a component external to a data storage system
JP6613375B2 (en) Profiling cache replacement
US20180011799A1 (en) Adjusting active cache size based on cache usage
US8862837B1 (en) Techniques for automated data compression and decompression
TW201432451A (en) Method to throttle rate of data caching for improved I/O performance
CN104794064A (en) Cache management method based on region heat degree
US9372810B2 (en) Collaborative caching
US10997080B1 (en) Method and system for address table cache management based on correlation metric of first logical address and second logical address, wherein the correlation metric is incremented and decremented based on receive order of the first logical address and the second logical address
CN108710583A (en) Management method, device, computer equipment and the medium in SSD write buffers area
JP2014164769A (en) Apparatus, method and storage medium for assigning weight to host quality-of-service indicators
CN109840134A (en) Dynamic caching zone manager in isomery virtual cloud cache environment
US20240036756A1 (en) Systems, methods, and devices for partition management of storage resources
Sun et al. Co-active: A workload-aware collaborative cache management scheme for NVMe SSDs
US11048631B2 (en) Maintaining cache hit ratios for insertion points into a cache list to optimize memory allocation to a cache
US20200133543A1 (en) Locality-aware, memory-efficient, time-efficient hot data identification using count-min-sketch for flash or streaming applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20170204

Address after: Section fourteen economic and Technological Development Zone of Beijing city 100176 Street No. 99 building 33 building D No. 2226

Applicant after: Beijing legend core technology Co., Ltd.

Address before: 100085 Beijing, Haidian District information industry base on the road No. 6

Applicant before: Lenovo (Beijing) Co., Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190808

Address after: 518067 Dongjiaotou Workshop D24/F-02, Houhai Avenue, Shekou Street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Yi Lian Information System Co., Ltd.

Address before: Section fourteen economic and Technological Development Zone of Beijing city 100176 Street No. 99 building 33 building D No. 2226

Patentee before: Beijing legend core technology Co., Ltd.