[go: up one dir, main page]

CN108874310A - The read buffer method, apparatus and computer readable storage medium of distributed storage - Google Patents

The read buffer method, apparatus and computer readable storage medium of distributed storage Download PDF

Info

Publication number
CN108874310A
CN108874310A CN201810523394.7A CN201810523394A CN108874310A CN 108874310 A CN108874310 A CN 108874310A CN 201810523394 A CN201810523394 A CN 201810523394A CN 108874310 A CN108874310 A CN 108874310A
Authority
CN
China
Prior art keywords
read
offset
current
request
file corresponding
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
CN201810523394.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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810523394.7A priority Critical patent/CN108874310A/en
Publication of CN108874310A publication Critical patent/CN108874310A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/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; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

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 invention discloses a read cache method and device for distributed storage and a computer-readable storage medium. The method includes: after obtaining the current read request, extracting the current read offset of the file corresponding to the current read request and Record; if the file corresponding to this read request is the same as the file corresponding to the last read request, determine whether the read offset is within the threshold range corresponding to the last read offset; if so, initiate pre-reading; The present invention expands the judgment conditions for triggering pre-reading by judging whether the read offset is within the threshold range corresponding to the last read offset, and can perform normal pre-reading when there is an incomplete sequential read scene. Reading, which enhances the stability of front-end reading performance and improves user experience.

Description

分布式存储的读缓存方法、装置及计算机可读存储介质Distributed storage read cache method, device and computer-readable storage medium

技术领域technical field

本发明涉及分布式存储应用领域,特别涉及一种分布式存储的读缓存方法、装置及计算机可读存储介质。The present invention relates to the field of distributed storage applications, in particular to a distributed storage read cache method, device and computer-readable storage medium.

背景技术Background technique

随着现代社会科技的发展,基于网络将数据分散存储在多台独立的设备上的分布式存储系统得到了广泛的应用。在分布式存储系统中,为了提高前端客户端的读写性能,系统设计时均会引入缓存的概念,划分出内存中的一块区域用于容纳下发的读写请求数据,尤其是针对读操作,从后端存储预读过来的数据可以提高缓存命中率,极大地提高读性能。With the development of science and technology in modern society, distributed storage systems that store data in multiple independent devices based on the network have been widely used. In a distributed storage system, in order to improve the read and write performance of the front-end client, the concept of cache is introduced in the system design, and an area in the memory is divided to accommodate the issued read and write request data, especially for read operations. The data pre-read from the back-end storage can improve the cache hit rate and greatly improve the read performance.

现有技术中,分布式存储系统中传统的读缓存机制仅针对普遍情况设计,若读取文件不完全按照顺序读的话,则预读将会失效,影响前端读取性能,不利于用户体验。因此,如何能够对现有的读缓存机制进行改良,增强前端读取性能的稳定性,提高用户体验,是现今急需解决的问题。In the existing technology, the traditional read cache mechanism in the distributed storage system is only designed for general situations. If the read files are not read in complete order, the pre-read will be invalid, affecting the front-end reading performance and not conducive to user experience. Therefore, how to improve the existing read cache mechanism, enhance the stability of front-end read performance, and improve user experience is an urgent problem to be solved today.

发明内容Contents of the invention

本发明的目的是提供一种分布式存储的读缓存方法、装置及计算机可读存储介质,以在当前预读机制的基础上,拓展触发预读的判断条件,增强前端读取性能的稳定性,提高用户体验。The purpose of the present invention is to provide a distributed storage read cache method, device and computer-readable storage medium, to expand the judgment conditions for triggering pre-reading on the basis of the current pre-reading mechanism, and enhance the stability of front-end reading performance , improve user experience.

为解决上述技术问题,本发明提供一种分布式存储的读缓存方法,包括:In order to solve the above technical problems, the present invention provides a read cache method for distributed storage, including:

获取本次读请求后,提取所述本次读请求对应的文件的本次读取偏移量并记录;After obtaining the current read request, extract and record the current read offset of the file corresponding to the current read request;

若所述本次读请求对应的文件与上次读请求对应的文件相同,判断所述本次读取偏移量是否在上次读取偏移量对应的阈值范围内;If the file corresponding to the read request this time is the same as the file corresponding to the last read request, determine whether the read offset is within the threshold range corresponding to the last read offset;

若是,则发起预读。If so, initiate read-ahead.

可选的,所述获取本次读请求后,还包括:Optionally, after obtaining the read request, it also includes:

提取所述本次读请求对应的文件的本次读取长度并记录。The current read length of the file corresponding to the current read request is extracted and recorded.

可选的,所述判断所述本次读取偏移量是否在上次读取偏移量对应的阈值范围内,包括:Optionally, the judging whether the read offset is within the threshold range corresponding to the last read offset includes:

判断所述本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于所述上次读取偏移量、上次读取长度与第二阈值之和;Judging whether the current read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the difference between the last read offset, the last read length, and the second threshold and;

若是,则执行所述发起预读的步骤。If yes, execute the step of initiating pre-reading.

可选的,提取所述前读取偏移量和本次读取长度并记录之后,还包括:Optionally, after extracting and recording the previous read offset and the current read length, it also includes:

若所述本次读请求对应的文件与所述上次读请求对应的文件不同,将所述本次读请求发送至后端存储,以获取所述本次读请求对应的数据。If the file corresponding to the current read request is different from the file corresponding to the last read request, send the current read request to the backend storage to obtain the data corresponding to the current read request.

可选的,该方法还包括:Optionally, the method also includes:

根据记录的所述本次读取偏移量和所述本次读取长度,计算生成或更新所述本次读请求对应的文件的读取码流;Calculate and generate or update the read code stream of the file corresponding to the current read request according to the recorded current read offset and the current read length;

根据所述本次读请求对应的文件的读取码流与全部读请求对应的所有文件的读取码流的比值,在预设容量的缓存内为所述本次读请求对应的文件分配对应的容量。According to the ratio of the read code stream of the file corresponding to the current read request to the read code stream of all the files corresponding to all the read requests, assign the corresponding file to the file corresponding to the current read request in the cache of the preset capacity capacity.

本发明还提供了一种分布式存储的读缓存装置,包括:The present invention also provides a read cache device for distributed storage, including:

提取记录模块,用于获取本次读请求后,提取所述本次读请求对应的文件的本次读取偏移量并记录;The extracting record module is used to extract and record the current reading offset of the file corresponding to the current reading request after obtaining the current reading request;

判断模块,用于若所述本次读请求对应的文件与上次读请求对应的文件相同,判断所述本次读取偏移量是否在上次读取偏移量对应的阈值范围内;A judging module, configured to judge whether the current read offset is within the threshold range corresponding to the last read offset if the file corresponding to the current read request is the same as the file corresponding to the last read request;

预读模块,用于若所述本次读取偏移量在所述阈值范围内,则发起预读。A read-ahead module, configured to initiate a read-ahead if the current read offset is within the threshold range.

可选的,所述提取记录模块,包括:Optionally, the extracting record module includes:

提取记录子模块,用于获取本次读请求后,提取所述本次读请求对应的文件的所述本次读取偏移量和本次读取长度并记录。The extract record submodule is configured to extract and record the current read offset and the current read length of the file corresponding to the current read request after obtaining the current read request.

可选的,所述判断模块,包括:Optionally, the judging module includes:

判断子模块,用于判断所述本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于所述上次读取偏移量、上次读取长度与第二阈值之和;若是,则向所述预读模块发送启动信号。A judging submodule, used to judge whether the read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the last read offset, the last read The sum of the length and the second threshold; if yes, send an activation signal to the pre-reading module.

可选的,该装置还包括:Optionally, the device also includes:

计算模块,用于根据记录的所述本次读取偏移量和所述本次读取长度,计算生成或更新所述本次读请求对应的文件的读取码流;A calculation module, configured to calculate, generate or update the read code stream of the file corresponding to the current read request according to the recorded current read offset and the current read length;

缓存分配模块,用于根据所述本次读请求对应的文件的读取码流与全部读请求对应的所有文件的读取码流的比值,在预设容量的缓存内为所述本次读请求对应的文件分配对应的容量。The cache allocation module is configured to, according to the ratio of the read code stream of the file corresponding to the current read request to the read code stream of all files corresponding to all read requests, provide the current read file in a cache with a preset capacity. Request the corresponding file to allocate the corresponding capacity.

此外,本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述任一项所述的分布式存储的读缓存方法的步骤。In addition, the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the distributed storage as described in any one of the above-mentioned The steps of the read cache method.

本发明所提供的一种分布式存储的读缓存方法,包括:获取本次读请求后,提取本次读请求对应的文件的本次读取偏移量并记录;若本次读请求对应的文件与上次读请求对应的文件相同,判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内;若是,则发起预读;A read cache method for distributed storage provided by the present invention includes: after acquiring the read request, extracting and recording the current read offset of the file corresponding to the read request; The file is the same as the file corresponding to the last read request, and judge whether the read offset is within the threshold range corresponding to the last read offset; if so, initiate pre-reading;

可见,本发明通过判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内,拓展了触发预读的判断条件,可以在出现不完全顺序读取的场景时进行正常的预读,增强了前端读取性能的稳定性,提高了用户体验。此外,本发明还提供了一种分布式存储的读缓存装置及计算机可读存储介质,同样具有上述有益效果。It can be seen that the present invention expands the judgment conditions for triggering pre-reading by judging whether the read offset is within the threshold range corresponding to the last read offset, and can perform normal reading when incomplete sequential reading occurs. Pre-reading enhances the stability of front-end reading performance and improves user experience. In addition, the present invention also provides a read cache device for distributed storage and a computer-readable storage medium, which also have the above beneficial effects.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.

图1为本发明实施例所提供的一种分布式存储的读缓存方法的流程图;FIG. 1 is a flow chart of a read cache method for distributed storage provided by an embodiment of the present invention;

图2为本发明实施例所提供的另一种分布式存储的读缓存方法的流程图;FIG. 2 is a flow chart of another read cache method for distributed storage provided by an embodiment of the present invention;

图3为本发明实施例所提供的另一种分布式存储的读缓存方法的触发预读展示图;Fig. 3 is a trigger pre-reading display diagram of another distributed storage read cache method provided by an embodiment of the present invention;

图4为本发明实施例所提供的另一种分布式存储的读缓存方法的缓存调整流程图;Fig. 4 is a cache adjustment flow chart of another distributed storage read cache method provided by an embodiment of the present invention;

图5为本发明实施例所提供的另一种分布式存储的读缓存方法的内存结构示意图;FIG. 5 is a schematic diagram of a memory structure of another read cache method for distributed storage provided by an embodiment of the present invention;

图6为本发明实施例所提供的一种分布式存储的读缓存装置的结构图。FIG. 6 is a structural diagram of a read cache device for distributed storage provided by an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

请参考图1,图1为本发明实施例所提供的一种分布式存储的读缓存方法的流程图。该方法可以包括:Please refer to FIG. 1 . FIG. 1 is a flow chart of a read cache method for distributed storage provided by an embodiment of the present invention. The method can include:

步骤101:获取本次读请求后,提取本次读请求对应的文件的本次读取偏移量并记录。Step 101: After obtaining the current read request, extract and record the current read offset of the file corresponding to the current read request.

