+

CN114816254A - Hard disk data access method, device, equipment and medium - Google Patents

Hard disk data access method, device, equipment and medium Download PDF

Info

Publication number
CN114816254A
CN114816254A CN202210446406.7A CN202210446406A CN114816254A CN 114816254 A CN114816254 A CN 114816254A CN 202210446406 A CN202210446406 A CN 202210446406A CN 114816254 A CN114816254 A CN 114816254A
Authority
CN
China
Prior art keywords
data
target
data transmission
access
transmission link
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.)
Pending
Application number
CN202210446406.7A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210446406.7A priority Critical patent/CN114816254A/en
Publication of CN114816254A publication Critical patent/CN114816254A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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]

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a hard disk data access method, a device, equipment and a medium, which relate to the technical field of computers, and the method comprises the following steps: acquiring a target access request sent by a central processing unit aiming at target data; judging the data type of the target data based on a preset large-capacity judgment rule and a preset small-capacity judgment rule; if the data type is large-capacity data, directly utilizing a first data transmission link between a double-rate synchronous dynamic random access memory and a central processing unit, which is established based on a first target protocol, to carry out data transmission so as to complete access operation aiming at the target data through the first data transmission link; and if the data type is small-capacity data, directly utilizing a second data transmission link between the nonvolatile memory and the central processing unit, which is established based on a second target protocol, to carry out data transmission so as to complete the access operation aiming at the target data through the second data transmission link. Therefore, the access speed of the hard disk is improved, and the time delay is reduced.

Description

一种硬盘数据访问方法、装置、设备及介质A hard disk data access method, device, device and medium

技术领域technical field

本发明涉及计算机技术领域,特别涉及一种硬盘数据访问方法、装置、设备及介质。The present invention relates to the field of computer technology, and in particular, to a method, device, device and medium for accessing hard disk data.

背景技术Background technique

当前,随着电子技术和制造工艺的快速发展,在计算机体系架构中,CPU(centralprocessing unit,中央处理器)和DDR(Double Data Rate,双倍速率同步动态随机存储器)的运行频率越来越高,处理能力越来越强,而大容量存储介质虽然也在发展,从机械硬盘到基于SATA(Serial Advanced Technology Attachment,串行高级技术附件)、NVME(NVMExpress,非易失性内存主机控制器接口规范)的SSD(Solid State Disk或Solid StateDrive,固态硬盘),但其发展速度严重滞后CPU的发展速度,如何提高硬盘IO(input\output)读写访问速度,成为影响计算机系统性能的关键。目前,在大容量存储介质设备中,SSD固态硬盘以其性能优势,逐渐取代传统的机械硬盘。SSD主要包含SATA2.0\SATA3.0\PCIe(Peripheral Component Interconnect Express)接口固态硬盘,其中基于NVME协议规范的SSD性能更加优越,也逐渐成为设计首选。但相对于CPU和DDR运行频率,依然是计算机系统性能主要瓶颈。At present, with the rapid development of electronic technology and manufacturing process, in the computer architecture, the operating frequency of CPU (central processing unit, central processing unit) and DDR (Double Data Rate, double-rate synchronous dynamic random access memory) is getting higher and higher. , the processing power is getting stronger and stronger, and although large-capacity storage media is also developing, from mechanical hard drives to SATA (Serial Advanced Technology Attachment, Serial Advanced Technology Attachment), NVME (NVMExpress, non-volatile memory host controller interface) Standard) SSD (Solid State Disk or Solid State Drive, solid state drive), but its development speed is seriously lagging behind the development speed of CPU, how to improve the read and write access speed of hard disk IO (input\output) has become the key to affecting the performance of computer systems. At present, among large-capacity storage media devices, SSD solid-state drives are gradually replacing traditional mechanical hard drives with their performance advantages. SSDs mainly include SATA2.0\SATA3.0\PCIe (Peripheral Component Interconnect Express) interface solid state drives, among which SSDs based on the NVME protocol specification have better performance and have gradually become the first choice for design. But relative to the operating frequency of CPU and DDR, it is still the main bottleneck of computer system performance.

综上所述,如何提高硬盘访问速度,降低延时是当前亟待解决的问题。To sum up, how to improve the access speed of the hard disk and reduce the delay is an urgent problem to be solved at present.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种硬盘数据访问方法、装置、设备及介质,能够提高硬盘访问速度,降低延时。其具体方案如下:In view of this, the purpose of the present invention is to provide a hard disk data access method, device, device and medium, which can improve the hard disk access speed and reduce the delay. Its specific plan is as follows:

第一方面,本申请公开了一种硬盘数据访问方法,包括:In a first aspect, the present application discloses a hard disk data access method, including:

获取主机的中央处理器针对目标数据发送的目标访问请求;Obtain the target access request sent by the host's central processor for the target data;

基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型;Judging the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule;

若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;If the data type of the target data is large-capacity data, the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit is directly used for data transmission, so as to Complete the access operation for the target data through the first data transmission link;

若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。If the data type of the target data is small-capacity data, the second data transmission link between the non-volatile memory established based on the second target protocol and the central processing unit is directly used for data transmission, so as to The second data transmission link completes the access operation for the target data.

可选的,所述若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作,包括:Optionally, if the data type of the target data is large-capacity data, the first data transmission chain between the double-rate synchronous dynamic random access memory and the central processing unit established based on the first target protocol is directly used. data transmission through the first data transmission link, so as to complete the access operation for the target data through the first data transmission link, including:

若所述目标数据的数据类型为大容量数据,并且所述目标访问请求中的所述访问操作的操作类型为写操作,则直接利用所述第一数据传输链路,将所述中央处理器发送的所述目标数据写入所述双倍速率同步动态随机存储器;If the data type of the target data is large-capacity data, and the operation type of the access operation in the target access request is a write operation, the first data transmission link is directly used to transfer the central processing unit to the central processing unit. The sent target data is written into the double-rate synchronous dynamic random access memory;

将所述双倍速率同步动态随机存储器中的所述目标数据写入至所述非易失性存储器中,以完成对所述目标数据的所述写操作。The target data in the double-rate synchronous dynamic random access memory is written into the non-volatile memory to complete the write operation on the target data.

可选的,所述若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作,包括:Optionally, if the data type of the target data is large-capacity data, the first data transmission chain between the double-rate synchronous dynamic random access memory and the central processing unit established based on the first target protocol is directly used. data transmission through the first data transmission link, so as to complete the access operation for the target data through the first data transmission link, including:

若所述目标数据的数据类型为大容量数据,并且所述目标访问请求中的所述访问操作的操作类型为读操作,则将所述非易失性存储器中的所述目标数据传输至所述双倍速率同步动态随机存储器,以便所述中央处理器利用所述第一数据传输链路直接从所述双倍速率同步动态随机存储器中读取所述目标数据,以完成对所述目标数据的所述读操作。If the data type of the target data is bulk data, and the operation type of the access operation in the target access request is a read operation, the target data in the non-volatile memory is transferred to the the double-rate synchronous dynamic random access memory, so that the central processing unit directly reads the target data from the double-rate synchronous dynamic random access memory by using the first data transmission link, so as to complete the processing of the target data of the read operation.

可选的,所述若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作,包括:Optionally, if the data type of the target data is small-capacity data, directly use the second data transmission link between the non-volatile memory established based on the second target protocol and the central processing unit. Data transmission, so as to complete the access operation for the target data through the second data transmission link, including:

若所述目标数据的数据类型为小容量数据,并且所述目标访问请求中的所述访问操作的操作类型为写操作,则利用所述第二数据传输链路直接将所述中央处理器发送的所述目标数据写入至所述非易失性存储器中,以完成对所述目标数据的所述写操作。If the data type of the target data is small-capacity data, and the operation type of the access operation in the target access request is a write operation, use the second data transmission link to directly send the central processing unit to the central processing unit. The target data is written into the non-volatile memory to complete the write operation on the target data.

可选的,所述若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作,包括:Optionally, if the data type of the target data is small-capacity data, directly use the second data transmission link between the non-volatile memory established based on the second target protocol and the central processing unit. Data transmission, so as to complete the access operation for the target data through the second data transmission link, including:

若所述目标数据的数据类型为小容量数据,并且所述目标访问请求中的所述访问操作的操作类型为读操作,则利用所述第二数据传输链路将所述目标数据发送至所述中央处理器,以完成对所述目标数据的读操作。If the data type of the target data is small-capacity data, and the operation type of the access operation in the target access request is a read operation, the second data transmission link is used to send the target data to the The central processing unit is used to complete the read operation of the target data.

可选的,所述利用所述第二数据传输链路将所述目标数据发送至所述中央处理器,包括:Optionally, the sending the target data to the central processing unit by using the second data transmission link includes:

基于所述非易失性存储器中的所述目标数据创建数据报文,并利用所述第二数据传输链路将所述数据报文发送至所述中央处理器。A data packet is created based on the target data in the non-volatile memory, and the data packet is sent to the central processing unit using the second data transmission link.

可选的,所述硬盘数据访问方法,还包括:Optionally, the hard disk data access method further includes:

利用第三目标协议实现所述主机与所述硬盘之间的通信。The communication between the host and the hard disk is implemented using a third target protocol.

第二方面,本申请公开了一种硬盘数据访问装置,包括:In a second aspect, the present application discloses a hard disk data access device, comprising:

请求获取模块,用于获取主机的中央处理器针对目标数据发送的目标访问请求;a request acquisition module, used to acquire the target access request sent by the central processing unit of the host for the target data;

判别模块,用于基于预设大容量判别规则和预设小容量判别规则判断目标数据的数据类型;The discrimination module is used for judging the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule;

第一访问模块,用于若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;The first access module is configured to directly utilize the first data transmission between the double-rate synchronous dynamic random access memory and the central processing unit established based on the first target protocol if the data type of the target data is large-capacity data The link performs data transmission, so as to complete the access operation for the target data through the first data transmission link;

第二访问模块,用于若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。The second access module is configured to directly utilize the second data transmission link between the non-volatile memory established based on the second target protocol and the central processing unit if the data type of the target data is small-capacity data Data transmission is performed to complete the access operation for the target data through the second data transmission link.

第三方面,本申请公开了一种电子设备,包括处理器和存储器;其中,所述处理器执行所述存储器中保存的计算机程序时实现前述公开的硬盘数据访问方法。In a third aspect, the present application discloses an electronic device including a processor and a memory; wherein, the processor implements the aforementioned method for accessing hard disk data when executing a computer program stored in the memory.

第四方面,本申请公开了一种计算机可读存储介质,用于存储计算机程序;其中,所述计算机程序被处理器执行时实现前述公开的硬盘数据访问方法。In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned method for accessing hard disk data is implemented.

可见,本申请获取主机的中央处理器针对目标数据发送的目标访问请求;基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型;若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。由此可见,本申请对于大容量数据只需要通过第一数据链路就可以进行双倍速率同步动态随机存储器与所述中央处理器之间的数据传输,不再需要通过主机中的双倍速率同步动态随机存储器,因此在进行大容量数据的数据传输时,提高了数据传输速度,降低了延时;本申请对于小容量数据只需要通过第二数据链路就可以进行非易失性存储器与所述中央处理器之间的数据传输,不再需要通过主机以及硬盘中的双倍速率同步动态随机存储器,因此在进行小容量数据的数据传输时,提高了数据传输速度,降低了延时;综上所述,本申请在进行数据传输的过程中,提高了数据传输速度,降低了延时,也即提高了硬盘访问速度,降低了延时,也减少了访问双倍速率同步动态随机存储器时的扰动。It can be seen that the present application obtains the target access request sent by the central processing unit of the host for the target data; judges the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule; if the data type of the target data For large-capacity data, the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit is directly used for data transmission, so as to pass the first data transmission link. complete the access operation for the target data; if the data type of the target data is small-capacity data, directly use the second target protocol between the non-volatile memory established based on the second target protocol and the central processing unit. The data transmission link performs data transmission, so as to complete the access operation for the target data through the second data transmission link. It can be seen that, for large-capacity data, data transmission between the double-rate synchronous dynamic random access memory and the central processing unit can be performed only through the first data link in the present application, and the double-rate data transmission in the host is no longer required. Synchronous dynamic random access memory, so when data transmission of large-capacity data is performed, the data transmission speed is improved, and the delay is reduced; for small-capacity data, the application can perform non-volatile memory and The data transmission between the central processing units no longer needs to pass through the double-rate synchronous dynamic random access memory in the host and the hard disk, so when the data transmission of small-capacity data is performed, the data transmission speed is improved and the delay time is reduced; In summary, in the process of data transmission, the present application improves the data transmission speed and reduces the delay, that is, the hard disk access speed is improved, the delay is reduced, and the access to the double-rate synchronous dynamic random access memory is also reduced. time disturbance.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art 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 It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.

图1为本申请提供的一种硬盘数据访问方法流程图;Fig. 1 is a flow chart of a hard disk data access method provided by the application;

图2为现有的一种硬盘数据访问方法示意图;Fig. 2 is a schematic diagram of an existing hard disk data access method;

图3为本申请提供的一种具体的硬盘数据访问方法流程图;3 is a flowchart of a specific hard disk data access method provided by the application;

图4为本申请提供的一种具体的硬盘数据访问方法流程图;4 is a flowchart of a specific hard disk data access method provided by the application;

图5为本申请提供的硬盘数据访问方法硬件部分组成示意图;5 is a schematic diagram of hardware components of the hard disk data access method provided by the application;

图6为本申请提供的硬盘数据访问方法固件部分组成示意图;6 is a schematic diagram of the composition of the firmware part of the hard disk data access method provided by the application;

图7为本申请提供的CPU读写大容量数据块的流程示意图;Fig. 7 is the schematic flow chart of CPU read-write large-capacity data block provided by this application;

图8为本申请提供的CPU读写小容量数据块的流程示意图;8 is a schematic flowchart of the CPU read and write small-capacity data blocks provided by the present application;

图9为本申请提供的一种硬盘数据访问装置结构图;9 is a structural diagram of a hard disk data access device provided by the application;

图10为本申请提供的一种电子设备结构图。FIG. 10 is a structural diagram of an electronic device provided by the application.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

当前SSD固态硬盘的访问速度慢,成为计算机性能的主要瓶颈。为了克服上述问题,本申请提供了一种硬盘数据访问方案,能够提高硬盘访问速度,降低延时。At present, the slow access speed of SSD solid-state drives has become the main bottleneck of computer performance. In order to overcome the above problems, the present application provides a hard disk data access solution, which can improve the hard disk access speed and reduce the delay.

参见图1所示,本申请实施例公开了一种硬盘数据访问方法,该方法包括:Referring to FIG. 1 , an embodiment of the present application discloses a method for accessing hard disk data, which includes:

步骤S11:获取主机的中央处理器针对目标数据发送的目标访问请求。Step S11: Obtain a target access request sent by the central processing unit of the host for the target data.

本申请实施例中,现有方法中对硬盘数据访问的方法主要有两种。第一种方法是基于SATA接口、AHCI(Advanced Host Controller Interface,高级主机控制器接口)协议规范的SSD(固态硬盘),该方法在硬件层面上,计算机与SATA中存储设备只能有一个队列,即使是多CPU情况下,所有请求只能经过这样一个狭窄的道路。同时SATA与SAS(SerialAttached SCSI)接口的外置控制器(PCH,Platform Controller Hub)与CPU通信也会带来额外时延,在软件层方面,AHCI每条命令则需要读取4次寄存器,会消耗8000次CPU循环,从而造成大概2.5微秒的延时。第二种方法,如图2所示,是基于PCIe接口、NVME协议规范的SSD,该方法在硬件层面上,NVME SSD使用PCIe总线传输,带宽显著提高。同时NVMe协议可以最多有64K个队列,多队列负责发挥闪存的并行能力,每个CPU或者核心都可以有一个队列,并发程度大大提升,极大地提高了吞吐率;具体的,CPU访问NVME SSD流程如下:SSD以PCIe插卡的方式插入主机系统的PCIe插槽,当CPU访问大容量数据时,CPU设置NVME队列信息,通知SSD,然后SSD侧控制器读取队列信息,控制数据管理模块和DMA,将NAND FLASH中的数据通过DMA(Direct Memory Access,直接存储器访问)传输到HOST(主机)侧RDIMM(Registered DIMM),并产生中断通知CPU,之后CPU通过CACHE(高速缓冲存储器)访问RDIMM,读取数据。数据流过程NAND FLASH→板卡DDR4→DMA→CPU DDR4→CACHE。当CPU进行小容量或IO数据读写时,NVME驱动将读取信息转换为PIO(Programmed Input-Output,可编程输入输出)操作,发送TLP包(Transaction Layer Packet,事务层包),然后SSD侧读取NAND FLASH数据,以完成包的形式发送到CPU缓存,进行读取。由此可见,上述方法的技术缺点主要为,第一,CPU访问SSD存储设备时的总延迟时间大,访问效率低;第二,CPU访问CACHE、DDR、整个链路的扰动大,造成SSD的访问延迟大;第三,CPU DMA频繁中断及PCIeNVME驱动都会影响性能。因此,本申请提出了一种硬盘数据访问方法。In the embodiments of the present application, there are mainly two methods for accessing hard disk data in the existing methods. The first method is SSD (Solid State Drive) based on SATA interface and AHCI (Advanced Host Controller Interface, Advanced Host Controller Interface) protocol specification. At the hardware level, the computer and SATA storage device can only have one queue. Even with multiple CPUs, all requests can only go through such a narrow path. At the same time, the communication between the external controller (PCH, Platform Controller Hub) of the SATA and SAS (SerialAttached SCSI) interfaces and the CPU will also bring extra delay. In terms of software layer, each command of AHCI needs to read the register 4 times, which will Consumes 8000 CPU cycles, resulting in a latency of about 2.5 microseconds. The second method, as shown in Figure 2, is an SSD based on the PCIe interface and the NVME protocol specification. At the hardware level, the NVME SSD uses the PCIe bus for transmission, and the bandwidth is significantly improved. At the same time, the NVMe protocol can have up to 64K queues, and multiple queues are responsible for the parallel ability of flash memory. Each CPU or core can have one queue, which greatly improves the degree of concurrency and greatly improves the throughput rate; specifically, the process of CPU accessing NVME SSD As follows: The SSD is inserted into the PCIe slot of the host system in the form of a PCIe card. When the CPU accesses large-capacity data, the CPU sets the NVME queue information, notifies the SSD, and then the SSD side controller reads the queue information and controls the data management module and DMA. , transfer the data in the NAND FLASH to the RDIMM (Registered DIMM) on the HOST (host) side through DMA (Direct Memory Access, direct memory access), and generate an interrupt to notify the CPU, and then the CPU accesses the RDIMM through the CACHE (cache memory), read fetch data. The data flow process is NAND FLASH→board DDR4→DMA→CPU DDR4→CACHE. When the CPU reads and writes small-capacity or IO data, the NVME driver converts the read information into PIO (Programmed Input-Output) operations, sends TLP packets (Transaction Layer Packet, transaction layer packets), and then the SSD side Read the NAND FLASH data and send it to the CPU cache in the form of a completion packet for reading. It can be seen that the technical disadvantages of the above method are mainly: first, the total delay time when the CPU accesses the SSD storage device is large, and the access efficiency is low; The access delay is large; third, frequent CPU DMA interrupts and PCIeNVME drivers will affect performance. Therefore, the present application proposes a hard disk data access method.

本申请实施例中,利用CXL(Compute Express Link)协议进行主机与硬盘间的通信。CXL协议又包括CXL.mem子协议、CXL.cache子协议和CXL.io子协议,另外,CXL协议又包括CXL控制器(CXL engine)。第三目标协议,也即CXL.io子协议用于实现所述主机与所述硬盘之间的通信。需要指出的是,CXL是一种新的计算互连标准。In the embodiment of the present application, the CXL (Compute Express Link) protocol is used for communication between the host and the hard disk. The CXL protocol further includes the CXL.mem sub-protocol, the CXL.cache sub-protocol and the CXL.io sub-protocol. In addition, the CXL protocol includes the CXL controller (CXL engine). The third target protocol, namely the CXL.io sub-protocol, is used to implement the communication between the host and the hard disk. It should be pointed out that CXL is a new computing interconnection standard.

本申请实施例中,首先构建好总链路,并对总链路进行初始化,然后获取主机的中央处理器针对目标数据发送的目标访问请求,具体的,由中央处理器发出目标访问请求,并生成访问请求包发送到硬盘,硬盘得到访问请求包后,对访问请求包进行解析得到目标访问请求,更具体的为,构建好CXL总链路,并对CXL总链路进行初始化,通过主机的CXL控制器(CXL engine)发送出CXL.io请求包。然后利用SSD中的CXL控制器(CXL engine)接收CXL.io请求包并解析得到目标访问请求。所述目标访问请求中包括但不限于数据源信息、数据类型信息和读写标志。In the embodiment of the present application, the overall link is first constructed and initialized, and then the target access request sent by the central processing unit of the host for the target data is obtained. Specifically, the central processing unit sends the target access request, and Generate the access request packet and send it to the hard disk. After the hard disk obtains the access request packet, it parses the access request packet to obtain the target access request. The CXL controller (CXL engine) sends out the CXL.io request packet. Then use the CXL controller (CXL engine) in the SSD to receive the CXL.io request packet and parse it to obtain the target access request. The target access request includes but is not limited to data source information, data type information and read/write flag.

步骤S12:基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型。Step S12: Determine the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule.

本申请实施例中,基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型,然后基于数据类型对目标数据进行相应的访问操作。In the embodiment of the present application, the data type of the target data is determined based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule, and then a corresponding access operation is performed on the target data based on the data type.

步骤S13:若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作。Step S13: If the data type of the target data is large-capacity data, directly use the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit to perform data processing. transmission, so as to complete the access operation for the target data through the first data transmission link.

本申请实施例中,若所述目标数据的数据类型为大容量数据,则基于读写标志判断访问操作为读操作还是写操作,然后直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的读操作或写操作。In the embodiment of the present application, if the data type of the target data is large-capacity data, it is determined whether the access operation is a read operation or a write operation based on the read-write flag, and then the double-rate synchronous dynamic randomization established based on the first target protocol is directly used. A first data transmission link between the memory and the central processing unit performs data transmission, so as to complete a read operation or a write operation for the target data through the first data transmission link.

需要指出的是,所述第一目标协议为CXL.mem子协议,CXL.mem实现CPU对SSD上的MEM(memory)直接管理,也可将MEM作为DDR(双倍速率同步动态随机存储器),因此,通过第一目标协议可以实现CPU直接访问SSD上双倍速率同步动态随机存储器,减少了CPU通过主机上的双倍速率同步动态随机存储器的步骤,提高了速度,降低了延时。需要指出的是,在完成读操作或写操作之后重新进行CXL链路的初始化。It should be pointed out that the first target protocol is the CXL.mem sub-protocol. CXL.mem realizes the direct management of the MEM (memory) on the SSD by the CPU, and the MEM can also be used as a DDR (double-rate synchronous dynamic random access memory), Therefore, through the first target protocol, the CPU can directly access the double-rate synchronous dynamic random access memory on the SSD, which reduces the steps for the CPU to synchronize the dynamic random access memory through the double-rate on the host, improves the speed, and reduces the delay. It should be pointed out that the initialization of the CXL link is performed again after the read operation or the write operation is completed.

需要指出的是,进行大容量数据的访问操作时,主要利用第一目标协议和第三目标协议,也即CXL.mem子协议和CXL.io子协议。It should be pointed out that, when performing large-capacity data access operations, the first target protocol and the third target protocol, that is, the CXL.mem sub-protocol and the CXL.io sub-protocol are mainly used.

步骤S14:若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。Step S14: if the data type of the target data is small-capacity data, then directly use the second data transmission link between the non-volatile memory established based on the second target protocol and the central processing unit to perform data transmission, to complete the access operation for the target data through the second data transmission link.

本申请实施例中,若所述目标数据的数据类型为小容量数据,则基于读写标志判断访问操作为读操作还是写操作,然后直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的读操作或写操作。In the embodiment of the present application, if the data type of the target data is small-capacity data, it is determined based on the read-write flag whether the access operation is a read operation or a write operation, and then the non-volatile memory established based on the second target protocol is directly used to communicate with the A second data transmission link between the central processors performs data transmission, so as to complete a read operation or a write operation for the target data through the second data transmission link.

需要指出的是,所述第二目标协议为CXL.cache子协议,CXL.cache使用硬盘对应的固件部分,也即FPGA(Field Programmable Gate Array,现场可编程门阵列),内部的RAM作为CPU CACHE,由CPU CACHE一致性管理模块统一管理,所述CPU CACHE可理解为非易失性存储器的缓冲区,由此,可通过第二目标协议直接进行非易失性存储器与所述中央处理器之间的数据传输,减少了CPU通过主机上的双倍速率同步动态随机存储器和SSD上的双倍速率同步动态随机存储器的步骤,提高了速度,降低了延时。需要指出的是,在完成读操作或写操作之后重新进行CXL链路的初始化。It should be pointed out that the second target protocol is the CXL.cache sub-protocol. CXL.cache uses the firmware part corresponding to the hard disk, that is, the FPGA (Field Programmable Gate Array), and the internal RAM is used as the CPU CACHE , which is uniformly managed by the CPU CACHE consistency management module. The CPU CACHE can be understood as a buffer of the non-volatile memory. Therefore, the communication between the non-volatile memory and the central processing unit can be directly performed through the second target protocol. It reduces the steps of the CPU through the double-rate synchronous dynamic random access memory on the host and the double-rate synchronous dynamic random access memory on the SSD, which improves the speed and reduces the delay. It should be pointed out that the initialization of the CXL link is performed again after the read operation or the write operation is completed.

需要指出的是,进行大容量数据的访问操作时,主要利用第二目标协议和第三目标协议,也即CXL.cache子协议和CXL.io子协议。It should be pointed out that, when performing large-capacity data access operations, the second target protocol and the third target protocol, that is, the CXL.cache sub-protocol and the CXL.io sub-protocol, are mainly used.

可见,本申请获取主机的中央处理器针对目标数据发送的目标访问请求;基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型;若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。由此可见,本申请对于大容量数据只需要通过第一数据链路就可以进行双倍速率同步动态随机存储器与所述中央处理器之间的数据传输,不再需要通过主机中的双倍速率同步动态随机存储器,因此在进行大容量数据的数据传输时,提高了数据传输速度,降低了延时;本申请对于小容量数据只需要通过第二数据链路就可以进行非易失性存储器与所述中央处理器之间的数据传输,不再需要通过主机以及硬盘中的双倍速率同步动态随机存储器,因此在进行小容量数据的数据传输时,提高了数据传输速度,降低了延时;综上所述,本申请在进行数据传输的过程中,提高了数据传输速度,降低了延时,也即提高了硬盘访问速度,降低了延时,也减少了访问双倍速率同步动态随机存储器时的扰动,另外,由于不存在DMA,因此不存在频繁中断,提高了访问速度。It can be seen that the present application obtains the target access request sent by the central processing unit of the host for the target data; judges the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule; if the data type of the target data For large-capacity data, the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit is directly used for data transmission, so as to pass the first data transmission link. complete the access operation for the target data; if the data type of the target data is small-capacity data, directly use the second target protocol between the non-volatile memory established based on the second target protocol and the central processing unit. The data transmission link performs data transmission, so as to complete the access operation for the target data through the second data transmission link. It can be seen that, for large-capacity data, data transmission between the double-rate synchronous dynamic random access memory and the central processing unit can be performed only through the first data link in the present application, and the double-rate data transmission in the host is no longer required. Synchronous dynamic random access memory, so when data transmission of large-capacity data is performed, the data transmission speed is improved, and the delay is reduced; for small-capacity data, the application can perform non-volatile memory and The data transmission between the central processing units no longer needs to pass through the double-rate synchronous dynamic random access memory in the host and the hard disk, so when the data transmission of small-capacity data is performed, the data transmission speed is improved and the delay time is reduced; In summary, in the process of data transmission, the present application improves the data transmission speed and reduces the delay, that is, the hard disk access speed is improved, the delay is reduced, and the access to the double-rate synchronous dynamic random access memory is also reduced. In addition, because there is no DMA, there is no frequent interruption, which improves the access speed.

参见图3所示,本申请实施例公开了一种具体的硬盘数据访问方法,该方法包括:Referring to FIG. 3 , an embodiment of the present application discloses a specific hard disk data access method, which includes:

