CN108614669A - Solve the key-data access method and solid storage device of hash-collision - Google Patents

Solve the key-data access method and solid storage device of hash-collision Download PDF

Info

Publication number
CN108614669A
CN108614669A CN201611142834.1A CN201611142834A CN108614669A CN 108614669 A CN108614669 A CN 108614669A CN 201611142834 A CN201611142834 A CN 201611142834A CN 108614669 A CN108614669 A CN 108614669A
Authority
CN
China
Prior art keywords
data
key
key assignments
physical address
cryptographic hash
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
CN201611142834.1A
Other languages
Chinese (zh)
Other versions
CN108614669B (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.)
Beijing Memblaze Technology Co Ltd
Original Assignee
Beijing Memblaze Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Memblaze Technology Co Ltd filed Critical Beijing Memblaze Technology Co Ltd
Priority to CN201611142834.1A priority Critical patent/CN108614669B/en
Publication of CN108614669A publication Critical patent/CN108614669A/en
Application granted granted Critical
Publication of CN108614669B publication Critical patent/CN108614669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

This application provides the key data access methods and solid storage device that solve hash-collision.Disclosed method includes:The first key (Key) value and the first data (Value) are received from host;Hash operation is made to the first key assignments, obtains the first cryptographic Hash;The first physical address is distributed for the first cryptographic Hash;And corresponding first data cell of the first physical address is written into the first key assignments and the first data.Disclosed solid storage device includes interface, control unit, one or more NVM chips and DRAM, and wherein control unit is used to control the data transmission between interface, NVM chips and DRAM, and executes the above method by executing program.The application is applied to the data access operation of solid storage device.

Description

