CN103677653A - Data processing method and electronic device based on solid state disk (SSD) - Google Patents

Data processing method and electronic device based on solid state disk (SSD) Download PDF

Info

Publication number
CN103677653A
CN103677653A CN201210356601.7A CN201210356601A CN103677653A CN 103677653 A CN103677653 A CN 103677653A CN 201210356601 A CN201210356601 A CN 201210356601A CN 103677653 A CN103677653 A CN 103677653A
Authority
CN
China
Prior art keywords
data
written
subregion
access degree
write
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.)
Granted
Application number
CN201210356601.7A
Other languages
Chinese (zh)
Other versions
CN103677653B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
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
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The application provides a data processing method based on a solid state disk (SSD). The data processing method based on the SSD is applied to an electronic device, and characterized by determining each partition of a storage unit of the SSD according to the visit degree of data in advance, and establishing corresponding relations between the visit degree of the data and each partition of the storage unit, wherein each partition storage visits data with different degrees. The data processing method based on the SSD includes: obtaining data to be written; determining the visit degree of the data to be written; writing the data to be written into a partition corresponding to the determined visit degree of the data to be written based on the corresponding relations between the visit degree of the data and each partition of the storage unit. The application further provides the electronic device. According to the method and the electronic device based on the SSD, when the data is written in the electronic device, data in a whole flash memory block can be directly wiped away, and therefore new data can be written in the flash memory block, or only a small quantity of active pages needs to be copied, the small quantity of the active pages and the data to be written are written in the flash memory block after the data in the flash memory block is wiped away, and accordingly writing speed of the data can be improved, and correspondingly time occupied during the process of writing the data in the flash memory block is reduced.

Description