步骤S21:获取主机的中央处理器针对目标数据发送的目标访问请求。Step S21: Obtain a target access request sent by the central processing unit of the host for the target data.

其中,关于步骤S21的其它更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For other more specific processing procedures of step S21, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.

步骤S22:基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型。Step S22: Determine the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule.

其中,关于步骤S22的其它更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For other more specific processing procedures of step S22, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.

步骤S23:若所述目标数据的数据类型为大容量数据,并且所述目标访问请求中的所述访问操作的操作类型为写操作,则直接利用所述第一数据传输链路,将所述中央处理器发送的所述目标数据写入所述双倍速率同步动态随机存储器;将所述双倍速率同步动态随机存储器中的所述目标数据写入至所述非易失性存储器中,以完成对所述目标数据的所述写操作。Step S23: If the data type of the target data is large-capacity data, and the operation type of the access operation in the target access request is a write operation, directly use the first data transmission link to transfer the The target data sent by the central processing unit is written into the double-rate synchronous dynamic random access memory; the target data in the double-rate synchronous dynamic random access memory is written into the non-volatile memory, so as to The write operation to the target data is completed.

本申请实施例中,若所述目标数据的数据类型为大容量数据,则基于读写标志判断访问操作为读操作还是写操作,如果所述目标访问请求中的所述访问操作的操作类型为写操作,则直接利用所述第一数据传输链路,将所述中央处理器发送的所述目标数据写入所述双倍速率同步动态随机存储器;将所述双倍速率同步动态随机存储器中的所述目标数据写入至所述非易失性存储器中,以完成对所述目标数据的所述写操作。需要指出的是,进行读写判断的是CXL协议又包括CXL控制器(CXL engine),CXL控制器控制CXL协议的使用。In the embodiment of the present application, if the data type of the target data is large-capacity data, it is determined based on the read-write flag whether the access operation is a read operation or a write operation, and if the operation type of the access operation in the target access request is write operation, directly use the first data transmission link to write the target data sent by the central processing unit into the double-rate synchronous dynamic random access memory; write the double-rate synchronous dynamic random access memory into the double-rate synchronous dynamic random access memory The target data is written into the non-volatile memory to complete the write operation on the target data. It should be pointed out that the CXL protocol and the CXL controller (CXL engine) are included in the read-write judgment, and the CXL controller controls the use of the CXL protocol.

本申请实施例中,直接利用所述第一数据传输链路,将所述中央处理器发送的所述目标数据写入所述双倍速率同步动态随机存储器的过程具体包括:产生中断,以通知CPU发送目标数据,然后CPU通过第一数据传输链路将所述中央处理器发送的所述目标数据写入所述双倍速率同步动态随机存储器,然后利用总线仲裁管理模块和缓冲区读写模块。将双倍速率同步动态随机存储器中的目标数据通过非易失性存储器控制器写入非易失性存储器中,然后再次产生中断通知CPU已完成写操作,然后重新进行CXL链路的初始化。In the embodiment of the present application, the process of directly using the first data transmission link to write the target data sent by the central processing unit into the double-rate synchronous dynamic random access memory specifically includes: generating an interrupt to notify The CPU sends the target data, and then the CPU writes the target data sent by the central processing unit into the double-rate synchronous dynamic random access memory through the first data transmission link, and then uses the bus arbitration management module and the buffer read-write module . Write the target data in the double-rate synchronous dynamic random access memory into the non-volatile memory through the non-volatile memory controller, and then generate an interrupt again to notify the CPU that the write operation has been completed, and then re-initialize the CXL link.

需要指出的是,所述第一数据传输链路为利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的数据传输链路;所述第一目标协议为CXL.mem子协议;所述产生中断以通知CPU发送目标数据或通知CPU已完成写操作,是由CXL.io子协议完成;本申请中,双倍速率同步动态随机存储器为SSD的MEM空间;所述总线仲裁管理模块和缓冲区读写模块位于硬盘对应的固件部分,也即FPGA固件,负责非易失性存储器中数据的传输;所述非易失性存储器为FLASH。It should be pointed out that the first data transmission link is a data transmission link between the double-rate synchronous dynamic random access memory and the central processing unit established based on the first target protocol; the first target protocol is CXL.mem sub-protocol; The described interrupt is generated to notify the CPU to send the target data or to notify the CPU that the write operation has been completed, which is completed by the CXL.io sub-protocol; In this application, the double-rate synchronous dynamic random access memory is the MEM space of the SSD; The bus arbitration management module and the buffer read/write module are located in the firmware part corresponding to the hard disk, that is, the FPGA firmware, and are responsible for data transmission in the non-volatile memory; the non-volatile memory is FLASH.

步骤S24:若所述目标数据的数据类型为大容量数据,并且所述目标访问请求中的所述访问操作的操作类型为读操作,则将所述非易失性存储器中的所述目标数据传输至所述双倍速率同步动态随机存储器,以便所述中央处理器利用所述第一数据传输链路直接从所述双倍速率同步动态随机存储器中读取所述目标数据,以完成对所述目标数据的所述读操作。Step S24: If the data type of the target data is large-capacity data, and the operation type of the access operation in the target access request is a read operation, then the target data in the non-volatile memory is stored. Transfer to the double-rate synchronous dynamic random access memory, so that the central processing unit directly reads the target data from the double-rate synchronous dynamic random access memory by using the first data transmission link, so as to complete all the the read operation of the target data.

本申请实施例中,若所述目标数据的数据类型为大容量数据,则基于读写标志判断访问操作为读操作还是写操作,如果所述目标访问请求中的所述访问操作的操作类型为读操作,则将所述非易失性存储器中的所述目标数据传输至所述双倍速率同步动态随机存储器,以便所述中央处理器利用所述第一数据传输链路直接从所述双倍速率同步动态随机存储器中读取所述目标数据,以完成对所述目标数据的所述读操作。In the embodiment of the present application, if the data type of the target data is large-capacity data, it is determined based on the read-write flag whether the access operation is a read operation or a write operation, and if the operation type of the access operation in the target access request is read operation, the target data in the non-volatile memory is transferred to the double-rate synchronous dynamic random access memory, so that the central processing unit uses the first data transfer link directly from the dual The target data is read from the double-rate synchronous dynamic random access memory, so as to complete the read operation on the target data.

本申请实施例中,根据目标数据在非易失性存储器中的地址信息,将目标数据从非易失性存储器读取并传输至双倍速率同步动态随机存储器,然后产生中断通知CPU读取数据,以便CPU利用所述第一数据传输链路从SSD的双倍速率同步动态随机存储器中读取数据,完成读操作。In the embodiment of the present application, according to the address information of the target data in the non-volatile memory, the target data is read from the non-volatile memory and transferred to the double-rate synchronous dynamic random access memory, and then an interrupt is generated to notify the CPU to read the data , so that the CPU uses the first data transmission link to read data from the double-rate synchronous dynamic random access memory of the SSD to complete the read operation.

需要指出的是,将目标数据从非易失性存储器传输至双倍速率同步动态随机存储器的步骤是由总线仲裁管理模块和缓冲区读写模块完成的;所述第一数据传输链路为利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的数据传输链路。It should be pointed out that the step of transferring the target data from the non-volatile memory to the double-rate synchronous dynamic random access memory is completed by the bus arbitration management module and the buffer read-write module; A data transmission link between the double-rate synchronous dynamic random access memory and the central processing unit established based on the first target protocol.

步骤S25:若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。Step S25: if the data type of the target data is small-capacity data, then directly use the second data transmission link between the non-volatile memory established based on the second target protocol and the central processing unit to perform data transmission, to complete the access operation for the target data through the second data transmission link.

其中,关于步骤S25的其它更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For other more specific processing procedures of step S25, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

可见,本申请获取主机的中央处理器针对目标数据发送的目标访问请求;基于预设大容量判别规则和预设小容量判别规则判断目标数据的数据类型;若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。由此可见,本申请对于大容量数据只需要通过第一数据链路就可以进行双倍速率同步动态随机存储器与所述中央处理器之间的数据传输,不再需要通过主机中的双倍速率同步动态随机存储器,因此在进行大容量数据的数据传输时,提高了数据传输速度,降低了延时;本申请对于小容量数据只需要通过第二数据链路就可以进行非易失性存储器与所述中央处理器之间的数据传输,不再需要通过主机以及硬盘中的双倍速率同步动态随机存储器,因此在进行小容量数据的数据传输时,提高了数据传输速度,降低了延时;综上所述,本申请在进行数据传输的过程中,提高了数据传输速度,降低了延时,也即提高了硬盘访问速度,降低了延时,也减少了访问双倍速率同步动态随机存储器时的扰动。It can be seen that the present application obtains the target access request sent by the central processing unit of the host for the target data; judges the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule; if the data type of the target data is large capacity data, then directly use the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit to perform data transmission, so as to complete the data transmission through the first data transmission link The access operation for the target data; if the data type of the target data is small-capacity data, directly use the second data transmission between the non-volatile memory established based on the second target protocol and the central processing unit The link performs data transmission, so as to complete the access operation for the target data through the second data transmission link. It can be seen that, for large-capacity data, data transmission between the double-rate synchronous dynamic random access memory and the central processing unit can be performed only through the first data link in the present application, and the double-rate data transmission in the host is no longer required. Synchronous dynamic random access memory, so when data transmission of large-capacity data is performed, the data transmission speed is improved, and the delay is reduced; for small-capacity data, the application can perform non-volatile memory and The data transmission between the central processing units no longer needs to pass through the double-rate synchronous dynamic random access memory in the host and the hard disk, so when the data transmission of small-capacity data is performed, the data transmission speed is improved and the delay time is reduced; In summary, in the process of data transmission, the present application improves the data transmission speed and reduces the delay, that is, the hard disk access speed is improved, the delay is reduced, and the access to the double-rate synchronous dynamic random access memory is also reduced. time disturbance.

参见图4所示,本申请实施例公开了一种具体的硬盘数据访问方法,该方法包括:Referring to FIG. 4 , an embodiment of the present application discloses a specific hard disk data access method, which includes:

步骤S31:获取主机的中央处理器针对目标数据发送的目标访问请求。Step S31: Obtain a target access request sent by the central processing unit of the host for the target data.

其中,关于步骤S31的其它更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For other more specific processing procedures of step S31, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

步骤S32:基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型。Step S32: Determine the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule.

其中,关于步骤S32的其它更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For other more specific processing procedures of step S32, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.

步骤S33:若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作。Step S33: If the data type of the target data is large-capacity data, directly use the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit to perform data processing. transmission, so as to complete the access operation for the target data through the first data transmission link.

其中,关于步骤S33的其它更加具体的处理过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。Wherein, for other more specific processing procedures of step S33, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

步骤S34:若所述目标数据的数据类型为小容量数据,并且所述目标访问请求中的所述访问操作的操作类型为写操作,则利用所述第二数据传输链路直接将所述中央处理器发送的所述目标数据写入至所述非易失性存储器中,以完成对所述目标数据的所述写操作。Step S34: If the data type of the target data is small-capacity data, and the operation type of the access operation in the target access request is a write operation, use the second data transmission link to directly transfer the data to the central The target data sent by the processor is written into the non-volatile memory to complete the write operation on the target data.

本申请实施例中,若所述目标数据的数据类型为小容量数据,则基于读写标志判断访问操作为读操作还是写操作,如果所述目标访问请求中的所述访问操作的操作类型为写操作,则利用所述第二数据传输链路直接将所述中央处理器发送的所述目标数据写入至所述非易失性存储器中,以完成对所述目标数据的所述写操作。In the embodiment of the present application, if the data type of the target data is small-capacity data, it is determined based on the read-write flag whether the access operation is a read operation or a write operation, and if the operation type of the access operation in the target access request is write operation, then use the second data transmission link to directly write the target data sent by the central processing unit into the non-volatile memory, so as to complete the write operation to the target data .

本申请实施例中,利用所述第二数据传输链路直接将所述中央处理器发送的所述目标数据写入至所述非易失性存储器中的步骤,具体为,获取CPU基于目标数据生成数据包,并对数据包进行解析得到目标数据,然后将目标数据写入非易失性存储器的缓冲区,然后由总线仲裁管理模块和缓冲区读写模块将非易失性存储器的缓冲区中的目标数据写入至非易失性存储器中。需要指出的是,CPU生成数据包之前,主机生成完成包,利用完成包通知CPU发送数据。In the embodiment of the present application, the step of directly writing the target data sent by the central processing unit into the non-volatile memory by using the second data transmission link is, specifically, obtaining the CPU-based target data Generate a data packet, parse the data packet to get the target data, and then write the target data into the buffer of the non-volatile memory, and then the bus arbitration management module and the buffer read-write module will transfer the buffer of the non-volatile memory to the buffer of the non-volatile memory. The target data in is written to the non-volatile memory. It should be pointed out that before the CPU generates a data packet, the host generates a completion packet, and uses the completion packet to notify the CPU to send data.

需要指出的是,生成数据完成包并通知CPU发送数据的过程是由CXL控制器(CXLengine)进行的;所述数据包为CXL.cache数据包;所述解析数据包的过程是由CXL控制器(CXL engine)进行的。It should be pointed out that the process of generating a data completion packet and notifying the CPU to send data is performed by the CXL controller (CXLengine); the data packet is a CXL.cache data packet; the process of parsing the data packet is performed by the CXL controller (CXL engine).

步骤S35:若所述目标数据的数据类型为小容量数据,并且所述目标访问请求中的所述访问操作的操作类型为读操作,则利用所述第二数据传输链路将所述目标数据发送至所述中央处理器,以完成对所述目标数据的读操作。Step S35: If the data type of the target data is small-capacity data, and the operation type of the access operation in the target access request is a read operation, use the second data transmission link to transfer the target data. Sent to the central processing unit to complete the read operation of the target data.

本申请实施例中,若所述目标数据的数据类型为小容量数据,则基于读写标志判断访问操作为读操作还是写操作,如果所述目标访问请求中的所述访问操作的操作类型为读操作,则利用所述第二数据传输链路将所述目标数据发送至所述中央处理器,以完成对所述目标数据的读操作,具体的,基于所述非易失性存储器中的所述目标数据创建数据报文,并利用所述第二数据传输链路将所述数据报文发送至所述中央处理器。In the embodiment of the present application, if the data type of the target data is small-capacity data, it is determined based on the read-write flag whether the access operation is a read operation or a write operation, and if the operation type of the access operation in the target access request is read operation, then use the second data transmission link to send the target data to the central processing unit to complete the read operation of the target data, specifically, based on the data in the non-volatile memory The target data creates a data packet, and sends the data packet to the central processing unit by using the second data transmission link.

需要指出的是,可以将所述非易失性存储器中的所述目标数据写入非易失性存储器的缓冲区,然后利用所述第二数据传输链路将所述缓冲区的所述目标数据发送至所述中央处理器,以完成对所述目标数据的读操作;具体的,可以将所述非易失性存储器中的所述目标数据写入非易失性存储器的缓冲区,然后基于缓冲区的所述目标数据创建数据报文,并利用所述第二数据传输链路将所述数据报文发送至所述中央处理器。It should be noted that the target data in the non-volatile memory can be written into a buffer of the non-volatile memory, and then the target data of the buffer can be transferred to the buffer using the second data transmission link. The data is sent to the central processing unit to complete the read operation of the target data; specifically, the target data in the non-volatile memory can be written into the buffer of the non-volatile memory, and then Create a data packet based on the target data in the buffer, and send the data packet to the central processing unit by using the second data transmission link.

需要指出的是,将所述非易失性存储器中的所述目标数据写入非易失性存储器的缓冲区的步骤是由总线仲裁管理模块和缓冲区读写模块完成的;CXL控制器(CXL engine)从缓冲区读取目标数据,产生数据报文;所述数据报文为CXL.cache数据报文。It should be pointed out that the step of writing the target data in the non-volatile memory into the buffer of the non-volatile memory is completed by the bus arbitration management module and the buffer read-write module; the CXL controller ( CXL engine) reads the target data from the buffer to generate a data message; the data message is a CXL.cache data message.

可见,本申请获取主机的中央处理器针对目标数据发送的目标访问请求;基于预设大容量判别规则和预设小容量判别规则判断目标数据的数据类型;若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。由此可见,本申请对于大容量数据只需要通过第一数据链路就可以进行双倍速率同步动态随机存储器与所述中央处理器之间的数据传输,不再需要通过主机中的双倍速率同步动态随机存储器,因此在进行大容量数据的数据传输时,提高了数据传输速度,降低了延时;本申请对于小容量数据只需要通过第二数据链路就可以进行非易失性存储器与所述中央处理器之间的数据传输,不再需要通过主机以及硬盘中的双倍速率同步动态随机存储器,因此在进行小容量数据的数据传输时,提高了数据传输速度,降低了延时;综上所述,本申请在进行数据传输的过程中,提高了数据传输速度,降低了延时,也即提高了硬盘访问速度,降低了延时,也减少了访问双倍速率同步动态随机存储器时的扰动。It can be seen that the present application obtains the target access request sent by the central processing unit of the host for the target data; judges the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule; if the data type of the target data is large capacity data, then directly use the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit to perform data transmission, so as to complete the data transmission through the first data transmission link The access operation for the target data; if the data type of the target data is small-capacity data, directly use the second data transmission between the non-volatile memory established based on the second target protocol and the central processing unit The link performs data transmission, so as to complete the access operation for the target data through the second data transmission link. It can be seen that, for large-capacity data, data transmission between the double-rate synchronous dynamic random access memory and the central processing unit can be performed only through the first data link in the present application, and the double-rate data transmission in the host is no longer required. Synchronous dynamic random access memory, so when data transmission of large-capacity data is performed, the data transmission speed is improved, and the delay is reduced; for small-capacity data, the application can perform non-volatile memory and The data transmission between the central processing units no longer needs to pass through the double-rate synchronous dynamic random access memory in the host and the hard disk, so when the data transmission of small-capacity data is performed, the data transmission speed is improved and the delay time is reduced; In summary, in the process of data transmission, the present application improves the data transmission speed and reduces the delay, that is, the hard disk access speed is improved, the delay is reduced, and the access to the double-rate synchronous dynamic random access memory is also reduced. time disturbance.

参见图5所示,为本申请公开的硬件部分组成。采用FPGA作为主处理芯片,支持2路DDR4,其中一路由数据管理模块进行元数据、FLASH块映射等管理,另一路作为FLASH阵列数据的缓存,由数据管理模块和CXL协议共同访问。其中存储器子系统包含FLASH阵列、FLASH控制器、数据管理模块及DDR4组成。接口采用CXL协议,在物理形态上兼容PCIe协议,板卡可以通过金手指直接插入主板PCIe插槽。需要指出的是,物理层兼容PCIe接口,可以复用PCIe插槽,无需新的连接器。Referring to FIG. 5 , the hardware components disclosed in this application are composed. FPGA is used as the main processing chip and supports 2 channels of DDR4. One of the routing data management modules manages metadata and FLASH block mapping, and the other is used as a cache for FLASH array data, which is jointly accessed by the data management module and the CXL protocol. The memory subsystem includes a FLASH array, a FLASH controller, a data management module and DDR4. The interface adopts the CXL protocol, which is compatible with the PCIe protocol in physical form, and the board can be directly inserted into the motherboard PCIe slot through the golden finger. It should be pointed out that the physical layer is compatible with the PCIe interface, and the PCIe slots can be reused without the need for new connectors.

参见图6所示,为本申请公开的固件部分组成,FPGA固件部分中固件关键模块包括CXL子系统(包含CXL.io、CXL.cache、CXL.mem协议层、CXL Coherency Engine以及CXLphy)、缓冲区读写模块、总线仲裁管理模块、控制寄存器、状态寄存器、NAND FLASH子系统(FLASH控制器、FLASH数据管理模块),CXL.io用于实现HOST与SSD间IO通信,包括链路训练、命令发送、msi中断等功能,CXL.cache使用FPGA内部的RAM作为CPU CACHE,由CPU CACHE一致性管理模块统一管理,CPU可以像访问本地CACHE一样访问SSD上的CACHE,从而简化CPU访问SSD的路径,降低访问延时。CXL.mem实现CPU对SSD上的MEM直接管理。缓冲区读写模块和总线仲裁管理模块负责FLASH数据的传输。本文的重点是阐述如何通过CXL降低CPU访问SSD总体时间,因此关于存储子系统不进行详细描述。Referring to FIG. 6 , the firmware disclosed in this application is composed of the firmware part. The key firmware modules in the FPGA firmware part include CXL subsystem (including CXL.io, CXL.cache, CXL.mem protocol layer, CXL Coherency Engine and CXLphy), buffer Area read/write module, bus arbitration management module, control register, status register, NAND FLASH subsystem (FLASH controller, FLASH data management module), CXL.io is used to implement IO communication between HOST and SSD, including link training, commands For functions such as sending and msi interrupt, CXL.cache uses the internal RAM of the FPGA as the CPU CACHE, which is managed by the CPU CACHE consistency management module. The CPU can access the CACHE on the SSD just like accessing the local CACHE, thereby simplifying the path for the CPU to access the SSD. Reduce access latency. CXL.mem implements the direct management of the MEM on the SSD by the CPU. The buffer read-write module and the bus arbitration management module are responsible for the transmission of FLASH data. The focus of this article is to explain how to reduce the overall CPU access time to SSD through CXL, so the storage subsystem will not be described in detail.

参见图7所示,为具体的CPU读写大容量数据块的流程,如下所示:Referring to Figure 7, the specific process of reading and writing large-capacity data blocks for the CPU is as follows:

S40:初始状态,完成CXL链路初始化。S40: In the initial state, the initialization of the CXL link is completed.

S41:CPU发出IO请求,通过主机侧CXL控制器(CXL engine)发出CXL.io请求包。S41: The CPU sends an IO request, and sends a CXL.io request packet through the host-side CXL controller (CXL engine).

S42:SSD侧CXL engine接收到主机CXL.io请求包,由CXL.io子协议进行包解析,得到IO请求的相关信息,如读写标志、数据源、大小等信息。S42: The CXL engine on the SSD side receives the host CXL.io request packet, and the CXL.io sub-protocol parses the packet to obtain the relevant information of the IO request, such as the read/write flag, data source, size and other information.

S43:CXL engine根据CXL.io解析后的信息进行读、写判读。如果是写操作,跳到状态S44,如果是读操作,跳转到S47状态。S43: CXL engine performs read and write interpretation based on the information parsed by CXL.io. If it is a write operation, jump to the state S44, if it is a read operation, jump to the state S47.

S44:通过CXL.io产生CXL中断,通知CPU,可以发送数据。S44: Generate a CXL interrupt through CXL.io to notify the CPU that data can be sent.

S45:CPU侧CXL通过CXL.mem协议,直接将数据写入SSD的MEM空间。S45: The CXL on the CPU side directly writes data to the MEM space of the SSD through the CXL.mem protocol.

S46:总线仲裁管理模块和缓冲区读写模块配合,将MEM空间的数据通过FLASH控制器写入FLASH中,然后向CPU发出中断,实现SSD写操作。返回初始状态S40。S46: The bus arbitration management module cooperates with the buffer read/write module to write the data in the MEM space into the FLASH through the FLASH controller, and then send an interrupt to the CPU to realize the SSD write operation. Return to the initial state S40.

S47:当判断到IO是读请求时,根据地址信息,将数据从FLASH读取。S47: When it is determined that the IO is a read request, read the data from the FLASH according to the address information.

S48:总线仲裁管理模块和缓冲区读写模块配合,将数据搬移到SSD的MEM空间。S48: The bus arbitration management module cooperates with the buffer read/write module to move the data to the MEM space of the SSD.

S49:通知CPU读取数据,CPU通过HOST侧CXL.mem协议读取SSD的MEM空间数据,完成读操作。S49: Notify the CPU to read the data, and the CPU reads the MEM space data of the SSD through the CXL.mem protocol on the HOST side to complete the read operation.

参见图8所示,为具体的CPU读写小容量数据块的流程,如下所示:Referring to Figure 8, the specific process of reading and writing small-capacity data blocks for the CPU is as follows:

S50:初始状态,完成CXL初始化,等待CPU命令,并控制CPU发出IO请求,通过主机侧CXL控制器发出CXL.io包请求。S50: Initial state, complete the CXL initialization, wait for the CPU command, and control the CPU to send an IO request, and send a CXL.io packet request through the host-side CXL controller.

S51:SSD侧CXL engine接收到主机CXL.io请求包,CXL engine基于CXL.io子协议进行CXL.io包解析,判断CPU读操作还是写操作。如果是读操作,跳转到S55转态,如果是写操作,跳转到S52转态。S51: The CXL engine on the SSD side receives the CXL.io request packet from the host, and the CXL engine parses the CXL.io packet based on the CXL.io sub-protocol to determine whether the CPU is a read operation or a write operation. If it is a read operation, jump to S55 to change state, if it is a write operation, jump to S52 to change state.

S52:CXL engine发送CXL.io完成包,通知CPU发送数据。S52: The CXL engine sends a CXL.io completion packet to notify the CPU to send data.

S53:CPU发送CXL.cache数据包,CXL.Engine解析数据包,将数据写入FLASH缓冲区S53: The CPU sends the CXL.cache data packet, CXL.Engine parses the data packet, and writes the data into the FLASH buffer

S54:通过总线仲裁管理模块和读写缓冲区模块将数据写入FLASH。S54: Write data into FLASH through the bus arbitration management module and the read-write buffer module.

S55:CPU读操作,总线仲裁管理模块和读写缓冲区模块读取FLASH数据写入缓冲区。S55: CPU read operation, the bus arbitration management module and the read-write buffer module read the FLASH data and write the buffer.

S56:CXL engine读取缓冲区数据,产生CXL.cache数据报文并发送给CPU。S56: The CXL engine reads the buffer data, generates a CXL.cache data packet and sends it to the CPU.

S57:CPU侧接收到CXL.cashe数据报文,完成读操作。S57: The CPU side receives the CXL.cash data packet and completes the read operation.

综上所述,本申请从降低CPU-CACHE-DDR-SSD整体链路上延时的角度提出了一种基于CXL协议的新型SSD固态硬盘,在固态硬盘上实现CXL.io、CXL.cache、CXL.mem子协议,利用FPGA内部高速RAM或REG作为SSD缓存CACHE,CPU可以直接访问SSD固态硬盘上的Cache,从而提高IO存储速度。降低传输延时。主要是,针对当前CPU通过DMA方式或IO方式访问SSD延迟相对较大的问题,实现一种新型的协议CXL来进一步提高CPU访问SSD的IO性能,降低访问延时,同时,本方案也可以减少CPU访问本地DDR带来的额外扰动,从而提供整个计算机系统性能。具体的,一是对于大容量数据传输,通过CXL.mem子协议,利用FPGA侧MEM作为HOST侧CPU的MEM,形成FLASH-本地DDR-CXL.mem数据通路,避免FLASH数据在本地DDR与HOST侧DDR之间的传输延时。二是小容量数据传输,通过CXL.cache子协议,直接对FLASH数据进行读写,绕过本地DDR操作,同时,CXL.IO协议包相对于PCIe IO包进行了简化,进一步降低延时。三是CPU-CXL-本地DDR-FLASH形成完整的数据通路,无需HOST侧RDIMM参与,避免了RDIMM访问的扰动问题,其中,HOST为主机。To sum up, this application proposes a new type of SSD solid-state drive based on the CXL protocol from the perspective of reducing the overall link delay of CPU-CACHE-DDR-SSD, which implements CXL.io, CXL.cache, CXL. The CXL.mem sub-protocol uses the internal high-speed RAM or REG of the FPGA as the SSD cache cache, and the CPU can directly access the Cache on the SSD solid state drive, thereby improving the IO storage speed. Reduce transmission delay. Mainly, in view of the relatively large delay of the current CPU accessing SSD through DMA or IO, a new protocol CXL is implemented to further improve the IO performance of CPU accessing SSD and reduce the access delay. At the same time, this solution can also reduce The additional perturbation introduced by the CPU accessing the local DDR provides overall computer system performance. Specifically, first, for large-capacity data transmission, through the CXL.mem sub-protocol, the MEM on the FPGA side is used as the MEM of the CPU on the HOST side to form a FLASH-local DDR-CXL.mem data path to avoid FLASH data on the local DDR and HOST sides. Propagation delay between DDRs. The second is small-capacity data transmission. Through the CXL.cache sub-protocol, the FLASH data can be read and written directly, bypassing the local DDR operation. At the same time, the CXL.IO protocol packet is simplified compared to the PCIe IO packet, which further reduces the delay. Third, CPU-CXL-local DDR-FLASH forms a complete data path, without the participation of RDIMM on the HOST side, which avoids the disturbance of RDIMM access, where the HOST is the host.

参见图9所示,本申请实施例公开了一种硬盘数据访问装置,包括:Referring to FIG. 9, an embodiment of the present application discloses a hard disk data access device, including:

请求获取模块11,用于获取主机的中央处理器针对目标数据发送的目标访问请求;The request acquisition module 11 is used to acquire the target access request sent by the central processing unit of the host for the target data;

判别模块12,用于基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型;The discrimination module 12 is used for judging the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule;

第一访问模块13,用于若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;The first access module 13 is configured to directly utilize the first data between the double-rate synchronous dynamic random access memory and the central processing unit established based on the first target protocol if the data type of the target data is large-capacity data The transmission link performs data transmission, so as to complete the access operation for the target data through the first data transmission link;

第二访问模块14,用于若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。The second access module 14 is configured to directly utilize the second data transmission chain between the non-volatile memory established based on the second target protocol and the central processing unit if the data type of the target data is small-capacity data data transmission through the second data transmission link, so as to complete the access operation for the target data through the second data transmission link.

其中,关于上述各个模块更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For more specific working processes of the above-mentioned modules, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.

可见,本申请获取主机的中央处理器针对目标数据发送的目标访问请求;基于预设大容量判别规则和预设小容量判别规则判断所述目标数据的数据类型;若所述目标数据的数据类型为大容量数据,则直接利用基于第一目标协议建立的双倍速率同步动态随机存储器与所述中央处理器之间的第一数据传输链路进行数据传输,以通过所述第一数据传输链路完成针对所述目标数据的访问操作;若所述目标数据的数据类型为小容量数据,则直接利用基于第二目标协议建立的非易失性存储器与所述中央处理器之间的第二数据传输链路进行数据传输,以通过所述第二数据传输链路完成针对所述目标数据的访问操作。由此可见,本申请对于大容量数据只需要通过第一数据链路就可以进行双倍速率同步动态随机存储器与所述中央处理器之间的数据传输,不再需要通过主机中的双倍速率同步动态随机存储器,因此在进行大容量数据的数据传输时,提高了数据传输速度,降低了延时;本申请对于小容量数据只需要通过第二数据链路就可以进行非易失性存储器与所述中央处理器之间的数据传输,不再需要通过主机以及硬盘中的双倍速率同步动态随机存储器,因此在进行小容量数据的数据传输时,提高了数据传输速度,降低了延时;综上所述,本申请在进行数据传输的过程中,提高了数据传输速度,降低了延时,也即提高了硬盘访问速度,降低了延时,也减少了访问双倍速率同步动态随机存储器时的扰动。It can be seen that the present application obtains the target access request sent by the central processing unit of the host for the target data; judges the data type of the target data based on the preset large-capacity discrimination rule and the preset small-capacity discrimination rule; if the data type of the target data For large-capacity data, the first data transmission link between the double-rate synchronous dynamic random access memory established based on the first target protocol and the central processing unit is directly used for data transmission, so as to pass the first data transmission link. complete the access operation for the target data; if the data type of the target data is small-capacity data, directly use the second target protocol between the non-volatile memory established based on the second target protocol and the central processing unit. The data transmission link performs data transmission, so as to complete the access operation for the target data through the second data transmission link. It can be seen that, for large-capacity data, data transmission between the double-rate synchronous dynamic random access memory and the central processing unit can be performed only through the first data link in the present application, and the double-rate data transmission in the host is no longer required. Synchronous dynamic random access memory, so when data transmission of large-capacity data is performed, the data transmission speed is improved, and the delay is reduced; for small-capacity data, the application can perform non-volatile memory and The data transmission between the central processing units no longer needs to pass through the double-rate synchronous dynamic random access memory in the host and the hard disk, so when the data transmission of small-capacity data is performed, the data transmission speed is improved and the delay time is reduced; In summary, in the process of data transmission, the present application improves the data transmission speed and reduces the delay, that is, the hard disk access speed is improved, the delay is reduced, and the access to the double-rate synchronous dynamic random access memory is also reduced. time disturbance.

进一步的,本申请实施例还提供了一种电子设备,图10是根据一示例性实施例示出的电子设备20结构图,图中的内容不能认为是对本申请的使用范围的任何限制。Further, an embodiment of the present application also provides an electronic device. FIG. 10 is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure should not be considered as any limitation on the scope of use of the present application.

图10为本申请实施例提供的一种电子设备20的结构示意图。该电子设备20,具体可以包括:至少一个处理器21、至少一个存储器22、电源23、输入输出接口24、通信接口25和通信总线26。其中,所述存储器22用于存储计算机程序,所述计算机程序由所述处理器21加载并执行,以实现前述任意实施例公开的硬盘数据访问方法的相关步骤。FIG. 10 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21 , at least one memory 22 , a power supply 23 , an input and output interface 24 , a communication interface 25 and a communication bus 26 . The memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps of the hard disk data access method disclosed in any of the foregoing embodiments.

本实施例中,电源23用于为电子设备20上的各硬件设备提供工作电压;通信接口25能够为电子设备20创建与外界设备之间的数据传输通道,其所遵循的通信协议是能够适用于本申请技术方案的任意通信协议,在此不对其进行具体限定;输入输出接口24,用于获取外界输入数据或向外界输出数据,其具体的接口类型可以根据具体应用需要进行选取,在此不进行具体限定。In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is applicable Any communication protocol in the technical solution of the present application is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, here No specific limitation is made.

另外,存储器22作为资源存储的载体,可以是只读存储器、随机存储器、磁盘或者光盘等,存储器22作为可以包括作为运行内存的随机存取存储器和用于外部内存的存储用途的非易失性存储器,其上的存储资源包括操作系统221、计算机程序222等,存储方式可以是短暂存储或者永久存储。In addition, as a carrier for resource storage, the memory 22 can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc. The memory 22 can include a random access memory as a running memory and a non-volatile non-volatile memory used for storage purposes of external memory The memory, the storage resources on it include the operating system 221, the computer program 222, etc., and the storage mode can be short-term storage or permanent storage.

其中,操作系统221用于管理与控制源主机上电子设备20上的各硬件设备以及计算机程序222,操作系统221可以是Windows、Unix、Linux等。计算机程222除了包括能够用于完成前述任一实施例公开的由电子设备20执行的硬盘数据访问方法的计算机程序之外,还可以进一步包括能够用于完成其他特定工作的计算机程序。The operating system 221 is used to manage and control various hardware devices and computer programs 222 on the electronic device 20 on the source host, and the operating system 221 may be Windows, Unix, Linux, or the like. In addition to the computer program that can be used to complete the hard disk data access method performed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks.

本实施例中,所述输入输出接口24具体可以包括但不限于USB接口、硬盘读取接口、串行接口、语音输入接口、指纹输入接口等。In this embodiment, the input/output interface 24 may specifically include, but is not limited to, a USB interface, a hard disk reading interface, a serial interface, a voice input interface, a fingerprint input interface, and the like.

进一步的,本申请实施例还公开了一种计算机可读存储介质,用于存储计算机程序;其中,所述计算机程序被处理器执行时实现前述公开的硬盘数据访问方法。Further, an embodiment of the present application further discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned method for accessing hard disk data is implemented.

关于该方法的具体步骤可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the specific steps of the method, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

这里所说的计算机可读存储介质包括随机存取存储器(Random Access Memory,RAM)、内存、只读存储器(Read-Only Memory,ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、磁碟或者光盘或技术领域内所公知的任意其他形式的存储介质。其中,所述计算机程序被处理器执行时实现前述硬盘数据访问方法。关于该方法的具体步骤可以参考前述实施例中公开的相应内容,在此不再进行赘述。The computer-readable storage medium mentioned here includes random access memory (Random Access Memory, RAM), memory, read-only memory (Read-Only Memory, ROM), electrically programmable ROM, electrically erasable programmable ROM, registers , hard disk, magnetic disk or optical disk or any other form of storage medium known in the art. Wherein, when the computer program is executed by the processor, the aforementioned hard disk data access method is implemented. For the specific steps of the method, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的硬盘数据访问方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. For the device disclosed in the embodiment, since it corresponds to the hard disk data access method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the possibilities of hardware and software. Interchangeability, the above description has generally described the components and steps of each example in terms of functionality. 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 this application.

结合本文中所公开的实施例描述算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of an algorithm described in connection with the embodiments disclosed herein may be implemented directly in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the art. in any other known form of storage medium.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or there is any such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上对本发明所提供的一种硬盘数据访问方法、装置、设备及介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A method, device, device and medium for accessing hard disk data provided by the present invention have been described in detail above. Specific examples are used in this paper to illustrate the principles and implementations of the present invention. The descriptions of the above embodiments are only used to help Understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this specification does not It should be understood as a limitation of the present invention.

Claims (10)

1. A hard disk data access method is characterized by comprising the following steps:
acquiring a target access request sent by a central processing unit of a host aiming at target data;
judging the data type of the target data based on a preset large-capacity judgment rule and a preset small-capacity judgment rule;
if the data type of the target data is high-capacity data, directly utilizing a first data transmission link between a double-rate synchronous dynamic random access memory and the central processing unit, which is established based on a first target protocol, to carry out data transmission so as to complete access operation aiming at the target data through the first data transmission link;
and if the data type of the target data is small-capacity data, directly utilizing a second data transmission link between the nonvolatile memory and the central processing unit, which is established based on a second target protocol, to perform data transmission so as to complete the access operation aiming at the target data through the second data transmission link.
2. The method according to claim 1, wherein if the data type of the target data is large-capacity data, the data is directly transmitted by using a first data transmission link between a double-data-rate synchronous dynamic random access memory (ddr sdram) established based on a first target protocol and the central processing unit, so as to complete the access operation for the target data through the first data transmission link, including:
if the data type of the target data is high-capacity data and the operation type of the access operation in the target access request is a write operation, directly utilizing the first data transmission link to write the target data sent by the central processing unit into the double-rate synchronous dynamic random access memory;
writing the target data in the double-rate synchronous dynamic random access memory into the nonvolatile memory to complete the write operation of the target data.
3. The method according to claim 1, wherein if the data type of the target data is large-capacity data, the data is directly transmitted by using a first data transmission link between a double-data-rate synchronous dynamic random access memory (ddr sdram) established based on a first target protocol and the central processing unit, so as to complete the access operation for the target data through the first data transmission link, including:
if the data type of the target data is large-capacity data and the operation type of the access operation in the target access request is a read operation, transmitting the target data in the nonvolatile memory to the double-rate synchronous dynamic random access memory, so that the central processing unit directly reads the target data from the double-rate synchronous dynamic random access memory by using the first data transmission link to complete the read operation on the target data.
4. The hard disk data access method according to claim 1, wherein if the data type of the target data is small-capacity data, directly performing data transmission by using a second data transmission link between the nonvolatile memory and the central processor, which is established based on a second target protocol, to complete an access operation for the target data through the second data transmission link, the method includes:
if the data type of the target data is small-capacity data and the operation type of the access operation in the target access request is a write operation, directly writing the target data sent by the central processing unit into the nonvolatile memory by using the second data transmission link to complete the write operation on the target data.
5. The hard disk data access method according to claim 1, wherein if the data type of the target data is small-capacity data, directly performing data transmission by using a second data transmission link between the nonvolatile memory and the central processor, which is established based on a second target protocol, to complete an access operation for the target data through the second data transmission link, the method includes:
and if the data type of the target data is small-capacity data and the operation type of the access operation in the target access request is a read operation, sending the target data to the central processing unit by using the second data transmission link so as to complete the read operation of the target data.
6. The hard disk data access method of claim 5, wherein the sending the target data to the central processor using the second data transmission link comprises:
creating a data packet based on the target data in the non-volatile memory and sending the data packet to the central processor using the second data transmission link.
7. The hard disk data access method according to any one of claims 1 to 6, further comprising:
and realizing the communication between the host and the hard disk by utilizing a third target protocol.
8. A hard disk data access device, comprising:
the request acquisition module is used for acquiring a target access request sent by a central processing unit of the host aiming at target data;
the judging module is used for judging the data type of the target data based on a preset large-capacity judging rule and a preset small-capacity judging rule;
the first access module is used for directly utilizing a first data transmission link between a double-rate synchronous dynamic random access memory and the central processing unit which is established based on a first target protocol to carry out data transmission if the data type of the target data is high-capacity data, so as to complete the access operation aiming at the target data through the first data transmission link;
and the second access module is used for directly utilizing a second data transmission link between the nonvolatile memory and the central processing unit which is established based on a second target protocol to carry out data transmission if the data type of the target data is the small-capacity data, so as to complete the access operation aiming at the target data through the second data transmission link.
9. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the hard disk data access method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements a hard disk data access method as claimed in any one of claims 1 to 7.
CN202210446406.7A 2022-04-26 2022-04-26 Hard disk data access method, device, equipment and medium Pending CN114816254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210446406.7A CN114816254A (en) 2022-04-26 2022-04-26 Hard disk data access method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210446406.7A CN114816254A (en) 2022-04-26 2022-04-26 Hard disk data access method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114816254A true CN114816254A (en) 2022-07-29

Family

ID=82507194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210446406.7A Pending CN114816254A (en) 2022-04-26 2022-04-26 Hard disk data access method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114816254A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107937A (en) * 2022-11-11 2023-05-12 北京天融信网络安全技术有限公司 Data processing method, device, electronic device and storage medium
CN116208574A (en) * 2023-03-13 2023-06-02 苏州盛科通信股份有限公司 Message processing method, device, electronic equipment and computer readable storage medium
CN116436526A (en) * 2023-06-13 2023-07-14 苏州浪潮智能科技有限公司 Method, device, system, storage medium and electronic equipment for controlling signal transmission
CN118363914A (en) * 2024-06-19 2024-07-19 山东云海国创云计算装备产业创新中心有限公司 Data processing method, solid state disk device and host
CN119046219A (en) * 2024-10-30 2024-11-29 苏州元脑智能科技有限公司 Method, apparatus, medium and program product for controlling data transmission rate
CN119148945A (en) * 2024-11-08 2024-12-17 联芸科技(杭州)股份有限公司 NAND-Flash memory access method and device based on NFI interface protocol
CN120066597A (en) * 2025-04-28 2025-05-30 山东云海国创云计算装备产业创新中心有限公司 Device initialization method, system, electronic device, storage medium and program product

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991736A (en) * 2015-06-15 2015-10-21 联想(北京)有限公司 Method and device for typing in data and storage equipment
CN114385534A (en) * 2020-10-19 2022-04-22 华为技术有限公司 A method and device for data processing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991736A (en) * 2015-06-15 2015-10-21 联想(北京)有限公司 Method and device for typing in data and storage equipment
CN114385534A (en) * 2020-10-19 2022-04-22 华为技术有限公司 A method and device for data processing

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107937A (en) * 2022-11-11 2023-05-12 北京天融信网络安全技术有限公司 Data processing method, device, electronic device and storage medium
CN116107937B (en) * 2022-11-11 2025-09-05 北京天融信网络安全技术有限公司 Data processing method, device, electronic device and storage medium
CN116208574A (en) * 2023-03-13 2023-06-02 苏州盛科通信股份有限公司 Message processing method, device, electronic equipment and computer readable storage medium
CN116436526A (en) * 2023-06-13 2023-07-14 苏州浪潮智能科技有限公司 Method, device, system, storage medium and electronic equipment for controlling signal transmission
CN116436526B (en) * 2023-06-13 2024-02-20 苏州浪潮智能科技有限公司 Methods and devices, systems, storage media, and electronic equipment for controlling signal transmission
WO2024255377A1 (en) * 2023-06-13 2024-12-19 苏州元脑智能科技有限公司 Method, apparatus and system for controlling signal transmission, storage medium, and electronic device
CN118363914A (en) * 2024-06-19 2024-07-19 山东云海国创云计算装备产业创新中心有限公司 Data processing method, solid state disk device and host
CN118363914B (en) * 2024-06-19 2024-08-30 山东云海国创云计算装备产业创新中心有限公司 Data processing method, solid state disk device and host
CN119046219A (en) * 2024-10-30 2024-11-29 苏州元脑智能科技有限公司 Method, apparatus, medium and program product for controlling data transmission rate
CN119046219B (en) * 2024-10-30 2025-03-18 苏州元脑智能科技有限公司 Data transmission rate control method, device, medium and program product
CN119148945A (en) * 2024-11-08 2024-12-17 联芸科技(杭州)股份有限公司 NAND-Flash memory access method and device based on NFI interface protocol
CN120066597A (en) * 2025-04-28 2025-05-30 山东云海国创云计算装备产业创新中心有限公司 Device initialization method, system, electronic device, storage medium and program product

Similar Documents

Publication Publication Date Title
CN114816254A (en) Hard disk data access method, device, equipment and medium
EP3796179B1 (en) System, apparatus and method for processing remote direct memory access operations with a device-attached memory
CN115495389B (en) Memory controller, calculation memory device, and operation method of calculation memory device
US11741034B2 (en) Memory device including direct memory access engine, system including the memory device, and method of operating the memory device
US9772802B2 (en) Solid-state device management
US20160259568A1 (en) Method and apparatus for storing data
CN108268414B (en) SD card driver and its control method based on SPI mode
CN114385235B (en) Command exhaust using host memory buffering
US12379844B2 (en) Adjustable timer component for semiconductor devices
CN118363914B (en) Data processing method, solid state disk device and host
CN103207846A (en) Memory controller and control method
US11055220B2 (en) Hybrid memory systems with cache management
TWI797022B (en) Storage controller, computational storage device, and operational method of computational storage device
CN114296638A (en) Storage and computing integrated solid-state hard disk controller, solid-state hard disk, data storage system and method
Koh et al. Faster than flash: An in-depth study of system challenges for emerging ultra-low latency SSDs
WO2022067686A1 (en) Data reading method applied to solid state disk (ssd), and related apparatus
CN118778910A (en) Disk access method and device, electronic device, and storage medium
Micheloni et al. Solid state drives (ssds)
CN118092782A (en) Method for operating a memory device using programming suspension control and corresponding memory device
US10853255B2 (en) Apparatus and method of optimizing memory transactions to persistent memory using an architectural data mover
CN117093517A (en) Storage device, operation method of storage device and electronic system
CN208077160U (en) SD card driver based on SPI mode
EP4398084B1 (en) Storage device and operating method thereof
KR102656104B1 (en) Non-volatile memory controller device and non-volatile memory device
CN120687382A (en) Memory access method and electronic device

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

Country or region after: China

Address after: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Address before: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载