其中,本步骤可以为分布式存储系统中与后端存储对接的前端客户端(处理器),在接收到前端下发的读请求后,提取该读请求对应的文件的读取偏移量。Wherein, this step may be that the front-end client (processor) connected to the back-end storage in the distributed storage system extracts the read offset of the file corresponding to the read request after receiving the read request sent by the front-end.

可以理解的是,本步骤中的本次读请求可以为前端客户端当前从前端接收的一个读请求。也就是说,本步骤可以为前端客户端接收到每个读请求后,提取并记录每个读请求对应的文件的读取偏移量。对于本步骤中提取本次读请求对应的文件的本次读取偏移量并记录的具体方式,可以由设计人员根据实用场景和用户需求自行设置,如可以采用与现有技术相似的方式实现。只要前端客户端可以在接收到读请求后,提取该读请求对应的文件的读取偏移量。本实施例对此不做任何限制。It can be understood that the current read request in this step may be a read request currently received by the front-end client from the front-end. That is to say, in this step, after the front-end client receives each read request, it can extract and record the read offset of the file corresponding to each read request. For the specific method of extracting and recording the read offset of the file corresponding to the read request in this step, the designer can set it up according to the practical scenario and user needs, for example, it can be implemented in a similar way to the existing technology . As long as the front-end client can extract the read offset of the file corresponding to the read request after receiving the read request. This embodiment does not impose any limitation on this.

需要说明的是,本步骤的目的可以为通过提取的本次读取偏移量,为步骤102中判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内做准备It should be noted that the purpose of this step can be to prepare for judging whether the read offset is within the threshold range corresponding to the last read offset in step 102 through the extracted current read offset

步骤102:若本次读请求对应的文件与上次读请求对应的文件相同,判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内;若是,则进入步骤103。Step 102: If the file corresponding to the current read request is the same as the file corresponding to the last read request, determine whether the read offset is within the threshold range corresponding to the last read offset; if so, proceed to step 103 .

其中,本步骤中的上次读请求可以为前端客户端在接收本次读请求之前,接收的一个读请求。对应的,上次读取偏移量可以为前端客户端在接收到上次读请求之后,通过步骤101提取并记录的上次读请求对应的文件的读取偏移量。Wherein, the last read request in this step may be a read request received by the front-end client before receiving this read request. Correspondingly, the last read offset may be the read offset of the file corresponding to the last read request extracted and recorded by the front-end client through step 101 after receiving the last read request.

可以理解的是,本步骤的目的可以为在本次读请求对应的文件与上次读请求对应的文件相同的情况下,通过判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内,确定是否触发预读,以拓展触发预读的判断条件,容忍文件读取时出现的小幅抖动,从而使前端客户端可以在出现不完全顺序读取的场景时进行正常预读。It can be understood that the purpose of this step can be to determine whether the read offset is higher than the last read offset when the file corresponding to the current read request is the same as the file corresponding to the last read request. Within the corresponding threshold range, determine whether to trigger pre-reading, so as to expand the judgment conditions for triggering pre-reading, tolerate small jitters when reading files, so that the front-end client can perform normal pre-reading when incomplete sequential reading occurs. read.

具体的,对于本步骤中的上次读取偏移量对应的阈值范围,可以由设计人员根据实用场景和用户需求自行设置,如可以将该阈值范围设置为上次读取偏移量减去一个阈值和上次读取偏移量加上该阈值,即判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内,可以为判断本次读取偏移量与上次读取偏移量之差的绝对值是否小于或等于该阈值;也可以将该阈值范围设置为上次读取偏移量减去一个阈值和上次读取偏移量加上另一个阈值;还可以将该阈值范围设置为上次读取偏移量和第一阈值之差与上次读取偏移量、上次读取长度和第二阈值之和之间,即判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内,可以为判断本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于上次读取偏移量、上次读取长度与第二阈值之和。本实施例对此不做任何限制。Specifically, the threshold range corresponding to the last read offset in this step can be set by the designer according to practical scenarios and user needs. For example, the threshold range can be set as the last read offset minus A threshold and the last read offset plus the threshold, that is, to determine whether the read offset is within the threshold range corresponding to the last read offset, which can be used to determine the current read offset and Whether the absolute value of the difference between the last read offsets is less than or equal to this threshold; the threshold range can also be set to last read offset minus one threshold and last read offset plus another Threshold; the threshold range can also be set between the difference between the last read offset and the first threshold and the sum of the last read offset, last read length, and the second threshold, that is, to judge this time Whether the read offset is within the threshold range corresponding to the last read offset can be judged whether the current read offset is greater than or equal to the difference between the last read offset and the first threshold, and less than or equal to The sum of the last read offset, the last read length, and the second threshold. This embodiment does not impose any limitation on this.

其中,上次读取长度可以为前端客户端在接收到上次读请求之后,提取并记录的上次读请求对应的文件的读取长度。对于上次读取长度的获取方式可以由设计人员自行设置,如可以在步骤101提取并记录每个读请求对应的文件的读取偏移量时,提取并记录每个读请求对应的文件的读取长度。只要可以在判断本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于上次读取偏移量、上次读取长度与第二阈值之和之前,获取上次读取长度,本实施例对此不做任何限制。Wherein, the last read length may be the read length of the file corresponding to the last read request extracted and recorded by the front-end client after receiving the last read request. The acquisition method of the last read length can be set by the designer himself. For example, when extracting and recording the read offset of the file corresponding to each read request in step 101, extract and record the offset of the file corresponding to each read request. Read length. As long as it can be judged whether the read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the sum of the last read offset, the last read length, and the second threshold Before, the length of the last read is obtained, which is not limited in this embodiment.

需要说明的是,本步骤是在本次读请求对应的文件与上次读请求对应的文件相同的情况下进行的判断,对于本次读请求对应的文件与上次读请求对应的文件是否相同的具体判断过程和判断流程,由设计人员自行设置,如可以采用与现有技术相似的方式实现,只要可以保证本步骤是在上次读请求和本次读请求对应同一文件的情况下进行的判断,本实施例对此不做任何限制。It should be noted that this step is to judge when the file corresponding to this read request is the same as the file corresponding to the last read request, whether the file corresponding to this read request is the same as the file corresponding to the last read request The specific judgment process and judgment flow are set by the designer. If it can be realized in a similar way to the existing technology, as long as it can be guaranteed that this step is performed when the last read request and this read request correspond to the same file Judging, this embodiment does not impose any limitation on this.

对应的,对于本次读请求对应的文件与上次读请求对应的文件不相同的情况,可以采用与现有技术相似的方式,由前端客户端根据的本次读请求从后端存储获取对应的数据。如若本次读请求对应的文件与上次读请求对应的文件不同,前端客户端可以将本次读请求发送至后端存储,以获取本次读请求对应的数据。Correspondingly, for the situation that the file corresponding to this read request is different from the file corresponding to the last read request, a method similar to the existing technology can be adopted, and the front-end client obtains the corresponding file from the back-end storage according to the current read request. The data. If the file corresponding to this read request is different from the file corresponding to the last read request, the front-end client can send this read request to the back-end storage to obtain the data corresponding to this read request.

具体的,对于本次读取偏移量不在上次读取偏移量对应的阈值范围内的情况,可以认为是跳跃性地读取,不适合发起预读占用带宽和空间,不触发预读,可以采用与现有技术相似的方式,由前端客户端直接根据的本次读请求从后端存储获取对应的数据。Specifically, if the read offset is not within the threshold range corresponding to the last read offset, it can be considered as a jumpy read, which is not suitable for initiating read-ahead to occupy bandwidth and space, and does not trigger read-ahead , the front-end client can directly obtain the corresponding data from the back-end storage according to the current read request in a manner similar to the prior art.

步骤103:发起预读。Step 103: Initiate pre-reading.

其中,本实施例的目的可以为通过步骤102拓展触发预读的判断条件,容忍文件读取时出现的小幅抖动,从而使前端客户端可以在出现不完全顺序读取的场景时进行正常预读。对于在触发预读后本步骤中发起预读的具体过程和方式,可以由设计人员根据实用场景和用户需求,采用与现有技术相似的方式自行进行设置,可以对本次读取偏移量和本次读取长度之后阈值内的数据进行预读。本实施对此不做任何限制。Among them, the purpose of this embodiment can be to expand the judgment conditions for triggering pre-reading through step 102, and to tolerate the slight jitter that occurs when the file is read, so that the front-end client can perform normal pre-reading when there is an incomplete sequential reading scene. . For the specific process and method of initiating pre-reading in this step after pre-reading is triggered, the designer can set it up in a similar way to the existing technology according to practical scenarios and user needs. Read ahead with the data within the threshold after the read length. This implementation does not impose any restrictions on this.

本实施例中,本发明实施例通过判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内,拓展了触发预读的判断条件,可以在出现不完全顺序读取的场景时进行正常的预读,增强了前端读取性能的稳定性,提高了用户体验。In this embodiment, the embodiment of the present invention expands the judgment conditions for triggering pre-reading by judging whether the read offset this time is within the threshold range corresponding to the last read offset, so that incomplete sequential reads can occur Perform normal pre-reading in certain scenarios, which enhances the stability of front-end reading performance and improves user experience.

请参考图2,图2为本发明实施例所提供的另一种分布式存储的读缓存方法的流程图。该方法可以包括:Please refer to FIG. 2 . FIG. 2 is a flowchart of another distributed storage read caching method provided by an embodiment of the present invention. The method can include:

步骤201:获取本次读请求后,提取本次读请求对应的文件的本次读取偏移量和本次读取长度并记录。Step 201: After obtaining the current read request, extract and record the current read offset and current read length of the file corresponding to the current read request.

具体的,如图3所示,本步骤可以为与后端存储对接的前端客户端(处理器),在接收前端在本次下发的读请求后,提取该读请求对应的文件的读取偏移量(offset’)和读取长度(len’)。Specifically, as shown in Figure 3, this step can be for the front-end client (processor) connected to the back-end storage to extract the read file corresponding to the read request after receiving the read request sent by the front-end this time. Offset (offset') and read length (len').

步骤202:若本次读请求对应的文件与上次读请求对应的文件相同,判断本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于上次读取偏移量、上次读取长度与第二阈值之和;若是,则进入步骤103。Step 202: If the file corresponding to this read request is the same as the file corresponding to the last read request, determine whether the read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the above The sum of the second read offset, the last read length and the second threshold; if yes, go to step 103.

其中,如图3所示,上次读取偏移量和上次读取长度可以为前端客户端在接收前端在上次下发的读请求后,提取该读请求对应的文件的读取偏移量(offset)和读取长度(len)。Wherein, as shown in FIG. 3 , the last read offset and the last read length may be the read offset of the file corresponding to the read request extracted by the front-end client after receiving the read request sent by the front-end last time. Shift (offset) and read length (len).

可以理解的是,对于本步骤中的第一阈值和第二阈值的具体数值的设置,可以由设计人员根据实用场景和用户需求自行设置,如可以将第一阈值和第二阈值均设置为1MB。本实施例对此不做任何限制。It can be understood that the setting of the specific values of the first threshold and the second threshold in this step can be set by the designer according to practical scenarios and user needs, for example, both the first threshold and the second threshold can be set to 1MB . This embodiment does not impose any limitation on this.

具体的,如图3所示,当第一阈值和第二阈值均为1MB时,offset-1MB<offset’<offset+len+1MB,满足本步骤中的预读触发判断,可以通过步骤203进行预读。Specifically, as shown in FIG. 3, when the first threshold and the second threshold are both 1MB, offset-1MB<offset'<offset+len+1MB satisfies the pre-reading trigger judgment in this step, which can be performed through step 203 read ahead.

步骤203:对本次读取偏移量与本次读取长度之和以后的第三阈值内的数据进行预读。Step 203: Pre-read the data within the third threshold after the sum of the current read offset and the current read length.

具体的,对于本步骤中的第三阈值的具体数值的设置,可以由设计人员根据实用场景和用户需求自行设置,如可以将第三阈值设置为4MB,如图3所示,可以针对offset’+len’之后的4MB文件数据发起预读,以便后续数据请求的直接命中,提升性能。本实施例对此不做任何限制。Specifically, the setting of the specific numerical value of the third threshold in this step can be set by the designer according to practical scenarios and user needs. For example, the third threshold can be set to 4MB, as shown in FIG. 3 , for offset' The 4MB file data after +len' initiates pre-reading, so that subsequent data requests can be directly hit and improve performance. This embodiment does not impose any limitation on this.

本实施例中,本发明实施例通过判断本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于上次读取偏移量、上次读取长度与第二阈值之和,进一步拓展了触发预读的判断条件,限定了容忍文件读取时出现的小幅抖动的范围,增强了前端读取性能的稳定性,提高了用户体验。In this embodiment, the embodiment of the present invention judges whether the current read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the last read offset, the last read The sum of the length and the second threshold further expands the judgment conditions for triggering pre-reading, limits the range of tolerance for small jitters when reading files, enhances the stability of front-end reading performance, and improves user experience.

基于上述任一实施例,为了确保缓存的充分利用,防止出现内存占用不均衡,影响前端业务性能的情况发生,本实施例所提供的方法还可以包括如图4所示的缓存动态调整的过程。具体的,请参考图4,图4为本发明实施例所提供的另一种分布式存储的读缓存方法的缓存调整流程图。该方法可以包括:Based on any of the above-mentioned embodiments, in order to ensure full utilization of the cache, prevent unbalanced memory usage, and affect front-end business performance, the method provided in this embodiment may also include the process of dynamically adjusting the cache as shown in Figure 4 . Specifically, please refer to FIG. 4 . FIG. 4 is a cache adjustment flow chart of another read cache method for distributed storage provided by an embodiment of the present invention. The method can include:

步骤301:根据记录的本次读取偏移量和本次读取长度,计算生成或更新本次读请求对应的文件的读取码流。Step 301: Calculate, generate or update the read code stream of the file corresponding to the current read request according to the recorded current read offset and the current read length.

其中,本步骤可以为当本次读请求对应的文件不存在读取码流时,即之前的读取请求对应的文件与本次读请求对应的文件不同时,处理器根据本次读取偏移量和本次读取长度,计算生成本次读请求对应的文件的读取码流;当本次读请求对应的文件存在读取码流时,即本次读请求对应的文件与之前的读取请求对应的文件相同时,处理器根据本次读取偏移量和本次读取长度,计算更新本次读请求对应的文件的读取码流。Wherein, this step can be that when the file corresponding to this read request does not have a read code stream, that is, when the file corresponding to the previous read request is different from the file corresponding to this read request, the processor will Shift and the length of this read, calculate and generate the read code stream of the file corresponding to this read request; when the file corresponding to this read request has a read code stream, that is, the file corresponding to this read request is different from the previous When the files corresponding to the read requests are the same, the processor calculates and updates the read stream of the files corresponding to the read requests according to the current read offset and the current read length.

具体的,对于本步骤中计算生成或更新本次读请求对应的文件的读取码流的具体方式,可以由设计人员自行设置,如可以采用与现有技术相似的方式进行设置,本实施例对此不做任何限制。Specifically, the specific way of calculating and generating or updating the read code stream of the file corresponding to this read request in this step can be set by the designer himself. For example, it can be set in a way similar to the prior art. There are no restrictions on this.

步骤302:根据本次读请求对应的文件的读取码流与全部读请求对应的所有文件的读取码流的比值,在预设容量的缓存内为本次读请求对应的文件分配对应的容量。Step 302: According to the ratio of the read code stream of the file corresponding to this read request to the read code stream of all files corresponding to all read requests, assign the corresponding file to the file corresponding to this read request in the cache with a preset capacity. capacity.

可以理解的是,本步骤中全部读请求对应的所有文件的读取码流,可以为全部读请求对应的所有不同的文件的读取码流,即读取码流的数量与全部读请求对应的所有不同的文件的数量相同,多个读请求对应的相同的文件仅对应一个读取码流。It can be understood that the read code streams of all files corresponding to all read requests in this step may be the read code streams of all different files corresponding to all read requests, that is, the number of read code streams corresponds to all read requests The number of all different files is the same, and the same file corresponding to multiple read requests corresponds to only one read code stream.

具体的,如图5所示,本步骤可以为处理器在通过步骤301计算或更新本次读请求对应的文件的读取码流v1后,统计所有文件的读取码流(v1+v2+…vn,n为所有文件的数量),按照比例分配预设容量(memory_cache)的缓存,如在预设容量的缓存中为本次读请求对应的文件分配的缓存大小可以为memory_cache*v1/(v1+v2+…vn)。Specifically, as shown in FIG. 5, this step can be that the processor counts the read code streams (v1+v2+... vn, n is the number of all files), allocate a cache with a preset capacity (memory_cache) in proportion, for example, in the cache with a preset capacity, the cache size allocated for the file corresponding to this read request can be memory_cache*v1/(v1 +v2+...vn).