A kind of data processing method and electronic equipment based on SSD
Technical field
The present invention relates to technical field of data processing, relate in particular to a kind of data processing method and electronic equipment based on SSD.
Background technology
Solid state hard disc (Solid State Disk, SSD) is the hard disk made from solid-state electronic storage chip array, controller and storage unit two parts, consists of, and storage unit is responsible for storing data, and control module is responsible for reading, data writing.SSD is divided into two kinds according to storage medium, and a kind of is SSD based on flash memory, and another kind is the SSD based on DRAM.Usually said SSD refers to the SSD based on flash memory, below alleged SSD be the SSD based on flash memory.
The storage unit of SSD is generally divided into a plurality of storage blocks, and each storage block consists of a plurality of pages.What the singularity of SSD was data writes that Shi Yiyewei unit carries out, and wipe, Shi Yikuaiwei unit carries out, when concrete by certain according to the user operation data command of writing is to writing new data in SSD or when existing data to modify, need first all data in flash block to be read in to buffer memory, erase block, in buffer memory, upgrade the data of whole and newer data are write back, that is, the data that the valid data in former and new data maybe will be revised are write back.This erase-before-write characteristic of SSD, first wipes rear write diagnostics, and SSD writing speed is declined, and ablation process holding time is longer.
Summary of the invention
The invention provides a kind of date storage method and electronic equipment based on SSD, in order to solve SSD writing speed in prior art, decline, the problem that 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, be applied to an electronic equipment, according to the access degree of data, determine in advance each subregion of the storage unit of SSD, and set up the access degree of data and the corresponding relation of each subregion, wherein, the different data of described each partitioned storage access degree, the method comprises:
Obtain data to be written;
Determine the access degree of data to be written;
Access degree based on described data and the corresponding relation of each subregion, write described data to be written in the subregion corresponding with the access degree of determined data.
Preferably, above-mentioned data processing method also comprises:
When receiving garbage reclamation instruction, for described each subregion, carry out garbage reclamation.
Preferably, above-mentioned data processing method also comprises:
Obtain the abrasion condition of each subregion, according to the abrasion condition of described each subregion, adjust the access degree of the data corresponding with subregion.
Preferably, above-mentioned data processing method also comprises:
Obtain the size of the clear area of described each subregion, the size of the clear area of described each subregion of foundation is adjusted the size in the space of described each subregion.
Preferably, above-mentioned data processing method also comprises:
When the storage unit of described SSD exists idle continuum, and the continuum of described free time is while being present at least two subregions, at least two subregions described in adjustment so that described clear area be present in a subregion.
Preferably, the access degree of described definite data to be written is specially:
According to the extension name of described data to be written, determine the access degree of described data to be written: if the described data to be written of described extension name indication are temporary file, the access degree of determining described data to be written is that low frequency is read low frequency and write; If the described data to be written of described extension name indication are non-temporary file, the access degree of determining described data to be written is that high frequency is read high frequency and write.
Preferably, the access degree of described definite data to be written is specially:
According to the read-write number of times of the data that count in advance, determine the access degree of described data to be written:
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that high frequency is read high frequency and write;
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that high frequency is read low frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that low frequency is read high frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that low frequency is read low frequency and write.
An electronic equipment, determines each subregion of the storage unit of SSD in advance according to the access degree of data, and sets up the access degree of data and the corresponding relation of each subregion, wherein, the different data of described each partitioned storage access degree, comprising: acquisition module, determination module and writing module;
Described acquisition module, for obtaining data to be written;
Described determination module, for determining the access degree of the data to be written that described acquisition module obtains;
Said write module, for the access degree based on described data and the corresponding relation of each subregion, the data to be written that described acquisition module is obtained write in subregion corresponding to the access degree of the data of determining with described determination module.
Preferably, above-mentioned electronic equipment also comprises: garbage reclamation module;
Described garbage reclamation module, for when receiving garbage reclamation instruction, carries out garbage reclamation for described each subregion.
Preferably, above-mentioned electronic equipment also comprises: the first adjusting module;
Described the first adjusting module, for obtaining the abrasion condition of each subregion, according to the abrasion condition of described each subregion obtaining, adjusts the access degree of the data corresponding with subregion.
Preferably, above-mentioned electronic equipment also comprises: the second adjusting module;
Described the second adjusting module, for obtaining the size of the clear area of each subregion, the size of the clear area of described each subregion that foundation is obtained is adjusted the size in the space of described each subregion.
Preferably, above-mentioned electronic equipment also comprises: the 3rd adjusting module;
Described the 3rd adjusting module, for having idle continuum when the storage unit of described SSD, and the continuum of described free time is while being present at least two subregions, at least two subregions described in adjustment so that described clear area be present in a subregion.
Preferably, described determination module comprises: first determines submodule;
Described first determines submodule, for determine the access degree of described data to be written according to the extension name of described data to be written: if the described data to be written of described extension name indication are temporary file, the access degree of determining described data to be written is that low frequency is read low frequency and write; If the described data to be written of described extension name indication are non-temporary file, the access degree of determining described data to be written is that high frequency is read high frequency and write.
Preferably, described determination module comprises: second determines submodule;
Described second determines submodule, for determine the access degree of described data to be written according to the read-write number of times of the data that count in advance:
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that high frequency is read high frequency and write;
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that high frequency is read low frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that low frequency is read high frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that low frequency is read low frequency and write.
Data processing method provided by the invention and electronic equipment, access degree by data to be written according to data writes in the subregion that SSD is corresponding, when concrete by certain according to the user operation data command of writing is in SSD during data writing, owing to thering are the data of identical access degree, be stored in same subregion, therefore, need may not have active page in the flash block of data writing, or there is less active page, therefore, when to SSD data writing, can directly whole flash block be wiped to data writing again again, or only need copy a small amount of active page, after erasing flash memory piece, a small amount of active page and data to be written are write, this improves the writing speed of data, accordingly, shortened the time that data writing process takies.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skills, do not paying under the prerequisite of creative work, other accompanying drawing can also be provided according to the accompanying drawing providing.
The schematic flow sheet of the data processing method based on solid-state hard disk SSD that Fig. 1 provides for the embodiment of the present invention one;
The schematic flow sheet of the data processing method based on solid-state hard disk SSD that Fig. 2 provides for the embodiment of the present invention two;
The schematic flow sheet of the data processing method based on solid-state hard disk SSD that Fig. 3 provides for the embodiment of the present invention three;
The structural representation of the electronic equipment that Fig. 4 provides for the embodiment of the present invention four;
The structural representation of the electronic equipment that Fig. 5 provides for the embodiment of the present invention five;
The structural representation of the electronic equipment that Fig. 6 provides for the embodiment of the present invention six.
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 clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment mono-
The embodiment of the present invention one provides a kind of data processing method based on solid-state hard disk SSD, be applied to an electronic equipment, according to the access degree of data, determine in advance each subregion of the storage unit of SSD, and set up the access degree of data and the corresponding relation of each subregion, wherein, the different data of each partitioned storage access degree, the schematic flow sheet that Fig. 1 is the method, the method can comprise:
S101: obtain data to be written.
S102: the access degree of determining data to be written.
S103: the access degree based on data and the corresponding relation of each subregion, write data to be written in the subregion corresponding with the access degree of determined data.
Data processing method provided by the invention and electronic equipment, access degree by data to be written according to data writes in the subregion that SSD is corresponding, when concrete by certain according to the user operation data command of writing is in SSD during data writing, owing to thering are the data of identical data access degree, be stored in same subregion, therefore, need may not have active page in the flash block of data writing, or there is less active page, therefore, when to SSD data writing, can directly whole flash block be wiped to data writing again again, or only need copy a small amount of active page, after erasing flash memory piece, a small amount of active page and data to be written are write, this improves the writing speed of data, accordingly, shortened the time that data writing process takies.
Embodiment bis-
The embodiment of the present invention two provides a kind of data processing method based on solid-state hard disk SSD, be applied to an electronic equipment, according to the access degree of data, determine in advance each subregion of the storage unit of SSD, set up the access degree of data and the corresponding relation of each subregion.Wherein:
The access degree of the data in the present embodiment can comprise: high frequency is read high frequency and write and read low frequency with low frequency and write, accordingly, the storage unit of SSD can comprise two subregions, be respectively the first subregion and the second subregion, the first subregion is read high frequency with high frequency and is write corresponding, for the access degree of storing data, be that high frequency is read the data that high frequency is write, the second subregion and low frequency are read low frequency and are write correspondingly, for storing the access degree of data, are that low frequency is read the data that low frequency is write.
Fig. 2 shows the schematic flow sheet of the method that the embodiment of the present invention two provides, and the method can comprise:
S201: obtain data to be written.
S202: the access degree of determining data to be written.
In the present embodiment, the access degree of determining data to be written can comprise: the access degree of determining data to be written according to the extension name of data to be written: if the extension name of data to be written is indicated data to be written, be temporary file, the access degree of determining these data to be written is that low frequency is read low frequency and write; If it is non-temporary file that the extension name of data to be written is indicated data to be written, the access degree of determining these data to be written is that high frequency is read high frequency and write.
S203: the access degree based on data and the corresponding relation of each subregion, write data to be written in the subregion corresponding with the access degree of determined data.
Particularly, if the data access degree of the data to be written of determining is high frequency, reads high frequency and write, data to be written are write to the first subregion, if the data access degree of the data to be written of determining is low frequency to be read low frequency and write, data to be written are write to the second subregion.
The data processing method that the embodiment of the present invention one provides, the data with different pieces of information access degree are write in the subregion that SSD is different, as temporary file writes in the second subregion, non-temporary file writes in the first subregion, when concrete by certain according to the user operation data command of writing is in SSD during data writing, due to whole flash block storage is data of the same type, therefore need may not have valid data in the flash block of data writing, or there are less valid data, therefore, when to SSD data writing, can directly whole flash block be wiped to data writing again again, or only need copy a small amount of valid data, after erasing flash memory piece, a small amount of valid data and data to be written are write again, this improves the writing speed of data, accordingly, shortened the time that data writing process takies.
Because SSD has added Trim, wherein, Trim is an operational order, allow operating system tell SSD that this page is invalid, Trim can directly produce invalid page, in order to wipe invalid data, re-use the shared invalid page of invalid data, the method that the embodiment of the present invention two provides can also comprise:
S204: when receiving garbage reclamation instruction, carry out garbage reclamation for each subregion.
The object of garbage reclamation is that all active pages are copied in new blank block, then old piece bulk erase.When carrying out garbage reclamation, because needs are first searched valid data, then valid data are copied in blank flash block, finally those invalid flash block are wiped.The process of searching and copy valid data has reduced the efficiency of garbage reclamation, and the data processing method that the present embodiment provides, can make the data with identical access degree connect together, as temporary file connects together, non-temporary file connects together, corresponding, valid data and invalid data are relatively concentrated, this can directly wipe some flash block, and searching with doubling time of valid data shortened, and the efficiency of garbage reclamation improves.
Embodiment tri-
The embodiment of the present invention three provides a kind of data processing method based on solid-state hard disk SSD, be applied to an electronic equipment, according to the access degree of data, determine in advance each subregion of the storage unit of SSD, set up the access degree of data and the corresponding relation of each subregion.Wherein:
The access degree of data can comprise: high frequency is read high frequency and write, high frequency is read low frequency and is write, low frequency is read high frequency and is write and read low frequency with low frequency and write, accordingly, the storage unit of SSD can comprise four subregions, be respectively the first subregion, the second subregion, the 3rd subregion and the 4th subregion, the first subregion is read high frequency with high frequency and is write corresponding, for storing the access degree of data, be that high frequency is read the data that high frequency is write, the second subregion is read low frequency with high frequency and is write corresponding, for storing the access degree of data, be that high frequency is read the data that low frequency is write, the 3rd subregion is read high frequency with low frequency and is write corresponding, for storing the access degree of data, be that low frequency is read the data that high frequency is write, the 4th subregion is read low frequency with low frequency and is write corresponding, for storing the access degree of data, be that low frequency is read the data that low frequency is write.
Fig. 3 shows the schematic flow sheet of the method that the embodiment of the present invention three provides, and the method can comprise:
S301: obtain data to be written.
S302: the access degree of determining data to be written.
In the present embodiment, the access degree of determining data to be written can comprise: the access degree of determining data to be written according to the read-write number of times of the data that count in advance: if the number of times of reading of data to be written is greater than the first setting threshold, and write number of times and be greater than the second setting threshold, the access degree of determining data to be written is that high frequency is read high frequency and write; If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining data to be written is that high frequency is read low frequency and write; If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining data to be written is that low frequency is read high frequency and write; If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining data to be written is that low frequency is read low frequency and write.
Preferably, in the present embodiment, when each reading and writing data, upgrade the reading and writing data number of times of statistics, so that in follow-up data writing process, can determine more accurately the access degree of data to be written.
S303: the access degree based on data and the corresponding relation of each subregion, write data to be written in the subregion corresponding with the access degree of determined data.
Concrete, if the data access degree of the data to be written of determining is high frequency to be read high frequency and write, data to be written are write to the first subregion; If the data access degree of the data to be written of determining is high frequency to be read low frequency and write, data to be written are write to the second subregion; If the data access degree of the data to be written of determining is low frequency to be read high frequency and writes, data to be written are write to the 3rd subregion, if the data access degree of the data to be written of determining is low frequency to be read low frequency and write, data to be written are write to the 4th subregion.
The data processing method that the embodiment of the present invention two provides, data are stored in the subregion that SSD is different according to the classification of data access degree, when concrete by certain according to the user operation data command of writing is in SSD during data writing, due to the flash block storage of each subregion is data of the same type, therefore need may not have valid data in the flash block of data writing, or there are less valid data, therefore, when to SSD data writing, can directly whole flash block be wiped to data writing again again, or only need copy a small amount of valid data, after erasing flash memory piece, a small amount of valid data and data to be written are write again, this improves the writing speed of data, accordingly, shortened the time that data writing process takies.
Because SSD has added Trim, wherein, Trim is an operational order, allow operating system tell SSD that this page is invalid, Trim can directly produce invalid page, in order to wipe invalid data, re-use the shared invalid page of invalid data, the method that the embodiment of the present invention three provides can also comprise:
S304: when receiving garbage reclamation instruction, carry out garbage reclamation for each subregion.
The object of garbage reclamation is that all active pages are copied in new blank block, then old piece bulk erase.When carrying out garbage reclamation, because needs are first searched valid data, then valid data are copied in blank flash block, finally those invalid flash block are wiped.The process of searching and copy valid data has reduced the efficiency of garbage reclamation, and the data processing method that the present embodiment provides, can make the data with identical access degree connect together, as temporary file connects together, non-temporary file connects together, corresponding, valid data and invalid data are relatively concentrated, this can directly wipe some flash block, and searching with doubling time of valid data shortened, and the efficiency of garbage reclamation improves.
Because the access degree of data is different, therefore, the first subregion, the second subregion, the 3rd subregion and the operated frequency of the 4th subregion are different, the data of the first subregion and the 3rd subregion are constantly updated and are write, cause the flash block of the first subregion and the 3rd subregion to be constantly wiped free of, to write, form bad piece, after bad piece reaches certain quantity, SSD just can not re-use, and the second subregion and the 4th subregion write owing to not upgrading for a long time, cause these flash block to be seldom wiped free of, can cause so very large waste.For SSD flash block is worn fifty-fifty, the method that the embodiment of the present invention three provides can also comprise:
S305: obtain the abrasion condition of each subregion, according to the abrasion condition of each subregion, adjust the access degree of the data corresponding with subregion.
For example, can change the access degree of the data corresponding with the first subregion and the 4th subregion, change the access degree of the data corresponding with the second subregion and the 3rd subregion, particularly, the data access degree corresponding with the first subregion changed to low frequency to be read low frequency and writes, the data access degree corresponding with the 4th subregion changed to high frequency to be read high frequency and writes, the data access degree corresponding with the second subregion changed to low frequency and read high frequency and write, the data access degree corresponding with the 3rd subregion changed to high frequency and read low frequency and write.Certainly; the present embodiment does not limit the access degree that only adopts the aforesaid way adjustment data corresponding with subregion; also can adopt alternate manner adjustment, as long as by adjusting the access degree of the data corresponding with subregion, be all the scope of protection of the invention thereby realize abrasion equilibration.
Along with constantly writing of data, the data volume writing in the first subregion, the second subregion, the 3rd subregion and the 4th subregion might not be identical, can not get rid of wherein a certain subregion has write full, there is the situation of larger free area in other subregion, in order to make full use of the storage space of SSD, make the data of each subregion can no write de-lay, the method that the embodiment of the present invention two provides can also comprise:
S306: obtain the size of the clear area of each subregion, adjust the size in the space of each subregion according to the size of the clear area of each subregion.
For example, the first subregion is that high frequency is read the data that high frequency is write for storing the access degree of data, therefore, the data volume that this subregion writes is larger, and the second subregion is that high frequency is read the data that low frequency is write for storing the access degree of data, the data volume that this subregion writes is less, when the free area of the first subregion hour, when the free area of the first subregion is larger, can adjust the size of two subregions, increase the first partitioned storage space, so that the data in the first subregion can no write de-lay.
In addition the method that, the embodiment of the present invention one provides can also comprise:
S307: when the storage unit of SSD exists idle continuum, and idle continuum is while being present at least two subregions, adjusts at least two subregions so that clear area is present in a subregion.
For example, when the first subregion exists a clear area, and when the clear area of this clear area and the second subregion is a continuum, clear area in the second subregion can be adjusted in the first subregion, or, the clear area of the first subregion is adjusted in the second subregion, so that the clear area in two subregions is linked to be a continuum, to can store more convenient, fast data.Which, as for being adjusted to subregion, can determine according to the size of the storage condition of data, data to be written and the data access degree of these data to be written.
It should be noted that, the present embodiment does not limit the execution sequence of step S304-S307, in the process that these steps can write in data, carries out, also can after having write data, carry out, and this also restriction of execution sequence of four steps of S304-S307.
Embodiment tetra-
The embodiment of the present invention four provides a kind of electronic equipment, according to the access degree of data, determine in advance each subregion of the storage unit of SSD, and set up the access degree of data and the corresponding relation of each subregion, wherein, the different data of each partitioned storage access degree, Fig. 4 is the structural representation of this electronic equipment, comprising: acquisition module 101, determination module 102 and writing module 103.Wherein:
Acquisition module 101, for obtaining data to be written.Determination module 102, for determining the access degree of the data to be written that acquisition module 101 obtains.Writing module 103, for the access degree based on data and the corresponding relation of each subregion, the data to be written that acquisition module 101 is obtained write in subregion corresponding to the access degree of the data of determining with determination module 103.
Embodiment five
The embodiment of the present invention five provides a kind of electronic equipment, the structural representation that Fig. 5 is this electronic equipment, and the acquisition module 101 that this electronic equipment provides except comprising embodiment tetra-, outside determination module 102 and writing module 103, also comprises: garbage reclamation module 104.Wherein:
Garbage reclamation module 104, for when receiving garbage reclamation instruction, carries out garbage reclamation for each subregion.
In the present embodiment, determination module 102 can comprise: first determines submodule.
First determines submodule, for determine the access degree of data to be written according to the extension name of data to be written: be temporary file if extension name is indicated data to be written, the access degree of determining data to be written is that low frequency is read low frequency and write, if it is non-temporary file that extension name is indicated data to be written, the access degree of determining data to be written is that high frequency is read high frequency and write.
Embodiment six
The embodiment of the present invention five provides a kind of electronic equipment, Fig. 6 is the structural representation of this electronic equipment, the acquisition module 101 that this electronic equipment provides except comprising embodiment five, outside determination module 102, writing module 103 and garbage reclamation module 104, also comprise: the first adjusting module 105, the second adjusting module 106 and the 3rd adjusting module 107.Wherein:
The first adjusting module 105, for obtaining the abrasion condition of each subregion, according to the abrasion condition of each subregion obtaining, adjusts the access degree of the data corresponding with subregion.
The second adjusting module 106, for obtaining the size of the clear area of each subregion, the size of the clear area of each subregion that foundation is obtained is adjusted the size in the space of each subregion.
The 3rd adjusting module 107, for having idle continuum when the storage unit of SSD, and idle continuum is while being present at least two subregions, adjusts at least two subregions so that clear area is present in a subregion.
In the present embodiment, determination module 102 can comprise: second determines submodule.
Second determines submodule, for determine the access degree of data to be written according to the read-write number of times of the data that count in advance: if the number of times of reading of data to be written is greater than the first setting threshold, and write number of times and be greater than the second setting threshold, the access degree of determining data to be written is that high frequency is read high frequency and write; If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that high frequency is read low frequency and write; If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining data to be written is that low frequency is read high frequency and write; If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining data to be written is that low frequency is read low frequency and write.
While for convenience of description, describing above device, with function, being divided into various unit describes respectively.Certainly, when enforcement is of the present invention, the function of each unit can be realized in same or a plurality of software and/or hardware.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential general hardware platform by software and realizes.Understanding based on such, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually referring to, each embodiment stresses is the difference with other embodiment.Especially, for system embodiment, because it is substantially similar in appearance to embodiment of the method, so describe fairly simplely, relevant part is referring to the part explanation of embodiment of the method.System embodiment described above is only schematic, the wherein said unit as separating component explanation can or can not be also physically to separate, the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of module wherein to realize the object of the present embodiment scheme.Those of ordinary skills, in the situation that not paying creative work, are appreciated that and implement.
The present invention can be used in numerous general or special purpose computingasystem environment or configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-size computer, mainframe computer, comprise distributed computing environment of above any system or equipment etc.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, by the teleprocessing equipment being connected by communication network, be executed the task.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.
The above is only the specific embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (14)

