CN101533337B - A solid-state hard disk data management method and device - Google Patents

A solid-state hard disk data management method and device Download PDF

Info

Publication number
CN101533337B
CN101533337B CN2009101378717A CN200910137871A CN101533337B CN 101533337 B CN101533337 B CN 101533337B CN 2009101378717 A CN2009101378717 A CN 2009101378717A CN 200910137871 A CN200910137871 A CN 200910137871A CN 101533337 B CN101533337 B CN 101533337B
Authority
CN
China
Prior art keywords
state hard
data
solid state
hard disc
logical address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009101378717A
Other languages
Chinese (zh)
Other versions
CN101533337A (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Symantec Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN2009101378717A priority Critical patent/CN101533337B/en
Publication of CN101533337A publication Critical patent/CN101533337A/en
Application granted granted Critical
Publication of CN101533337B publication Critical patent/CN101533337B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The embodiment of the invention discloses a solid-state hard disk data management method, which includes: acquiring the dynamic mapping relationship of the logical address and the physical address storing the data in the solid-state hard disk; performing the movement of data between the logical addresses by modifying the dynamic mapping relationship. The invention simultaneously discloses a solid-state hard disk data management device. The invention can realize the fast-moving of the solid-state hard disk data between different logical addresses, reduces I/O resource consumption and speeds up order execution speed, and can effectively reduce the read/write waste of the solid-state hard disk, for extending the service life of the solid-state hard drive disk.

Description

Solid-state hard disk data management method and equipment
Technical field
The present invention relates to field of computer technology, relate in particular to solid-state hard disk data management method and equipment.
Background technology
When data move on memory device because the existence of disk partition, can be divided into stride subregion move with subregion in move:
Stride subregion and move, be meant data are moved to another subregion from a subregion; For bottom, be that (Logical Block Address LBA) moves to another logical address, or data are moved to another group logical address from one group of logical address from a logical address with data.
Move in the subregion, have two kinds of situation: a kind of is that data still leave original logical address in, only through revising the file allocation table or the similar data structure on upper strata, realizes moving of data or file, for example the shearing manipulation of file between different directories; Another kind is that data move to the different logical address, for example, the disk fragments arrangement function that WINDOWS provides, it can force data are moved between the different logical address.
Because there are constant basically unique corresponding relation in conventional hard logical address and physical address, therefore, data moving between logical address, corresponding bottom layer realization is data moving between physical address.
When data move between physical address, at first need data be read from source address, be kept in the buffer memory or Installed System Memory of hard disk; Carry out data write operation then, data are written to destination address, thereby accomplish moving of data.
At present for the moving of data between the Different Logic address in the solid-state hard attitude, also be adopt and above-mentioned conventional hard in the similar method of data mobile phase between logical address.
The inventor is in realizing process of the present invention, and it is following not enough to find that above-mentioned prior art exists:
When data move between the Different Logic address, exist data to read and ablation process, take more I/O (Input/Output, I/O) resource; It is also longer that command execution is accomplished the required time, especially under the bigger situation of the data that move; And have the memory device of age limit to some, for example FLASH memory device (flash memory) can increase its loss, influences serviceable life.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of solid-state hard disk data management method and equipment; In order to realize the fast moving of solid state hard disc data between the Different Logic address; Reduce the I/O resource occupation, improve command execution speed, reduce the loss of solid state hard disc read/write, prolong solid state hard disc serviceable life.
For realizing above-mentioned purpose, the embodiment of the invention provides a kind of solid-state hard disk data management method, and this method comprises:
Through logical address of searching said solid state hard disc and the mapping relations table that is stored in the physical address of the data in the said solid state hard disc; Obtain the dynamic mapping relationship of physical address of logical address and the said data of said solid state hard disc; Said mapping relations table comprises the value of element entry and element entry; Said element entry comprises the logical address of said solid state hard disc, and the value of said element entry is and the logical address of the said solid state hard disc physical address of mapped data mutually; When obtaining said dynamic mapping relationship, at first according to the logical address of said solid state hard disc, find element entry corresponding in the said mapping relations table, and then search the value of the corresponding element entry of this element entry;
Value through exchanging element entry in the said mapping relations table is revised said dynamic mapping relationship, carries out moving of said data between logical address.
For realizing above-mentioned purpose, the embodiment of the invention provides a kind of solid-state hard disk data management equipment, and this equipment comprises:
Acquisition module; The mapping relations table that is used for logical address and the physical address of the data that are stored in said solid state hard disc through searching said solid state hard disc; Obtain the dynamic mapping relationship of physical address of logical address and said data of the data of said solid state hard disc; Said mapping relations table comprises the value of element entry and element entry, and said element entry comprises the logical address of said solid state hard disc, and the value of said element entry is and the logical address of the said solid state hard disc physical address of mapped data mutually; When obtaining said dynamic mapping relationship, at first according to the logical address of said solid state hard disc, find element entry corresponding in the said mapping relations table, and then search the value of the corresponding element entry of this element entry;
Modified module is used for revising said dynamic mapping relationship through the value that exchanges said mapping relations table element entry, carries out the moving of said data between logical address.
The beneficial effect of the embodiment of the invention is, during mobile in carrying out solid state hard disc between data logical address, obtains the logical address and the dynamic mapping relationship that is stored in the physical address of the data in the said solid state hard disc of said solid state hard disc earlier; Again through revising said dynamic mapping relationship; Carry out the moving of said data between logical address; With realize that through reading the technical scheme that data move compares between the Different Logic address in the prior art with ablation process, the embodiment of the invention realizes the fast moving of data between logical address in the solid state hard disc through revising dynamic mapping relationship; Reducing data reads and write operation; Have that the I/O of taking resource is little, command execution advantage fast, and can effectively reduce the read/write loss of solid state hard disc, prolong the serviceable life of solid state hard disc.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.In the accompanying drawings:
Fig. 1 is the process flow diagram of solid-state hard disk data management method in the one embodiment of the invention;
Fig. 2 is for looking into the synoptic diagram of mapping relations table in the another embodiment of the present invention;
Fig. 3 is a synoptic diagram of revising dynamic mapping relationship in the mapping relations table in the another embodiment of the present invention;
Fig. 4, Fig. 5 are the structural representation of the solid-state hard disk data management equipment among another embodiment of the present invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, the embodiment of the invention is further elaborated below in conjunction with Figure of description.At this, illustrative examples of the present invention and explanation thereof are used to explain the present invention, but not as to qualification of the present invention.
Embodiment one
The inventor considers that for conventional hard, logical address is corresponding with well-determined physical address, under the normal condition not in time or reading and writing data and changing; But; For solid state hard disc, different with conventional hard is, because the requirement of bad block management and wear leveling; Its logical address is dynamic changes with the mapping relations of the physical address of the data of storing; Therefore, present embodiment is through the logical address of revising solid state hard disc and the dynamic mapping relationship that is stored in the physical address of the data in the said solid state hard disc, and then the fast moving of data between logical address in the realization solid state hard disc.
As shown in Figure 1, the solid-state hard disk data management method flow process in the present embodiment can comprise:
Step 101, the logical address of obtaining said solid state hard disc and the dynamic mapping relationship that is stored in the data physical address in the said solid state hard disc.
Step 102, through revising said dynamic mapping relationship, carry out the moving of said data between logical address.
Flow process shown in Figure 1 need not to carry out that data are read and write operation; Can realize the fast moving of data between logical address in the solid state hard disc through revising said dynamic mapping relationship; Actual physical does not take place and moves in data during enforcement on solid state hard disc; For constant data physical address, data have realized moving between the different logical address, have that the I/O of taking resource is little, a command execution advantage fast; And can effectively reduce the read/write loss of solid state hard disc, prolong the serviceable life of solid state hard disc.
Embodiment two
Present embodiment carries out further detailed explanation to flow process shown in Figure 1.
In the present embodiment, in the mapping relations table of the logical address that the dynamic mapping relationship of the logical address of solid state hard disc and the physical address of data can be stored in solid state hard disc and the physical address of the data of storing, can obtain this dynamic mapping relationship through tabling look-up; Perhaps; The dynamic mapping relationship of the logical address of solid state hard disc and the physical address of data also can be the logical address of solid state hard disc and the transfer function of the physical address of the data of storing, and promptly can the logical address of solid state hard disc and the physical address of the data of storing be shone upon through this transfer function; When obtaining dynamic mapping relationship, aforementioned mode of tabling look-up with transfer function can be used separately, also can be used in combination.Certainly; When the physical address of the logical address of solid state hard disc and the data of storing shines upon; Alternate manner can also be arranged,, repeat no more here as long as the physical address of the logical address that can realize solid state hard disc and storage data is corresponding one by one and the mapping relations of the two can be modified.
Dynamic mapping relationship with the logical address of obtaining solid state hard disc through tabling look-up and the physical address of the data of being stored is an example below, the practical implementation of description of step 101.
As shown in Figure 2, suppose that the solid state hard disc of storage data has N+1 physical address; The mapping relations table that is used for dynamic mapping relationship between the physical address of logical address and data of this solid state hard disc has N+1 item element entry; Element entry comprises the logical address of solid state hard disc, and the value of element entry is and the logical address of the solid state hard disc physical address of mapped data mutually.When searching the dynamic mapping relationship of physical address of logical address and data of solid state hard disc,, find the element entry X in the mapping relations table at first according to the logical address X of solid state hard disc; And then the value of searching the corresponding element entry of element entry X, can see that from Fig. 2 the value of the element entry that element entry X is corresponding is 0, the physical address of the data that then the logical address X of solid state hard disc is corresponding is 0.
In the enforcement, when revising the dynamic mapping relationship of physical address of logical address and data of solid state hard disc, can revise and the solid state hard disc logical address physical address of mapped data mutually; Certainly; Also can revise the solid state hard disc logical address of shining upon mutually, as long as can make the dynamic mapping relationship of physical address of logical address and the data of solid state hard disc change, realize data moving between the Different Logic address with the physical address of data.
Dynamic mapping relationship is an example in the mapping relations table to revise below, the practical implementation of description of step 102.
Through the value of element entry in the change mapping relations table, can a certain logical address be mapped to any physical address of solid state hard disc.Through the value of element entry in the exchange mapping relations table, realize the change of solid state hard disc logical address and data physical address dynamic mapping relationship in this example.That is to say, the solid state hard disc of bottom, the value of two element entries in the exchange mapping relations table, for the operating system on upper strata, exchange has taken place in two corresponding data of logical address.
Act one is for example shown in Figure 3, and logical address L1 maps to physical address D1, and logical address L2 maps to physical address D2; Through the value of the element entry among logical address L1 and the logical address L2 in the exchange mapping relations table, logical address L1 maps to physical address D2, and logical address L2 maps to physical address D1.Be valid data if physical address D1, physical address D2 deposit, what aforesaid operations was realized is the exchanges of data between the Different Logic address; If among the physical address D1, physical address D2 wherein one be blank block, what then realize is the mobile of data.
When step 102 is implemented; Whether the target disk subregion of the solid state hard disc that also can first specified data moves has enough remaining spaces (for example having free sector enough, that be not used); When the target disk subregion of confirming solid state hard disc has enough remaining spaces; Just revise the logical address of solid state hard disc and the dynamic mapping relationship of the physical address of the data of storing, can improve the success ratio that data move like this, the situation of loss of data takes place when avoiding data to move.
In the enforcement, before step 101 is carried out, can also comprise: (Advanced Technology Attachment ATA) orders data sent to move notice through self-defined Advanced Technology Attachment to receive main frame; Then when step 101 is carried out, can move notice, obtain the logical address of solid state hard disc and the dynamic mapping relationship of the physical address of the data of storing according to these data.Here main frame sends data through self-defined ata command and moves notice, is to consider in the existing ATA standard, and still therefore the related command that moves of no datat can be used for the transmission that data move notice by self-defined ata command in the present embodiment.
In the enforcement; The host notification solid state hard disc is mobile data between the Different Logic address, can realize through the mode of aforementioned self-defined ata command, but also can realize the interface or the agreement of solid state hard disc transmitting control commands through other; FC (Fiber Channel for example; Optical-fibre channel), SCSI (Small Computer System Interface, small computer system interface), USB interface or agreements such as (Universal Serial BUS, USBs).
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer read/write memory medium; This program is when carrying out; Can comprise all or part of step in the foregoing description method, described storage medium can comprise: ROM, RAM, disk, CD etc.
Based on same inventive concept, a kind of solid-state hard disk data management equipment also is provided in the embodiment of the invention, of following embodiment three.Because the principle that this memory device is dealt with problems is similar with solid-state hard disk data management method, so the enforcement of this equipment can repeat part and repeat no more referring to the enforcement of method.
Embodiment three
The structure of solid-state hard disk data management equipment is as shown in Figure 4 in the present embodiment, can comprise:
Acquisition module 401 is used for obtaining the dynamic mapping relationship of logical address and the physical address of the data that are stored in said solid state hard disc of the data of said solid state hard disc;
Modified module 402 is used for through revising said dynamic mapping relationship, carries out the moving of said data between logical address.
As shown in Figure 5, equipment shown in Figure 4 in the enforcement can also comprise:
Receiver module 403 is used to receive main frame and moves notice through self-defined ata command data sent;
Then this moment, acquisition module 401 can also be used for moving notice according to said data, obtains said dynamic mapping relationship.
In the enforcement; Acquisition module 401 can also be used for the mapping relations table through the physical address of logical address of searching said solid state hard disc and said data; And/or the transfer function of the logical address of said solid state hard disc and the physical address of said data obtains said dynamic mapping relationship.
In the enforcement, modified module 402 can also be used for when the target disk subregion of confirming the said solid state hard disc that said data move has enough remaining spaces, revising said dynamic mapping relationship.
In the enforcement, modified module 402 can also be used to revise the physical address of said solid state hard disc of the logical address mapping of said data.
Can learn by the foregoing description, in the embodiment of the invention, in carrying out solid state hard disc, during data mobile between logical address, obtain the logical address and the dynamic mapping relationship that is stored in the physical address of the data in the said solid state hard disc of said solid state hard disc earlier; Again through revising said dynamic mapping relationship; Carry out the moving of said data between logical address; With realize that through reading the technical scheme that data move compares between the Different Logic address in the prior art with ablation process; The embodiment of the invention only can realize the fast moving of data between logical address in the solid state hard disc through revising dynamic mapping relationship, and need not to carry out that data are read and write operation, has that the I/O of taking resource is little, a command execution advantage fast; And can effectively reduce the read/write loss of solid state hard disc, prolong the serviceable life of solid state hard disc.
Embodiment of the invention method and apparatus can be applied to the other technologies field equally.Realize that for existing the design that similar mapping relations and mapping relations can dynamic change the embodiment of the invention all has certain application value.
Above-described specific embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely specific embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a solid-state hard disk data management method is characterized in that, may further comprise the steps:
Through logical address of searching said solid state hard disc and the mapping relations table that is stored in the physical address of the data in the said solid state hard disc; Obtain the dynamic mapping relationship of physical address of logical address and the said data of said solid state hard disc; Said mapping relations table comprises the value of element entry and element entry; Said element entry comprises the logical address of said solid state hard disc, and the value of said element entry is and the logical address of the said solid state hard disc physical address of mapped data mutually; When obtaining said dynamic mapping relationship, at first according to the logical address of said solid state hard disc, find element entry corresponding in the said mapping relations table, and then search the value of the corresponding element entry of this element entry;
Value through exchanging element entry in the said mapping relations table is revised said dynamic mapping relationship, carries out the moving of said data between logical address.
2. the method for claim 1 is characterized in that, obtains before the said dynamic mapping relationship, further comprises: receive main frame and move notice through self-defined Advanced Technology Attachment order data sent;
Obtain said dynamic mapping relationship, comprising: move notice according to said data, obtain said dynamic mapping relationship.
3. the method for claim 1 is characterized in that, revises said dynamic mapping relationship, comprising:
When the target disk subregion of confirming the said solid state hard disc that said data move has enough remaining spaces, revise said dynamic mapping relationship.
4. a solid-state hard disk data management equipment is characterized in that, comprising:
Acquisition module; The mapping relations table that is used for logical address and the physical address of the data that are stored in said solid state hard disc through searching said solid state hard disc; Obtain the dynamic mapping relationship of physical address of logical address and the said data of said solid state hard disc; Said mapping relations table comprises the value of element entry and element entry, and said element entry comprises the logical address of said solid state hard disc, and the value of said element entry is and the logical address of the said solid state hard disc physical address of mapped data mutually; When obtaining said dynamic mapping relationship, at first according to the logical address of said solid state hard disc, find element entry corresponding in the said mapping relations table, and then search the value of the corresponding element entry of this element entry;
Modified module is used for revising said dynamic mapping relationship through the value that exchanges said mapping relations table element entry, carries out the moving of said data between logical address.
5. equipment as claimed in claim 4 is characterized in that, also comprises:
Receiver module is used to receive main frame and moves notice through self-defined Advanced Technology Attachment order data sent;
Said acquisition module is further used for moving notice according to said data, obtains said dynamic mapping relationship.
6. equipment as claimed in claim 4 is characterized in that, said modified module is further used for when the target disk subregion of confirming the said solid state hard disc that said data move has enough remaining spaces, revising said dynamic mapping relationship.
CN2009101378717A 2009-05-05 2009-05-05 A solid-state hard disk data management method and device Active CN101533337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101378717A CN101533337B (en) 2009-05-05 2009-05-05 A solid-state hard disk data management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101378717A CN101533337B (en) 2009-05-05 2009-05-05 A solid-state hard disk data management method and device

Publications (2)

Publication Number Publication Date
CN101533337A CN101533337A (en) 2009-09-16
CN101533337B true CN101533337B (en) 2012-04-04

Family

ID=41103962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101378717A Active CN101533337B (en) 2009-05-05 2009-05-05 A solid-state hard disk data management method and device

Country Status (1)

Country Link
CN (1) CN101533337B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291194B2 (en) 2009-11-16 2012-10-16 Mediatek Inc. Methods of utilizing address mapping table to manage data access of storage medium without physically accessing storage medium and related storage controllers thereof

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096561B (en) * 2011-02-09 2012-07-25 成都市华为赛门铁克科技有限公司 Hierarchical data storage processing method, device and storage equipment
CN102622307B (en) * 2012-02-27 2016-03-30 记忆科技(深圳)有限公司 The method of operating of hard disc data and hard disk controller
CN102929792B (en) * 2012-11-12 2016-03-30 华为技术有限公司 Data movement method and system, memory device and main frame
CN107391391B (en) * 2017-07-19 2019-05-14 深圳大普微电子科技有限公司 Method, system and the solid state hard disk of data copy are realized in the FTL of solid state hard disk
CN110895597B (en) * 2018-09-12 2022-04-19 长鑫存储技术有限公司 Transcoding logical function calculation method and device, storage medium and electronic equipment
CN110442531B (en) * 2019-08-08 2021-10-26 深圳忆联信息系统有限公司 Method and device for improving reading performance based on solid state disk and computer equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291194B2 (en) 2009-11-16 2012-10-16 Mediatek Inc. Methods of utilizing address mapping table to manage data access of storage medium without physically accessing storage medium and related storage controllers thereof

Also Published As

Publication number Publication date
CN101533337A (en) 2009-09-16

Similar Documents

Publication Publication Date Title
CN101533337B (en) A solid-state hard disk data management method and device
US7487303B2 (en) Flash memory device and associated data merge method
TWI405082B (en) Memory system and mapping methods thereof
US8762682B1 (en) Data storage apparatus providing host full duplex operations using half duplex storage devices
US8117374B2 (en) Flash memory control devices that support multiple memory mapping schemes and methods of operating same
US9405485B2 (en) Method and apparatus for writing data to a flash memory
US8650379B2 (en) Data processing method for nonvolatile memory system
JP5149912B2 (en) Selective use of multiple disparate solid-state storage locations
US9037814B2 (en) Flash memory management method and flash memory controller and storage system using the same
CN103019971A (en) Method of quickly responding to trim command, SSD (Solid State Disk) controller and system
CN102511044A (en) Method for deleting the data and device thereof
CN103294604A (en) Flash memory device and electronic device employing thereof
CN102799534A (en) Storage system and method based on solid state medium and cold-hot data identification method
CN101727395A (en) Flash memory device and management system and method thereof
CN107870868B (en) Storage device and storage system
KR20070075640A (en) Method and apparatus for shortening operating time of page replacement in demand paging applied system
US20120179859A1 (en) Nonvolatile memory apparatus performing ftl function and method for controlling the same
CN103942011A (en) Differential snapshot system and use method thereof
CN105718206A (en) Flash translation layer capable of perceiving RAID (Redundant Array of Independent Disks) and implementation method thereof
CN102662856A (en) Solid state disk and access method
CN105808167A (en) SR-IOV (Single Root I/O Virtualization)-based linked clone method, storage equipment and system
CN103838676A (en) Data storage system, data storage method and PCM bridge
CN110865770A (en) Memory system
CN102306124A (en) Method for implementing hardware driver layer of Nand Flash chip
CN104239252A (en) Data transmission method, device and system of data storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

Free format text: FORMER NAME: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee after: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee before: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right

Effective date of registration: 20220916

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China

Patentee before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

TR01 Transfer of patent right