Solve the key-data access method and solid storage device of hash-collision
Technical field
This application involves technical field of memory, more particularly to the solid storage device based on KV models data access method With solid storage device.
Background technology
NVM (nonvolatile storage, Non-Volatile Memory) has non-volatile spy for realizing store function Point.Fig. 1 is the block diagram of the solid storage device of the prior art.Solid storage device 102 is coupled with host, for being carried for host For storage capacity.Host can be coupled in several ways between solid storage device 102, and coupled modes include but not limited to For example, by SATA (Serial Advanced Technology Attachment, Serial Advanced Technology Attachment), SCSI (Small Computer System Interface, small computer system interface), SAS (Serial Attached SCSI, Serial Attached SCSI (SAS)), IDE (Integrated Drive Electronics, integrated drive electronics), USB (Universal Serial Bus, universal serial bus), PCIE (Peripheral Component Interconnect Express, PCIe, peripheral component interconnection), NVMe (NVM Express, high speed non-volatile memory), Ethernet, optical fiber it is logical Road, cordless communication network etc. connect host and solid storage device 102.Host can be set through the above way with storage The standby information processing equipment communicated, for example, personal computer, tablet computer, server, portable computer, network exchange Machine, router, cellular phone, personal digital assistant etc..Storage device 102 includes interface 103, control unit 104, one or more A NVM chips 105 and DRAM (Dynamic Random Access Memory, dynamic RAM) 110.
Nand flash memory, phase transition storage, FeRAM (Ferroelectric RAM, ferroelectric memory), MRAM (Magnetic Random Access Memory, magnetoresistive memory), RRAM (Resistive Random Access Memory, resistance-change memory Device) etc. be common NVM.
Interface 103 can be adapted to for example, by the side such as SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, optical-fibre channel Formula and host exchanging data.
The data that control unit 104 is used to control between interface 103, NVM chips 105 and firmware memory 110 pass It is defeated, it is additionally operable to storage management, host logical address to flash memory physical address map, erasure balance, bad block management etc..Control unit 104 can be realized by the various ways of software, hardware, firmware or combinations thereof, for example, control unit 104 can be FPGA (Field-programmable gate array, field programmable gate array), ASIC (Application Specific Integrated Circuit, application specific integrated circuit) or a combination thereof form;Control unit 104 can also include place Device or controller are managed, software is executed in processor or controller and carrys out the hardware of manipulation and control component 104 to handle IO (Input/Output) it orders;Control unit 104 is also coupled to DRAM 110, and may have access to the data of DRAM 110; DRAM can store the data of the I/O command of FTL tables and/or caching.
Memory target (Target) is that the shared chip in the encapsulation of flash memory particle 105 enables (CE, Chip Enable) letter Number one or more logic units (Logic UNit).It may include one or more tube cores (Die) in nand flash memory encapsulation.Allusion quotation Type, logic unit corresponds to single tube core.Logic unit may include multiple planes (Plane).It is multiple in logic unit Plane can be with parallel access, and multiple logic units in nand flash memory chip can execute order and report shape independently of one another State.http://www.onfi.org/~/media/ONFI/specs/ONFI_3_ 2%20Gold.pdf" the Open obtained In NAND Flash Interface Specification (Revision 3.2) ", provides about target (target), patrols The meaning of volume unit (LUN), plane (Plane), and also provide the order of operation NVM chips.
Data are usually stored and read on storage medium by page.And data are erased in blocks.Block includes multiple pages.Storage Page (being known as Physical Page) on medium has fixed size, such as 17664 bytes.Physical Page can also have other rulers It is very little.May include multiple data frames (data frame) in Physical Page, data frame has specified size, such as 4096 or 4416 Byte.
In solid storage device, using FTL (Flash Translation Layer, flash translation layer (FTL)) come safeguard from Map information of the logical address to physical address.Logical address constitutes the solid-state that the upper layer software (applications)s such as operating system are perceived and deposits Store up the memory space of equipment.Physical address is the address of the physical memory cell for accessing solid storage device.In existing skill Also implement address of cache using intermediate address form in art.Such as logical address is mapped as intermediate address, and then will be intermediate Address is further mapped as physical address.
Wherein, the table structure for storing the map information from logical address to physical address is referred to as FTL tables.FTL tables are Important metadata in solid storage device.The data item of usual FTL tables has recorded in solid storage device with data page/data Frame is the address mapping relation of unit.
NVMe agreements are (on November 3rd, 2014, complete by it by reference referring to " NVM Express Revision 1.2 " Text is incorporated in this specification) define host (Host) and equipment (Device) swapping data order and data structure. Multiple queues are safeguarded in host, and multiple orders can be filled in each queue.Host exchanges data with equipment based on queue.Host will C filling is ordered to submit queue, equipment obtains order C from submission queue, and is handled by the content of order C, by processing knot Fruit filling completes queue.Host obtains the handling result of order C to know that the processing of order C is completed from queue is completed.NVMe is assisted NameSpace (Namespace, NS) is also defined in view.Size is that the NameSpace of n is with the logical block from 0 to n-1 The logical block set of location.It being capable of unique mark NameSpace by NameSpace ID (Namespace ID, NS ID).Name is empty Between can be shared between host or NVMe controllers.Host is able to access that different NameSpaces by single NVMe controllers. Different hosts also can access identical NameSpace by multiple NVMe controllers.
Invention content
The purpose of the application includes providing data access method, solid storage device based on KV models.
According to the first aspect of the invention, the first data based on KV models provided according to a first aspect of the present invention are visited Ask that method, this method include:The first key (Key) value and the first data (Value) are received from host;Hash fortune is made to the first key assignments It calculates, obtains the first cryptographic Hash;The first physical address is distributed for the first cryptographic Hash;And by the first key assignments and the first data write-in the Corresponding first data cell of one physical address.
The first data access method based on KV models according to the first aspect of the invention is provided according to the present invention the The second data access method based on KV models of one side further includes:By the first cryptographic Hash, and it is the first object of its distribution Reason address is recorded in flash memory transfer layer table.
The first or second data access method based on KV models according to the first aspect of the invention is provided according to this The third data access method based on KV models of invention first aspect further includes:In first data cell, write-in the The initial address and/or length of one key assignments and the first data in first data cell.
The third data access method based on KV models according to the first aspect of the invention is provided according to the present invention the The 4th data access method based on KV models of one side, if first data cell can not accommodate first key assignments and First data, the first data cell and with the first data cell on physical address continuous one or more second First key assignments and first data are written in data cell.
The first or second data access method based on KV models according to the first aspect of the invention is provided according to this The 5th data access method based on KV models of invention first aspect, wherein the length according to the first key assignments and the first data obtains To the number N of data cell to be used, wherein N is the positive integer more than or equal to 1;And start in the first physical address And the first key assignments and the first data and first key assignments and the first number are continuously written in N number of data cell for physical address According to the initial address and/or length in N number of data cell.
The third based on KV models according to the first aspect of the invention is provided to the 5th data access method according to this The 6th data access method based on KV models of invention first aspect, when the length of the first key assignments and the first data and insufficient When filling up the last one data cell, filler fills up the last one described data cell according to this.
The first to the 6th data access method based on KV models according to the first aspect of the invention is provided according to this The 7th data access method based on KV models of invention first aspect further includes:The first key assignments is received from host;To the first key Value makees Hash operation, obtains the first cryptographic Hash;According to the first cryptographic Hash, the first physical address is obtained from flash memory transfer layer table;From Corresponding first data cell of first physical address reads the initial address and/or length of the first data;And it is counted according to first According to initial address and length, obtain the first data.
The 7th data access method based on KV models according to the first aspect of the invention is provided according to the present invention the The 8th data access method based on KV models of one side further includes:The second key assignments is obtained from the first data cell, it will be described Second key assignments is compared with the first key assignments that host provides, and when first key assignments is identical as second key assignments, is read First data.
The 8th data access method based on KV models according to the first aspect of the invention is provided according to the present invention the The 9th data access method based on KV models of one side, when first key assignments and the second key assignments difference, to master There is mistake in machine instruction.
The second to the 6th data access method based on KV models according to the first aspect of the invention is provided according to this The tenth data access method based on KV models of invention first aspect further includes:The first key assignments and the second number are received from host According to;Hash operation is made to the first key assignments, obtains the first cryptographic Hash;The second physical address is distributed for the first cryptographic Hash;And by The corresponding third data cell of the second physical address is written in one key assignments and the second data;It is distributed with the first cryptographic Hash, and for it Third physical address update flash memory transfer layer table.
According to the second aspect of the invention, the first solid-state based on KV models according to the second aspect of the invention is provided Storage device, the solid storage device include that data reception module, Hash operation module, physical address assignments module and data are write Enter module, data reception module is used to receive the first key assignments and the first data from host;Hash operation module is used for the first key Value makees Hash operation, obtains the first cryptographic Hash;Physical address assignments module is used to distribute the first physical address for the first cryptographic Hash; And Data write. module is used to the first key assignments and the first data corresponding first data cell of the first physical address is written.
According to the second aspect of the invention based on the first solid storage device of KV models, provide according to the present invention second The second solid storage device based on KV models of aspect further includes flash memory transfer layer table update module, is used for the first Hash Value, and be recorded in flash memory transfer layer table for the first physical address of its distribution.
According to the second aspect of the invention based on KV model first or second solid storage devices, provide according to this hair The third solid storage device of bright second aspect, wherein Data write. module are additionally operable in first data cell, write-in The initial address and/or length of first key assignments and the first data in first data cell.
According to the second aspect of the invention based on KV model third solid storage devices, provide according to the present invention second 4th solid storage device of aspect, wherein Data write. module, if be additionally operable to first data cell can not accommodate it is described First key assignments and first data, the first data cell and with the first data cell continuous one on physical address Or first key assignments and first data are written in multiple second data cells.
According to the second aspect of the invention based on KV models third or the 4th solid storage device, provide according to this hair 5th solid storage device of bright second aspect, further includes length computation unit, for according to the first key assignments and the first data Length obtains the number N of data cell to be used, wherein N is the positive integer more than or equal to 1;And Data write. module, It is additionally operable to start in the first physical address and continuously the first key assignments and the first data is written in N number of data cell in physical address, And the initial address and/or length of first key assignments and first data in N number of data cell.
According to the second aspect of the invention based on KV models third to the 5th solid storage device, provide according to this hair 6th solid storage device of bright second aspect, further includes database population module, for the length when the first key assignments and the first data Degree and when being not enough to fill up the last one data cell, filler fills up the last one described data cell according to this.
According to the second aspect of the invention based on the first to the 6th solid storage device of KV models, provide according to this hair 7th solid storage device of bright second aspect further includes retrieval module and data read module, wherein data reception module, goes back For receiving the first key assignments from host;Hash operation module is additionally operable to make Hash operation to the first key assignments, obtains the first Hash Value;Module is retrieved, for according to the first cryptographic Hash, obtaining the first physical address from flash memory transfer layer table, and physically by first Location is sent to data read module;Data read module, for reading the from corresponding first data cell of the first physical address The initial address and/or length of one key assignments;And initial address and length according to the first data, obtain the first data.
According to the second aspect of the invention based on the 7th solid storage device of KV models, provide according to the present invention second 8th solid storage device of aspect, further includes comparison module, and the comparison module is used to count from first in data read module After obtaining the second key assignments according to unit, second key assignments is compared with the first key assignments that host provides;And in response to institute Readout data signal is stated, data read module is used to mutually read simultaneously the first number with second key assignments when first key assignments According to.
According to the second aspect of the invention based on the 8th solid storage device of KV models, provide according to the present invention second 9th solid storage device of aspect, wherein comparison module are additionally operable to when first key assignments and the second key assignments difference, There is mistake to host instruction.
According to the second aspect of the invention based on the second to the 6th solid storage device of KV models, provide according to this hair Tenth solid storage device of bright second aspect, wherein data reception module are additionally operable to receive the first key assignments and second from host Data;Hash operation module is additionally operable to make Hash operation to the first key assignments, obtains the first cryptographic Hash;Physical address assignments module, It is additionally operable to distribute the second physical address and Data write. module for the first cryptographic Hash, is additionally operable to count the first key assignments and second Third data cell is corresponded to according to the second physical address of write-in;And flash memory transfer layer table update module, it is additionally operable to the first Hash Value, and update flash memory transfer layer table for the third physical address of its distribution.
According to the third aspect of the invention we, a kind of solid storage device according to a third aspect of the present invention is provided, this is solid State storage device includes host interface, NVM chips, control unit and DRAM, and control unit is for controlling in interface, NVM cores Data transmission between piece and DRAM, the control unit execute base according to the first aspect of the invention by executing program In the method described in the first to the tenth data access method of KV models.
According to the fourth aspect of the invention, a kind of solid storage device according to a fourth aspect of the present invention is provided, this is solid State storage device includes host interface, NVM chips, control unit and DRAM, control unit for control host interface, Data transmission between NVM chips and DRAM, the control unit, for receiving the first key assignments and the first data from host;It is right First key assignments makees Hash operation, obtains the first cryptographic Hash;The first physical address is distributed for the first cryptographic Hash;And by the first key assignments The first data cell corresponding with the first data the first physical address of write-in.
According to the fifth aspect of the invention, the first data based on KV models provided according to a fifth aspect of the present invention are visited Ask that method, this method include:The second key (Key) value and the second data (Value) are received from host;Hash fortune is made to the second key assignments It calculates, obtains the second cryptographic Hash;If first cryptographic Hash equal with the second cryptographic Hash has been recorded in flash memory transfer layer table, from flash memory The first physical address corresponding with the first cryptographic Hash is obtained in transfer layer table;The second physical address is distributed for the second cryptographic Hash;From First physical address reads the first key assignments and the first data;By the second key assignments and the second data, the first key assignments, the write-in of the first data The second data cell indicated by second physical address.
The first data access method based on KV models according to the fifth aspect of the invention is provided according to the present invention the The second data access method based on KV models of five aspects further includes updating the second cryptographic Hash and the second physical address to sudden strain of a muscle Deposit transfer layer table.
The first or second data access method based on KV models according to the fifth aspect of the invention is provided according to this The first key assignments is written in second data cell in the third data access method based on KV models for inventing the 5th aspect With initial address of first data in second data cell and/or length and the second key assignments and the second data in institute State the initial address and/or length in the second data cell.
First based on KV models according to the fifth aspect of the invention provides to third data access method according to this The 4th data access method based on KV models for inventing the 5th aspect, if second data cell can not accommodate described first Key assignments and first data, second key assignments and second data, the second data cell and with the second data sheet First key assignments and first data, institute is written in continuous one or more third data cell on physical address in member State the second key assignments and second data.
The 4th data access method based on KV models according to the fifth aspect of the invention is provided according to the present invention the The 5th data access method based on KV models of five aspects, the key assignments are written into identical data cell with the data, Or it is written into different data cells.
The first to the 5th data access method based on KV models according to the fifth aspect of the invention is provided according to this The 6th data access method based on KV models of the 5th aspect is invented, is also started and continuous multiple numbers in the second physical address According to the conflicting information that the first key assignments and the second key assignments are written in unit.
The first to the 6th data access method based on KV models according to the fifth aspect of the invention is provided according to this The 7th data access method based on KV models for inventing the 5th aspect further includes receiving third key assignments from host;To third key Value makees Hash operation, obtains third cryptographic Hash;Flash memory transfer layer table is retrieved;If recorded in flash memory transfer layer table with The first equal cryptographic Hash of third cryptographic Hash obtains the second physical address corresponding to the first cryptographic Hash;Physically based on second Location obtains the first key assignments and the second key assignments, and it is compared with the third key assignments that host receives;And if the second key assignments with Third key assignments is equal, obtains the second data;And the second data are sent to host.
The 5th data access method based on KV models according to the fifth aspect of the invention is provided according to the present invention the Five aspects are respectively written into based on the 8th data access method of KV models in described identical or different data cell The initial address and/or length of the key assignments and the data in described identical or different data cell.
The 8th data access method based on KV models according to the fifth aspect of the invention is provided according to the present invention the Five aspect the 9th data access method based on KV models, further include:Third key assignments is received from host;Third key assignments is breathed out Uncommon operation, obtains third cryptographic Hash;Flash memory transfer layer table is retrieved;If recorded in flash memory transfer layer table and third The first equal cryptographic Hash of cryptographic Hash;Obtain the second physical address corresponding to the first cryptographic Hash;It is obtained according to the second physical address The first key assignments is taken, if the first key assignments and third key assignments are unequal, according to the second physical address and the first key assignments and the first data Length, obtain the second key assignments, if the second key assignments is equal with third key assignments, corresponding with the second key assignments the second data of acquisition;With And the second data are sent to host.
According to the sixth aspect of the invention, the first solid-state based on KV models provided according to a sixth aspect of the present invention is deposited Store up equipment, the solid storage device include data reception module, Hash operation module, retrieval module, physical address assignments module, Data acquisition module and Data write. module, wherein data reception module, for receiving the second key assignments and the second number from host According to;Hash operation module obtains the second cryptographic Hash for making Hash operation to the second key assignments;Module is retrieved, for turning to flash memory It moves layer table to be retrieved, the first physical address corresponding with the first cryptographic Hash is obtained from flash memory transfer layer table;Physical address point With module, for distributing the second physical address for the second cryptographic Hash;Data acquisition module, for reading the from the first physical address One key assignments and the first data;Data write. module, for the second key assignments and the second data, the first key assignments, the first data to be written The second data cell indicated by second physical address.
The first solid storage device based on KV models according to the sixth aspect of the invention is provided according to the present invention the Second solid storage device of six aspects, further includes flash memory transfer layer table update module, is used for the second cryptographic Hash and the second object Address update is managed to flash memory transfer layer table.
The first or second solid storage device based on KV models according to the sixth aspect of the invention is provided according to this The third solid storage device of the 6th aspect, wherein Data write. module are invented, is additionally operable to write in second data cell Enter the initial address and/or length and the second key assignments and of the first key assignments and the first data in second data cell Initial address and/or length of two data in second data cell.
First based on KV models according to the sixth aspect of the invention provides to third solid storage device according to this The 4th solid storage device of the 6th aspect, wherein Data write. module are invented, it can not if being additionally operable to second data cell Accommodate first key assignments and first data, second key assignments and second data, in the second data cell and First key assignments and institute is written in continuous one or more third data cell on physical address with the second data cell State the first data, second key assignments and second data.
The 4th solid storage device based on KV models according to the sixth aspect of the invention is provided according to the present invention the 5th solid storage device of six aspects, wherein Data write. module, are additionally operable to the key assignments is identical as the data write-in Data cell or different data cells.
The first to the 5th solid storage device based on KV models according to the sixth aspect of the invention is provided according to this The 6th solid storage device of the 6th aspect, wherein Data write. module are invented, be additionally operable to start in the second physical address and is connected The conflicting information of the first key assignments and the second key assignments is written in continuous multiple data cells.
The second to the 6th solid storage device based on KV models according to the sixth aspect of the invention is provided according to this The 7th solid storage device for inventing the 6th aspect, further includes comparison module, wherein data reception module, is additionally operable to connect from host Receive third key assignments;Hash operation module is additionally operable to make Hash operation to third key assignments, obtains third cryptographic Hash;Module is retrieved, also For being retrieved to flash memory transfer layer table, the second physical address corresponding to the first cryptographic Hash is obtained;Comparison module is used for base The first key assignments and the second key assignments are obtained in the second physical address, and it is compared with the third key assignments that host receives;Data Read module obtains the second data if it is equal with third key assignments to be additionally operable to the second key assignments;And the second data are sent to master Machine.
The 7th solid storage device based on KV models according to the sixth aspect of the invention is provided according to the present invention the 8th solid storage device of six aspects, wherein Data write. module, are additionally operable in described identical or different data cell In, it is respectively written into the initial address and/or length of the key assignments and the data in described identical or different data cell Degree.
The 8th solid storage device based on KV models according to the sixth aspect of the invention is provided according to the present invention the 9th solid storage device of six aspects, wherein data reception module are additionally operable to receive third key assignments from host;Hash operation mould Block is additionally operable to make Hash operation to third key assignments, obtains third cryptographic Hash;Retrieve module, be additionally operable to flash memory transfer layer table into Row retrieval, obtains the second physical address corresponding to the first cryptographic Hash equal with third cryptographic Hash;Comparison module is additionally operable to foundation Second physical address obtains the first key assignments;And if the first key assignments and third key assignments it is unequal, according to the second physical address and The length of first key assignments and the first data obtains the second key assignments;Data read module, if being additionally operable to the second key assignments and third key assignments It is equal, obtain the second data corresponding with the second key assignments;And the second data are sent to host.
According to the seventh aspect of the invention, a kind of solid storage device according to a seventh aspect of the present invention is provided, this is solid State storage device includes host interface, NVM chips, control unit and DRAM, control unit for control host interface, Data transmission between NVM chips and DRAM, the controller part execute the according to the present invention 5th by executing program Method described in the first to the 9th data access method based on KV models of aspect.
According to the eighth aspect of the invention, a kind of solid storage device according to a eighth aspect of the present invention is provided, this is solid State storage device includes host interface, NVM chips, control unit and DRAM, control unit for control host interface, Data transmission between NVM chips and DRAM, the controller part are used for, and the second key assignments and the second data are received from host; Hash operation is made to the second key assignments, obtains the second cryptographic Hash;If having been recorded in flash memory transfer layer table equal with the second cryptographic Hash The first cryptographic Hash, corresponding with the first cryptographic Hash the first physical address is obtained from flash memory transfer layer table;For the second cryptographic Hash Distribute the second physical address;The first key assignments and the first data are read from the first physical address;By the second key assignments and the second data, The second data cell indicated by the second physical address is written in one key assignments, the first data.
According to the ninth aspect of the invention, the first data based on KV models provided according to a ninth aspect of the present invention are visited Ask that method, this method include:The first key (Key) value and the first data (Value) are received from host;It obtains corresponding with the first data NameSpace;Hash operation is made to the first key assignments, obtains the first cryptographic Hash;The first physical address is distributed for the first cryptographic Hash; The first physical address institute is written in first key assignments and the first data by the data cell that specified quantity is determined based on the NameSpace The data cell of the specified quantity of instruction.
The first data access method based on KV models according to the ninth aspect of the invention is provided according to the present invention the The second data access method based on KV models of nine aspects, wherein receiving NameSpace mark corresponding with the first data from host Know, and identifies according to NameSpace to obtain NameSpace corresponding with the first data.
The first data access method based on KV models according to the ninth aspect of the invention is provided according to the present invention the The third data access method based on KV models of nine aspects obtains and the according to the length of the first data received from host The corresponding NameSpace of one data.
The third data access method based on KV models according to the ninth aspect of the invention is provided according to the present invention the Nine aspect the 4th data access method based on KV models, according to the first data length residing for length range, obtain with The corresponding NameSpace of first data.
First to fourth data access method based on KV models according to the ninth aspect of the invention is provided according to this The 5th data access method based on KV models for inventing the 9th aspect, when the length of the first data is less than the specified quantity When the size of data cell, filler fills up the data cell of specified quantity according to this.
The first to the 5th data access method based on KV models according to the ninth aspect of the invention is provided according to this The 6th data access method based on KV models for inventing the 9th aspect by the first cryptographic Hash and is the of the distribution of the first cryptographic Hash Flash memory transfer layer table is recorded in one physical address.
The first to the 5th data access method based on KV models according to the ninth aspect of the invention is provided according to this The 7th data access method based on KV models for inventing the 9th aspect, according to the NameSpace corresponding to the first data, by the One cryptographic Hash and the first physical address distributed for the first cryptographic Hash are recorded corresponding with NameSpace corresponding with the first data Flash memory transfer layer table in.
The first to the 7th data access method based on KV models according to the ninth aspect of the invention is provided according to this The 8th data access method based on KV models in terms of the 9th is invented, further includes:The second key assignments is received from host;To the second key Value makees Hash operation, obtains the second cryptographic Hash;The second cryptographic Hash is inquired from flash memory transfer layer table, is obtained as the second cryptographic Hash institute Second physical address of distribution;The second Data Concurrent, which is obtained, from second physical address gives host.
The 8th data access method based on KV models according to the ninth aspect of the invention is provided according to the present invention the The 9th data access method based on KV models of nine aspects is visited wherein according to the instruction to NameSpace received from host The corresponding flash memory transfer layer table of the NameSpace being instructed to is asked to obtain with corresponding second cryptographic Hash of the second key assignments.
The 8th data access method based on KV models according to the ninth aspect of the invention is provided according to the present invention the The tenth data access method based on KV models of nine aspects, wherein multiple flash memory transfer layers of the corresponding different NameSpaces of search Table, to obtain with corresponding second cryptographic Hash of the second key assignments.
The first to the tenth data access method based on KV models according to the ninth aspect of the invention is provided according to this The 11st data access method based on KV models in terms of the 9th is invented, further includes:The length of first data is written first Data cell indicated by physical address.
The 11st data access method based on KV models according to the ninth aspect of the invention, provides according to the present invention 9th aspect the 12nd data access method based on KV models, further include:Third key assignments is received from host;To third key assignments Make Hash operation, obtains third cryptographic Hash;Third cryptographic Hash is inquired from flash memory transfer layer table, is obtained by third cryptographic Hash point The third physical address matched;Data cell indicated by the third physical address obtains the length of third data, and according to institute The length of acquisition reads third data;And third data are sent to host.
According to the tenth aspect of the invention, the first solid storage device according to a tenth aspect of the present invention is provided, this is solid State storage device includes:Data reception module, NameSpace acquisition module, Hash operation module, physical address assignments module and Data write. module, wherein data reception module, for receiving the first key assignments and the first data from host;NameSpace obtains Module, for obtaining NameSpace corresponding with the first data;Hash operation module, for making Hash operation to the first key assignments, Obtain the first cryptographic Hash;Physical address assignments module, for distributing the first physical address for the first cryptographic Hash;Mould is written in data The first object is written in first key assignments and the first data by block, the data cell for determining specified quantity based on the NameSpace Manage the data cell of the specified quantity indicated by address.
The first solid storage device according to the tenth aspect of the invention, provides second according to a tenth aspect of the present invention Solid storage device, wherein NameSpace acquisition module, for receiving NameSpace mark corresponding with the first data from host, And it identifies to obtain NameSpace corresponding with the first data according to NameSpace.
The first solid storage device according to the tenth aspect of the invention, provides third according to a tenth aspect of the present invention Solid storage device, wherein NameSpace acquisition module, are additionally operable to according to the length of the first data received from host, obtain and The corresponding NameSpace of first data.
Third solid storage device according to the tenth aspect of the invention, provides the 4th according to a tenth aspect of the present invention Solid storage device, wherein NameSpace acquisition module are additionally operable to the length range residing for the length according to the first data, obtain NameSpace corresponding with the first data.
First to fourth solid storage device according to the tenth aspect of the invention, provides according to a tenth aspect of the present invention The 5th solid storage device, further include database population module, be less than the specified quantity for the length when the first data When the size of data cell, filler will be filled with the data cell of specified quantity according to this.
The first to the 5th solid storage device according to the tenth aspect of the invention, provides according to a tenth aspect of the present invention The 6th solid storage device, further include flash memory transfer layer table update module, for by the first cryptographic Hash and be the first cryptographic Hash Flash memory transfer layer table is recorded in first physical address of distribution.
The first to the 6th solid storage device according to the tenth aspect of the invention, provides according to a tenth aspect of the present invention The 7th solid storage device, flash memory transfer layer table update module is additionally operable to according to the NameSpace corresponding to the first data, will The corresponding NameSpace pair with the first data is recorded in first cryptographic Hash and the first physical address distributed for the first cryptographic Hash In the flash memory transfer layer table answered.
The first to the 7th solid storage device according to the tenth aspect of the invention, provides according to a tenth aspect of the present invention The 8th solid storage device, further include data read module and retrieval module, wherein data reception module is additionally operable to from host Receive the second key assignments;Hash operation module is additionally operable to make Hash operation to the second key assignments, obtains the second cryptographic Hash;Module is retrieved, For inquiring the second cryptographic Hash from flash memory transfer layer table, the second physical address distributed by the second cryptographic Hash is obtained;Data Read module gives host for obtaining the second Data Concurrent from second physical address.
The 8th solid storage device according to the tenth aspect of the invention, provides the 9th according to a tenth aspect of the present invention Solid storage device further includes cryptographic Hash acquisition module, for according to the instruction to NameSpace received from host, accessing quilt The corresponding flash memory transfer layer table of NameSpace of instruction is to obtain with corresponding second cryptographic Hash of the second key assignments.
The 9th solid storage device according to the tenth aspect of the invention, provides the tenth according to a tenth aspect of the present invention Solid storage device, wherein cryptographic Hash acquisition module are additionally operable to multiple flash memory transfer layer tables of the corresponding different NameSpaces of search, To obtain with corresponding second cryptographic Hash of the second key assignments.
The first to the tenth solid storage device according to the tenth aspect of the invention, provides according to a tenth aspect of the present invention The 11st solid storage device, wherein Data write. module is additionally operable to the length of the first data the first physical address is written Indicated data cell.
The 11st solid storage device according to the tenth aspect of the invention provides according to a tenth aspect of the present invention 12 solid storage devices, wherein data reception module are additionally operable to receive third key assignments from host;Hash operation module, is also used In making Hash operation to third key assignments, third cryptographic Hash is obtained;Module is retrieved, is additionally operable to inquire third from flash memory transfer layer table Cryptographic Hash obtains the third physical address distributed by third cryptographic Hash;Data acquisition module is additionally operable to from third physical address Indicated data cell obtains the length of third data, and reads third data according to acquired length;And by Three data are sent to host.
According to the eleventh aspect of the invention, a kind of solid storage device according to the tenth one side of the invention is provided, The solid storage device includes host interface, NVM chips, control unit and DRAM, and control unit connects for controlling in host Data transmission between mouth, NVM chips and DRAM, the controller part are executed by executing program according to the present invention the 9th Method described in the first to the 12nd data access method based on KV models of aspect.
According to the twelfth aspect of the invention, a kind of solid-state storage provided according to the twelfth aspect of the invention is set Standby, which includes host interface, NVM chips, control unit and DRAM, and control unit is for controlling in host Data transmission between interface, NVM chips and DRAM, the controller part are used for, and the first key assignments and first is received from host Data;Obtain NameSpace corresponding with the first data;Hash operation is made to the first key assignments, obtains the first cryptographic Hash;It is first Cryptographic Hash distributes the first physical address;The data cell that specified quantity is determined based on the NameSpace, by the first key assignments and The data cell of the specified quantity indicated by the first physical address is written in one data.
According to the thirteenth aspect of the invention, the first number based on KV models according to the 13rd aspect of the present invention is provided According to access method, this method includes:The first key assignments is received from host, Hash operation is made to the first key assignments, obtains the first cryptographic Hash; The first cryptographic Hash is inquired from flash memory transfer layer table, obtains the first physical address distributed by the first cryptographic Hash;From described One physical address obtains the first Data Concurrent and gives host.
The first data access method based on KV models according to the thirteenth aspect of the invention, it is proposed that according to the present invention The second data access method based on KV models of 13rd aspect, wherein according to the finger to NameSpace received from host Show, accesses the corresponding flash memory transfer layer table of the NameSpace being instructed to obtain with corresponding first cryptographic Hash of the first key assignments.
The first data access method based on KV models according to the thirteenth aspect of the invention, it is proposed that according to the present invention The third data access method based on KV models of 13rd aspect, wherein multiple flash memories of the corresponding different NameSpaces of search turn Layer table is moved, to obtain with corresponding first cryptographic Hash of the first key assignments.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, embodiment will be described below Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment for those of ordinary skill in the art without creative efforts, can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is the schematic diagram of solid storage device in the prior art;
Fig. 2 is the structural schematic diagram according to the FTL tables of the embodiment of the present invention;
Fig. 3 is the schematic diagram according to the data organization of the NVM of the embodiment of the present invention;
Fig. 4 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Fig. 5 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Fig. 6 is the structural schematic diagram according to the FTL tables of further embodiment of this invention;
Fig. 7 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Fig. 8 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Fig. 9 is the structural schematic diagram according to the FTL tables of further embodiment of this invention;
Figure 10 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Figure 11 is the structural schematic diagram according to the FTL tables of further embodiment of this invention;
Figure 12 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Figure 13 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Figure 14 is the structural schematic diagram according to the FTL tables of further embodiment of this invention;
Figure 15 is the schematic diagram according to the data organization of the NVM of further embodiment of this invention;
Figure 16 is the structural schematic diagram according to the FTL tables of further embodiment of this invention;
Figure 17 is the block diagram according to the solid storage device with multiple NameSpaces of the embodiment of the present invention;
Figure 18 is the structural schematic diagram according to the FTL tables of further embodiment of this invention;
Figure 19 is the structural schematic diagram according to the FTL tables of further embodiment of this invention;And
Figure 20 is the structural schematic diagram according to the FTL tables of further embodiment of this invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
In the solid storage device for supporting Key-Value (key-data, also referred to as " KV ") storage model, to execute Write operation, host provides key (Key) and data (Value) to solid storage device, to write data into solid storage device, and Using key as the index for the data being written.To execute read operation, host provides key, solid storage device to solid storage device Data are found according to key, and serve data to host.Thus in KV storage systems, key is the index for accessing data, And data (Value) are accessed data.Usually, the length of key and data is not fixed length.And optionally, in order to drop The length of low-complexity, key and/or data can have specified range.
Fig. 2 is the structural schematic diagram according to the FTL tables of the embodiment of the present invention.FTL tables offer shown in Fig. 2 is obtained from by key Mapping of the cryptographic Hash arrived to physical address (for example, PPA, Physical Page Address, physical page address).For example, The mapping relations of the cryptographic Hash and physical address that are obtained by key are recorded in FTL tables.And optionally, in addition to physical page address, FTL The physical address recorded in table can be the initial address of the data frame (Data frame) inside Physical Page.Data frame is that have The data cell of fixed size, Physical Page may include one or more data frames.
In an embodiment in accordance with the invention, the key length that host provides is indefinite, and the length of data is also indefinite.It will not The key of fixed length carries out Hash operation, obtains the cryptographic Hash (for example, 4 bytes/8 byte) of fixed length, the index as FTL tables.With Kazakhstan Uncommon value is used as search index FTL tables, obtains corresponding physical address.FTL tables can be by a variety of data knots such as array, chained list, tree Structure is realized.
Embodiment one
Fig. 3 illustrates the data organization of the NVM of the embodiment of the present invention.Illustrate the NVM's that physical address is PPA in Fig. 3 Physical Page (or data frame), wherein PPA indicates Physical Page (or data frame) address of NVM, indicated by physical address PPA Key Key and data Value are had recorded in Physical Page (or data frame), key Key and data Value is provided when being host write-in data Key Key and data Value.It is also recorded for a data in by the Physical Page (or data frame) indicated by physical address PPA Header, head data Header are used to indicate the initial address and/or length of key Key and/or data Value.For example, head data Header has recorded the length of key Key and the length (and the length of the parts Header is definite value) of data Value, according to PPA institutes The physical address of instruction and the length of the parts Header can calculate the initial address of key Key and the initial address of Value.One In a example, the length of head data Header record keys Key, the length of physical address and the parts Header indicated by PPA The length of degree and key Key can calculate the initial address of data Value.And in another example, the starting of key Key Address is fixed, the initial address of head data Header record data Value.
Since key Key and data Value are random lengths, head data Header, key Key and data in some cases The summation of the length of Value is not enough to fill up the Physical Page (or data frame) of NVM, then it is described to fill up to fill data (dummy) Physical Page (or data frame).
Embodiment two
Fig. 4 illustrates the data organization of the NVM according to further embodiment of this invention.Fig. 4 illustrate physical address be PPA and The Physical Page (or data frame) of PPA+1, wherein PPA indicate that Physical Page (or data frame) address of NVM, PPA+1 instructions exist with PPA Continuous Physical Page (or data frame) address on physical address, the key that key Key and data Value is provided when being host write-in data Key and data Value.The data that key Key is provided with host are had recorded in by the Physical Page (or data frame) indicated by PPA The part of Value has recorded the remaining of the data Value of host offer in by the Physical Page (or data frame) indicated by PPA+1 Lower part.It is also recorded for a data Header in by the Physical Page (or data frame) indicated by PPA and PPA+1, for referring to Show the initial address and/or length in the Physical Page (or data frame) of key Key and data Value indicated by PPA and PPA+1 Degree.Optionally, (in Fig. 4, which is the quantity of Physical Page (or data frame) occupied by also being recorded in head data Header 2)。
In the embodiment according to Fig. 4, the length for the data Value that host is written into NVM is more than what 1 PPA was indicated Data unit size, i.e. data cell indicated by PPA can not accommodate data Value, use with the PPA physical address indicated and are Two or more continuous data cells of initial address and physical address are (referring to Fig. 4, with by continuous the two of PPA and PPA+1 instructions A data cell) key Key and the data Value of host offer are provided, wherein data cell corresponds to the physics indicated by PPA Page (or data frame).Further, it is also stored with a data Header in two or more data cells indicated by PPA, It is used to indicate the initial address and/or length of key Key and data Value.Optionally, still referring to Fig. 4, in head data Header And the curtailment of key Key and data Value that provides of host to fill up the data cell indicated by PPA+1 when, filler According to (Dummy) to fill up the data cell indicated by PPA+1.
According to still another embodiment of the invention, data are written to NVM in host.Host sends out write-in data to NVM Order.NVM receives the order of write-in data from host, the data Valuel to be written is indicated in order and for indexing The key Key1 of data Value1.In response to receiving the order of write-in data, NVM carries out Hash operation to key Key1, obtains Hash Value H1.And NVM is cryptographic Hash H1 allocated physical address PPA1, and by cryptographic Hash H1 and be the physical address of cryptographic Hash H1 distribution PPA1 is recorded in FTL tables.Next, data Value is written to the data cell indicated by PPA1 in NVM.
Optionally, length of the NVM also according to key Key1 and data Valuel, determines data cell quantity n to be used.With And it according to data cell quantity n, is write since continuous n data cell (PPA1, PPA1+1, PPA1+2...) PPA1 Enter key Key1 and data Value1 and head data Header, wherein head data Header is used to indicate key Key1 and data Initial addresses and/or length of the Value1 in n data cell (PPA1, PPA1+1, PPA1+2...) to be used.
According to still another embodiment of the invention, host reads data from NVM.Host sends out reading data to NVM Order.NVM receives the order for reading data from host, is indicated in order corresponding to target data Value1 to be read Index key Key1.The order of data is read in response to receiving, NVM carries out Hash operation to key Key1, obtains cryptographic Hash H1.It connects down Come, NVM inquires FTL tables according to cryptographic Hash H1, obtains the physical address PPA1 for cryptographic Hash H1 distribution.And NVM is from physically Value1 is read in data cell corresponding to the PPA1 of location and is supplied to host.Optionally, NVM is indicated by the physical address PPA1 Data cell in playback head data Header, and from the beginning data Header obtains the storage address of data Valuel.And NVM reads data Valuel from the storage address of data Valuel, and is supplied to host.
Optionally, NVM also from the beginning data Header obtain the storage address of key Key1 and length and read key Key1, and Whether comparison key Key1 and the Key1 that host provides are identical.What if the key Key1 that from the beginning data Header is read was provided with host Key1 is identical, then continues to obtain the storage address of data Value1 and read data Value1, and by the data Value1 It is supplied to host.
According to another embodiment of the invention, host is updated the data to NVM.Host sends out to NVM and updates the data Order.NVM receives the order updated the data from host, and data Value2 to be updated is indicated in order and is used for index number According to the key Key1 of Value2, the data Value1 by Key1 indexes is stored in wherein NVM, data Value1 is stored in With in the physical address PPA1 corresponding to key Key1.In response to receiving the order updated the data, NVM carries out Hash fortune to key Key1 It calculates, obtains cryptographic Hash H1.And NVM is cryptographic Hash H1 allocated physical address PPA2.NVM searches cryptographic Hash H1 also from FTL tables With the record position of physical address PPA1, and FTL tables are updated according to newly assigned physical address PPA2, use physical address PPA2 updates PPA1.
Optionally, length of the NVM also according to key Key1 and data Value2, determines data cell quantity n to be used.With And according to data cell quantity n, since physical address PPA2 and continuous n data cell (PPA2, PPA2+1, PPA2+ 2... record key Key1 and data Value2 and head data Header in), wherein head data Header is for recording key Key1 With initial addresses and/or length of the data Value2 in n data cell (PPA2, PPA2+1, PPA2+2...).
Embodiment three (solution of Hash (Hash) conflict)
Hash-collision may occur when doing Hash to key.Hash-collision refers to the different key assignments sent to host, passes through Hash Identical cryptographic Hash can be obtained in operation.In an embodiment according to the present invention, there will be identical Hash when solving hash-collision Two or more sets keys and the data of value are stored together.
Fig. 5 illustrates that according to the ... of the embodiment of the present invention there are the data organizations of NVM when hash-collision.It is illustrated in Fig. 5 Physical address is the Physical Page (or data frame) of PPA and PPA+1, and wherein PPA indicates Physical Page (or data frame) address of NVM, PPA+1 is indicated and continuous Physical Page (or data frame) addresses on physical address PPA.By indicated by PPA Physical Page (or Data frame) in have recorded host offer key Key1 and data Valuel, by the Physical Page (or data frame) indicated by PPA+1 In have recorded host offer key Key2 and data Value2.By the Physical Page (or data frame) indicated by PPA and PPA+1 In be also stored with data head Header, be used to indicate the starting point of key Key1, data Value1, key Key2 and data Value2 Location and/or length.Although the physics of Physical Page (or data frame) and PPA+1 instructions indicated by PPA1 is shown in FIG. 5 A data Header is all stored in page (or data frame), this is not required.Optionally, though there are if hash-collision only Storage head data Header in the Physical Page indicated by PPA (or data frame).(phase is stored in each Physical Page (or data frame) With) head data Header, can be from other when one or more head data Header break down for improving reliability Head data Header identifies the position of each key Key and data Value storages.
Although in Figure 5, key Key1 and data Value1 is located in the Physical Page (or data frame) indicated by PPA, and key Key2 and data Value2 is located in the Physical Page (or data frame) indicated by PPA+1, this is still not required.PPA and PPA Physical Page (or data frame) indicated by+1 provides continuous memory space, in the Coutinuous store space provided, can connect Multigroup key Key and data Value is stored continuously (for example, multiple key Key and data Value can also appear in identical physics In page (or data frame)), and record in head data Header the initial address and/or length of each key Key and data Value Degree.
The process of processing hash-collision according to embodiments of the present invention is described below.
Example IV (solution of Hash (Hash) conflict)
Fig. 6 is the FTL tables according to further embodiment of this invention.Referring to Fig. 6, host write key Key1 sum numbers into NVM According to Value1, key Key1 is used for index data Value1, and the Hash result of key Key1 is cryptographic Hash H1, cryptographic Hash H1 and to breathe out The physical address PPA1 of uncommon value H1 distribution is recorded in FTL tables.And referring to Fig. 7, using by continuous physical address PPA1 And two data cells storage key Key1 and data Value1 of PPA+1 instructions.
According to an embodiment of the present application four, host distinguishes the order of the order and write-in data that update the data.Update Data Value of the order of data for keeping already present key Key indexes new, and the order of data is written for being written by new The corresponding data Value of key Key indexes.Thus in the order of processing write-in data, the index of the key Key in order be It was not recorded in FTL tables.
As an example, host is updated the data to NVM, by key Key1 updates to for index data Value2.Host to NVM sends out the order updated the data.NVM receives the order updated the data from host, and data to be updated are indicated in order Value2 and key Key1 for index data Value2.In response to receiving the order updated the data, NVM carries out key Key1 Hash operation obtains cryptographic Hash H1.Then NVM by inquire FTL tables obtain the corresponding physical address PPA1 of cryptographic Hash H1 (referring to Fig. 6),
Since what is received is the order updated the data, NVM is that cryptographic Hash H1 distributes new physical address PPA2.Then, join See Fig. 8, NVM write key Key1 and data Value2 into the Physical Page (or data frame) indicated by PPA2, and in head data The initial address and/or length of key Key1 and data Value2 are recorded in Header.And record and cryptographic Hash H1 in FTL tables Corresponding physical address is PPA2 (referring to Fig. 9).
Next, data are written to NVM in host.Host sends out the order of write-in data to NVM.NVM writes from host reception Enter the order of data, the write-in data Value3 and key Key3 for index data Value3 is indicated in order.In response to The order of write-in data is received, NVM carries out Hash operation to key Key3, obtains cryptographic Hash H1.Then NVM inquires FTL tables, It is found in FTL tables and has recorded the cryptographic Hash H1 and physical address PPA2 (referring to Fig. 9) for cryptographic Hash H1 distribution, to find There are hash-collision (cryptographic Hash H1 having the same) with key Key1 by key Key3.
In response to key Key3 and key Key1 there are hash-collision, NVM is new physically for cryptographic Hash H1 distribution in FTL tables Location PPA3.Then NVM reading key Keyl and data Value2 from physical address PPA2 (referring to Fig. 8).And referring to Figure 10, Continuous multiple data cells that NVM starts in the new physics address PPA3 of distribution (are shown as in Figure 10 by PPA3 and PPA3+1 Indicated data cell) in be written Key1, Value2, Key3 and Value3.Optionally, NVM is also in write-in data cell Of the presence of record hash-collision and Key1, Value2, Key3 and Value3 in one or more head data Header Beginning address and/or length.And it is PPA3 that physical address corresponding with cryptographic Hash H1 is recorded in FTL tables.
As another example, next, host sends out the order for reading data to NVM.NVM is received from host and is read number According to order, read the index key Key3 indicated in the order of data corresponding to target data Value3 to be read.Response In receiving the order for reading data, NVM carries out Hash operation to key Key3, obtains cryptographic Hash H1.Then NVM is by inquiring FTL Table, it is PPA3 to find physical address corresponding with cryptographic Hash H1.
Head data are obtained in response to finding the data cell of physical address PPA3, NVM indicated by the physical address PPA3 Header then obtains the storage address of key from Header and obtains key Key1.Comparison key Keyl and the life from reading data The key Key3 obtained in order has found that the key Key1 read from physical address PPA3 is not equal to the host key Key3 to be read, then it represents that There are hash-collisions.And continues to obtain the storage address of next key from Header and obtain key key3.Due to acquisition Key Key3 is equal to the host key Key3 to be read, then reads data Value3 corresponding with key Key3, and be supplied to host.
Embodiment five (solution of Hash (Hash) conflict)
According to an embodiment of the present application five, host does not differentiate between the order of the order and write-in data that update the data.Cause And in the order of processing write-in data, if the cryptographic Hash of the key in order exists in FTL tables, or show that host is wished It updates the data, or shows the key there are hash-collisions with the already existing key of FTL tables.It to update the data or be written for identification With the data that new key is index, need to read stored key from NVM.If the key that host provides and the key read from NVM It is identical, indicate that host wishes to update the data;If the key that host provides is different from the key read from NVM, indicate that host wishes to write to With the data that new key is index.
Figure 11 is the FTL tables according to the embodiment of the present invention five.Referring to Figure 11, host be written into NVM Key4 and Value4, Key4 are H4 for the Hash result of index data Value4, Key4, cryptographic Hash H4 and be cryptographic Hash H4 distribution Physical address PPA4 is recorded in FTL tables.And referring to Figure 12, using by physical address PPA4 and continuous PPA4+1 instructions Two data cells store Key4 and Value4.
As an example, data are written to NVM in host.Host sends out the order of write-in data to NVM.NVM is received from host The order that data are written is written in the order of data and indicates write-in data Value5 and the key for index data Value5 Key5.In response to receiving the order of write-in data, NVM carries out Hash operation to key Key5, obtains cryptographic Hash H4.Then NVM from It is found in FTL tables and has recorded the cryptographic Hash H4 and physical address PPA4 for cryptographic Hash H4 distribution (referring to Figure 11).This fashion It is Value5 that can not determine that host wishes to update by the data of key Key5 indexes, it is desirable to which write-in is by the new of key Key5 indexes Data Value5.
To determine that the purpose of host, data cells of the NVM indicated by the physical address PPA4 obtain head data Header, connect It and obtains the storage address of key from Header and obtain key Key4.The order of comparison key Key4 and the write-in data received from host The key Key5 of middle acquisition has found that the key Key4 read from physical address PPA4 is not equal to the key Key5 of host, then it represents that host is not The data that update is indexed by key Key5 (because key Key5 is not present in NVM) are desirable to, but are wished to write to by key Key5 The new data Value5 indexed.If it should be understood that physical address PPA4 (or PPA4 start it is continuous it is multiple physically Location) multigroup key/data are stored, it needs to read each key stored, and the write order that the key of reading is provided with host In key Key5 be compared.If same without storage in physical address PPA4 (or PPA4 start continuous multiple physical address) The identical keys of key Key5 for the write order that host provides, show that host is wished to write to by the new data of key Key5 indexes Value5;If store that same host provides in physical address PPA4 (or PPA4 start continuous multiple physical address) writes life The identical keys of key Key5 of order show that host wishes to update by the data of key Key5 indexes.
With continued reference to Figure 12, the key read from physical address PPA4 is Key4, is different from the key Key5 that host provides, to Determine that host is wished to write to by the new data Value5 of key Key5 indexes.In response, from physical address PPA4 reading keys with Data combine the key of reading (for example, additional) with data with the key Key5 that host to be written with data Value5, and will combination Result the data cell indicated by newly assigned physical address is written.
For example, NVM, which is cryptographic Hash H4, distributes new physical address PPA5.Then NVM is from physical address PPA4 and PPA4+1 Reading key Key4 and data Value4 in (referring to Figure 12).And start in the new physics address PPA5 of distribution referring to Figure 13, NVM Continuous two data cells (PPA5 and PPA5+1) in write key Key4 and key Value4;And in continuous third data Write key Key5 and data Value5 in unit (PPA5+2).Optionally, NVM recorded also in head data Header key Key4, The initial address and/or length of data Value4, key Key5 and data Value5.And record and cryptographic Hash H4 in FTL tables Corresponding physical address is PPA5 (referring to Figure 14).It is to be appreciated that the cryptographic Hash of key Key4 and key Key5 is H4.Still may be used To understand ground, from physical address PPA4 and PPA4+1 (referring to Figure 12) when reading key Key4 and data Value4, if wherein wrapping Filling data (Dummy) are included, Dummy data can be deleted and add key Key5 and data Value5 after data Value4. And if the size of the filling data stored in physical address PPA4 and PPA4+1 can accommodate key Key5 and data Value5, can be Write key Key4 and key in continuous two data cells (PPA5 and PPA5+1) that the new physics address PPA5 of distribution starts Value4 and key Key5 and data Value5.
As another example, next, host sends out the order for reading data to NVM.NVM is received from host and is read number According to order, read the index key Key5 indicated in the order of data corresponding to target data Value5 to be read.Response In receiving the order for reading data, NVM carries out Hash operation to key Key5, obtains cryptographic Hash H4.Then NVM is by inquiring FTL Table finds physical address PPA5 corresponding with cryptographic Hash H4 (referring to Figure 14).
Head data are obtained in response to finding the data cell of physical address PPA5, NVM indicated by the physical address PPA5 Header then obtains the storage address of key from Header and obtains key Key4.Comparison key Key4 and the order from reading data The key Key5 of middle acquisition has found that the key Key4 read from physical address PPA5 is not equal to the host key Key5 to be read, then it represents that deposit In hash-collision, continues to obtain the storage address of next key from Header and obtain key Key5.Due to the key Key5 of acquisition Equal to the host key Key5 to be read, then data Value5 corresponding with key Key5 is read, and be supplied to host.
Optionally, it is not equal to the host key Key5 to be read in response to the key Key4 read from physical address PPA5, that is, indicates There are hash-collisions, continue the length for obtaining key Key4 and data Value4 from Header, and according to key Key4 and data The length determination key Key4 of Value4 occupies 2 data cells with data Value4 (referring to Figure 13).Then since PPA5 The storage address of key Key5 is obtained in continuous third data cell (PPA5+2) and obtains key Key5.Due to the key of acquisition Key5 is equal to the host key Key5 to be read, then reads data Value5 corresponding with key Key5, and be supplied to host.
In another example, still referring to Figure 11 and Figure 12, Key4 and Value4, Key4 is written in host into NVM For index data Value4, the Hash result of Key4 is H4, cryptographic Hash H4 and the physical address for cryptographic Hash H4 distribution PPA4 is recorded in FTL tables.And it is deposited using two data cells indicated by physical address PPA4 and continuous PPA4+1 Store up Key4 and Value4.
Data are written to NVM in host.Host sends out the order of write-in data to NVM.NVM receives write-in data from host Order is written in the order of data and indicates the write-in data Value5 and key Key4 for index data Value5.Response In the order for receiving write-in data, NVM carries out Hash operation to key Key4, obtains cryptographic Hash H4.Then NVM is looked into from FTL tables To the physical address PPA4 for having recorded cryptographic Hash H4 and having been distributed for cryptographic Hash H4 (referring to Figure 11).Method there is no to determine master at this time It is Value5 that machine, which wishes to update by the data of key Key4 indexes, it is desirable to the new data by key Key4 indexes be written Value5。
To determine that the purpose of host, data cells of the NVM indicated by the physical address PPA4 obtain head data Header (ginsengs See Figure 12), then the storage address of key is obtained from Header and obtain key Key4.Comparison key Key4 and the write-in received from host The key Key4 obtained in the order of data has found that the key Key4 read from physical address PPA4 is equal to the key Key4 that host provides, Then indicate the data that host wishes that update is indexed by key Key4 (because key Key4 exists in NVM).
In response, NVM is that cryptographic Hash H4 distributes new physical address PPA51.Then, NVM is by key Key4 and data Value5 is written by the Physical Page (or data frame) (referring to Figure 15) indicated by physical address PPA51.And update FTL tables, It is PPA51 that the corresponding physical address of cryptographic Hash H4 is recorded in FTL tables (referring to Figure 16).
Embodiment six
In embodiment in front, solid storage device can support the key and/or data of random length.And according to this In the embodiment six of application, solid storage device supports the key and/or data of limited kind of length.Such as the data length of support has 2 kinds (512 bytes/4KB) or 4 kinds (512 bytes/1KB/4KB/16KB).And the key length that solid storage device is supported is It is limited, it is, for example, less than 1KB, or there is limited kind of length.
Figure 17 shows the solid storage device according to the ... of the embodiment of the present invention with multiple NameSpaces (Name Space) Block diagram.Different NameSpaces (NS1/NS2/NS3/NS4) shown in Figure 17 be used to carry the key with different length and/or The I/O command of data.According to one embodiment of present invention, the data of different length are sent to by host by I/O command Corresponding NameSpace.For example, I/O command of the host by data length no more than 512 bytes is sent to NameSpace NS1, will count Be in 512 bytes according to length and be sent to NameSpace NS2 to the I/O command between 1KB, by data length be in 1KB to 4KB it Between I/O command be sent to NameSpace NS3, the I/O command that data length is between 4KB to 16KB is sent to NameSpace NS4.Optionally, in one example, host uses privately owned order instruction order space.And in another example, host with The mode for meeting NVMe protocol commands describes NameSpace.
Optionally, instruction of the solid storage device also according to I/O command to NameSpace, the length of the determination data to be accessed Degree.For example, host indicates NameSpace NS1, indicate that the data length to be accessed is not more than 512 bytes;Host instruction name is empty Between NS2, mark the data length to be accessed be in 512 bytes between 1KB.And solid storage device does Hash fortune to key It calculates, obtains the cryptographic Hash (such as H6) of fixed length, the index as FTL tables.
With continued reference to Figure 17, the data unit size indicated by physical address in FTL tables is corresponding with the physical address Order space belonging to logical address is related.For example, the I/O command that host is sent out indicates NameSpace NS1, if I/O command is Read command, the logical address according to I/O command obtains corresponding physical address from FTL tables, and is obtained from the physical address of acquisition The data of 512 bytes are as the response to I/O command.Similarly, it if I/O command indicates NameSpace NS2, is obtained from through FTL tables The physical address taken obtains the data of 1KB bytes as the response to I/O command.
It is to be appreciated that in an embodiment according to the present invention, to be visited according to the NameSpace acquisition indicated by I/O command The length for the data asked, and the corresponding physical address of logical address from FTL tables acquisition I/O command.Obtain data length and object The sequence of reason address can change, or be carried out at the same time.
According to one embodiment of present invention, data are written to solid storage device in host.Host is to solid-state storage Equipment sends out the order of write-in data.Solid storage device receives the order of write-in data from host, is written in the order of data The data Value6 and key Key6 for index data Value6 is indicated, is written in the order of data and further indicates name sky Between NS1 (referring to Figure 17).
In response to receiving the order of write-in data, solid storage device determines data Value6's according to NameSpace NS1 Length is not more than 512 bytes.Next, solid storage device does Hash operation to key Key6, cryptographic Hash H6 is obtained, and is Hash Value H6 allocated physical address PPA6, and (ginseng is recorded in FTL tables by cryptographic Hash H6 and for the physical address PPA6 of H6 distribution See Figure 18).And data Value 6 is written by the data cell indicated by physical address PPA6 solid storage device.It is optional Ground, if 512 byte of curtailment of data Value 6, data cell filling of the solid storage device to write-in data Value 6 Data are to supply 512 bytes.
In another example, next, host continues to write to data to solid storage device.Host is set to solid-state storage Preparation goes out the order of data is written.Solid storage device receives the order of write-in data from host, and the order middle finger of data is written The data Value7 and key Key7 for index data Value7 is shown, has been written in the order of data and further indicates NameSpace NS2 (referring to Figure 15).
In response to receiving the order of write-in data, solid storage device determines the length of Value7 according to NameSpace NS2 No more than 1K bytes.Solid storage device does Hash operation to key Key7, obtains cryptographic Hash H7, and distribute physics for cryptographic Hash H7 Address PPA7, and be recorded in FTL tables (referring to figure by cryptographic Hash H7 and for the physical address PPA7 of cryptographic Hash H7 distribution 18).And the data cell indicated by physical address PPA7 is written in data Value7 by solid storage device.Optionally, if number According to the curtailment 1KB of Value7, solid storage device is supplied according to this to the data cell filler for Value7 to be written 1KB。
Optionally, key is also recorded in association with physical address PPA6 and PPA7 in the storage medium of solid storage device Key6 and key Key7, and record the length of data Value6 and data Value7.
One of ordinary skill in the art will realize when hash-collision (about key) occurs, and can be used real according to the application The scheme that example three, example IV and/or embodiment five are provided is applied to solve hash-collision.
According to still another embodiment of the invention, host reads data from solid storage device.Host is deposited to solid-state Storage equipment sends out the order for reading data.Solid storage device receives the order for reading data from host, reads the order of data In indicate key Key8 for indexing target data Value8 to be read, read in the order of data and further indicate NameSpace NS3 (referring to Figure 17).
The order of data is read in response to receiving, solid storage device determines data Value8's according to NameSpace NS3 Length is not more than 4KB.Next, solid storage device does Hash operation to key Key8, cryptographic Hash H8 is obtained, and inquires FTL tables (referring to Figure 18) obtains the corresponding physical address PPA8 of cryptographic Hash H8.Solid storage device is indicated by the physical address PPA8 Data cell reads length and is the data of 4KB, and is supplied to host.
Optionally, solid storage device is also obtained from the data that the data cell indicated by physical address PPA8 is read The length of Value8, and the Value8 of designated length is supplied to host.
In another example, next, host reads data from solid storage device.Host is sent out to solid storage device Go out to read the order of data.Solid storage device receives the order for reading data from host, reads in the order of data and indicates Key Key9 for indexing target data Value9 to be read, read further indicated in the order of data NameSpace NS4 (referring to Figure 17).
The order of data is read in response to receiving, solid storage device determines data Value9's according to NameSpace NS4 Length is not more than 16KB.Next, solid storage device does Hash operation to key Key9, cryptographic Hash H9 is obtained, and inquire FTL Table obtains the corresponding physical address PPA9 of cryptographic Hash H9 (referring to Figure 18).Then solid storage device accesses physical address PPA9 Indicated data cell.Since a physical address PPA indicates the memory space of (for example) maximum 4416 bytes in FTL tables, The continuous multiple data cell (PPA9/PPA9+1/PPA9+2/PPA9+ of physical address of the solid storage device indicated by the PPA9 3) 16KB data are read, and are supplied to host.
Optionally, physical address of the solid storage device also indicated by the PPA9 is continuously read-out by multiple data cells The length of data Value9 is obtained in data, and the data Value9 of designated length is supplied to host.
Optionally, according to another embodiment of the invention, host in the I/O command for being supplied to solid storage device not Indicate NameSpace.And solid storage device otherwise identifies NameSpace.For example, host designation date in I/O command Length, solid storage device for data length 0-512 bytes I/O command, by the I/O command for accessing NameSpace NS1 Handled, and to data length 512-1024 bytes I/O command, by access NameSpace NS2 I/O command at Reason.As another example, host is indicating NVMe controllers in being supplied to solid storage device I/O command, and solid-state storage sets The standby correspondence according to NVMe controllers and NameSpace obtains the NameSpace of access.
Embodiment seven
According to an embodiment of the present application seven, host indication key and data in I/O command.Optionally, host is ordered in IO The length of data is also indicated in order.
According to an embodiment of the present application seven, solid storage device classifies to I/O command according to data length.For example, to data I/O command of the length between 0-512 bytes, solid storage device filler according to this supply the length of data to 512 bytes; To I/O command of the data length between 512 byte -1K bytes, solid storage device filler according to this supplies data length 1K bytes;To I/O command of the data length between 1K-4K bytes, solid storage device filler according to this supplies data length To 4K bytes;To I/O command of the data length between 4K-16K bytes, solid storage device filler is according to this by data length Supply 16K bytes.
Optionally, solid storage device can correspond to every class data length and provide multiple FTL tables, make to remember in each FTL tables Mapping relations of the cryptographic Hash of the I/O command of a kind of data length of record to physical address PPA.
For example, in FTL tables illustrated in fig. 19, it is 1K-4K bytes that every, which records corresponding data length, and shown in Figure 20 In the FTL tables gone out, it is 4K-16K bytes that every, which records corresponding data length,.Figure 19 institutes are provided in solid storage device simultaneously The FTL tables shown and FTL tables shown in Figure 20.
As an example, data are written to solid storage device in host.Host sends write-in data life to solid storage device It enables, is written in data command and indicates the data Value10 and key Key10 for index data Value10, wherein data The length of Value10 is 1K-4K bytes.Solid storage device receives write-in data command from host.In response to receiving write-in number According to order, solid storage device carries out Hash operation to key Key10, obtains cryptographic Hash H10, and is H10 allocated physical address PPA10, and the mapping relations of cryptographic Hash H10 and physical address PPA10 are recorded in FTL tables 1 (4K) (referring to Figure 19).And Data Value10 is written to the data cell indicated by physical address PPA10 in solid storage device.
As another example, host reads data to solid storage device.Host sends to solid storage device and reads Data command reads the key Key11 indicated in data command for indexing target data Value11 to be read, wherein continuing It is 4K-16K bytes to take the length of target data Value11.In response to receiving reading data command, solid storage device is to key Key11 carries out Hash operation, obtains cryptographic Hash H11.And solid storage device is found from FTL tables (16K) (referring to Figure 20) Cryptographic Hash H11 and its corresponding physical address PPA11.And solid storage device continuing repeatedly since physical address PPA11 Physical address obtains the data of 16K bytes, and is supplied to host.Optionally, solid storage device is since physical address PPA11 Physical address continuously multiple data cells obtain the length of target data Value11 to be read, and by the number of designated length It is supplied to host according to Value11.
As still another example, host sends to solid storage device and reads data command, reads in data command Indicate the key Key11 for indexing target data Value11 to be read, but the not length of prompt data Value11.Response In receiving the reading data command, solid storage device searches for all FTL tables, and is found from FTL tables (16K) (referring to Figure 20) Cryptographic Hash H11 and its corresponding physical address PPA11.And (one indicated by the physical address PPA11 of solid storage device Or multiple) data cell obtains the data of 16K bytes, and is supplied to host.
One of ordinary skill in the art will realize when hash-collision (about key) occurs, and can be used real according to the application The scheme that example three, example IV and/or embodiment five are provided is applied to solve hash-collision.
Embodiment nine
According to an embodiment of the invention nine, support the solid storage device of KV storage models that host is allowed to pass through Get/Put Command access solid storage device.
As an example, host reads data from solid storage device.Host sends " Get (Key) " to solid storage device Order indicates the key for indexing target data Value12 to be read by parameter " Key " in " Get (Key) " order Key12.Solid storage device receives " Get (Key) " order from host.
In response to receiving " Get (Key) " order, solid storage device carries out Hash operation to key Key12, obtains cryptographic Hash H12.Next, solid storage device searches for FTL tables according to cryptographic Hash H12, and it is corresponding to find from FTL tables cryptographic Hash H12 Physical address PPA12.And data cell of the solid storage device indicated by the physical address PPA12 obtains target data Value12, and it is supplied to host.Optionally, host also specifies target data to be read in " Get (Key) " order of transmission NameSpace corresponding to Value12.
As another example, data are written to solid storage device in host.Host sends " Put to solid storage device (Key, Value) " is ordered, and data are indicated by parameter " Key " and " Value " in " Put (Key, Value) " order Value13 and key Key13 for index data Value13.Solid storage device from host receive " Put (Key, Value it) " orders.
In response to receiving " Put (Key, Value) " order, solid storage device carries out Hash operation to key Key13, obtains Cryptographic Hash H13, and be cryptographic Hash H13 allocated physical address PPA13, and by cryptographic Hash H13, with the physical address for its distribution The mapping relations of PPA13 are recorded in FTL tables.And solid storage device is to the data cell indicated by physical address PPA13 Data Value13 is written.Optionally, host also specified data Value13 institutes in " Put (Key, Value) " order of transmission Corresponding NameSpace.
As another example, host sends the order that Get/Put is carried with NVMe agreements to solid storage device, and leads to Cross PRP (Physical Region Page, physical region page) entries or SG lists (Scatter Gather List, dispersion- Collect list) specify the data to be accessed.
In addition, FTL tables according to the ... of the embodiment of the present invention be storable in solid storage device DRAM (for example, referring to Fig. 1, DRAM 110).Wherein, control unit 104 accesses DRAM 110 to safeguard FTL tables.Control unit 104 controls aforementioned according to this Shen Please embodiment flow execution.Optionally, control unit 104 includes CPU, and software is executed in CPU and carrys out manipulation and control component 104 hardware executes foregoing schemes.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (10)