1. the data processing method based on solid-state hard disk SSD, it is characterized in that, be applied to an electronic equipment, according to the access degree of data, determine in advance each subregion of the storage unit of SSD, and set up the access degree of data and the corresponding relation of each subregion, wherein, the different data of described each partitioned storage access degree, the method comprises:
Obtain data to be written;
Determine the access degree of data to be written;
Access degree based on described data and the corresponding relation of each subregion, write described data to be written in the subregion corresponding with the access degree of determined data.
2. method according to claim 1, is characterized in that, also comprises:
When receiving garbage reclamation instruction, for described each subregion, carry out garbage reclamation.
3. method according to claim 1, is characterized in that, also comprises:
Obtain the abrasion condition of each subregion, according to the abrasion condition of described each subregion, adjust the access degree of the data corresponding with subregion.
4. method according to claim 1, is characterized in that, also comprises:
Obtain the size of the clear area of described each subregion, the size of the clear area of described each subregion of foundation is adjusted the size in the space of described each subregion.
5. method according to claim 1, is characterized in that, also comprises:
When the storage unit of described SSD exists idle continuum, and the continuum of described free time is while being present at least two subregions, at least two subregions described in adjustment so that described clear area be present in a subregion.
6. method according to claim 1, is characterized in that, the access degree of described definite data to be written is specially:
According to the extension name of described data to be written, determine the access degree of described data to be written: if the described data to be written of described extension name indication are temporary file, the access degree of determining described data to be written is that low frequency is read low frequency and write; If the described data to be written of described extension name indication are non-temporary file, the access degree of determining described data to be written is that high frequency is read high frequency and write.
7. method according to claim 1, is characterized in that, the access degree of described definite data to be written is specially:
According to the read-write number of times of the data that count in advance, determine the access degree of described data to be written:
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that high frequency is read high frequency and write;
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that high frequency is read low frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that low frequency is read high frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that low frequency is read low frequency and write.
8. an electronic equipment, it is characterized in that, according to the access degree of data, determine in advance each subregion of the storage unit of SSD, and set up the access degree of data and the corresponding relation of each subregion, wherein, the different data of described each partitioned storage access degree, comprising: acquisition module, determination module and writing module;
Described acquisition module, for obtaining data to be written;
Described determination module, for determining the access degree of the data to be written that described acquisition module obtains;
Said write module, for the access degree based on described data and the corresponding relation of each subregion, the data to be written that described acquisition module is obtained write in subregion corresponding to the access degree of the data of determining with described determination module.
9. electronic equipment according to claim 8, is characterized in that, also comprises: garbage reclamation module;
Described garbage reclamation module, for when receiving garbage reclamation instruction, carries out garbage reclamation for described each subregion.
10. electronic equipment according to claim 8, is characterized in that, also comprises: the first adjusting module;
Described the first adjusting module, for obtaining the abrasion condition of each subregion, according to the abrasion condition of described each subregion obtaining, adjusts the access degree of the data corresponding with subregion.
11. electronic equipments according to claim 8, is characterized in that, also comprise: the second adjusting module;
Described the second adjusting module, for obtaining the size of the clear area of each subregion, the size of the clear area of described each subregion that foundation is obtained is adjusted the size in the space of described each subregion.
12. electronic equipments according to claim 8, is characterized in that, also comprise: the 3rd adjusting module;
Described the 3rd adjusting module, for having idle continuum when the storage unit of described SSD, and the continuum of described free time is while being present at least two subregions, at least two subregions described in adjustment so that described clear area be present in a subregion.
13. electronic equipments according to claim 8, is characterized in that, described determination module comprises: first determines submodule;
Described first determines submodule, for determine the access degree of described data to be written according to the extension name of described data to be written: if the described data to be written of described extension name indication are temporary file, the access degree of determining described data to be written is that low frequency is read low frequency and write; If the described data to be written of described extension name indication are non-temporary file, the access degree of determining described data to be written is that high frequency is read high frequency and write.
14. electronic equipments according to claim 8, is characterized in that, described determination module comprises: second determines submodule;
Described second determines submodule, for determine the access degree of described data to be written according to the read-write number of times of the data that count in advance:
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that high frequency is read high frequency and write;
If the number of times of reading of data to be written is greater than the first setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that high frequency is read low frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be greater than the second setting threshold, the access degree of determining described data to be written is that low frequency is read high frequency and write;
If the number of times of reading of data to be written is less than the 4th setting threshold, and writes number of times and be less than the 3rd setting threshold, the access degree of determining described data to be written is that low frequency is read low frequency and write.
CN201210356601.7A 2012-09-21 2012-09-21 A kind of data processing method and electronic equipment based on SSD Active 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 true CN103677653A (en) 2014-03-26
CN103677653B CN103677653B (en) 2017-07-25