需要说明的是,对于预设容量的缓存的具体缓存大小(容量)的划分,可以由设计人员或用户自行设置,本实施例对此不做任何限制。It should be noted that the division of the specific cache size (capacity) of the cache with the preset capacity can be set by the designer or the user, and this embodiment does not impose any limitation on this.

对应的,本步骤还可以包括对所有文件中除本次读请求对应的文件外的其他文件的缓存大小的调整步骤。本实施例对此不做任何限制。Correspondingly, this step may also include a step of adjusting the cache size of all files except the file corresponding to this read request. This embodiment does not impose any limitation on this.

本实施例中,本发明实施例通过根据本次读请求对应的文件的读取码流与全部读请求对应的所有文件的读取码流的比值,在预设容量的缓存内为本次读请求对应的文件分配对应的容量,可以动态分配各文件占用的缓存空间,实现缓存的动态调整,最大限度地保证缓存使用效率,避免出现内存占用不均衡,进而影响前端业务性能的情况发生。In this embodiment, according to the ratio of the read code stream of the file corresponding to this read request to the read code stream of all files corresponding to all read requests, the embodiment of the present invention provides the current read file in the cache with a preset capacity. Request the corresponding file to allocate the corresponding capacity, dynamically allocate the cache space occupied by each file, realize the dynamic adjustment of the cache, maximize the efficiency of the cache usage, and avoid the occurrence of unbalanced memory usage, which in turn affects the performance of the front-end business.

请参考图6,图6为本发明实施例所提供的一种分布式存储的读缓存装置的结构图。该装置可以包括:Please refer to FIG. 6 . FIG. 6 is a structural diagram of a read cache device for distributed storage provided by an embodiment of the present invention. The device can include:

提取记录模块100,用于获取本次读请求后,提取本次读请求对应的文件的本次读取偏移量并记录;The extracting record module 100 is used to extract and record the read offset of the file corresponding to the read request after obtaining the read request;

判断模块200,用于若本次读请求对应的文件与上次读请求对应的文件相同,判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内;The judging module 200 is used to determine whether the read offset is within the threshold range corresponding to the last read offset if the file corresponding to the read request is the same as the file corresponding to the last read request;

预读模块300,用于若本次读取偏移量在阈值范围内,则发起预读。The read-ahead module 300 is configured to initiate a read-ahead if the read offset is within a threshold range.

可选的,提取记录模块100,可以包括:Optionally, extracting the recording module 100 may include:

提取记录子模块,用于获取本次读请求后,提取本次读请求对应的文件的本次读取偏移量和本次读取长度并记录。The extract record sub-module is used to extract and record the current read offset and current read length of the file corresponding to the current read request after obtaining the current read request.

可选的,判断模块200,包括:Optionally, the judging module 200 includes:

判断子模块,用于判断本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于上次读取偏移量、上次读取长度与第二阈值之和;若是,则向预读模块发送启动信号。The judging sub-module is used to judge whether the read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the last read offset, the last read length and the second threshold. The sum of the thresholds; if so, send a start signal to the pre-reading module.

可选的,该装置还可以包括:Optionally, the device may also include:

发送模块,用于若所述本次读请求对应的文件与所述上次读请求对应的文件不同,将所述本次读请求发送至后端存储,以获取所述本次读请求对应的数据。A sending module, configured to send the current read request to the backend storage if the file corresponding to the current read request is different from the file corresponding to the last read request, so as to obtain the file corresponding to the current read request data.

可选的,该装置还可以包括:Optionally, the device may also include:

计算模块,用于根据记录的本次读取偏移量和本次读取长度,计算生成或更新本次读请求对应的文件的读取码流;A calculation module, configured to calculate, generate or update the read code stream of the file corresponding to the read request according to the recorded current read offset and the current read length;

缓存分配模块,用于根据本次读请求对应的文件的读取码流与全部读请求对应的所有文件的读取码流的比值,在预设容量的缓存内为本次读请求对应的文件分配对应的容量。The cache allocation module is used to assign the file corresponding to this read request in the cache with a preset capacity according to the ratio of the read code stream of the file corresponding to this read request to the read code stream of all files corresponding to all read requests Allocate the corresponding capacity.

本实施例中,本发明实施例通过判断模块200判断本次读取偏移量是否在上次读取偏移量对应的阈值范围内,拓展了触发预读的判断条件,可以在出现不完全顺序读取的场景时进行正常的预读,增强了前端读取性能的稳定性,提高了用户体验。In this embodiment, the embodiment of the present invention uses the judging module 200 to judge whether the read offset is within the threshold range corresponding to the last read offset, and expands the judgment conditions for triggering pre-reading. Normal pre-reading is performed in sequential reading scenarios, which enhances the stability of front-end reading performance and improves user experience.

本发明还提供了一种计算机可读存储介质,其上存有计算机程序,该计算机程序被执行时可以实现上述任一实施例所提供的分布式存储的读缓存方法的步骤。该存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the steps of the read-cache method for distributed storage provided by any of the above-mentioned embodiments can be realized. The storage medium may include various media capable of storing program codes such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk.

说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置及计算机可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device and the computer-readable storage medium disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the relevant details, please refer to the description of the method part.

专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules 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 Any other known storage medium.

以上对本发明所提供的分布式存储的读缓存方法、装置及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The read caching method, device and computer-readable storage medium for distributed storage provided by the present invention have been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention, and the descriptions of the above embodiments are only used to help understand the method and core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims (10)

1.一种分布式存储的读缓存方法,其特征在于,包括:1. A read cache method for distributed storage, comprising: 获取本次读请求后,提取所述本次读请求对应的文件的本次读取偏移量并记录;After obtaining the current read request, extract and record the current read offset of the file corresponding to the current read request; 若所述本次读请求对应的文件与上次读请求对应的文件相同,判断所述本次读取偏移量是否在上次读取偏移量对应的阈值范围内;If the file corresponding to the read request this time is the same as the file corresponding to the last read request, determine whether the read offset is within the threshold range corresponding to the last read offset; 若是,则发起预读。If so, initiate read-ahead. 2.根据权利要求1所述的分布式存储的读缓存方法,其特征在于,所述获取本次读请求后,还包括:2. The read caching method for distributed storage according to claim 1, wherein, after obtaining the read request, further comprising: 提取所述本次读请求对应的文件的本次读取长度并记录。The current read length of the file corresponding to the current read request is extracted and recorded. 3.根据权利要求2所述的分布式存储的读缓存方法,其特征在于,所述判断所述本次读取偏移量是否在上次读取偏移量对应的阈值范围内,包括:3. The read cache method for distributed storage according to claim 2, wherein the judging whether the read offset is within the threshold range corresponding to the last read offset comprises: 判断所述本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于所述上次读取偏移量、上次读取长度与第二阈值之和;Judging whether the current read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the difference between the last read offset, the last read length, and the second threshold and; 若是,则执行所述发起预读的步骤。If yes, execute the step of initiating pre-reading. 4.根据权利要求2所述的分布式存储的读缓存方法,其特征在于,提取所述前读取偏移量和本次读取长度并记录之后,还包括:4. The read cache method of distributed storage according to claim 2, characterized in that, after extracting the previous read offset and this read length and recording, further comprising: 若所述本次读请求对应的文件与所述上次读请求对应的文件不同,将所述本次读请求发送至后端存储,以获取所述本次读请求对应的数据。If the file corresponding to the current read request is different from the file corresponding to the last read request, send the current read request to the backend storage to obtain the data corresponding to the current read request. 5.根据权利要求2至4任一项所述的分布式存储的读缓存方法,其特征在于,还包括:5. The read cache method for distributed storage according to any one of claims 2 to 4, further comprising: 根据记录的所述本次读取偏移量和所述本次读取长度,计算生成或更新所述本次读请求对应的文件的读取码流;Calculate and generate or update the read code stream of the file corresponding to the current read request according to the recorded current read offset and the current read length; 根据所述本次读请求对应的文件的读取码流与全部读请求对应的所有文件的读取码流的比值,在预设容量的缓存内为所述本次读请求对应的文件分配对应的容量。According to the ratio of the read code stream of the file corresponding to the current read request to the read code stream of all the files corresponding to all the read requests, assign the corresponding file to the file corresponding to the current read request in the cache of the preset capacity capacity. 6.一种分布式存储的读缓存装置,其特征在于,包括:6. A read cache device for distributed storage, comprising: 提取记录模块,用于获取本次读请求后,提取所述本次读请求对应的文件的本次读取偏移量并记录;The extracting record module is used to extract and record the current reading offset of the file corresponding to the current reading request after obtaining the current reading request; 判断模块,用于若所述本次读请求对应的文件与上次读请求对应的文件相同,判断所述本次读取偏移量是否在上次读取偏移量对应的阈值范围内;A judging module, configured to judge whether the current read offset is within the threshold range corresponding to the last read offset if the file corresponding to the current read request is the same as the file corresponding to the last read request; 预读模块,用于若所述本次读取偏移量在所述阈值范围内,则发起预读。A read-ahead module, configured to initiate a read-ahead if the current read offset is within the threshold range. 7.根据权利要求6所述的分布式存储的读缓存装置,其特征在于,所述提取记录模块,包括:7. The read cache device for distributed storage according to claim 6, wherein the extracting and recording module comprises: 提取记录子模块,用于获取本次读请求后,提取所述本次读请求对应的文件的所述本次读取偏移量和本次读取长度并记录。The extract record submodule is configured to extract and record the current read offset and the current read length of the file corresponding to the current read request after obtaining the current read request. 8.根据权利要求7所述的分布式存储的读缓存装置,其特征在于,所述判断模块,包括:8. The read cache device for distributed storage according to claim 7, wherein the judging module comprises: 判断子模块,用于判断所述本次读取偏移量是否大于等于上次读取偏移量与第一阈值之差,且小于等于所述上次读取偏移量、上次读取长度与第二阈值之和;若是,则向所述预读模块发送启动信号。A judging submodule, used to judge whether the read offset is greater than or equal to the difference between the last read offset and the first threshold, and is less than or equal to the last read offset, the last read The sum of the length and the second threshold; if yes, send an activation signal to the pre-reading module. 9.根据权利要求7至9任一项所述的分布式存储的读缓存装置,其特征在于,还包括:9. The read cache device for distributed storage according to any one of claims 7 to 9, further comprising: 计算模块,用于根据记录的所述本次读取偏移量和所述本次读取长度,计算生成或更新所述本次读请求对应的文件的读取码流;A calculation module, configured to calculate, generate or update the read code stream of the file corresponding to the current read request according to the recorded current read offset and the current read length; 缓存分配模块,用于根据所述本次读请求对应的文件的读取码流与全部读请求对应的所有文件的读取码流的比值,在预设容量的缓存内为所述本次读请求对应的文件分配对应的容量。The cache allocation module is configured to, according to the ratio of the read code stream of the file corresponding to the current read request to the read code stream of all files corresponding to all read requests, provide the current read file in a cache with a preset capacity. Request the corresponding file to allocate the corresponding capacity. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述的分布式存储的读缓存方法的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the distribution according to any one of claims 1 to 5 is realized. The steps of the read caching method for storage.
CN201810523394.7A 2018-05-28 2018-05-28 The read buffer method, apparatus and computer readable storage medium of distributed storage Pending CN108874310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810523394.7A CN108874310A (en) 2018-05-28 2018-05-28 The read buffer method, apparatus and computer readable storage medium of distributed storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810523394.7A CN108874310A (en) 2018-05-28 2018-05-28 The read buffer method, apparatus and computer readable storage medium of distributed storage

Publications (1)

Publication Number Publication Date
CN108874310A true CN108874310A (en) 2018-11-23

Family

ID=64335279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810523394.7A Pending CN108874310A (en) 2018-05-28 2018-05-28 The read buffer method, apparatus and computer readable storage medium of distributed storage

Country Status (1)

Country Link
CN (1) CN108874310A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502498A (en) * 2019-08-16 2019-11-26 济南浪潮数据技术有限公司 Distributed file system file pre-reading method and system
CN111625503A (en) * 2020-05-29 2020-09-04 苏州浪潮智能科技有限公司 A method and device for local random pre-reading of distributed file system files
CN112162956A (en) * 2020-09-11 2021-01-01 北京浪潮数据技术有限公司 Skip read pre-reading method, device, equipment and storage medium
CN113609093A (en) * 2021-06-30 2021-11-05 济南浪潮数据技术有限公司 Reverse order reading method, system and related device of distributed file system
WO2021238265A1 (en) * 2020-05-28 2021-12-02 广东浪潮智慧计算技术有限公司 File pre-reading method, apparatus and device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1280063A2 (en) * 2001-07-27 2003-01-29 Fujitsu Limited Cache control methods and apparatus for hard disk drives
CN103544076A (en) * 2012-07-13 2014-01-29 阿里巴巴集团控股有限公司 Data backup method and device
CN103795781A (en) * 2013-12-10 2014-05-14 西安邮电大学 Distributed cache model based on file prediction
CN105426127A (en) * 2015-11-13 2016-03-23 浪潮(北京)电子信息产业有限公司 File storage method and apparatus for distributed cluster system
CN106776759A (en) * 2016-11-17 2017-05-31 郑州云海信息技术有限公司 The small documents pre-head method and system of distributed file system
CN107340978A (en) * 2017-07-18 2017-11-10 郑州云海信息技术有限公司 One kind storage pre-head method, device and storage system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1280063A2 (en) * 2001-07-27 2003-01-29 Fujitsu Limited Cache control methods and apparatus for hard disk drives
CN103544076A (en) * 2012-07-13 2014-01-29 阿里巴巴集团控股有限公司 Data backup method and device
CN103795781A (en) * 2013-12-10 2014-05-14 西安邮电大学 Distributed cache model based on file prediction
CN105426127A (en) * 2015-11-13 2016-03-23 浪潮(北京)电子信息产业有限公司 File storage method and apparatus for distributed cluster system
CN106776759A (en) * 2016-11-17 2017-05-31 郑州云海信息技术有限公司 The small documents pre-head method and system of distributed file system
CN107340978A (en) * 2017-07-18 2017-11-10 郑州云海信息技术有限公司 One kind storage pre-head method, device and storage system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502498A (en) * 2019-08-16 2019-11-26 济南浪潮数据技术有限公司 Distributed file system file pre-reading method and system
WO2021238265A1 (en) * 2020-05-28 2021-12-02 广东浪潮智慧计算技术有限公司 File pre-reading method, apparatus and device, and storage medium
CN111625503A (en) * 2020-05-29 2020-09-04 苏州浪潮智能科技有限公司 A method and device for local random pre-reading of distributed file system files
CN111625503B (en) * 2020-05-29 2022-11-04 苏州浪潮智能科技有限公司 Method and equipment for locally and randomly pre-reading file of distributed file system
US12298934B2 (en) 2020-05-29 2025-05-13 Inspur Suzhou Intelligent Technology Co., Ltd. Method and device for local random readahead of file in distributed file system
CN112162956A (en) * 2020-09-11 2021-01-01 北京浪潮数据技术有限公司 Skip read pre-reading method, device, equipment and storage medium
CN113609093A (en) * 2021-06-30 2021-11-05 济南浪潮数据技术有限公司 Reverse order reading method, system and related device of distributed file system
CN113609093B (en) * 2021-06-30 2023-12-22 济南浪潮数据技术有限公司 Reverse order reading method, system and related device of distributed file system

Similar Documents

Publication Publication Date Title
CN108874310A (en) The read buffer method, apparatus and computer readable storage medium of distributed storage
CN101510219B (en) File data accessing method, apparatus and system
JP6316974B2 (en) Flash memory compression
KR102384907B1 (en) Record credit management for non-volatile memory
CN103329111B (en) Data processing method, device and system based on block storage
CN103995855B (en) Method and device for storing data
CN108874688B (en) Message data caching method and device
CN112328185B (en) Intelligent pre-reading method based on distributed storage
CN106713028B (en) Service degradation method and device and distributed task scheduling system
CN105573667B (en) A kind of method for reading data and storage server
CN107562915A (en) Read the method, apparatus and equipment and computer-readable recording medium of small documents
WO2021047120A1 (en) Resource allocation method in fpga heterogeneous accelerator card cluster, device, and medium
CN110737388A (en) Data pre-reading method, client, server and file system
WO2017091984A1 (en) Data caching method, storage control apparatus and storage device
CN106776759A (en) The small documents pre-head method and system of distributed file system
CN105760467A (en) Real-time data read-write method, device and system and NFS server
CN101763433B (en) Data storage system and method
CN110908965A (en) Object storage management method, device, equipment and storage medium
CN108959500A (en) A kind of object storage method, device, equipment and computer readable storage medium
CN105988941B (en) Cache data processing method and device
US11782762B2 (en) Stack management
US20180137045A1 (en) Automatic memory management using a memory management unit
WO2022083267A1 (en) Data processing method, apparatus, computing node, and computer readable storage medium
CN109508143B (en) Data storage method and device
CN101315595A (en) A data reading method and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181123

RJ01 Rejection of invention patent application after publication