[go: up one dir, main page]

CN103810114A - Method and device for distributing storage space - Google Patents

Method and device for distributing storage space Download PDF

Info

Publication number
CN103810114A
CN103810114A CN201410083434.2A CN201410083434A CN103810114A CN 103810114 A CN103810114 A CN 103810114A CN 201410083434 A CN201410083434 A CN 201410083434A CN 103810114 A CN103810114 A CN 103810114A
Authority
CN
China
Prior art keywords
file
storage
information
storage blocks
identification number
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
CN201410083434.2A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410083434.2A priority Critical patent/CN103810114A/en
Publication of CN103810114A publication Critical patent/CN103810114A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明涉及一种分配存储空间的方法及装置,包括:接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件信息;查找所述文件信息所对应的文件,并查找所述文件对应的标识号;解析所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息;向所述应用程序发送所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。由此实现了让应用程序了解存储空间的连续性,可有效提高应用程序对磁盘数据的读写速度。

The present invention relates to a method and device for allocating storage space, comprising: receiving a request message for querying file storage information sent by an application program, wherein the request message for querying file storage information includes file information; searching for a file corresponding to the file information, And search for the identification number corresponding to the file; analyze the identification number, and obtain the storage information of the storage block occupied by the file on the memory according to the result of analyzing the identification number; send the storage information to the application program information, so that the application program classifies the storage blocks according to the storage information, and enables the application program to allocate the classified storage blocks to the read and write requests according to the continuity of the read and write requests of the application program . This enables applications to understand the continuity of storage space, which can effectively improve the speed of reading and writing disk data by applications.

Description

分配存储空间的方法及装置Method and device for allocating storage space

技术领域technical field

本发明涉及移动通信领域,尤其涉及一种分配存储空间的方法及装置。The invention relates to the field of mobile communication, in particular to a method and device for allocating storage space.

背景技术Background technique

磁盘数据库运行的主要瓶颈是数据库数据的读写速度,难以提高数据库数据读写速度的原因是数据库不知道文件的连续性,预读、写缓存、连续写等功能受影响。The main bottleneck of disk database operation is the read and write speed of database data. The reason why it is difficult to improve the read and write speed of database data is that the database does not know the continuity of files, and functions such as pre-reading, write cache, and continuous writing are affected.

现有技术中,在数据库需要进行读写处理时,首先向内核发送读写请求消息,内核接收到读写请求消息之后,启动磁盘进行读写处理,当数据库读取数据时,从磁盘向应用缓存返回待读取的数据;当数据库写入数据时,将待写入的数据直接写入到磁盘中,而不去了解存储空间的连续性,这样容易导致相关数据在磁盘上存放位置的不连续,从而严重影响磁盘数据库的读写速度。In the prior art, when the database needs to perform read and write processing, it first sends a read and write request message to the kernel, and after the kernel receives the read and write request message, it starts the disk to perform read and write processing. The cache returns the data to be read; when the database writes data, the data to be written is directly written to the disk without knowing the continuity of the storage space, which easily leads to the inconsistency of the storage location of the relevant data on the disk Continuous, which seriously affects the read and write speed of the disk database.

发明内容Contents of the invention

本发明实施例提供了一种分配存储空间的方法及装置,解决了应用程序读写磁盘数据效率低的问题。The embodiment of the present invention provides a method and device for allocating storage space, which solves the problem of low efficiency of reading and writing disk data by application programs.

第一方面,提供了一种分配存储空间的方法,该方法包括:In the first aspect, a method for allocating storage space is provided, and the method includes:

接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件信息;receiving a request message for querying file storage information sent by an application program, wherein the request message for querying file storage information includes file information;

查找所述文件信息所对应的文件,并查找所述文件对应的标识号;Find the file corresponding to the file information, and find the identification number corresponding to the file;

解析所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息;Analyzing the identification number, and obtaining the storage information of the storage block occupied by the file on the memory according to the result of analyzing the identification number;

向所述应用程序发送所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。sending the storage information to the application, so that the application classifies the storage blocks according to the storage information, and makes the application classify the classified blocks according to the continuity of the read and write requests of the application A memory block is allocated to the read and write requests.

根据第一方面,在第一方面的第一种可能的实现方式中,所述文件信息具体为文件名称,所述查找所述文件信息所对应的文件,并查找所述文件对应的标识号包括:According to the first aspect, in a first possible implementation manner of the first aspect, the file information is specifically a file name, and the searching for the file corresponding to the file information and searching for the identification number corresponding to the file includes :

检查所述文件名称是否合法,若所述文件名称合法,则查找所述文件名称所对应的文件是否存在,若所述文件存在,则根据所述文件名称查找所述文件对应的标识号。Check whether the file name is legal, if the file name is legal, then find whether the file corresponding to the file name exists, if the file exists, then search for the identification number corresponding to the file according to the file name.

根据第一方面,在第一方面的第二种可能的实现方式中,所述文件信息具体为文件句柄,所述查找所述文件信息所对应的文件,并查找所述文件对应的标识号包括:According to the first aspect, in a second possible implementation manner of the first aspect, the file information is specifically a file handle, and the searching for the file corresponding to the file information and searching for the identification number corresponding to the file includes :

根据所述文件句柄从所述操作系统的进程管理模块中查找所述文件句柄所对应的文件,并查找所述文件对应的标识号。Find the file corresponding to the file handle from the process management module of the operating system according to the file handle, and find the identification number corresponding to the file.

根据第一方面或第一方面的上述两种实现方式中任一种实现方式,在第一方面的第三种实现方式中,所述文件系统解析所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息包括:According to the first aspect or any one of the above two implementation manners of the first aspect, in the third implementation manner of the first aspect, the file system parses the identification number, and according to the As a result, obtaining the storage information of the storage block occupied by the file on the storage includes:

解析所述标识号,根据解析所述标识号的结果,获取所述文件在所述存储器上占用的所有存储块的信息,所述所有存储块的信息包括多组存储块的信息,其中,每组存储块的信息包括:该组存储块的起始地址信息和该组存储块包含的存储块个数。Analyzing the identification number, and according to the result of analyzing the identification number, obtaining information on all storage blocks occupied by the file on the storage, where the information on all storage blocks includes information on multiple groups of storage blocks, wherein each The information of the group of storage blocks includes: the starting address information of the group of storage blocks and the number of storage blocks contained in the group of storage blocks.

根据第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述向所述应用程序发送所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求包括:According to the third possible implementation manner of the first aspect, in the fourth possible implementation manner of the first aspect, the sending the storage information to the application program, so that the application program The information classifies the storage blocks, and the application program allocates the classified storage blocks to the read and write requests according to the continuity of the application program's read and write requests, including:

向所述应用程序发送所述存储信息,以使所述应用程序根据所述每组存储块包含的存储块个数和预设的存储块的大小,确定所述每组存储块的总大小,并根据所述每组存储块的总大小,对所述各组存储块进行分类,并根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。sending the storage information to the application program, so that the application program determines the total size of each group of storage blocks according to the number of storage blocks contained in each group of storage blocks and the size of the preset storage block, And according to the total size of each group of storage blocks, classify the groups of storage blocks, and allocate the classified storage blocks to the read and write requests according to the continuity of the read and write requests of the application.

第二方面,提供了一种分配存储空间的装置,该装置包括:接收单元、查找单元、处理单元和发送单元;In a second aspect, a device for allocating storage space is provided, the device comprising: a receiving unit, a search unit, a processing unit, and a sending unit;

所述接收单元,用于接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件信息;The receiving unit is configured to receive a query file storage information request message sent by an application program, and the query file storage information request message includes file information;

所述查找单元,用于查找所述接收单元接收的所述文件信息所对应的文件,并查找所述文件对应的标识号;The searching unit is configured to search for the file corresponding to the file information received by the receiving unit, and search for the identification number corresponding to the file;

所述处理单元,用于解析所述查找单元查找的所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息;The processing unit is configured to analyze the identification number searched by the search unit, and obtain the storage information of the storage block occupied by the file on the memory according to the result of analyzing the identification number;

所述发送单元,用于向所述应用程序发送所述处理单元获取的所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。The sending unit is configured to send the storage information obtained by the processing unit to the application program, so that the application program can classify the storage blocks according to the storage information, and enable the application program to classify the storage blocks according to the The continuity of the read and write requests of the application program allocates the classified storage blocks to the read and write requests.

根据第二方面,在第二方面的第一种可能的实现方式中,所述查找单元具体用于:According to the second aspect, in a first possible implementation manner of the second aspect, the search unit is specifically configured to:

检查所述文件名称是否合法,若所述文件名称合法,则查找所述文件名称所对应的文件是否存在,若所述文件存在,则根据所述文件名称查找所述文件对应的标识号。Check whether the file name is legal, if the file name is legal, then find whether the file corresponding to the file name exists, if the file exists, then search for the identification number corresponding to the file according to the file name.

根据第二方面,在第二方面的第二种可能的实现方式中,所述查找单元具体用于:According to the second aspect, in a second possible implementation manner of the second aspect, the search unit is specifically configured to:

根据所述文件句柄从所述操作系统的进程管理模块中查找所述文件句柄所对应的文件,并查找所述文件对应的标识号。Find the file corresponding to the file handle from the process management module of the operating system according to the file handle, and find the identification number corresponding to the file.

根据第二方面或第二方面的上述两种实现方式中任一种实现方式,在第二方面的第三种实现方式中,所述处理单元具体用于:According to the second aspect or any one of the above two implementation manners of the second aspect, in the third implementation manner of the second aspect, the processing unit is specifically configured to:

解析所述标识号,根据解析所述标识号的结果,获取所述文件在所述存储器上占用的所有存储块的信息,所述所有存储块的信息包括多组存储块的信息,其中,每组存储块的信息包括:该组存储块的起始地址信息和该组存储块包含的存储块个数。Analyzing the identification number, and according to the result of analyzing the identification number, obtaining information on all storage blocks occupied by the file on the storage, where the information on all storage blocks includes information on multiple groups of storage blocks, wherein each The information of the group of storage blocks includes: the starting address information of the group of storage blocks and the number of storage blocks contained in the group of storage blocks.

根据第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述发送单元具体用于:According to a third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the sending unit is specifically configured to:

向所述应用程序发送所述存储信息,以使所述应用程序根据所述每组存储块包含的存储块个数和预设的存储块的大小,确定所述每组存储块的总大小,并根据所述每组存储块的总大小,对所述各组存储块进行分类,并根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。sending the storage information to the application program, so that the application program determines the total size of each group of storage blocks according to the number of storage blocks contained in each group of storage blocks and the size of the preset storage block, And according to the total size of each group of storage blocks, classify the groups of storage blocks, and allocate the classified storage blocks to the read and write requests according to the continuity of the read and write requests of the application.

本发明实施例提供的分配存储空间的方法及装置,接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件信息;查找所述文件信息所对应的文件,并查找所述文件对应的标识号;解析所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息;向所述应用程序发送所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。由此实现了让应用程序了解存储空间的连续性,并且根据读写请求的特点,分类使用存储空间,从而有效提高了应用程序对磁盘数据的读写速度。The method and device for allocating storage space provided by the embodiments of the present invention receive a request message for querying file storage information sent by an application program, the request message for querying file storage information includes file information; search for a file corresponding to the file information, and Find the identification number corresponding to the file; analyze the identification number, and obtain the storage information of the storage block occupied by the file on the memory according to the result of analyzing the identification number; send the storage information to the application program so that the application program classifies the storage blocks according to the storage information, and the application program allocates the classified storage blocks to the read and write requests according to the continuity of the read and write requests of the application program. This enables the application to understand the continuity of the storage space, and uses the storage space according to the characteristics of the read and write requests, thereby effectively improving the read and write speed of the application to the disk data.

附图说明Description of drawings

图1为本发明提供的Posix文件系统示意图;Fig. 1 is the Posix file system schematic diagram that the present invention provides;

图2为本发明实施例一提供的分配存储空间的方法流程图;FIG. 2 is a flowchart of a method for allocating storage space provided by Embodiment 1 of the present invention;

图3为本发明实施例一提供的应用程序获取存储空间信息的示意图;FIG. 3 is a schematic diagram of obtaining storage space information by an application program provided by Embodiment 1 of the present invention;

图4为本发明实施例二提供的分配存储空间的方法流程图;FIG. 4 is a flowchart of a method for allocating storage space provided by Embodiment 2 of the present invention;

图5为本发明实施例三提供的分配存储空间的装置示意图。FIG. 5 is a schematic diagram of an apparatus for allocating storage space provided by Embodiment 3 of the present invention.

具体实施方式Detailed ways

下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solutions of the present invention will be described in further detail below with reference to the accompanying drawings and embodiments.

在本发明提供的实施例中,以Posix文件系统为例进行说明,参见图1所示的本发明提供的Posix文件系统示意图,图1中,文件系统层新增文件块模块(FileBlock),该模块是文件系统内置的功能的一部分,文件文件系统接口的一部分,可以直接获取文件物理位置;在操作系统层增加文件物理位置系统调用接口,举例来说,可以定义两种系统调用接口:1)intGetFileBlock_name(const char*pathname,char*buf,int size);2)int GetFileBlock_fd(const int fd,char*buf,int size);其中,第一种接口形式中的参数pathname表示操作系统向文件系统发送的文件的路径,该路径中包括文件的文件名称,参数buf指向文件系统向应用程序返回的各存储块组的首地址,参数size则表示返回的各组存储块中存储块的个数,上述存储块可以为磁盘块;数据块遍历模块,根据文件在存储块上对应的物理标识号,利用文件系统的磁盘管理规则对上述物理标识号进行解析,返回上述文件在存储器上占用的全部存储块;文件句柄管理模块,根据文件句柄fd在进程管理模块中是否包含该文件句柄,最终找到fd在存储块上对应的物理标识号。In the embodiment provided by the present invention, the Posix file system is taken as an example for illustration. Refer to the schematic diagram of the Posix file system provided by the present invention shown in FIG. The module is a part of the built-in function of the file system, a part of the file system interface, which can directly obtain the physical location of the file; add the system call interface of the file physical location at the operating system layer, for example, two kinds of system call interfaces can be defined: 1) intGetFileBlock_name (const char*pathname, char*buf, int size); 2) int GetFileBlock_fd (const int fd, char*buf, int size); among them, the parameter pathname in the first interface form indicates that the operating system sends to the file system The path of the file, the path includes the file name of the file, the parameter buf points to the first address of each storage block group returned by the file system to the application program, and the parameter size indicates the number of storage blocks in each group of storage blocks returned, the above The storage block can be a disk block; the data block traversal module, according to the physical identification number corresponding to the file on the storage block, uses the disk management rules of the file system to analyze the above physical identification number, and returns all the storage blocks occupied by the above file on the storage ; The file handle management module, according to whether the file handle fd contains the file handle in the process management module, finally finds the corresponding physical identification number of fd on the storage block.

图2为本发明实施例一提供的分配存储空间的方法流程图。所述方法的执行主体可以为文件系统。如图2所示,所述方法具体包括:FIG. 2 is a flowchart of a method for allocating storage space provided by Embodiment 1 of the present invention. The subject of execution of the method may be a file system. As shown in Figure 2, the method specifically includes:

S210,接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件名称。S210. Receive a request message for querying file storage information sent by an application program, where the request message for querying file storage information includes a file name.

参见图3所示的本发明实施例一提供的应用程序获取存储空间信息的示意图,图3中,首先在系统调用层新增系统调用接口:int GetFileBlock_name(const char*pathname,char*buf,int size)或者int GetFileBlock_fd(const int fd,char*buf,int size),应用程序或者具体为数据库通过调用上述操作系统的接口函数(通过参数pathname)向文件系统发送查询文件存储信息的请求消息,该查询文件存储信息请求消息中包括文件的路径信息,该文件的路径信息中包括文件名称,其中,上述文件名称对应的文件可以为数据文件,也可以为日志文件。Referring to the schematic diagram of the application program obtaining the storage space information provided by the first embodiment of the present invention shown in Fig. 3, in Fig. 3, first add a system call interface in the system call layer: int GetFileBlock_name (const char * pathname, char * buf, int size) or int GetFileBlock_fd (const int fd, char*buf, int size), the application or specifically the database sends a request message for querying file storage information to the file system by calling the interface function of the above operating system (through the parameter pathname), the The request message for querying file storage information includes file path information, and the file path information includes a file name, wherein the file corresponding to the above file name may be a data file or a log file.

S220,检查所述文件名称合法,若所述文件名称合法,则查找所述文件名称对应的文件是否存在,若所述文件存在,则根据所述文件名称查找所述文件对应的标识号。S220. Check that the file name is legal, and if the file name is legal, search whether the file corresponding to the file name exists, and if the file exists, search for the identification number corresponding to the file according to the file name.

参见图3中,文件系统的命名空间模块接收到上述应用程序或者数据库发送的文件的路径信息之后,获取该路径信息中的文件名称,举例为,该文件名称为字符串;然后命名空间模块检查该文件名称是否合法;当上述文件名称合法时,命名空间模块根据上述文件名称在本地查找是否包括该文件名称对应的文件,当查找到该文件名称所对应的文件时,命名空间模块将上述文件名称发送给文件系统的元数据索引模块,元数据索引模块根据该文件名称,查找该文件名称对应的文件对应的标识号。Referring to Figure 3, after the namespace module of the file system receives the path information of the file sent by the above-mentioned application or database, it obtains the file name in the path information, for example, the file name is a character string; then the namespace module checks Whether the file name is legal; when the above file name is legal, the namespace module searches locally according to the above file name to see if the file corresponding to the file name is included. The name is sent to the metadata index module of the file system, and the metadata index module searches for the identification number corresponding to the file corresponding to the file name according to the file name.

S230,解析所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息。S230. Analyze the identification number, and acquire storage information of a storage block occupied by the file on the storage according to a result of analyzing the identification number.

具体地,所述文件系统的元数据索引模块解析所述标识号,根据解析所述标识号的结果,获取所述文件在所述存储器上占用的所有存储块的信息,所述所有存储块的信息包括多组存储块的信息,其中,每组存储块的信息包括:该组存储块的起始地址信息和该组存储块包含的存储块个数。Specifically, the metadata indexing module of the file system parses the identification number, and according to the result of parsing the identification number, obtains information of all storage blocks occupied by the file on the storage, and the information of all storage blocks The information includes information of multiple groups of storage blocks, wherein the information of each group of storage blocks includes: start address information of the group of storage blocks and the number of storage blocks included in the group of storage blocks.

举例来说,上述存储器为磁盘,而存储块则为磁盘划分的磁盘块,则上述获取到的标识号即为文件在磁盘上的inode号;上述文件系统为ext3文件系统,根据ext3文件系统的管理规则,可以将inode号对应到数组i_block[EXT3_N_BLOCKS],该数组包括上述inode号、第一索引值和第二索引值,其中,该inode号为一个整形数,唯一地标识了存储上述文件中部分数据的磁盘块地址;第一索引值为一个一级指针,该指针指向磁盘上存放上述文件中部分数据的一组连续的磁盘块的起始地址;第二索引值为一个二级指针,该指针又可以指向多个不同的一级指针,每个一级指针又指向磁盘上存放上述文件中部分数据的一组连续的磁盘块的起始地址;具体地,根据上述第一索引值和第二索引值,就可以获取到多组磁盘块的信息,其中,每组磁盘块的信息包括:该组磁盘块的起始地址信息和该组磁盘块包含的磁盘块个数,由上述多组磁盘块的信息组成所有磁盘块的信息。For example, the above-mentioned memory is a disk, and the storage block is a disk block divided by the disk, then the identification number obtained above is the inode number of the file on the disk; the above-mentioned file system is an ext3 file system, according to the ext3 file system Management rules, the inode number can be mapped to the array i_block[EXT3_N_BLOCKS], the array includes the above inode number, the first index value and the second index value, wherein the inode number is an integer number, which uniquely identifies the The disk block address of some data; the first index value is a first-level pointer, which points to the start address of a group of continuous disk blocks storing part of the data in the above file on the disk; the second index value is a second-level pointer, This pointer can point to a plurality of different first-level pointers, and each first-level pointer points to the starting address of a group of continuous disk blocks storing part of the data in the above-mentioned file on the disk; specifically, according to the above-mentioned first index value and With the second index value, the information of multiple groups of disk blocks can be obtained, wherein, the information of each group of disk blocks includes: the starting address information of the group of disk blocks and the number of disk blocks contained in the group of disk blocks. The information of the group disk blocks constitutes the information of all disk blocks.

S240,向所述应用程序发送所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。S240. Send the storage information to the application program, so that the application program classifies the storage blocks according to the storage information, and enables the application program to classify the storage blocks according to the continuity of the read and write requests of the application program After the storage block is allocated to the read and write requests.

具体地,应用程序根据所述每组存储块包含的存储块个数和预设的存储块的大小,确定所述每组存储块的总大小,并根据所述每组存储块的总大小,对所述各组存储块进行分类,并根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。Specifically, the application determines the total size of each group of storage blocks according to the number of storage blocks included in each group of storage blocks and the preset size of the storage blocks, and according to the total size of each group of storage blocks, Classifying the groups of storage blocks, and assigning the classified storage blocks to the read and write requests according to the continuity of the read and write requests of the application.

参见图3中,文件系统获取到各组磁盘块的信息之后,将上述各组磁盘块的信息返回给应用程序或者数据库,由应用程序或者数据库中的存储引擎对返回的各组磁盘块进行分类,具体为,磁盘划分的磁盘块在逻辑上都是有固定大小的,举例为,可以为4KB,根据每组磁盘块的信息中该组磁盘块包含的磁盘块个数及上述磁盘块预设的大小,就可以得到每组磁盘块的总大小;上述存储引擎根据每组磁盘块的总大小,对各组磁盘块进行分类,举例为,总共包括三组磁盘块:第一组磁盘块的信息包括:首地址为200KB,总共包括2个磁盘块,则第一组磁盘块的总大小为8KB;第二组磁盘块的信息包括:首地址为512KB,总共包括16个磁盘块,则第二组磁盘块的总大小为64KB;第三组磁盘块的信息包括:首地址为768KB,总共包括128个磁盘块,则第三组磁盘块的总大小为512KB;则上述磁盘块可以被划为三类:第一类的大小为8KB,第二类的大小为64KB,第三类的大小为512KB。应用程序或数据库根据读写请求的连续性将分类后的存储块分配给所述读写请求,具体地,由于数据库中的数据文件随机读写较多,且数据文件的数据页比较小时,优先从小磁盘块分组中分配磁盘块,举例为:从第一类磁盘分组中分配磁盘块,由此,对于数据文件中数据页面可能大于文件系统最小分配单元时,本文件系统可以预先对齐,避免跨块;当数据库中的日志文件都是连续读写,数据块比较大时,优先从大磁盘块分组中分配磁盘块,举例为,从第三类磁盘块分组中分配磁盘块;当磁盘块不足时,允许大的磁盘块拆分为小的磁盘块,或将小的磁盘块合并为逻辑上连续的大的磁盘块使用,但是,此时需要提示用户数据文件或者日志文件的连续性不足。Referring to Figure 3, after the file system obtains the information of each group of disk blocks, it returns the information of each group of disk blocks to the application program or database, and the storage engine in the application program or database classifies the returned groups of disk blocks , specifically, the disk blocks divided by the disk logically have a fixed size, for example, it can be 4KB, according to the number of disk blocks contained in the group of disk blocks in the information of each group of disk blocks and the above-mentioned disk block preset The total size of each group of disk blocks can be obtained; the above-mentioned storage engine classifies each group of disk blocks according to the total size of each group of disk blocks. For example, there are three groups of disk blocks in total: the first group of disk blocks The information includes: the first address is 200KB, including 2 disk blocks in total, then the total size of the first group of disk blocks is 8KB; the information of the second group of disk blocks includes: the first address is 512KB, including 16 disk blocks in total, then the first The total size of the second group of disk blocks is 64KB; the information of the third group of disk blocks includes: the first address is 768KB, including 128 disk blocks in total, then the total size of the third group of disk blocks is 512KB; then the above disk blocks can be divided There are three types: the size of the first type is 8KB, the size of the second type is 64KB, and the size of the third type is 512KB. The application program or the database allocates the classified storage blocks to the read and write requests according to the continuity of the read and write requests. Specifically, since there are many random reads and writes of the data files in the database, and the data pages of the data files are relatively small, priority is given to Allocate disk blocks from small disk block groups, for example: allocate disk blocks from the first type of disk group. Therefore, when the data page in the data file may be larger than the minimum allocation unit of the file system, this file system can be pre-aligned to avoid spanning blocks; when the log files in the database are continuously read and written and the data blocks are relatively large, the disk blocks are allocated from the large disk block groups first, for example, the disk blocks are allocated from the third type of disk block groups; when the disk blocks are insufficient When , large disk blocks are allowed to be split into small disk blocks, or small disk blocks are merged into logically continuous large disk blocks for use, but at this time, users need to be prompted that the continuity of data files or log files is insufficient.

图4为本发明实施例二提供的分配存储空间的方法流程图。所述方法的执行主体可以为文件系统。如图4所示,所述方法具体包括:FIG. 4 is a flowchart of a method for allocating storage space provided by Embodiment 2 of the present invention. The subject of execution of the method may be a file system. As shown in Figure 4, the method specifically includes:

S410,接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件句柄。S410. Receive a request message for querying file storage information sent by an application program, where the request message for querying file storage information includes a file handle.

参见图3,首先在系统调用层新增系统调用接口:int GetFileBlock_name(const char*pathname,char*buf,int size)或者int GetFileBlock_fd(const int fd,char*buf,int size),应用程序或者具体为数据库通过调用上述操作系统的接口函数(通过参数pathname)向文件系统发送文件句柄,其中,该文件句柄对应的文件可以为数据文件,也可以为日志文件。See Figure 3, first add a system call interface in the system call layer: int GetFileBlock_name (const char*pathname, char*buf, int size) or int GetFileBlock_fd (const int fd, char*buf, int size), application or specific Send a file handle to the file system for the database by calling the interface function of the above-mentioned operating system (via the parameter pathname), where the file corresponding to the file handle can be a data file or a log file.

S420,根据所述文件句柄从所述操作系统的进程管理模块中查找所述文件句柄所对应的文件,并查找所述文件对应的标识号。S420. Find the file corresponding to the file handle from the process management module of the operating system according to the file handle, and find the identification number corresponding to the file.

举例来说,参见图3中,文件系统接收到上述应用程序或者数据库发送的文件句柄fd之后,根据该文件句柄从操作系统的进程管理模块管理的当前任务的task结构体中查找是否含有此文件句柄fd,此处,应用程序中所有打开的文件的文件句柄均记载在task结构体中,其中,文件与文件句柄是一对多的关系,即一个文件对应多个文件句柄,根据其中一个文件句柄可以唯一的找出一个文件;具体地,当文件系统从task结构体中查找到文件句柄fd时,就可以根据该fd从进程管理模块中查找到与fd对应的文件的相关信息,举例为,该文件的相关信息可以记载在进程管理模块的file结构体中,而file结构体中包括参数address_space,其中,参数address_space的inode字段中记载了与上述文件在存储器上对应的标识号,因此,根据上述文件句柄就可以查找到该文件对应的标识号。For example, referring to Fig. 3, after the file system receives the file handle fd sent by the above-mentioned application program or database, it searches whether the file is contained in the task structure of the current task managed by the process management module of the operating system according to the file handle Handle fd, here, the file handles of all open files in the application are recorded in the task structure, where the relationship between files and file handles is one-to-many, that is, one file corresponds to multiple file handles, according to one of the file The handle can uniquely find a file; specifically, when the file system finds the file handle fd from the task structure, it can find the relevant information of the file corresponding to fd from the process management module according to the fd, for example: , the relevant information of the file can be recorded in the file structure of the process management module, and the file structure includes the parameter address_space, wherein the inode field of the parameter address_space records the identification number corresponding to the above file on the memory, therefore, According to the above file handle, the identification number corresponding to the file can be found.

S430-S440同步骤S230-S240相同。S430-S440 are the same as steps S230-S240.

图5为本发明实施例三提供的分配存储空间的装置示意图,所述装置用于执行图2或图4所示的方法。如图5所示,该装置包括:接收单元501、查找单元502、处理单元503和发送单元504。FIG. 5 is a schematic diagram of an apparatus for allocating storage space provided by Embodiment 3 of the present invention, and the apparatus is used to execute the method shown in FIG. 2 or FIG. 4 . As shown in FIG. 5 , the apparatus includes: a receiving unit 501 , a searching unit 502 , a processing unit 503 and a sending unit 504 .

所述接收单元501,用于接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件信息。The receiving unit 501 is configured to receive a request message for querying file storage information sent by an application program, where the request message for querying file storage information includes file information.

所述查找单元502,用于查找所述接收单元501接收的所述文件信息所对应的文件,并查找所述文件对应的标识号。The searching unit 502 is configured to search for the file corresponding to the file information received by the receiving unit 501, and search for the identification number corresponding to the file.

可选地,所述查找单元502具体用于:检查所述文件名称是否合法,若所述文件名称合法,则查找所述文件名称所对应的文件是否存在,若所述文件存在,则根据所述文件名称查找所述文件对应的标识号。Optionally, the search unit 502 is specifically configured to: check whether the file name is legal, if the file name is legal, then search whether the file corresponding to the file name exists, if the file exists, then according to the Find the identification number corresponding to the file by using the file name.

可选地,所述查找单元502具体用于:根据所述文件句柄从所述操作系统的进程管理模块中查找所述文件句柄所对应的文件,并查找所述文件对应的标识号。Optionally, the search unit 502 is specifically configured to: search for the file corresponding to the file handle from the process management module of the operating system according to the file handle, and find the identification number corresponding to the file.

所述处理单元503,用于解析所述查找单元502查找的所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息。The processing unit 503 is configured to analyze the identification number searched by the search unit 502, and obtain the storage information of the storage block occupied by the file on the memory according to the result of analyzing the identification number.

可选地,所述处理单元503具体用于:解析所述标识号,根据解析所述标识号的结果,获取所述文件在所述存储器上占用的所有存储块的信息,所述所有存储块的信息包括多组存储块的信息,其中,每组存储块的信息包括:该组存储块的起始地址信息和该组存储块包含的存储块个数。Optionally, the processing unit 503 is specifically configured to: analyze the identification number, and obtain information of all storage blocks occupied by the file on the storage according to a result of analyzing the identification number, and all storage blocks The information includes the information of multiple groups of storage blocks, wherein the information of each group of storage blocks includes: the starting address information of the group of storage blocks and the number of storage blocks included in the group of storage blocks.

所述发送单元504,用于向所述应用程序发送所述处理单元503获取的所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。The sending unit 504 is configured to send the storage information acquired by the processing unit 503 to the application program, so that the application program classifies the storage blocks according to the storage information, and enables the application program to classify the storage blocks according to the The continuity of the read and write requests of the application program allocates the classified storage blocks to the read and write requests.

可选地,所述发送单元504具体用于:向所述应用程序发送所述存储信息,以使所述应用程序根据所述每组存储块包含的存储块个数和预设的存储块的大小,确定所述每组存储块的总大小,并根据所述每组存储块的总大小,对所述各组存储块进行分类,并根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。Optionally, the sending unit 504 is specifically configured to: send the storage information to the application program, so that the application program can store the information according to the number of storage blocks included in each group of storage blocks and the number of preset storage blocks. Size, determine the total size of each group of storage blocks, and classify each group of storage blocks according to the total size of each group of storage blocks, and classify according to the continuity of the read and write requests of the application program After the storage block is allocated to the read and write requests.

本发明实施例提供的装置植入了本发明实施例一提供的方法,因此,本发明提供的装置的具体工作过程,在此不复赘述。The device provided in the embodiment of the present invention is implanted with the method provided in Embodiment 1 of the present invention. Therefore, the specific working process of the device provided in the present invention will not be repeated here.

综上,上述文件系统可以导出文件使用的磁盘分组信息,即可以导出逻辑存储空间,使应用程序或者数据库可以知道文件对应的存储空间的连续性,根据存储空间的连续性,支持应用程序或者数据库使用伙伴算法管理存储空间,保证文件的物理连续性,实现优化数据库日志文件连续读写、数据文件小块随机读写目的。In summary, the above file system can export the disk grouping information used by the file, that is, it can export the logical storage space, so that the application program or database can know the continuity of the storage space corresponding to the file, and support the application program or database according to the continuity of the storage space. Use the buddy algorithm to manage storage space, ensure the physical continuity of files, and realize the purpose of optimizing continuous reading and writing of database log files and random reading and writing of small blocks of data files.

需要说明的是,本发明实施例中以磁盘文件系统为例进行说明,但不限于磁盘文件系统,对于SSD、内存文件系统或者在连续性要求苛刻的场景中,同样可以采用本方案。It should be noted that, in the embodiment of the present invention, a disk file system is used as an example for illustration, but it is not limited to a disk file system. This solution can also be used for SSDs, memory file systems, or scenarios with strict continuity requirements.

专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals should further realize that the units and algorithm steps 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 relationship between hardware and software 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 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 specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention and are not intended to limit the scope of the present invention. Protection scope, within the spirit and principles of the present invention, any modification, equivalent replacement, improvement, etc., shall be included in the protection scope of the present invention.

Claims (10)

1.一种分配存储空间的方法,其特征在于,所述方法包括:1. A method for allocating storage space, characterized in that the method comprises: 接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件信息;receiving a request message for querying file storage information sent by an application program, wherein the request message for querying file storage information includes file information; 查找所述文件信息所对应的文件,并查找所述文件对应的标识号;Find the file corresponding to the file information, and find the identification number corresponding to the file; 解析所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息;Analyzing the identification number, and obtaining the storage information of the storage block occupied by the file on the memory according to the result of analyzing the identification number; 向所述应用程序发送所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。sending the storage information to the application, so that the application classifies the storage blocks according to the storage information, and makes the application classify the classified blocks according to the continuity of the read and write requests of the application A memory block is allocated to the read and write requests. 2.根据权利要求1所述的方法,其特征在于,所述文件信息具体为文件名称,所述查找所述文件信息所对应的文件,并查找所述文件对应的标识号包括:2. The method according to claim 1, wherein the file information is specifically a file name, and the searching for the file corresponding to the file information and the identification number corresponding to the file include: 检查所述文件名称是否合法,若所述文件名称合法,则查找所述文件名称所对应的文件是否存在,若所述文件存在,则根据所述文件名称查找所述文件对应的标识号。Check whether the file name is legal, if the file name is legal, then find whether the file corresponding to the file name exists, if the file exists, then search for the identification number corresponding to the file according to the file name. 3.根据权利要求1所述的方法,其特征在于,所述文件信息具体为文件句柄,所述查找所述文件信息所对应的文件,并查找所述文件对应的标识号包括:3. The method according to claim 1, wherein the file information is specifically a file handle, and the searching for the file corresponding to the file information and the identification number corresponding to the file include: 根据所述文件句柄从所述操作系统的进程管理模块中查找所述文件句柄所对应的文件,并查找所述文件对应的标识号。Find the file corresponding to the file handle from the process management module of the operating system according to the file handle, and find the identification number corresponding to the file. 4.根据权利要求1-3任一所述的方法,其特征在于,所述解析所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息包括:4. The method according to any one of claims 1-3, wherein the analyzing the identification number, according to the result of analyzing the identification number, obtains the storage of the storage block occupied by the file on the memory. Information includes: 解析所述标识号,根据解析所述标识号的结果,获取所述文件在所述存储器上占用的所有存储块的信息,所述所有存储块的信息包括多组存储块的信息,其中,每组存储块的信息包括:该组存储块的起始地址信息和该组存储块包含的存储块个数。Analyzing the identification number, and according to the result of analyzing the identification number, obtaining information on all storage blocks occupied by the file on the storage, where the information on all storage blocks includes information on multiple groups of storage blocks, wherein each The information of the group of storage blocks includes: the starting address information of the group of storage blocks and the number of storage blocks contained in the group of storage blocks. 5.根据权利要求4所述的方法,其特征在于,向所述应用程序发送所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求包括:5. The method according to claim 4, characterized in that, sending the storage information to the application program, so that the application program classifies the storage blocks according to the storage information, and makes the application program classify the storage blocks according to the The continuity of the read and write requests of the application program, assigning the classified storage blocks to the read and write requests includes: 向所述应用程序发送所述存储信息,用以所述应用程序根据所述每组存储块包含的存储块个数和预设的存储块的大小,确定所述每组存储块的总大小,并根据所述每组存储块的总大小,对所述各组存储块进行分类,并根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。sending the storage information to the application, so that the application determines the total size of each group of storage blocks according to the number of storage blocks contained in each group of storage blocks and the size of the preset storage blocks, And according to the total size of each group of storage blocks, classify the groups of storage blocks, and allocate the classified storage blocks to the read and write requests according to the continuity of the read and write requests of the application. 6.一种分配存储空间的装置,其特征在于,所述装置包括:接收单元、查找单元、处理单元和发送单元;6. A device for allocating storage space, characterized in that the device comprises: a receiving unit, a search unit, a processing unit and a sending unit; 所述接收单元,用于接收应用程序发送的查询文件存储信息请求消息,所述查询文件存储信息请求消息中包括文件信息;The receiving unit is configured to receive a query file storage information request message sent by an application program, and the query file storage information request message includes file information; 所述查找单元,用于查找所述接收单元接收的所述文件信息所对应的文件,并查找所述文件对应的标识号;The searching unit is configured to search for the file corresponding to the file information received by the receiving unit, and search for the identification number corresponding to the file; 所述处理单元,用于解析所述查找单元查找的所述标识号,根据解析所述标识号的结果,获取所述文件在存储器上所占用的存储块的存储信息;The processing unit is configured to analyze the identification number searched by the search unit, and obtain the storage information of the storage block occupied by the file on the memory according to the result of analyzing the identification number; 所述发送单元,用于向所述应用程序发送所述处理单元获取的所述存储信息,以使所述应用程序根据所述存储信息对存储块进行分类,并使所述应用程序根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。The sending unit is configured to send the storage information acquired by the processing unit to the application program, so that the application program can classify storage blocks according to the storage information, and enable the application program to classify storage blocks according to the The continuity of the read and write requests of the application program allocates the classified storage blocks to the read and write requests. 7.根据权利要求6所述的装置,其特征在于,所述查找单元具体用于:7. The device according to claim 6, wherein the search unit is specifically configured to: 检查所述文件名称是否合法,若所述文件名称合法,则查找所述文件名称所对应的文件是否存在,若所述文件存在,则根据所述文件名称查找所述文件对应的标识号。Check whether the file name is legal, if the file name is legal, then find whether the file corresponding to the file name exists, if the file exists, then search for the identification number corresponding to the file according to the file name. 8.根据权利要求6所述的装置,其特征在于,所述查找单元具体用于:8. The device according to claim 6, wherein the search unit is specifically configured to: 根据所述文件句柄从所述操作系统的进程管理模块中查找所述文件句柄所对应的文件,并查找所述文件对应的标识号。Find the file corresponding to the file handle from the process management module of the operating system according to the file handle, and find the identification number corresponding to the file. 9.根据权利要求6-8任一所述的装置,其特征在于,所述处理单元具体用于:9. The device according to any one of claims 6-8, wherein the processing unit is specifically configured to: 解析所述标识号,根据解析所述标识号的结果,获取所述文件在所述存储器上占用的所有存储块的信息,所述所有存储块的信息包括多组存储块的信息,其中,每组存储块的信息包括:该组存储块的起始地址信息和该组存储块包含的存储块个数。Analyzing the identification number, and obtaining information on all storage blocks occupied by the file on the storage according to the result of analyzing the identification number, the information on all storage blocks includes information on multiple groups of storage blocks, wherein each The information of the group of storage blocks includes: the starting address information of the group of storage blocks and the number of storage blocks contained in the group of storage blocks. 10.根据权利要求9所述的装置,其特征在于,所述发送单元具体用于:10. The device according to claim 9, wherein the sending unit is specifically used for: 向所述应用程序发送所述存储信息,以使所述应用程序根据所述每组存储块包含的存储块个数和预设的存储块的大小,确定所述每组存储块的总大小,并根据所述每组存储块的总大小,对所述各组存储块进行分类,并根据所述应用程序的读写请求的连续性将分类后的存储块分配给所述读写请求。sending the storage information to the application program, so that the application program determines the total size of each group of storage blocks according to the number of storage blocks contained in each group of storage blocks and the size of the preset storage block, And according to the total size of each group of storage blocks, classify the groups of storage blocks, and allocate the classified storage blocks to the read and write requests according to the continuity of the read and write requests of the application.
CN201410083434.2A 2014-03-07 2014-03-07 Method and device for distributing storage space Pending CN103810114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410083434.2A CN103810114A (en) 2014-03-07 2014-03-07 Method and device for distributing storage space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410083434.2A CN103810114A (en) 2014-03-07 2014-03-07 Method and device for distributing storage space

Publications (1)

Publication Number Publication Date
CN103810114A true CN103810114A (en) 2014-05-21

Family

ID=50706908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410083434.2A Pending CN103810114A (en) 2014-03-07 2014-03-07 Method and device for distributing storage space

Country Status (1)

Country Link
CN (1) CN103810114A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022399A (en) * 2016-05-06 2016-10-12 庞震伟 Two-dimensional code, two-dimensional code label, two-dimensional code application system formation method and two-dimensional code use method
CN106383666A (en) * 2016-09-07 2017-02-08 东信和平科技股份有限公司 Data storage method and apparatus
CN108021513A (en) * 2016-11-02 2018-05-11 杭州海康威视数字技术股份有限公司 A kind of date storage method and device
CN112783439A (en) * 2020-12-29 2021-05-11 重庆真逆思维科技有限公司 Cloud platform data available area space allocation discovery working method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1377502A (en) * 1999-08-03 2002-10-30 松下电器产业株式会社 Method and apparatus for AV data recording, and disk recorded by method and apparatus
CN102662992A (en) * 2012-03-14 2012-09-12 北京搜狐新媒体信息技术有限公司 Method and device for storing and accessing massive small files
US20140032495A1 (en) * 2010-05-28 2014-01-30 Commvault Systems, Inc. Systems and methods for performing data replication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1377502A (en) * 1999-08-03 2002-10-30 松下电器产业株式会社 Method and apparatus for AV data recording, and disk recorded by method and apparatus
US20140032495A1 (en) * 2010-05-28 2014-01-30 Commvault Systems, Inc. Systems and methods for performing data replication
CN102662992A (en) * 2012-03-14 2012-09-12 北京搜狐新媒体信息技术有限公司 Method and device for storing and accessing massive small files

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022399A (en) * 2016-05-06 2016-10-12 庞震伟 Two-dimensional code, two-dimensional code label, two-dimensional code application system formation method and two-dimensional code use method
CN106383666A (en) * 2016-09-07 2017-02-08 东信和平科技股份有限公司 Data storage method and apparatus
CN106383666B (en) * 2016-09-07 2020-05-01 东信和平科技股份有限公司 Data storage method and device
CN108021513A (en) * 2016-11-02 2018-05-11 杭州海康威视数字技术股份有限公司 A kind of date storage method and device
CN108021513B (en) * 2016-11-02 2021-09-10 杭州海康威视数字技术股份有限公司 Data storage method and device
CN112783439A (en) * 2020-12-29 2021-05-11 重庆真逆思维科技有限公司 Cloud platform data available area space allocation discovery working method

Similar Documents

Publication Publication Date Title
CN103020174B (en) Similarity analysis method, Apparatus and system
US11461027B2 (en) Deduplication-aware load balancing in distributed storage systems
CN102725753B (en) Method and apparatus for optimizing data access, method and apparatus for optimizing data storage
CN107092439B (en) Method and device for data storage
CN106776967B (en) Method and device for storing massive small files in real time based on time sequence aggregation algorithm
CN105468642A (en) Data storage method and apparatus
CN106294352B (en) A kind of document handling method, device and file system
US11625192B2 (en) Peer storage compute sharing using memory buffer
CN105677903A (en) Data acquisition method and device as well as computer device
Li et al. Enabling efficient updates in KV storage via hashing: Design and performance evaluation
CN102169497B (en) Method and device for managing metadata through bitmaps
CN103810114A (en) Method and device for distributing storage space
CN113868267B (en) Method for injecting time sequence data, method for inquiring time sequence data and database system
WO2024169158A1 (en) Storage system, data access method, apparatus, and device
CN104537023B (en) A kind of storage method and device of reverse indexing record
JP7730236B2 (en) Computer system, computer program, and computer-implemented method (workload-driven database reorganization)
CN108804571B (en) Data storage method, device and equipment
WO2023274197A1 (en) Operation request processing method and related device
CN112380174B (en) XFS file system analysis method, terminal device and storage medium with deleted files
CN110245130A (en) Data deduplication method, device, computer equipment and storage medium
CN114443583A (en) Method, device and equipment for arranging fragment space and storage medium
CN119441169A (en) Server log document processing method and device
CN110019448B (en) Data interaction method and device
CN119493519A (en) Data management method and device
WO2008029146A1 (en) A distributed file system operable with a plurality of different operating systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140521

WD01 Invention patent application deemed withdrawn after publication