1. a kind of data access method based on KV models, which is characterized in that including:
The second key (Key) value and the second data (Value) are received from host;
Hash operation is made to the second key assignments, obtains the second cryptographic Hash;
If having recorded first cryptographic Hash equal with the second cryptographic Hash in flash memory transfer layer table, obtained from flash memory transfer layer table The first physical address corresponding with the first cryptographic Hash;
The second physical address is distributed for the second cryptographic Hash;
The first key assignments and the first data are read from the first physical address;
The second data sheet indicated by the second physical address is written into second key assignments and the second data, the first key assignments, the first data Member.
2. the data access method as described in claim 1 based on KV models, which is characterized in that further include:
Second cryptographic Hash and the second physical address are updated to flash memory transfer layer table.
3. such as data access method of the claim 1-2 any one of them based on KV models, which is characterized in that if described second Data cell can not accommodate first key assignments and first data, second key assignments and second data, second Data cell and with the second data cell on physical address in continuous one or more third data cells described in write-in First key assignments and first data, second key assignments and second data.
4. the data access method as claimed in claim 3 based on KV models, which is characterized in that the key assignments and the data It is written into identical data cell, or is written into different data cells.
5. the data access method according to any one of claims 1-4 based on KV models, which is characterized in that further include:
Third key assignments is received from host;
Hash operation is made to third key assignments, obtains third cryptographic Hash;
Flash memory transfer layer table is retrieved;
If having recorded first cryptographic Hash equal with third cryptographic Hash in flash memory transfer layer table, obtain corresponding to the first cryptographic Hash The second physical address;
The first key assignments and the second key assignments are obtained based on the second physical address, and its third key assignments received with host is compared Compared with;And
If the second key assignments is equal with third key assignments, the second data are obtained;And
Second data are sent to host.
6. the data access method as claimed in claim 4 based on KV models, which is characterized in that described identical or different Data cell in, be respectively written into the starting point of the key assignments and the data in described identical or different data cell Location and/or length.
7. the data access method as claimed in claim 6 based on KV models, which is characterized in that further include:
Third key assignments is received from host;
Hash operation is made to third key assignments, obtains third cryptographic Hash;
Flash memory transfer layer table is retrieved;
If having recorded first cryptographic Hash equal with third cryptographic Hash in flash memory transfer layer table;It is right to obtain the first cryptographic Hash institute The second physical address answered;
The first key assignments is obtained according to the second physical address, if the first key assignments and third key assignments are unequal,
According to the length of the second physical address and the first key assignments and the first data, the second key assignments of acquisition, if the second key assignments and the Three key assignments are equal, obtain the second data corresponding with the second key assignments;And
Second data are sent to host.
8. a kind of solid storage device based on KV models, which is characterized in that including data reception module, Hash operation module, Retrieve module, physical address assignments module, data acquisition module and Data write. module, wherein
Data reception module, for receiving the second key assignments and the second data from host;
Hash operation module obtains the second cryptographic Hash for making Hash operation to the second key assignments;
Module is retrieved, for being retrieved to flash memory transfer layer table, is obtained from flash memory transfer layer table corresponding with the first cryptographic Hash The first physical address;
Physical address assignments module, for distributing the second physical address for the second cryptographic Hash;
Data acquisition module, for reading the first key assignments and the first data from the first physical address;
Data write. module, for the second physical address institute to be written in the second key assignments and the second data, the first key assignments, the first data The second data cell indicated.
9. a kind of solid storage device, including host interface, NVM chips, control unit and DRAM, control unit is for controlling Data transmission between host interface, NVM chips and DRAM, which is characterized in that the controller part is by executing program To execute the data access method based on KV models according to claim 1-7.
10. a kind of solid storage device, including host interface, NVM chips, control unit and DRAM, control unit is for controlling Make the data transmission between host interface, NVM chips and DRAM, which is characterized in that the controller part is used for,
The second key assignments and the second data are received from host;
Hash operation is made to the second key assignments, obtains the second cryptographic Hash;
If having recorded first cryptographic Hash equal with the second cryptographic Hash in flash memory transfer layer table, obtained from flash memory transfer layer table The first physical address corresponding with the first cryptographic Hash;
The second physical address is distributed for the second cryptographic Hash;
The first key assignments and the first data are read from the first physical address;
The second data sheet indicated by the second physical address is written into second key assignments and the second data, the first key assignments, the first data Member.
CN201611142834.1A 2016-12-12 2016-12-12 Key-data access method for solving hash collision and solid-state storage device Active CN108614669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611142834.1A CN108614669B (en) 2016-12-12 2016-12-12 Key-data access method for solving hash collision and solid-state storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611142834.1A CN108614669B (en) 2016-12-12 2016-12-12 Key-data access method for solving hash collision and solid-state storage device