Family

ID=50315366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210356601.7A Active 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)

Cited By (10)

* 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
WO2015185002A1 (en) * 2014-06-06 2015-12-10 华为技术有限公司 Method and device for writing data
CN106547472A (en) * 2015-09-18 2017-03-29 华为技术有限公司 Storage array management method and device
CN107102819A (en) * 2014-12-12 2017-08-29 西安三星电子研究有限公司 The method and apparatus of data is write to solid state hard disc
CN108228103A (en) * 2017-12-29 2018-06-29 北京联想核芯科技有限公司 A kind of data processing method and device of SSD hard disks
CN108572922A (en) * 2017-03-07 2018-09-25 慧荣科技股份有限公司 data storage device and operation method thereof
CN109299088A (en) * 2018-08-22 2019-02-01 中国平安人寿保险股份有限公司 Mass data storage means, device, storage medium and electronic equipment
CN109426450A (en) * 2017-09-04 2019-03-05 爱思开海力士有限公司 Storage system and its operating method
CN109426448A (en) * 2017-08-28 2019-03-05 爱思开海力士有限公司 Storage system and its operating method
CN109739883A (en) * 2019-01-03 2019-05-10 广东南方数码科技股份有限公司 Promote the method, apparatus and electronic equipment of data query performance

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080027905A1 (en) * 2006-07-28 2008-01-31 Craig Jensen Assigning data for storage based on speed with which data may be retrieved
CN101911074A (en) * 2008-01-10 2010-12-08 帝斯科匹尔公司 Selecting storage location for file storage based on storage longevity and speed
US20110167230A1 (en) * 2006-07-28 2011-07-07 Diskeeper Corporation Selecting Storage Locations For Storing Data Based on Storage Location Attributes and Data Usage Statistics
CN102622310A (en) * 2011-01-30 2012-08-01 成都市华为赛门铁克科技有限公司 Invalid data erasing method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080027905A1 (en) * 2006-07-28 2008-01-31 Craig Jensen Assigning data for storage based on speed with which data may be retrieved
US20110167230A1 (en) * 2006-07-28 2011-07-07 Diskeeper Corporation Selecting Storage Locations For Storing Data Based on Storage Location Attributes and Data Usage Statistics
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

Cited By (11)

* 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
WO2015185002A1 (en) * 2014-06-06 2015-12-10 华为技术有限公司 Method and device for writing data
CN107102819A (en) * 2014-12-12 2017-08-29 西安三星电子研究有限公司 The method and apparatus of data is write to solid state hard disc
CN106547472A (en) * 2015-09-18 2017-03-29 华为技术有限公司 Storage array management method and device
CN106547472B (en) * 2015-09-18 2019-09-13 华为技术有限公司 Storage array management method and device
CN108572922A (en) * 2017-03-07 2018-09-25 慧荣科技股份有限公司 data storage device and operation method thereof
CN109426448A (en) * 2017-08-28 2019-03-05 爱思开海力士有限公司 Storage system and its operating method
CN109426450A (en) * 2017-09-04 2019-03-05 爱思开海力士有限公司 Storage system and its operating method
CN108228103A (en) * 2017-12-29 2018-06-29 北京联想核芯科技有限公司 A kind of data processing method and device of SSD hard disks
CN109299088A (en) * 2018-08-22 2019-02-01 中国平安人寿保险股份有限公司 Mass data storage means, device, storage medium and electronic equipment
CN109739883A (en) * 2019-01-03 2019-05-10 广东南方数码科技股份有限公司 Promote the method, apparatus and electronic equipment of data query performance

Also Published As

Publication number Publication date
CN103677653B (en) 2017-07-25

Similar Documents

Publication Publication Date Title
CN103677653A (en) Data processing method and electronic device based on solid state disk (SSD)
CN110781096B (en) Apparatus and method for performing garbage collection by predicting demand time
CN102096639B (en) Method for trimming data on non-volatile flash media
CN101154190B (en) Mapping information managing apparatus and method
US20120311238A1 (en) Memory apparatus
CN104346290A (en) Storage device, computer system and methods of operating same
US10475516B2 (en) Data storage device and data erasing method wherein after erasing process, predetermined value is written to indicate completion of said erasing method
CN101840380A (en) The protection metadata is avoided the apparatus and method of accident power-off influence
CN103577336A (en) Stored data processing method and device
CN111007985B (en) Compatible processing method, system and equipment for space recovery of storage system
JP6139711B2 (en) Information processing device
CN103677674A (en) Data processing method and device
KR20130034450A (en) Storage device and driving method thereof
CN103064792A (en) Method and device for writing data
CN102708058A (en) Non-volitile memory device for performing ftl and method thereof
CN104239096A (en) Method and unit for realizing security data partitions in Android system
CN102831072A (en) Flash memory device, and management method, data read-write method and data read-write device thereof
KR102653373B1 (en) Controller and operation method thereof
CN104216796A (en) Data backup and recovery method and electronic device
CN103389942A (en) Control device, storage device, and storage control method
CN103473185A (en) Cache writing method, caching device and storing system
CN104461384A (en) Data write-in method and storage device
CN101025711B (en) Apparatus and method for controlling flash memory
CN107203341A (en) Date storage method, device and flash chip based on flash memory
CN103116549B (en) Based on the flash memory storage method of maximum erasable number of times

Legal Events

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