CN108563399B - Data reading method and device of storage device, terminal device and storage medium - Google Patents
Data reading method and device of storage device, terminal device and storage medium Download PDFInfo
- Publication number
- CN108563399B CN108563399B CN201810204578.7A CN201810204578A CN108563399B CN 108563399 B CN108563399 B CN 108563399B CN 201810204578 A CN201810204578 A CN 201810204578A CN 108563399 B CN108563399 B CN 108563399B
- Authority
- CN
- China
- Prior art keywords
- data reading
- flash
- command
- address
- commands
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0658—Controller construction arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Read Only Memory (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及存储设备技术领域,尤其涉及一种存储设备的数据读取方法、装置、终端设备和计算机存储介质。The present invention relates to the technical field of storage devices, and in particular, to a data reading method, device, terminal device and computer storage medium of a storage device.
背景技术Background technique
在目前的存储设备比如SSD中,存储芯片一般采用flash,当读取数据时,由于flash读数据是一个异步操作的过程,即首先由上位机给flash发送数据读取命令,然后需要等flash把数据准备好上位机才能开始接收数据。针对这个特性,目前通常采用交叉存取技术(Interleaving)来提高数据的读取效率,即在flash的多个通道和多个片选存储区域之间采用交叉存取技术来抵消flash的数据准备时间。In the current storage devices such as SSD, the storage chip generally uses flash. When reading data, because the flash reading data is an asynchronous operation process, that is, the host computer first sends a data read command to the flash, and then needs to wait for the flash to read data. The host computer can start to receive data when the data is ready. In view of this feature, the interleaving technology is usually used to improve the reading efficiency of data, that is, the interleaving technology is used between multiple channels of the flash and multiple chip selection storage areas to offset the data preparation time of the flash. .
然而,由于上位机发送的一连串数据读取命令所对应的存储单元地址是随机乱序的,即很可能出现连续的多条数据读取命令作用在flash的同一个片选存储区域,这就导致flash的其它片选存储区域无法及时开始数据准备工作,产生时间资源的浪费。因此,采用传统的交叉存取技术对于存储设备的数据读取效率的提高效果并不显著。However, since the addresses of the storage units corresponding to a series of data read commands sent by the host computer are randomly out of order, it is very likely that multiple consecutive data read commands will act on the same chip selection storage area of the flash, which leads to Other chip selection storage areas of the flash cannot start data preparation work in time, resulting in a waste of time resources. Therefore, using the traditional interleaving technology has little effect on improving the data reading efficiency of the storage device.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供了一种存储设备的数据读取方法、装置、终端设备和计算机存储介质,能够显著提高存储设备的数据读取效率。In view of this, the embodiments of the present invention provide a data reading method, apparatus, terminal device and computer storage medium for a storage device, which can significantly improve the data reading efficiency of the storage device.
本发明实施例的第一方面提供了一种存储设备的数据读取方法,包括:A first aspect of the embodiments of the present invention provides a method for reading data from a storage device, including:
获取上位机下发的多条数据读取命令;Obtain multiple data read commands issued by the host computer;
对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的片选地址和存储单元地址;Analyzing the plurality of data read commands to obtain a physical address corresponding to each of the data read commands, where the physical addresses include a chip selection address and a storage unit address of the flash;
按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。Submit the data read command to the controller of the flash according to the sequence of traversing the chip select address first and then the memory unit address, so that the controller executes the received data read in sequence Order.
本发明实施例的第二方面提供了一种存储设备的数据读取装置,包括:A second aspect of the embodiments of the present invention provides a data reading apparatus of a storage device, including:
数据读取命令获取模块,用于获取上位机下发的多条数据读取命令;The data read command acquisition module is used to acquire multiple data read commands issued by the host computer;
数据读取命令解析模块,用于对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的片选地址和存储单元地址;The data read command parsing module is used to analyze the multiple data read commands, and obtain the physical addresses corresponding to each of the data read commands respectively, and the physical addresses include the chip selection address and storage unit address of the flash. ;
数据读取命令提交模块,用于按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。a data read command submission module, configured to submit the data read command to the controller of the flash in the order of traversing the chip select address first and then the memory unit address, so that the controller can sequentially The received data read command is executed.
本发明实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本发明实施例的第一方面提供的存储设备的数据读取方法的步骤。A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program The steps of implementing the data reading method of the storage device provided by the first aspect of the embodiments of the present invention.
本发明实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如本发明实施例的第一方面提供的存储设备的数据读取方法的步骤。A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the implementation as provided in the first aspect of the embodiments of the present invention The steps of a data reading method of a storage device.
本发明实施例提出的存储设备的数据读取方法包括:获取上位机下发的多条数据读取命令;对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的片选地址和存储单元地址;按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。上述过程通过将上位机下发的数据读取命令按照先遍历片选地址、后遍历存储单元地址的顺序排序,能够保证排序后相邻的数据读取命令分别作用在flash的不同片选存储区域,从而使得flash的每个片选存储区域都能及时开始数据准备工作。通过这样设置,当某个片选存储区域在传输数据时,其它片选存储区域在准备数据;当该片选存储区域传输完数据时,其它片选存储区域的数据准备工作也基本完成,能够开始传输数据,从而有效避免时间资源的浪费,显著提高了存储设备的数据读取效率。The data reading method of the storage device provided by the embodiment of the present invention includes: acquiring multiple data reading commands issued by a host computer; analyzing the multiple data reading commands to obtain each data reading command respectively The corresponding physical address, the physical address includes the chip selection address and storage unit address of the flash; submit the data read command to the flash in the order of traversing the chip selection address first and then traversing the storage unit address The controller, so that the controller sequentially executes the received data read commands. In the above process, by sorting the data read commands issued by the host computer in the order of traversing the chip select address first and then traversing the memory unit address, it can ensure that the adjacent data read commands after the sorting act on different chip select storage areas of the flash respectively. , so that each chip selection storage area of the flash can start the data preparation work in time. Through this setting, when a certain chip selection storage area is transmitting data, other chip selection storage areas are preparing data; when the chip selection storage area has finished transmitting data, the data preparation work of other chip selection storage areas is basically completed, and it is possible to Start to transmit data, thereby effectively avoiding the waste of time resources, and significantly improving the data reading efficiency of the storage device.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present invention. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本发明实施例提供的一种存储设备的数据读取方法的第一个实施例的流程图;1 is a flowchart of a first embodiment of a method for reading data from a storage device provided by an embodiment of the present invention;
图2是本发明实施例提供的一种存储设备的数据读取方法的第二个实施例的流程图;2 is a flowchart of a second embodiment of a method for reading data from a storage device provided by an embodiment of the present invention;
图3是本发明实施例提供的一种存储设备的数据读取方法的第三个实施例的流程图;3 is a flowchart of a third embodiment of a method for reading data from a storage device provided by an embodiment of the present invention;
图4是本发明实施例提供的一种存储设备的数据读取装置的一个实施例的结构图;4 is a structural diagram of an embodiment of a data reading apparatus of a storage device provided by an embodiment of the present invention;
图5是本发明实施例提供的一种终端设备的示意图。FIG. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are set forth in order to provide a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
本发明实施例提供了一种存储设备的数据读取方法、装置、终端设备和计算机存储介质,能够显著提高存储设备的数据读取效率。The embodiments of the present invention provide a data reading method, apparatus, terminal device and computer storage medium for a storage device, which can significantly improve the data reading efficiency of the storage device.
请参阅图1,本发明实施例中一种存储设备的数据读取方法的第一个实施例包括:Referring to FIG. 1, a first embodiment of a data reading method of a storage device in an embodiment of the present invention includes:
101、获取上位机下发的多条数据读取命令;101. Obtain multiple data read commands issued by the host computer;
在本发明实施例中,所述存储设备指包含flash存储器件的各种存储设备,比如SSD。当上位机下发数据读取命令给存储设备后,该存储设备的主控芯片能够获取到这些数据读取命令,并将这些数据读取命令提交给该存储设备的flash芯片,以读取flash芯片中保存的数据。In this embodiment of the present invention, the storage device refers to various storage devices including a flash storage device, such as an SSD. After the host computer sends data read commands to the storage device, the main control chip of the storage device can obtain these data read commands, and submit these data read commands to the flash chip of the storage device to read the flash. data stored in the chip.
102、对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的片选地址和存储单元地址;102. Analyze the plurality of data read commands to obtain a physical address corresponding to each of the data read commands, where the physical addresses include a chip selection address and a storage unit address of the flash;
在获取到上位机下发的多条数据读取命令之后,存储设备的主控芯片对这些数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的片选地址和存储单元地址。存储设备的flash一般分为多个通道,每个通道包括多个片选存储区域,每个片选存储区域包括多个存储单元。每条数据读取命令都会指向某个存储单元,可以通过查找映射表的方式将数据读取命令中的逻辑地址转换为flash的物理地址。在主控芯片对上位机下发的数据读取命令进行解析后,可以将解析得到的包含物理地址信息的数据读取命令称作flash命令。After obtaining a plurality of data read commands issued by the host computer, the main control chip of the storage device parses these data read commands, and obtains the physical address corresponding to each data read command. Including the chip select address and storage unit address of the flash. The flash of a storage device is generally divided into multiple channels, each channel includes multiple chip selection storage areas, and each chip selection storage area includes multiple storage units. Each data read command will point to a certain storage unit, and the logical address in the data read command can be converted to the physical address of the flash by looking up the mapping table. After the main control chip parses the data read command issued by the host computer, the data read command containing the physical address information obtained by the analysis can be called a flash command.
103、按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。103. Submit the data read command to the controller of the flash according to the sequence of traversing the chip selection address first and then traversing the memory unit address, so that the controller executes the received data in sequence read command.
在得到每条所述数据读取命令对应的物理地址之后,按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令(即各个flash命令)提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。需要指出的是,本实施例主要针对物理地址指向flash同一个通道的一连串数据读取命令。After obtaining the physical address corresponding to each data read command, submit the data read command (ie each flash command) to the the controller of the flash, so that the controller executes the received data read commands in sequence. It should be pointed out that this embodiment is mainly aimed at a series of data read commands whose physical addresses point to the same channel of the flash.
传统的存储设备数据读取方式为:主控芯片将获取到的数据读取命令提交给flash的控制器,flash的控制器依次执行接收到的数据读取命令,即flash执行命令的顺序与上位机下发命令的顺序相同。The traditional way of reading data from storage devices is: the main control chip submits the obtained data read command to the flash controller, and the flash controller executes the received data read commands in sequence, that is, the sequence of flash execution commands and the upper The sequence of commands issued by the machine is the same.
而在本实施例中,在获取到上位机下发的命令后会重新进行排序,即按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,flash执行命令的顺序为排序后的顺序。假设主控芯片依次获取到10条数据读取命令,分别为A、B、C、D、E、F、G、H、I和J,这些命令的物理地址都指向flash的同一个通道,该通道共包括CE0、CE1、CE2和CE3四个片选存储区域,每个片选存储区域分别包括die0至die7共8个存储单元。其中A对应于CE0-die3,B对应于CE3-die0,C对应于CE0-die1,D对应于CE1-die0,E对应于CE2-die2,F对应于CE1-die1,G对应于CE3-die6,H对应于CE2-die3,I对应于CE1-die5,J对应于CE2-die0。在排序过程中,首先遍历片选地址CE0至CE3,然后遍历存储单元地址die0至die7,即按照物理地址CE0-die0、CE1-die0、CE2-die0、CE3-die0、CE0-die1、CE1-die1、CE2-die1、CE3-die1、CE0-die2…的顺序排序。另外,若在遍历CE0至CE3的过程中存在某个die对应的数据读取命令为空,则按顺序提取该CE的下一个die对应的数据读取命令,比如若CE2-die0为空,则按照CE0-die0、CE1-die0、CE2-die1、CE3-die0、CE0-die1、CE1-die1、CE2-die2、CE3-die1、CE0-die2…的顺序排序。按照这个规则,上述命令A、B、C、D、E、F、G、H、I和J在排序后即为:C、D、J、B、A、F、E、G、I和H。In this embodiment, after the commands issued by the host computer are obtained, the order will be re-ordered, that is, the data read command will be submitted to the In the flash controller, the order in which the flash executes the commands is the sorted order. Assuming that the main control chip obtains 10 data read commands in turn, namely A, B, C, D, E, F, G, H, I and J, the physical addresses of these commands all point to the same channel of the flash. The channel includes a total of four chip selection storage areas CE0, CE1, CE2 and CE3, and each chip selection storage area includes a total of 8 storage units from die0 to die7. Where A corresponds to CE0-die3, B corresponds to CE3-die0, C corresponds to CE0-die1, D corresponds to CE1-die0, E corresponds to CE2-die2, F corresponds to CE1-die1, G corresponds to CE3-die6, H corresponds to CE2-die3, I corresponds to CE1-die5, and J corresponds to CE2-die0. In the sorting process, first traverse the chip select addresses CE0 to CE3, and then traverse the memory cell addresses die0 to die7, that is, according to the physical addresses CE0-die0, CE1-die0, CE2-die0, CE3-die0, CE0-die1, CE1-die1 , CE2-die1, CE3-die1, CE0-die2... in order. In addition, if there is a data read command corresponding to a die that is empty in the process of traversing CE0 to CE3, the data read command corresponding to the next die of the CE is extracted in sequence. For example, if CE2-die0 is empty, then Sort in the order of CE0-die0, CE1-die0, CE2-die1, CE3-die0, CE0-die1, CE1-die1, CE2-die2, CE3-die1, CE0-die2…. According to this rule, the above commands A, B, C, D, E, F, G, H, I and J are sorted as: C, D, J, B, A, F, E, G, I and H .
flash的一个通道在同一时间只能传输一个片选存储区域的数据,而各个片选存储区域之间是可以同时进行数据准备工作的。当flash执行对应于某个片选存储区域内任意一个存储单元的数据读取命令时,该片选存储区域即开始数据准备工作。可见,将上位机下发的数据读取命令按照上述规则排序后再执行,能够确保flash的各个片选存储区域都能及时开始数据准备工作,这样当前一个片选存储区域在传输数据时,后一个片选存储区域在准备数据;当前一个片选存储区域传输数据完毕时,后一个片选存储区域的数据准备工作也基本完成,可以直接进行数据传输,从而显著提高了数据的读取效率。A channel of flash can only transmit data of one chip selection storage area at the same time, and data preparation work can be performed simultaneously between each chip selection storage area. When the flash executes a data read command corresponding to any storage unit in a chip selection storage area, the chip selection storage area starts data preparation work. It can be seen that the data read commands issued by the host computer are sorted according to the above rules and then executed, which can ensure that each chip selection storage area of the flash can start the data preparation work in time, so that when the current chip selection storage area transmits data, the later A chip selection storage area is preparing data; when the data transmission of the previous chip selection storage area is completed, the data preparation work of the next chip selection storage area is basically completed, and data transmission can be performed directly, thereby significantly improving the data reading efficiency.
本发明实施例提出的存储设备的数据读取方法包括:获取上位机下发的多条数据读取命令;对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的片选地址和存储单元地址;按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。上述过程通过将上位机下发的数据读取命令按照先遍历片选地址、后遍历存储单元地址的顺序排序,能够保证排序后相邻的数据读取命令分别作用在flash的不同片选存储区域,从而使得flash的每个片选存储区域都能及时开始数据准备工作。通过这样设置,当某个片选存储区域在传输数据时,其它的片选存储区域在准备数据;当该片选存储区域传输完数据时,其它片选存储区域的数据准备工作也基本完成,能够开始传输数据,从而有效避免时间资源的浪费,显著提高了存储设备的数据读取效率。The data reading method of the storage device provided by the embodiment of the present invention includes: acquiring multiple data reading commands issued by a host computer; analyzing the multiple data reading commands to obtain each data reading command respectively The corresponding physical address, the physical address includes the chip selection address and storage unit address of the flash; submit the data read command to the flash in the order of traversing the chip selection address first and then traversing the storage unit address The controller, so that the controller sequentially executes the received data read commands. In the above process, by sorting the data read commands issued by the host computer in the order of traversing the chip select address first and then traversing the memory unit address, it can ensure that the adjacent data read commands after the sorting act on different chip select storage areas of the flash respectively. , so that each chip selection storage area of the flash can start the data preparation work in time. Through this setting, when a certain chip selection storage area is transmitting data, other chip selection storage areas are preparing data; when the chip selection storage area finishes transmitting data, the data preparation work of other chip selection storage areas is basically completed. Data transmission can be started, thereby effectively avoiding the waste of time resources, and significantly improving the data reading efficiency of the storage device.
请参阅图2,本发明实施例中一种存储设备的数据读取方法的第二个实施例包括:Referring to FIG. 2, a second embodiment of a method for reading data from a storage device in an embodiment of the present invention includes:
201、获取上位机下发的多条数据读取命令;201. Obtain multiple data read commands issued by the host computer;
步骤201与步骤101相同,具体可参照步骤101的相关说明。Step 201 is the same as
202、对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的通道地址、片选地址和存储单元地址;202. Analyze the plurality of data read commands, and obtain the physical addresses corresponding to each of the data read commands, respectively, where the physical addresses include a channel address, a chip selection address, and a storage unit address of the flash;
步骤202与步骤102的区别在于,解析得到的数据读取命令对应的物理地址还包括flash的通道地址。The difference between
203、按照先遍历所述通道地址、然后遍历所述片选地址、最后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。203. Submit the data read command to the controller of the flash according to the sequence of first traversing the channel address, then traversing the chip selection address, and finally traversing the memory unit address, so that the controller sequentially The received data read command is executed.
本实施例针对物理地址指向flash各个通道的一连串数据读取命令,在获取到上位机下发的命令后会重新进行排序,即按照先遍历所述通道地址、然后遍历所述片选地址、最后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,flash执行命令的顺序为排序后的顺序。假设flash有4个通道,分别为ch0、ch1、ch2和ch3,每个通道分别包括CE0、CE1、CE2和CE3四个片选存储区域,每个片选存储区域分别包括die0至die7共8个存储单元。在排序过程中,首先遍历通道地址ch0至ch3,然后遍历片选地址CE0至CE3,最后遍历存储单元地址die0至die7,即按照物理地址ch0-CE0-die0、ch1-CE0-die0、ch2-CE0-die0、ch3-CE0-die0、ch0-CE1-die0、ch1-CE1-die0、ch2-CE1-die0、ch3-CE1-die0、ch0-CE2-die0、ch1-CE2-die0、ch2-CE2-die0、ch3-CE2-die0…ch3-CE3-die0、ch0-CE0-die1、ch1-CE0-die1、ch2-CE0-die1、ch3-CE0-die1、ch0-CE1-die1…的顺序排序。另外,若在遍历ch0至ch3的过程中存在某个CE对应的数据读取命令为空,则按顺序提取对应通道的下一个CE对应的数据读取命令,若在遍历CE0至CE3的过程中存在某个die对应的数据读取命令为空,则按顺序提取该CE的下一个die对应的数据读取命令。比如,若ch2-CE0对应的数据读取命令为空(即ch2-CE0-die0、ch2-CE0-die1…ch2-CE0-die7都为空),则按照ch0-CE0-die0、ch1-CE0-die0、ch2-CE1-die0、ch3-CE0-die0、ch0-CE1-die0…的顺序排序。In this embodiment, a series of data read commands whose physical addresses point to each channel of the flash will be reordered after the commands issued by the host computer are obtained, that is, the channel addresses are first traversed, then the chip selection addresses are traversed, and finally The data read command is submitted to the controller of the flash by traversing the order of the addresses of the storage units, and the order in which the flash executes the commands is the sorted order. Suppose the flash has 4 channels, namely ch0, ch1, ch2 and ch3, each channel includes four chip selection storage areas CE0, CE1, CE2 and CE3, and each chip selection storage area includes 8 die0 to die7 respectively. storage unit. In the sorting process, first traverse the channel addresses ch0 to ch3, then traverse the chip select addresses CE0 to CE3, and finally traverse the memory cell addresses die0 to die7, that is, according to the physical addresses ch0-CE0-die0, ch1-CE0-die0, ch2-CE0 -die0, ch3-CE0-die0, ch0-CE1-die0, ch1-CE1-die0, ch2-CE1-die0, ch3-CE1-die0, ch0-CE2-die0, ch1-CE2-die0, ch2-CE2-die0 , ch3-CE2-die0...ch3-CE3-die0, ch0-CE0-die1, ch1-CE0-die1, ch2-CE0-die1, ch3-CE0-die1, ch0-CE1-die1... in order. In addition, if there is a data read command corresponding to a CE that is empty in the process of traversing ch0 to ch3, then extract the data read command corresponding to the next CE of the corresponding channel in order. If in the process of traversing CE0 to CE3 If the data read command corresponding to a certain die is empty, the data read command corresponding to the next die of the CE is sequentially extracted. For example, if the data read command corresponding to ch2-CE0 is empty (that is, ch2-CE0-die0, ch2-CE0-die1...ch2-CE0-die7 are all empty), according to ch0-CE0-die0, ch1-CE0- The order of die0, ch2-CE1-die0, ch3-CE0-die0, ch0-CE1-die0... .
flash的各个通道之间是独立工作的,即能够同时传输数据,但一个通道在同一时间只能传输一个片选存储区域的数据,而各个片选存储区域之间可以同时进行数据准备工作。可见,将主控芯片下发的数据读取命令按照上述规则排序后再执行,能够确保flash的各个通道能够及时开始数据传输工作,而且各个通道的片选存储区域都能及时开始数据准备工作。具体的,对于flash来说,各个通道能够及时开始数据传输工作,而对于flash的任意一个通道来说,当前一个片选存储区域在传输数据时,后一个片选存储区域在准备数据;当前一个片选存储区域传输数据完毕时,后一个片选存储区域的数据准备工作也基本完成,可以直接进行数据传输,从而显著提高了数据的读取效率。Each channel of the flash works independently, that is, it can transmit data at the same time, but one channel can only transmit the data of one chip selection storage area at the same time, and data preparation work can be performed between each chip selection storage area at the same time. It can be seen that the data read commands issued by the main control chip are sorted according to the above rules and then executed, which can ensure that each channel of the flash can start the data transmission work in time, and the chip selection storage area of each channel can start the data preparation work in time. Specifically, for flash, each channel can start data transmission work in time, and for any channel of flash, when the current chip selection storage area is transmitting data, the next chip selection storage area is preparing data; the current one When the data transmission in the chip selection storage area is completed, the data preparation for the next chip selection storage area is basically completed, and data transmission can be performed directly, thereby significantly improving the data reading efficiency.
本发明实施例提出的存储设备的数据读取方法包括:获取上位机下发的多条数据读取命令;对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的通道地址、片选地址和存储单元地址;按照先遍历所述通道地址、然后遍历所述片选地址、最后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。采用本实施例的数据读取方法能够确保flash的各个通道及时开始数据传输工作,而且各个通道的片选存储区域都能及时开始数据准备工作,极大地提升了多通道flash的数据读取效率。The data reading method of the storage device provided by the embodiment of the present invention includes: acquiring multiple data reading commands issued by a host computer; analyzing the multiple data reading commands to obtain each data reading command respectively Corresponding physical address, the physical address includes the channel address, chip selection address and storage unit address of the flash; according to the sequence of first traversing the channel address, then traversing the chip selection address, and finally traversing the storage unit address The data read command is submitted to the controller of the flash, so that the controller sequentially executes the received data read command. Using the data reading method of this embodiment can ensure that each channel of the flash starts data transmission work in time, and the chip selection storage area of each channel can start data preparation work in time, which greatly improves the data reading efficiency of multi-channel flash.
请参阅图3,本发明实施例中一种存储设备的数据读取方法的第三个实施例包括:Referring to FIG. 3 , a third embodiment of a method for reading data from a storage device in an embodiment of the present invention includes:
301、获取上位机下发的多条数据读取命令;301. Obtain multiple data read commands issued by the host computer;
302、对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址;302. Parse the multiple data read commands, and obtain the physical addresses corresponding to each of the data read commands respectively;
步骤301-302与步骤101-102相同,具体可参照步骤101-102的相关说明。Steps 301-302 are the same as steps 101-102, for details, please refer to the relevant description of steps 101-102.
303、将所述多条数据读取命令依次排入预设的命令队列中的空余节点,每个空余节点排入一条数据读取命令;303. Arrange the multiple data read commands into the spare nodes in the preset command queue in turn, and each spare node is placed into a data read command;
也即,将解析后的数据读取命令(即flash命令)依次排入预设的命令队列中的空余节点(即未排入命令的节点),每个空余节点排入一条数据读取命令。需要说明的是,这里的依次指按照主控芯片获取并解析数据读取命令的次序。That is, the parsed data read commands (that is, flash commands) are sequentially queued into the spare nodes (ie, the nodes that have not been placed into the command) in the preset command queue, and each spare node is placed into a data read command. It should be noted that the order here refers to the order in which the main control chip obtains and parses the data read commands.
具体的,该命令队列可以通过以下步骤预先设置:Specifically, the command queue can be preset through the following steps:
由存储设备的主控芯片选取指定的内存空间;The specified memory space is selected by the main control chip of the storage device;
将所述内存空间划分成N个节点,形成所述命令队列,每个节点用于存储一条数据读取命令,N为大于1的整数。The memory space is divided into N nodes to form the command queue, each node is used to store a data read command, and N is an integer greater than 1.
优选的,所述命令队列的节点数量N为flash的存储单元数量的2倍以上。Preferably, the number of nodes N of the command queue is more than twice the number of storage units of the flash.
通过将N设置为存储单元数量的2倍以上,每个存储单元在执行命令时,主控芯片的CPU还能同时对上位机下发的命令进行解析,从而达到并行处理的效果,进一步提高处理效率。By setting N to be more than twice the number of storage units, when each storage unit executes a command, the CPU of the main control chip can parse the command issued by the host computer at the same time, so as to achieve the effect of parallel processing and further improve the processing efficiency. efficiency.
304、将所述命令队列中的数据读取命令依次按照对应的物理地址缓存到所述flash的各个存储单元的链表中;304. Cache the data read commands in the command queue into the linked list of each storage unit of the flash according to the corresponding physical addresses in turn;
将所述命令队列中的数据读取命令依次按照对应的物理地址缓存到所述flash的各个存储单元的链表中。需要说明的是,可以先将所有数据读取命令排入命令队列,再将命令队列中的数据读取命令按照对应的物理地址缓存到各个存储单元的链表;也可以先将若干个数据读取命令排入命令队列,然后即开始将命令队列中的数据读取命令缓存到各个存储单元的链表,从而实现命令排入与命令缓存的同时进行,能够提高处理效率。The data read commands in the command queue are sequentially cached in the linked list of each storage unit of the flash according to the corresponding physical addresses. It should be noted that all data read commands can be queued into the command queue first, and then the data read commands in the command queue are cached to the linked list of each storage unit according to the corresponding physical address; it is also possible to read several data first. The command is queued into the command queue, and then the data read command in the command queue is buffered to the linked list of each storage unit, so that the command queue and the command buffer can be performed simultaneously, which can improve the processing efficiency.
在flash的初始化过程中,会给flash的每个存储单元分别创建一个链表,链表主要用于缓存数据读取命令,从而给数据读取命令的排序提供便利。假设数据读取命令A对应的物理地址为ch0-CE1-die3,则将A缓存到通道ch0、片选CE1的存储单元die3的链表中,以此类推。需要说明的是,一个存储单元的链表具有多个节点,可以缓存多条数据读取命令,即若有多条数据读取命令对应同一个存储单元,则依次将这些数据读取命令缓存到该存储单元的链表中。During the initialization process of the flash, a linked list is created for each storage unit of the flash. The linked list is mainly used to cache data read commands, thereby facilitating the ordering of data read commands. Assuming that the physical address corresponding to the data read command A is ch0-CE1-die3, A is cached in the linked list of the memory unit die3 of the channel ch0 and the chip select CE1, and so on. It should be noted that a linked list of a storage unit has multiple nodes, which can cache multiple data read commands. in the linked list of storage units.
具体的,可以为每个存储单元分别创建一个链表头,该链表头用于管理存储单元链表的各个节点,比如各个节点的分配和回收。Specifically, a linked list header may be created for each storage unit, and the linked list header is used to manage each node of the storage unit linked list, such as allocation and reclamation of each node.
具体的,还可以创建一个管理空余节点的链表头,用于管理所述任务队列的空余节点的分配和回收。Specifically, a linked list header for managing spare nodes may also be created, which is used to manage allocation and recycling of spare nodes in the task queue.
具体的节点管理过程如下:链表头设置有两个指针,一个头指针指向头节点,一个尾指针指向尾节点,每个节点会有一个指针,两个相邻节点的关系是上一个节点指针指向下一个节点。当每次从尾指针中取出一个节点时,会先找到这个节点指向的下一个节点,然后把链表头的尾指针指向这个节点。当每个节点进入链表时,首先把该节点的指针指向链表头中头指针指向的节点,然后把链表中的头指针指向这个进入的节点。The specific node management process is as follows: the head of the linked list is set with two pointers, a head pointer points to the head node, a tail pointer points to the tail node, each node has a pointer, and the relationship between two adjacent nodes is that the previous node pointer points to next node. Each time a node is taken from the tail pointer, the next node pointed to by this node will be found first, and then the tail pointer at the head of the linked list will point to this node. When each node enters the linked list, first point the pointer of the node to the node pointed to by the head pointer in the head of the linked list, and then point the head pointer in the linked list to the entered node.
305、将所述各个存储单元的链表中缓存的数据读取命令提交至所述flash的控制器。305. Submit the data read command cached in the linked list of each storage unit to the controller of the flash.
需要指出的是,在将各个存储单元的链表中缓存的数据读取命令提交至flash的控制器时,按照先遍历片选地址、后遍历存储单元地址的顺序;或者按照先遍历通道地址、然后遍历片选地址、最后遍历存储单元地址的顺序(具体可参照第一个实施例和第二个实施例中的相关说明)。It should be pointed out that when submitting the data read command cached in the linked list of each storage unit to the controller of the flash, the sequence of traversing the chip selection address and then the memory unit address is followed; or the channel address is traversed first, and then The sequence of traversing the chip selection address and finally traversing the memory unit address (for details, please refer to the relevant descriptions in the first embodiment and the second embodiment).
可选的,步骤305可以包括:Optionally,
(1)判断所述flash的所有存储单元的链表中缓存的数据读取命令的总数量是否大于第一阈值;(1) judge whether the total number of data read commands cached in the linked list of all storage units of the flash is greater than the first threshold;
(2)若所述总数量大于第一阈值,则将目标存储单元的链表中缓存的第一条数据读取命令提交至所述flash的控制器;所述目标存储单元为按照所述遍历顺序确定的当前应当提交数据读取命令的存储单元。(2) If the total number is greater than the first threshold, submit the first data read command cached in the linked list of the target storage unit to the controller of the flash; the target storage unit is in accordance with the traversal order The determined storage unit that should currently submit the data read command.
对于上述步骤(1),判断所述flash的所有存储单元的链表中缓存的数据读取命令的总数量是否大于第一阈值。这里的第一阈值设置得越大,则任务的排序效果越好,但与此同时flash执行命令和主控芯片解析命令的并行处理效果会变差,因此第一阈值也不能设置得太大,一般可设为N/2,即所述命令队列的节点数量的一半。For the above step (1), it is determined whether the total number of data read commands buffered in the linked list of all storage units of the flash is greater than a first threshold. The larger the first threshold is set here, the better the task sorting effect is, but at the same time, the parallel processing effect of flash execution commands and main control chip parsing commands will be worse, so the first threshold cannot be set too large. Generally, it can be set to N/2, that is, half of the number of nodes in the command queue.
对于上述步骤(2),若所述总数量大于第一阈值,则将目标存储单元的链表中缓存的第一条数据读取命令提交至所述flash的控制器;所述目标存储单元为按照所述遍历顺序确定的当前应当提交数据读取命令的存储单元。比如,若按照所述遍历顺序确定的当前应当提交数据读取命令的是ch3-CE1-die0,则将存储单元ch3-CE1-die0的链表中缓存的第一条数据读取命令(即最先存入该链表的数据读取命令)提交至所述flash的控制器。For the above step (2), if the total number is greater than the first threshold, submit the first data read command cached in the linked list of the target storage unit to the controller of the flash; the target storage unit is according to The storage unit determined by the traversal order that should currently submit the data read command. For example, if the current data read command that should be submitted according to the traversal order is ch3-CE1-die0, the first data read command cached in the linked list of the storage unit ch3-CE1-die0 (that is, the first data read command The data read command stored in the linked list) is submitted to the controller of the flash.
另外,若所述总数量小于或等于第一阈值,则可以返回步骤301,等待更多的数据读取命令缓存到所述flash的各个存储单元的链表。通过这样设置,达到了将新命令缓存到链表、将链表中缓存的命令提交至flash控制器的并行处理,有效提高了处理效率。In addition, if the total number is less than or equal to the first threshold, the process may return to step 301 to wait for more data read commands to be buffered in the linked list of each storage unit of the flash. By setting in this way, the parallel processing of caching new commands to the linked list and submitting the commands cached in the linked list to the flash controller is achieved, which effectively improves the processing efficiency.
可选的,步骤305可以包括:Optionally,
(1)判断在预设时长内是否获取到新的数据读取命令;(1) judging whether a new data reading command is obtained within a preset time length;
(2)若在预设时长内没有获取到新的数据读取命令,则将所述各个存储单元的链表中缓存的数据读取命令全部提交至所述flash的控制器。(2) If no new data read command is acquired within a preset time period, submit all the data read commands cached in the linked list of each storage unit to the controller of the flash.
对于上述步骤(1),判断在预设时长内是否获取到新的数据读取命令,即上位机在预设时长内是否下发新的数据读取命令给flash的主控芯片。For the above step (1), it is judged whether a new data read command is acquired within the preset time period, that is, whether the host computer issues a new data read command to the main control chip of the flash within the preset time period.
对于上述步骤(2),若在预设时长内没有获取到新的数据读取命令,则将所述各个存储单元的链表中缓存的数据读取命令全部提交至所述flash的控制器。同样的,在提交数据读取命令时按照所述遍历顺序。For the above step (2), if no new data read command is obtained within a preset time period, all data read commands cached in the linked list of each storage unit are submitted to the controller of the flash. Likewise, the traversal order is followed when submitting the data read command.
进一步的,若在预设时长内获取到新的数据读取命令,则将所述新的数据读取命令排入所述命令队列中的空余节点,并且按照对应的物理地址将所述新的数据读取命令缓存到所述flash的存储单元的链表中。即若接收到新的数据读取命令,优先将新的数据读取命令缓存到存储单元的链表,直至接收不到新的数据读取命令。然后,将存储单元链表中缓存的所有数据读取命令按照所述遍历顺序提交给flash的控制器执行。在将所有数据读取命令提交给flash的控制器之后,可以清空所述命令队列中的数据读取命令,以腾出更多的空余节点。Further, if a new data read command is acquired within a preset time period, the new data read command is queued into a spare node in the command queue, and the new data read command is stored according to the corresponding physical address. The data read command is buffered in the linked list of the storage units of the flash. That is, if a new data read command is received, the new data read command is preferentially cached in the linked list of the storage unit until no new data read command is received. Then, all data read commands cached in the storage unit linked list are submitted to the controller of the flash for execution according to the traversal sequence. After all data read commands are submitted to the controller of the flash, the data read commands in the command queue can be cleared to free up more spare nodes.
更进一步的,若所述命令队列中没有足够的空余节点(即无法排入所有新的数据读取命令),则将所述flash的各个存储单元的链表中缓存的数量与所述新的数据读取命令相同的数据读取命令提交至所述flash的控制器,并且在所述命令队列中清除提交至所述flash的控制器的数据读取命令,以形成能够排入所述新的数据读取命令的空余节点。Further, if there are not enough free nodes in the command queue (that is, all new data read commands cannot be queued), the number of caches in the linked list of each storage unit of the flash is compared with the new data. The same data read command as the read command is submitted to the controller of the flash, and the data read command submitted to the controller of the flash is cleared in the command queue to form the new data that can be queued Read the spare node for the command.
由于所述命令队列的节点数量是有限的,因此可能出现队列中没有足够的空余节点缓存新命令的问题。此时先将一部分数据读取命令提交给flash的控制器,然后在命令队列中清除这些数据读取命令,以腾出空余节点给新的数据读取命令。需要说明的是,提交命令至flash的控制器时需要按照先遍历片选地址、后遍历存储单元地址的顺序,或者按照先遍历通道地址、然后遍历片选地址、最后遍历存储单元地址的顺序。比如,若当前有一条新的数据读取命令,而命令队列中没有空余节点,且当前按顺序应当提交物理地址为ch0-CE0-die0的数据读取命令,则提交ch0-CE0-die0的链表中缓存的一条数据读取命令至flash的控制器,然后在命令队列中清除这条数据读取命令,以腾出一个空余节点给新的数据读取命令。另外,若ch0-CE0-die0的链表中缓存有多条数据读取命令,则提交最早缓存到链表的那条数据读取命令;若ch0-CE0-die0的链表中没有缓存数据读取命令,则提交ch0-CE0-die1的链表中缓存的一条数据读取命令。Since the number of nodes in the command queue is limited, there may be a problem that there are not enough free nodes in the queue to buffer new commands. At this time, a part of the data read commands are submitted to the controller of the flash, and then these data read commands are cleared in the command queue to free up spare nodes for new data read commands. It should be noted that when submitting a command to the flash controller, it is necessary to traverse the chip select address first, then the memory unit address in the order, or in the order of traversing the channel address first, then the chip select address, and finally the memory unit address. For example, if there is currently a new data read command, and there are no free nodes in the command queue, and the data read command with the physical address of ch0-CE0-die0 should be submitted in sequence, submit the linked list of ch0-CE0-die0 A data read command cached in the flash controller is sent to the flash controller, and then the data read command is cleared in the command queue to free up a spare node for a new data read command. In addition, if there are multiple data read commands cached in the linked list of ch0-CE0-die0, submit the data read command cached to the linked list earliest; if there is no cached data read command in the linked list of ch0-CE0-die0, Then submit a data read command cached in the linked list of ch0-CE0-die1.
本发明实施例提出的存储设备的数据读取方法包括:获取上位机下发的多条数据读取命令;对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址;将所述多条数据读取命令依次排入预设的命令队列中的空余节点,每个空余节点排入一条数据读取命令;将所述命令队列中的数据读取命令依次按照对应的物理地址缓存到所述flash的各个存储单元的链表中;将所述各个存储单元的链表中缓存的数据读取命令提交至所述flash的控制器。本实施例通过在flash的每个存储单元创建链表,并且将获取到的数据读取命令都缓存到对应的存储单元的链表中,能够方便地实现数据读取命令的排序。The data reading method of the storage device provided by the embodiment of the present invention includes: acquiring multiple data reading commands issued by a host computer; analyzing the multiple data reading commands to obtain each data reading command respectively Corresponding physical addresses; arrange the multiple data read commands into the spare nodes in the preset command queue in turn, and each spare node is placed into a data read command; arrange the data read commands in the command queue Cache the data in the linked list of each storage unit of the flash sequentially according to the corresponding physical address; submit the data read command cached in the linked list of each storage unit to the controller of the flash. In this embodiment, by creating a linked list in each storage unit of the flash, and buffering all the acquired data read commands into the linked list of the corresponding storage unit, the ordering of the data read commands can be conveniently realized.
应理解,上述各个实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above-mentioned various embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention. .
上面主要描述了一种存储设备的数据读取方法,下面将对一种存储设备的数据读取装置进行描述。The above mainly describes a data reading method of a storage device, and a data reading apparatus of a storage device will be described below.
请参阅图4,本发明实施例中一种存储设备的数据读取装置的一个实施例包括:Referring to FIG. 4, an embodiment of a data reading apparatus of a storage device in an embodiment of the present invention includes:
数据读取命令获取模块401,用于获取上位机下发的多条数据读取命令;a data read
数据读取命令解析模块402,用于对所述多条数据读取命令进行解析,分别得到每条所述数据读取命令对应的物理地址,所述物理地址包括flash的片选地址和存储单元地址;The data read
数据读取命令提交模块403,用于按照先遍历所述片选地址、后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器,以使所述控制器依次执行接收到的所述数据读取命令。The data read
进一步的,所述物理地址还包括flash的通道地址,所述数据读取命令提交模块403具体可以用于:Further, the physical address also includes the channel address of the flash, and the data read
按照先遍历所述通道地址、然后遍历所述片选地址、最后遍历所述存储单元地址的顺序将所述数据读取命令提交至所述flash的控制器。The data read command is submitted to the controller of the flash according to the sequence of first traversing the channel address, then traversing the chip selection address, and finally traversing the memory unit address.
本发明实施例还提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如图1至图3表示的任意一种存储设备的数据读取方法的步骤。An embodiment of the present invention further provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the implementation shown in FIG. 1 Steps to the data reading method of any storage device shown in FIG. 3 .
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如图1至图3表示的任意一种存储设备的数据读取方法的步骤。Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, realizes the storage device of any of the storage devices shown in FIG. 1 to FIG. 3 . The steps of the data read method.
图5是本发明一实施例提供的终端设备的示意图。如图5所示,该实施例的终端设备5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机程序52。所述处理器50执行所述计算机程序52时实现上述各个存储设备的数据读取方法的实施例中的步骤,例如图1所示的步骤101至103。或者,所述处理器50执行所述计算机程序52时实现上述各装置实施例中各模块/单元的功能,例如图4所示模块401至403的功能。FIG. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in FIG. 5 , the
所述计算机程序52可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器51中,并由所述处理器50执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序52在所述终端设备5中的执行过程。The
所述终端设备5可以是各种类型的手机、桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是终端设备5的示例,并不构成对终端设备5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备5还可以包括输入输出设备、网络接入设备、总线等。The
所称处理器50可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called
所述存储器51可以是所述终端设备5的内部存储单元,例如终端设备5的硬盘或内存。所述存储器51也可以是所述终端设备5的外部存储设备,例如所述终端设备5上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述终端设备5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。The
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
在本发明所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the system embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Excluded are electrical carrier signals and telecommunication signals.
以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it is still possible to implement the foregoing implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the within the protection scope of the present invention.
Claims (9)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810204578.7A CN108563399B (en) | 2018-03-13 | 2018-03-13 | Data reading method and device of storage device, terminal device and storage medium |
| PCT/CN2018/105308 WO2019174206A1 (en) | 2018-03-13 | 2018-09-12 | Data reading method and apparatus of storage device, terminal device, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810204578.7A CN108563399B (en) | 2018-03-13 | 2018-03-13 | Data reading method and device of storage device, terminal device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108563399A CN108563399A (en) | 2018-09-21 |
| CN108563399B true CN108563399B (en) | 2020-02-14 |
Family
ID=63531624
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810204578.7A Active CN108563399B (en) | 2018-03-13 | 2018-03-13 | Data reading method and device of storage device, terminal device and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108563399B (en) |
| WO (1) | WO2019174206A1 (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112527550B (en) * | 2020-11-26 | 2023-06-30 | 中山市江波龙电子有限公司 | Method for generating rereading table of storage device, testing device and storage medium |
| CN115002241B (en) * | 2022-05-06 | 2024-02-20 | 成都申威科技有限责任公司 | Control method and system of intelligent instrument, electronic equipment and medium thereof |
| CN114969445B (en) * | 2022-05-31 | 2025-05-06 | 山东云海国创云计算装备产业创新中心有限公司 | A method, system, storage medium and device for reading multi-channel multi-linked list addresses |
| CN117453115A (en) * | 2022-07-19 | 2024-01-26 | 华为技术有限公司 | A method, device and system for sharing storage devices |
| CN119225661B (en) * | 2024-12-02 | 2025-03-18 | 杭州长川科技股份有限公司 | Test data accelerated processing device, method and test machine |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007164893A (en) * | 2005-12-13 | 2007-06-28 | Toshiba Corp | Semiconductor memory device |
| CN101740102B (en) * | 2008-11-11 | 2014-03-26 | 西安奇维测控科技有限公司 | Multichannel flash memory chip array structure and writing and reading method thereof |
| CN102567257B (en) * | 2011-12-26 | 2014-08-27 | 华中科技大学 | Method for controlling data reading and writing of multi-channel solid-state disc |
| CN102567219B (en) * | 2011-12-31 | 2015-08-05 | 记忆科技(深圳)有限公司 | The data transmission method of solid state hard disc SATA interface |
| CN105912307B (en) * | 2016-04-27 | 2018-09-07 | 浪潮(北京)电子信息产业有限公司 | A kind of Flash controller datas processing method and processing device |
| CN206179522U (en) * | 2016-10-27 | 2017-05-17 | 北京润科通用技术有限公司 | Solid -state memory and electronic equipment |
-
2018
- 2018-03-13 CN CN201810204578.7A patent/CN108563399B/en active Active
- 2018-09-12 WO PCT/CN2018/105308 patent/WO2019174206A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| CN108563399A (en) | 2018-09-21 |
| WO2019174206A1 (en) | 2019-09-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108563399B (en) | Data reading method and device of storage device, terminal device and storage medium | |
| DE102018105943B4 (en) | Data storage system and method for context-aware dynamic instruction planning for a data storage system | |
| CN109522243B (en) | Metadata cache management method and device in full flash storage and storage medium | |
| DE112017003294B4 (en) | Technologies for scalable sending and receiving of packets | |
| CN115964319B (en) | Data processing method for remote direct memory access and related products | |
| CN111258932B (en) | Methods and storage controllers for accelerating UFS protocol processing | |
| CN102725753A (en) | Method and apparatus for optimizing data access, method and apparatus for optimizing data storage | |
| CN113176992B (en) | A/B experiment shunting method, device and computer readable storage medium | |
| CN114327917A (en) | Memory management method, computing device and readable storage medium | |
| US20220083275A1 (en) | Method for enhancing quality of service of solid-state drive and solid-state drive | |
| JP2020194523A (en) | Method, apparatus, device, and storage medium for processing access request | |
| CN118708302B (en) | Transaction request processing method, device and storage medium | |
| CN113515234A (en) | Method for controlling data to be read out to host and controller | |
| CN113485643B (en) | Method for data access and controller for data writing | |
| CN117055820B (en) | A command processing method for a solid state drive, a solid state drive and a storage medium | |
| CN114153785A (en) | Memory management method and device based on remote direct memory access | |
| CN113688107A (en) | Metadata caching method, device, terminal and storage medium for distributed file system | |
| US20160085683A1 (en) | Data receiving device and data receiving method | |
| CN115687252A (en) | Calculation method, device, equipment and storage medium | |
| US11003578B2 (en) | Method and system for parallel mark processing | |
| CN116661684B (en) | A method, system, equipment and medium for reading flash memory data | |
| CN115658625B (en) | Data decompression system, graphic processing system, device, equipment and decompression method | |
| CN113076178B (en) | Message storage method, device and equipment | |
| CN115390864A (en) | Data processing method and device in flash, readable storage medium and terminal | |
| EP3764238A1 (en) | Processing circuit, information processing apparatus, and information processing method |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |