CN103677653B - A kind of data processing method and electronic equipment based on SSD - Google Patents

A kind of data processing method and electronic equipment based on SSD Download PDF

Info

Publication number
CN103677653B
CN103677653B CN201210356601.7A CN201210356601A CN103677653B CN 103677653 B CN103677653 B CN 103677653B CN 201210356601 A CN201210356601 A CN 201210356601A CN 103677653 B CN103677653 B CN 103677653B
Authority
CN
China
Prior art keywords
data
written
subregion
write
access degree
Prior art date
Application number
CN201210356601.7A
Other languages
Chinese (zh)
Other versions
CN103677653A (en
Inventor
王欢
易贤群
李凡智
Original Assignee
联想(北京)有限公司
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 联想(北京)有限公司 filed Critical 联想(北京)有限公司
Priority to CN201210356601.7A priority Critical patent/CN103677653B/en
Publication of CN103677653A publication Critical patent/CN103677653A/en
Application granted granted Critical
Publication of CN103677653B publication Critical patent/CN103677653B/en

Links

Abstract

The application provides a kind of data processing method based on solid-state hard disk SSD, applied to an electronic equipment, the access degree according to data determines each subregion of SSD memory cell in advance, and set up the access degree of data and the corresponding relation of each subregion, wherein, each partitioned storage accesses the different data of degree, and this method includes:A data to be written are obtained, the access degree of data to be written is determined, the corresponding relation of the access degree based on data and each subregion is written into the corresponding subregion of the access degree of data of the data write-in with being determined.Present invention also provides a kind of electronic equipment.Method and electronic equipment that the application is provided, when writing data, the erasing of whole flash block directly can be re-write into data again, or need to only replicate a small amount of active page, wipe after flash block, a small amount of active page and data to be written are write, this causes the writing speed of data to improve, accordingly, the time of data writing process occupancy is shortened.

Description

A kind of data processing method and electronic equipment based on SSD

Technical field

Set the present invention relates to technical field of data processing, more particularly to a kind of data processing method and electronics based on SSD It is standby.

Background technology

Solid state hard disc (Solid State Disk, SSD) is the hard disk being made of solid-state electronic storage chip array, by controlling Device processed and memory cell two parts composition, memory cell are responsible for data storage, and control unit is responsible for reading, writes data.SSD roots It is divided into two kinds according to storage medium, a kind of is the SSD based on flash memory, and another is the SSD based on DRAM.Usually said SSD refers to Be the SSD based on flash memory, alleged SSD is the SSD based on flash memory below.

SSD memory cell is generally divided into multiple memory blocks, and each memory block is made up of multiple pages.SSD particularity It is that the write-in of data is carried out in units of page, and wipes and carried out in units of block, passes through when according to user's operation Some is specifically write when data command writes new data into SSD or existing data are modified, it is necessary to first by flash block On all data read in caching, wipe block, the data that whole block is updated in caching again write back new data, i.e. former Valid data and new data in block or the data to be changed write back.SSD this erase-before-write characteristics, i.e., Write diagnostics after first wiping so that SSD writing speeds decline, ablation process holding time is longer.

The content of the invention

The invention provides a kind of date storage method and electronic equipment based on SSD, to solve SSD in the prior art Writing speed declines, and the problem of ablation process holding time is longer, its technical scheme is as follows:

A kind of data processing method based on solid-state hard disk SSD, applied to an electronic equipment, the in advance access according to data Degree determines each subregion of SSD memory cell, and sets up the access degree of data and the corresponding relation of each subregion, its In, each described partitioned storage accesses the different data of degree, and this method includes:

Obtain a data to be written;

Determine the access degree of data to be written;

Access degree and the corresponding relation of each subregion based on the data, the data write-in to be written and institute is true In the corresponding subregion of access degree for the data made.

It is preferred that, above-mentioned data processing method also includes:

When receiving garbage reclamation instruction, garbage reclamation is carried out for each described subregion.

It is preferred that, above-mentioned data processing method also includes:

The abrasion condition of each subregion is obtained, according to the abrasion condition of each subregion, number corresponding with subregion is adjusted According to access degree.

It is preferred that, above-mentioned data processing method also includes:

The size of the clear area of each subregion is obtained, the size adjustment according to the clear area of each subregion The size in the space of each subregion.

It is preferred that, above-mentioned data processing method also includes:

When the memory cell of the SSD is present at least in the presence of idle continuum, and the idle continuum When in two subregions, at least two subregion is adjusted so that the clear area is present in a subregion.

Preferably, the access degree of the determination data to be written is specially:

The access degree of the data to be written is determined according to the extension name of the data to be written:If the extension name It is temporary file to indicate the data to be written, it is determined that the access degree of the data to be written is that low frequency reading low frequency is write;Such as Really described extension name indicates that the data to be written are non-provisional file, it is determined that the access degree of the data to be written is height Frequency reads high frequency write.

Preferably, the access degree of the determination data to be written is specially:

The access degree of the data to be written is determined according to the read-write number of times of the data counted in advance:

If the reading number of times of data to be written is more than the first given threshold, and writes number of times more than the second given threshold, then really The access degree of the fixed data to be written reads high frequency write for high frequency;

If the reading number of times of data to be written is more than the first given threshold, and writes number of times less than the 3rd given threshold, then really The access degree of the fixed data to be written is read low frequency for high frequency and write;

If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times more than the second given threshold, then really The access degree of the fixed data to be written reads high frequency write for low frequency;

If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times less than the 3rd given threshold, then really The access degree of the fixed data to be written is read low frequency for low frequency and write.

A kind of electronic equipment, the access degree according to data determines each subregion of SSD memory cell in advance, and sets up The access degree of data and the corresponding relation of each subregion, wherein, each described partitioned storage accesses the different data of degree, bag Include:Acquisition module, determining module and writing module;

The acquisition module, for obtaining a data to be written;

The determining module, the access degree for determining the data to be written that the acquisition module is obtained;

Said write module, for the access degree based on the data and the corresponding relation of each subregion, is obtained described The data to be written that modulus block is obtained are write in subregion corresponding with the access degree for the data that the determining module is determined.

It is preferred that, above-mentioned electronic equipment also includes:Garbage reclamation module;

The garbage reclamation module, for when receiving garbage reclamation instruction, rubbish to be carried out for each described subregion Reclaim.

It is preferred that, above-mentioned electronic equipment also includes:First adjusting module;

First adjusting module, the abrasion condition for obtaining each subregion, each subregion according to acquisition Abrasion condition, adjusts the access degree of data corresponding with subregion.

It is preferred that, above-mentioned electronic equipment also includes:Second adjusting module;

Second adjusting module, the size of the clear area for obtaining each subregion, according to obtain it is described each The size in the space of size adjustment each subregion of the clear area of subregion.

It is preferred that, above-mentioned electronic equipment also includes:3rd adjusting module;

3rd adjusting module, for there is idle continuum, and the free time when the memory cell of the SSD Continuum when being present at least two subregions, adjust at least two subregion so that the clear area is present in one In individual subregion.

Preferably, the determining module includes:First determination sub-module;

First determination sub-module, for determining the data to be written according to the extension name of the data to be written Access degree:If the extension name indicates that the data to be written are temporary file, it is determined that the visit of the data to be written Ask that degree is read low frequency for low frequency and write;If the extension name indicates that the data to be written are non-provisional file, it is determined that described The access degree of data to be written is that high frequency reads high frequency write.

Preferably, the determining module includes:Second determination sub-module;

Second determination sub-module, for determining the number to be written according to the read-write number of times of the data counted in advance According to access degree:

If the reading number of times of data to be written is more than the first given threshold, and writes number of times more than the second given threshold, then really The access degree of the fixed data to be written reads high frequency write for high frequency;

If the reading number of times of data to be written is more than the first given threshold, and writes number of times less than the 3rd given threshold, then really The access degree of the fixed data to be written is read low frequency for high frequency and write;

If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times more than the second given threshold, then really The access degree of the fixed data to be written reads high frequency write for low frequency;

If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times less than the 3rd given threshold, then really The access degree of the fixed data to be written is read low frequency for low frequency and write.

Data processing method and electronic equipment that the present invention is provided, the access degree for being written into data according to data write In the corresponding subregions of SSD, when foundation user operation specifically writes data command by some writes data into SSD, due to Data storage with identical access degree is in same subregion, accordingly, it would be desirable to may not deposited in writing the flash blocks of data In active page, or there is less active page, therefore, can be directly by the erasing of whole flash block again when writing data to SSD Data are re-write, or need to only be replicated after a small amount of active page, erasing flash block, by a small amount of active page and data to be written Write-in, this causes the writing speed of data to improve, accordingly, shortens the time of data writing process occupancy.

Brief description of the drawings

In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.

Fig. 1 is the schematic flow sheet for the data processing method based on solid-state hard disk SSD that the embodiment of the present invention one is provided;

Fig. 2 is the schematic flow sheet for the data processing method based on solid-state hard disk SSD that the embodiment of the present invention two is provided;

Fig. 3 is the schematic flow sheet for the data processing method based on solid-state hard disk SSD that the embodiment of the present invention three is provided;

Fig. 4 is the structural representation for the electronic equipment that the embodiment of the present invention four is provided;

Fig. 5 is the structural representation for the electronic equipment that the embodiment of the present invention five is provided;

Fig. 6 is the structural representation for the electronic equipment that the embodiment of the present invention six is provided.

Embodiment

Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.

Embodiment one

The embodiment of the present invention one provides a kind of data processing method based on solid-state hard disk SSD, is set applied to an electronics Standby, the access degree according to data determines each subregion of SSD memory cell in advance, and set up the access degree of data with it is each The corresponding relation of individual subregion, wherein, each partitioned storage accesses the different data of degree, and Fig. 1 is the schematic flow sheet of this method, This method can include:

S101:Obtain a data to be written.

S102:Determine the access degree of data to be written.

S103:Access degree and the corresponding relation of each subregion based on data, are written into data write-in with being determined In the corresponding subregion of access degree of the data gone out.

Data processing method and electronic equipment that the present invention is provided, the access degree for being written into data according to data write In the corresponding subregions of SSD, when foundation user operation specifically writes data command by some writes data into SSD, due to The data storage of degree is accessed in same subregion with identical data, accordingly, it would be desirable to may be simultaneously in writing the flash blocks of data In the absence of active page, or there is less active page, therefore, when writing data to SSD, directly can wipe whole flash block Except re-writing data again, or it need to only replicate after a small amount of active page, erasing flash block, by a small amount of active page and to be written Data write, and this causes the writing speed of data to improve, accordingly, shorten the time of data writing process occupancy.

Embodiment two

The embodiment of the present invention two provides a kind of data processing method based on solid-state hard disk SSD, is set applied to an electronics It is standby, in advance according to data access degree determine SSD memory cell each subregion, set up data access degree and each The corresponding relation of subregion.Wherein:

The access degree of data in the present embodiment can include:High frequency reads high frequency write and low frequency is read low frequency and write, accordingly, SSD memory cell can include two subregions, respectively the first subregion and the second subregion, and the first subregion reads high frequency write with high frequency Correspondence, the access degree for data storage reads the data of high frequency write for high frequency, and the second subregion reads low frequency with low frequency and writes corresponding, uses The data write in the access degree of data storage for low frequency reading low frequency.

Fig. 2 shows the schematic flow sheet for the method that the embodiment of the present invention two is provided, and this method can include:

S201:Obtain a data to be written.

S202:Determine the access degree of data to be written.

In the present embodiment, determining the access degree of data to be written can include:According to the extension name of data to be written Determine the access degree of data to be written:If the extension name of data to be written indicates that data to be written are temporary file, really The access degree of the fixed data to be written is read low frequency for low frequency and write;If the extension name of data to be written indicates data to be written and is Non-provisional file, it is determined that the access degree of the data to be written is that high frequency reads high frequency write.

S203:Access degree and the corresponding relation of each subregion based on data, are written into data write-in with being determined In the corresponding subregion of access degree of the data gone out.

Specifically, if it is determined that the data access degree of the data to be written gone out is that high frequency reads high frequency write, then is written into Data write the first subregion, if it is determined that the data access degree of the data to be written gone out is that low frequency reading low frequency is write, then will be to be written Enter data and write the second subregion.

The data that degree is accessed with different pieces of information are write SSD by the data processing method that the embodiment of the present invention one is provided In different subregions, such as temporary file is write in the second subregion, and non-provisional file is write in the first subregion, when according to user's operation When specifically writing data command by some and writing data into SSD, what is stored due to whole flash block is same type data, because This, which needs to write in the flash block of data, may be not present valid data, or there are less valid data, therefore, when to When SSD writes data, the erasing of whole flash block directly can be re-write into data again, or need to only replicate a small amount of significant figure According to, erasing flash block after, a small amount of valid data and data to be written are re-write, this causes the writing speed of data to carry Height, accordingly, shortens the time of data writing process occupancy.

Because SSD adds Trim, wherein, Trim is an operational order, allows operating system to tell SSD this page Invalid, i.e. Trim can directly produce invalid page, in order to wipe invalid data, re-use the invalid page shared by invalid data, this The method that inventive embodiments two are provided can also include:

S204:When receiving garbage reclamation instruction, garbage reclamation is carried out for each subregion.

The purpose of garbage reclamation is all active pages to be copied in new blank block, and then old block is integrally wiped Remove.When carrying out garbage reclamation, due to needing first to search valid data, then valid data are copied to the flash block of blank In, finally those invalid flash blocks are wiped.The process for searching and replicating valid data reduces the efficiency of garbage reclamation, and The data processing method that the present embodiment is provided, can make the data with identical access degree connect together, as temporary file is connected in Together, non-provisional file is connected together, accordingly, and valid data and invalid data are relatively concentrated, and this causes some flash memories Block can be wiped directly, and the lookup of valid data and doubling time shorten, and the efficiency of garbage reclamation is improved.

Embodiment three

The embodiment of the present invention three provides a kind of data processing method based on solid-state hard disk SSD, is set applied to an electronics It is standby, in advance according to data access degree determine SSD memory cell each subregion, set up data access degree and each The corresponding relation of subregion.Wherein:

The access degree of data can include:High frequency reads high frequency write, high frequency reading low frequency is write, low frequency reads high frequency write and low frequency is read Low frequency is write, accordingly, and SSD memory cell can include four subregions, respectively the first subregion, the second subregion, the 3rd subregion With the 4th subregion, the first subregion and high frequency read that high frequency write is corresponding, and the accesss degree for data storage is high frequency reading high frequency write Data, the second subregion reads low frequency with high frequency and writes corresponding, and the access degree for data storage reads the data that low frequency is write for high frequency, the Three subregions are corresponding with low frequency reading high frequency write, and the access degree for data storage reads the data of high frequency write, the 4th subregion for low frequency Low frequency is read with low frequency and writes corresponding, and the access degree for data storage reads the data that low frequency is write for low frequency.

Fig. 3 shows the schematic flow sheet for the method that the embodiment of the present invention three is provided, and this method can include:

S301:Obtain a data to be written.

S302:Determine the access degree of data to be written.

In the present embodiment, determining the access degree of data to be written can include:According to the data counted in advance Read-write number of times determines the access degree of data to be written:If the reading number of times of data to be written is more than the first given threshold, and writes Number of times is more than the second given threshold, it is determined that the access degree of data to be written is that high frequency reads high frequency write;If data to be written Reading number of times be more than the first given threshold, and write number of times less than the 3rd given threshold, it is determined that the access degree of data to be written Low frequency is read for high frequency to write;If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times more than the second setting threshold Value, it is determined that the access degree of data to be written is that low frequency reads high frequency write;If the reading number of times of data to be written is set less than the 4th Determine threshold value, and write number of times less than the 3rd given threshold, it is determined that the access degree of data to be written is that low frequency reading low frequency is write.

It is preferred that, in the present embodiment, in each reading and writing data, the reading and writing data number of times of statistics is updated, so as to rear In continuous data writing process, the access degree of data to be written can be more accurately determined.

S303:Access degree and the corresponding relation of each subregion based on data, are written into data write-in with being determined In the corresponding subregion of access degree of the data gone out.

Specifically, if it is determined that data to be written data access degree for high frequency read high frequency write, then be written into Data write the first subregion;If it is determined that data to be written data access degree for high frequency read low frequency write, then will be to be written Enter data and write the second subregion;If it is determined that data to be written data access degree for low frequency read high frequency write, then will treat Write data and write the 3rd subregion, if it is determined that the data access degree of the data to be written gone out is that low frequency reading low frequency is write, then will Data to be written write the 4th subregion.

Data are stored in SSD by the data processing method that the embodiment of the present invention two is provided according to the classification of data access degree In different subregions, when foundation user operation specifically writes data command by some writes data into SSD, due to each The flash block storage of subregion is same type data, it is therefore desirable to which significant figure may be not present by writing in the flash block of data According to, or there are less valid data, therefore, when writing data to SSD, directly whole flash block can be wiped again again Data are write, or need to only be replicated after a small amount of valid data, erasing flash block, by a small amount of valid data and data to be written Re-write, this causes the writing speed of data to improve, accordingly, shorten the time of data writing process occupancy.

Because SSD adds Trim, wherein, Trim is an operational order, allows operating system to tell SSD this page Invalid, i.e. Trim can directly produce invalid page, in order to wipe invalid data, re-use the invalid page shared by invalid data, this The method that inventive embodiments three are provided can also include:

S304:When receiving garbage reclamation instruction, garbage reclamation is carried out for each subregion.

The purpose of garbage reclamation is all active pages to be copied in new blank block, and then old block is integrally wiped Remove.When carrying out garbage reclamation, due to needing first to search valid data, then valid data are copied to the flash block of blank In, finally those invalid flash blocks are wiped.The process for searching and replicating valid data reduces the efficiency of garbage reclamation, and The data processing method that the present embodiment is provided, can make the data with identical access degree connect together, as temporary file is connected in Together, non-provisional file is connected together, accordingly, and valid data and invalid data are relatively concentrated, and this causes some flash memories Block can be wiped directly, and the lookup of valid data and doubling time shorten, and the efficiency of garbage reclamation is improved.

Because the access degree of data is different, therefore, the first subregion, the second subregion, the 3rd subregion and the 4th subregion are grasped The frequency of work is different, and the data of the first subregion and the 3rd subregion constantly update write-in, cause the first subregion and the 3rd point The flash block in area is constantly wiped free of, write, and forms bad block, after bad block reaches certain quantity, SSD cannot be reused , and the second subregion and the 4th subregion cause these flash blocks to be rarely erased, can so made due to not updating write-in for a long time Wasted into very big.In order that SSD flash blocks are fifty-fifty worn, the method that the embodiment of the present invention three is provided can also include:

S305:The abrasion condition of each subregion is obtained, according to the abrasion condition of each subregion, number corresponding with subregion is adjusted According to access degree.

For example, the access degree of data corresponding with the first subregion and the 4th subregion can be exchanged, exchange and the second subregion The access degree of data corresponding with the 3rd subregion, specifically, will data access degree corresponding with the first subregion be changed to it is low Frequency is read low frequency and write, and data access degree corresponding with the 4th subregion is changed into high frequency reading high frequency write, will be corresponding with the second subregion Data access degree be changed to low frequency read high frequency write, will data access degree corresponding with the 3rd subregion be changed to high frequency read it is low Frequency is write.Certainly, the present embodiment does not limit the access degree that data corresponding with subregion are adjusted only with aforesaid way, can also adopt Otherwise it is adjusted, as long as the access degree by adjusting data corresponding with subregion, so as to realize abrasion equilibration all It is the scope of protection of the invention.

With the continuous write-in of data, the data volume write in the first subregion, the second subregion, the 3rd subregion and the 4th subregion Might not be identical, it is impossible to exclude wherein a certain subregion and write full, other subregions have larger free area, in order to Make full use of SSD memory space so that the method that the data of each subregion can be provided with no write de-lay, the embodiment of the present invention two It can also include:

S306:The size of the clear area of each subregion is obtained, the size adjustment according to the clear area of each subregion is each The size in the space of individual subregion.

For example, the first subregion is used for the data that the access degree of data storage reads high frequency write for high frequency, therefore, the subregion is write The data volume entered is larger, and the second subregion is used for the access degree of data storage and reads the data that low frequency is write for high frequency, and the subregion is write The data volume entered is smaller, when the free area of the first subregion is smaller, when the free area of the first subregion is larger, can adjust two points The size in area, increases the first partitioned storage space, so that the data in the first subregion can be with no write de-lay.

In addition, the method that the embodiment of the present invention one is provided can also include:

S307:When the idle continuum of SSD memory cell presence, and idle continuum is present at least two When in subregion, at least two subregions of adjustment are so that clear area is present in a subregion.

For example, when the first subregion connects in the presence of a clear area, and the clear area and the clear area of the second subregion for one During continuous region, clear area in the second subregion can be adjusted into the first subregion, or, the clear area of the first subregion is adjusted Into the second subregion, so that the clear area in two subregions is linked to be a continuum, to be more convenient, quickly to store number According to., can be according to the storage condition of data, the size of data to be written and the data to be written as adjusting to which subregion Depending on data access degree.

It should be noted that the present embodiment does not limit step S304-S307 execution sequence, these steps can be in data Perform, can also be performed after data have been write during write-in, and the limit of S304-S307 this four steps also execution sequence It is fixed.

Example IV

The embodiment of the present invention four provides a kind of electronic equipment, and the access degree according to data determines SSD storage in advance Each subregion of unit, and the access degree of data and the corresponding relation of each subregion are set up, wherein, each partitioned storage is accessed The different data of degree, Fig. 4 is the structural representation of the electronic equipment, including:Acquisition module 101, determining module 102 and write-in Module 103.Wherein:

Acquisition module 101, for obtaining a data to be written.Determining module 102, for determining that acquisition module 101 is obtained Data to be written access degree.Writing module 103, for the pass corresponding with each subregion of the access degree based on data System, the data to be written write-in that acquisition module 101 is obtained is corresponding with the access degree for the data that determining module 103 is determined In subregion.

Embodiment five

The embodiment of the present invention five provides a kind of electronic equipment, and Fig. 5 is the structural representation of the electronic equipment, and the electronics is set It is standby except the acquisition module 101 provided including example IV, outside determining module 102 and writing module 103, in addition to:Rubbish is returned Receive module 104.Wherein:

Garbage reclamation module 104, for when receiving garbage reclamation instruction, garbage reclamation to be carried out for each subregion.

In the present embodiment, determining module 102 can include:First determination sub-module.

First determination sub-module, the access degree for determining data to be written according to the extension name of data to be written:Such as Fruit extension name indicates that data to be written are temporary file, it is determined that the access degree of data to be written is that low frequency reading low frequency is write, such as Fruit extension name indicates that data to be written are non-provisional file, it is determined that the access degree of data to be written is that high frequency reads high frequency write.

Embodiment six

The embodiment of the present invention five provides a kind of electronic equipment, and Fig. 6 is the structural representation of the electronic equipment, and the electronics is set For except the acquisition module 101 provided including embodiment five, determining module 102, writing module 103 and garbage reclamation module 104 Outside, in addition to:First adjusting module 105, the second adjusting module 106 and the 3rd adjusting module 107.Wherein:

First adjusting module 105, the abrasion condition for obtaining each subregion, according to the abrasion feelings of each subregion of acquisition Condition, adjusts the access degree of data corresponding with subregion.

Second adjusting module 106, the size of the clear area for obtaining each subregion, according to each subregion obtained The size of clear area adjusts the size in the space of each subregion.

3rd adjusting module 107, for there is idle continuum, and idle continuum when SSD memory cell When domain is present at least two subregions, at least two subregions of adjustment are so that clear area is present in a subregion.

In the present embodiment, determining module 102 can include:Second determination sub-module.

Second determination sub-module, the access for determining data to be written according to the read-write number of times of the data counted in advance Degree:If the reading number of times of data to be written is more than the first given threshold, and writes number of times more than the second given threshold, it is determined that treat Write the access degree of data and read high frequency write for high frequency;If the reading number of times of data to be written is more than the first given threshold, and writes Number of times is less than the 3rd given threshold, it is determined that the access degree of the data to be written is that high frequency reading low frequency is write;If to be written The reading number of times of data is less than the 4th given threshold, and writes number of times more than the second given threshold, it is determined that the access of data to be written Degree is that low frequency reads high frequency write;If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times and set less than the 3rd Determine threshold value, it is determined that the access degree of data to be written is that low frequency reading low frequency is write.

For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each unit can be realized in same or multiple softwares and/or hardware during invention.

As seen through the above description of the embodiments, those skilled in the art can be understood that the present invention can Realized by the mode of software plus required general hardware platform.Understood based on such, technical scheme essence On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are to cause a computer equipment (Can be personal computer, server, or network equipment etc.)Perform some of each of the invention embodiment or embodiment Method described in part.

Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system Apply for example, because it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to embodiment of the method Part explanation.System embodiment described above is only schematical, wherein described illustrate as separating component Unit can be or may not be physically separate, the part shown as unit can be or may not be Physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to the actual needs Some or all of module therein is selected to realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying In the case of creative work, you can to understand and implement.

The present invention can be used in numerous general or special purpose computing system environments or configuration.For example:Personal computer, service Device computer, handheld device or portable set, laptop device, multicomputer system, the system based on microprocessor, top set Box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer including any of the above system or equipment DCE etc..

The present invention can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type Part, data structure etc..The present invention can also be put into practice in a distributed computing environment, in these DCEs, by Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with Positioned at including in the local and remote computer-readable storage medium including storage device.

It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating In any this actual relation or order.

Described above is only the embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (10)

1. a kind of data processing method based on solid-state hard disk SSD, it is characterised in that applied to an electronic equipment, advance foundation The access degree of data determines each subregion of SSD memory cell, and sets up the access degree of data and pair of each subregion It should be related to, wherein, each described partitioned storage accesses the different data of degree, and this method includes:
Obtain a data to be written;
Determine the access degree of data to be written;
Access degree and the corresponding relation of each subregion based on the data, by the data write-in to be written with being determined Data the corresponding subregion of access degree in;
Wherein, the data processing method, in addition to:
The abrasion condition of each subregion is obtained, according to the abrasion condition of each subregion, data corresponding with subregion are adjusted Access degree;
When the idle continuum of the memory cell presence of the SSD, and the idle continuum is present at least two When in subregion, at least two subregion is adjusted so that the clear area is present in a subregion.
2. according to the method described in claim 1, it is characterised in that also include:
When receiving garbage reclamation instruction, garbage reclamation is carried out for each described subregion.
3. according to the method described in claim 1, it is characterised in that also include:
The size of the clear area of each subregion is obtained, the size adjustment according to the clear area of each subregion is described The size in the space of each subregion.
4. according to the method described in claim 1, it is characterised in that it is described determine data to be written access degree be specially:
The access degree of the data to be written is determined according to the extension name of the data to be written:If the extension name is indicated The data to be written are temporary file, it is determined that the access degree of the data to be written is that low frequency reading low frequency is write;If institute State extension name and indicate that the data to be written are non-provisional file, it is determined that the access degree of the data to be written is read for high frequency High frequency write.
5. according to the method described in claim 1, it is characterised in that it is described determine data to be written access degree be specially:
The access degree of the data to be written is determined according to the read-write number of times of the data counted in advance:
If the reading number of times of data to be written is more than the first given threshold, and writes number of times more than the second given threshold, it is determined that institute State the access degree of data to be written and read high frequency write for high frequency;
If the reading number of times of data to be written is more than the first given threshold, and writes number of times less than the 3rd given threshold, it is determined that institute The access degree of data to be written is stated to write for high frequency reading low frequency;
If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times more than the second given threshold, it is determined that institute State the access degree of data to be written and read high frequency write for low frequency;
If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times less than the 3rd given threshold, it is determined that institute The access degree of data to be written is stated to write for low frequency reading low frequency.
6. a kind of electronic equipment, it is characterised in that the access degree according to data determines each point of SSD memory cell in advance Area, and the access degree of data and the corresponding relation of each subregion are set up, wherein, it is different that each described partitioned storage accesses degree Data, including:Acquisition module, determining module and writing module;
The acquisition module, for obtaining a data to be written;
The determining module, the access degree for determining the data to be written that the acquisition module is obtained;
Said write module, for the access degree based on the data and the corresponding relation of each subregion, by the acquisition mould The data to be written that block is obtained are write in subregion corresponding with the access degree for the data that the determining module is determined;
Wherein, the electronic equipment also includes:First adjusting module;
First adjusting module, the abrasion condition for obtaining each subregion, the abrasion of each subregion according to acquisition Situation, adjusts the access degree of data corresponding with subregion;
Also include:3rd adjusting module;
3rd adjusting module, for there is idle continuum, and the idle company when the memory cell of the SSD When continuous region is present at least two subregions, at least two subregion is adjusted so that the clear area is present in one point Qu Zhong.
7. electronic equipment according to claim 6, it is characterised in that also include:Garbage reclamation module;
The garbage reclamation module, for when receiving garbage reclamation instruction, garbage reclamation to be carried out for each described subregion.
8. electronic equipment according to claim 6, it is characterised in that also include:Second adjusting module;
Second adjusting module, the size of the clear area for obtaining each subregion, according to each the described subregion obtained Clear area size adjustment each subregion space size.
9. electronic equipment according to claim 6, it is characterised in that the determining module includes:First determination sub-module;
First determination sub-module, the access for determining the data to be written according to the extension name of the data to be written Degree:If the extension name indicates that the data to be written are temporary file, it is determined that the access journey of the data to be written Spend and write for low frequency reading low frequency;If the extension name indicates that the data to be written are non-provisional file, it is determined that described to be written Enter the access degree of data and read high frequency write for high frequency.
10. electronic equipment according to claim 6, it is characterised in that the determining module includes:Second determines submodule Block;
Second determination sub-module, for determining the data to be written according to the read-write number of times of the data counted in advance Access degree:
If the reading number of times of data to be written is more than the first given threshold, and writes number of times more than the second given threshold, it is determined that institute State the access degree of data to be written and read high frequency write for high frequency;
If the reading number of times of data to be written is more than the first given threshold, and writes number of times less than the 3rd given threshold, it is determined that institute The access degree of data to be written is stated to write for high frequency reading low frequency;
If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times more than the second given threshold, it is determined that institute State the access degree of data to be written and read high frequency write for low frequency;
If the reading number of times of data to be written is less than the 4th given threshold, and writes number of times less than the 3rd given threshold, it is determined that institute The access degree of data to be written is stated to write for low frequency reading low frequency.
CN201210356601.7A 2012-09-21 2012-09-21 A kind of data processing method and electronic equipment based on SSD CN103677653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210356601.7A CN103677653B (en) 2012-09-21 2012-09-21 A kind of data processing method and electronic equipment based on SSD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210356601.7A CN103677653B (en) 2012-09-21 2012-09-21 A kind of data processing method and electronic equipment based on SSD

Publications (2)

Publication Number Publication Date
CN103677653A CN103677653A (en) 2014-03-26
CN103677653B true CN103677653B (en) 2017-07-25

Family

ID=50315366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210356601.7A CN103677653B (en) 2012-09-21 2012-09-21 A kind of data processing method and electronic equipment based on SSD

Country Status (1)

Country Link
CN (1) CN103677653B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978149A (en) * 2014-04-11 2015-10-14 群联电子股份有限公司 Data write-in method, memory control circuit unit and memory storage device
CN105242871B (en) * 2014-06-06 2018-06-05 华为技术有限公司 A kind of method for writing data and device
CN107102819A (en) * 2014-12-12 2017-08-29 西安三星电子研究有限公司 The method and apparatus of data is write to solid state hard disc
CN106547472B (en) * 2015-09-18 2019-09-13 华为技术有限公司 Storage array management method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101911074A (en) * 2008-01-10 2010-12-08 帝斯科匹尔公司 Selecting storage location for file storage based on storage longevity and speed
CN102622310A (en) * 2011-01-30 2012-08-01 成都市华为赛门铁克科技有限公司 Invalid data erasing method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9052826B2 (en) * 2006-07-28 2015-06-09 Condusiv Technologies Corporation Selecting storage locations for storing data based on storage location attributes and data usage statistics
US7870128B2 (en) * 2006-07-28 2011-01-11 Diskeeper Corporation Assigning data for storage based on speed with which data may be retrieved

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101911074A (en) * 2008-01-10 2010-12-08 帝斯科匹尔公司 Selecting storage location for file storage based on storage longevity and speed
CN102622310A (en) * 2011-01-30 2012-08-01 成都市华为赛门铁克科技有限公司 Invalid data erasing method, device and system

Also Published As

Publication number Publication date
CN103677653A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
Gupta et al. Leveraging Value Locality in Optimizing NAND Flash-based SSDs.
Chiang et al. Cleaning policies in mobile computers using flash memory
Chiang et al. Managing flash memory in personal communication devices
US5584018A (en) Information memory apparatus having a plurality of disk drives and calculating and re-allocating data according to access frequency
CN102576330B (en) Memory system having persistent garbage collection
US8244962B2 (en) Command processor for a data storage device
KR100789406B1 (en) Flash memory system and garbage collection method therof
Park et al. CFLRU: a replacement algorithm for flash memory
US20110289266A1 (en) Garbage collection in storage devices based on flash memories
US20070050548A1 (en) Dynamic optimization of cache memory
CN101105772B (en) Method for controlling computer readable memory and manager data unit device
US8112603B2 (en) Methods, systems, and computer program products for file relocation on a data storage device
CN103946811B (en) Apparatus and method for realizing the multi-level store hierarchy with different operation modes
US7890693B2 (en) Flash translation layer apparatus
US20100011154A1 (en) Data accessing method for flash memory and storage system and controller using the same
CN101784993B (en) Apparatus using flash memory as storage and method of operating the same
US8255630B1 (en) Optimization of cascaded virtual cache memory
DE102006005877A1 (en) Address mapping table and method for generating an address mapping table
Lee et al. FAST: An efficient flash translation layer for flash memory
US8423710B1 (en) Sequential writes to flash memory
US8335907B2 (en) Micro-update architecture for address tables
KR100528973B1 (en) Apparatus and method for garbage collection
US20120210042A1 (en) Remote memory for virtual machines
CN103197899B (en) Life and performance enhancement of storage based on flash memory
CN102609360B (en) Data processing method, data processing device and data processing system

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
GR01 Patent grant