Publications (2)

Publication Number Publication Date
CN108614669A true CN108614669A (en) 2018-10-02
CN108614669B CN108614669B (en) 2023-02-17

Family

ID=63657796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611142834.1A Active CN108614669B (en) 2016-12-12 2016-12-12 Key-data access method for solving hash collision and solid-state storage device

Country Status (1)

Country Link
CN (1) CN108614669B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138724A (en) * 2019-08-30 2021-07-20 上海忆芯实业有限公司 Method for processing read (Get)/Put request using accelerator and information processing system thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103229164A (en) * 2011-11-24 2013-07-31 华为技术有限公司 Data access method and device
CN103403709A (en) * 2012-11-15 2013-11-20 华为技术有限公司 Method, device and system for data reading and writing
CN103593477A (en) * 2013-11-29 2014-02-19 华为技术有限公司 Collocation method and device of Hash database
WO2014089828A1 (en) * 2012-12-14 2014-06-19 华为技术有限公司 Method for accessing storage device and storage device
CN104809183A (en) * 2015-04-17 2015-07-29 北京奇艺世纪科技有限公司 Data reading and writing-in method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103229164A (en) * 2011-11-24 2013-07-31 华为技术有限公司 Data access method and device
CN103403709A (en) * 2012-11-15 2013-11-20 华为技术有限公司 Method, device and system for data reading and writing
WO2014089828A1 (en) * 2012-12-14 2014-06-19 华为技术有限公司 Method for accessing storage device and storage device
CN103593477A (en) * 2013-11-29 2014-02-19 华为技术有限公司 Collocation method and device of Hash database
CN104809183A (en) * 2015-04-17 2015-07-29 北京奇艺世纪科技有限公司 Data reading and writing-in method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138724A (en) * 2019-08-30 2021-07-20 上海忆芯实业有限公司 Method for processing read (Get)/Put request using accelerator and information processing system thereof

Also Published As

Publication number Publication date
CN108614669B (en) 2023-02-17

Similar Documents

Publication Publication Date Title
CN108614668A (en) Data access method based on KV models and solid storage device
CN108984420B (en) Managing multiple namespaces in non-volatile memory (NVM)
CN105683953B (en) Support the data storage device of acceleration database manipulation
CN107111452B (en) Data migration method and device applied to computer system and computer system
US9244619B2 (en) Method of managing data storage device and data storage device
US20130151759A1 (en) Storage device and operating method eliminating duplicate data storage
US10296250B2 (en) Method and apparatus for improving performance of sequential logging in a storage device
US20150186259A1 (en) Method and apparatus for storing data in non-volatile memory
CN104054071A (en) Method for accessing storage device and storage device
CN108595349A (en) The address conversion method and device of mass-memory unit
CN106649144A (en) Data storage device and operating method thereof
US11868246B2 (en) Memory system and non-transitory computer readable recording medium
CN105095113B (en) A kind of buffer memory management method and system
CN107688436A (en) Memory module and its method of control
CN110275838A (en) The address conversion and its accelerator of KV storage equipment
CN109101185A (en) Solid storage device and its write order and read command processing method
CN109947669A (en) The address conversion method and system of KV storage equipment
CN108614671A (en) Key-data access method based on NameSpace and solid storage device
KR20220058944A (en) Memory Mapped Devices and Methods
CN207676335U (en) Solid storage device with asymmetric channel
CN108614669A (en) Solve the key-data access method and solid storage device of hash-collision
CN108628762A (en) More NameSpaces
US11126624B2 (en) Trie search engine
CN110968527A (en) FTL provided caching
CN110968520B (en) Multi-stream storage device based on unified cache architecture

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100192 room A302, building B-2, Dongsheng Science Park, Zhongguancun, 66 xixiaokou Road, Haidian District, Beijing

Applicant after: Beijing yihengchuangyuan Technology Co.,Ltd.

Address before: 100192 Room 302, 3 / F, building B-2, Dongsheng Science Park, 66 xixiaokou Road, Haidian District, Beijing

Applicant before: BEIJING MEMBLAZE TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant