WO2015021910A1 - Method for accessing data and apparatus thereof - Google Patents

Method for accessing data and apparatus thereof Download PDF

Info

Publication number
WO2015021910A1
WO2015021910A1 PCT/CN2014/084187 CN2014084187W WO2015021910A1 WO 2015021910 A1 WO2015021910 A1 WO 2015021910A1 CN 2014084187 W CN2014084187 W CN 2014084187W WO 2015021910 A1 WO2015021910 A1 WO 2015021910A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
storage location
location information
physical storage
data
Prior art date
Application number
PCT/CN2014/084187
Other languages
French (fr)
Inventor
Jianlin GAO
Original Assignee
Tencent Technology (Shenzhen) Company Limited
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 Tencent Technology (Shenzhen) Company Limited filed Critical Tencent Technology (Shenzhen) Company Limited
Publication of WO2015021910A1 publication Critical patent/WO2015021910A1/en

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/102Programmed access in sequence to addressed parts of tracks of operating record carriers
    • G11B27/105Programmed access in sequence to addressed parts of tracks of operating record carriers of operating discs

Definitions

  • the disclosure relates to storage technologies, and particularly, to a method for accessing data and an apparatus thereof.
  • a file system may be accessed through a standard Portable Operating System Interface (POSIX) or through an interface provided by the standard C language.
  • POSIX Portable Operating System Interface
  • the POSIX defines a read interface and a write interface, and the standard C language provides a fread interface and a fwrite interface. These two most common interfaces have been widely used.
  • the file system is basically accessed based on a hard disk. Since the hard disk is a mechanical electronic device, time is required for a movement of a magnetic head. A movement of a short distance consumes little time, while a movement of a long distance consumes much time. With the conventional interfaces, a spatial correlation of access operations is not considered. If a physical distance between two files that are successively accessed is long, the magnetic head should move a long distance, which consumes much time and leads to a slow access speed and an aggravated wear of a driving mechanism for the magnetic head.
  • a method for accessing data and an apparatus thereof are provided in the disclosure, with which a data access speed may be effectively improved and a wear of a driving mechanism for a magnetic head is alleviated.
  • a method for accessing data includes: loading a data access interface, where the data access interface is for acquiring physical storage location information of at least one file in a memory; acquiring identifiers of at least two files;
  • the apparatus includes: a data access interface, for acquiring physical storage location information of at least one file in a memory;
  • an acquisition unit for acquiring identifiers of at least two files
  • an interface calling unit for calling the data access interface to acquire the physical storage location information of the at least two files based on the acquired identifiers
  • an access unit for scheduling, based on the physical storage location information acquired by the data access interface, file access operations predetermined to be performed, to conform to an expected access mode, and correspondingly performing the file access operations.
  • the data access interface is provided, where the data access interface is for acquiring the physical storage location information of the at least one file; the identifiers of the at least two files are acquired; the data access interface is called to acquire, based on the identifiers, the physical storage location information of the at least two files; and the file access operations predetermined to be performed are scheduled, based on the physical storage location information, to conform to the expected access mode, and correspondingly the file access operations are performed. Since the files are accessed in an order scheduled based on actual physical storage locations of the files, time required for accessing the data may be reduced and the access speed may be increased, and at the same time, the wear of the driving mechanism for the magnetic head may be alleviated.
  • Figure 1 is a flowchart of a method for accessing data according to a first embodiment
  • Figure 2 is a schematic diagram of the method for accessing the data according to the first embodiment.
  • Figure 3 is a structural block diagram of an apparatus for accessing data according to a second embodiment.
  • a method for accessing data is provided according to an embodiment of the disclosure, which is applicable to a memory such as a hard disk or a compact disk, where the data is accessed based on a magnetic head.
  • a data access speed may be effectively improved and a wear of a driving mechanism for the magnetic head may be alleviated.
  • a file system of a computer may be used to store and organize computer data, which makes it easy to access and search the data.
  • abstract logical concepts of file and directory tree are used to replace a concept of data block used in a physical device such as the hard disk or the compact disk.
  • the user is not aware where a data block in which the data is actually stored locates on the hard disk or on the compact disk. Before writing new data, the user does not have to care about which data blocks are not in use.
  • a management (allocation and release) of storage spaces on the hard disk is automatically performed by the file system.
  • a storage area is divided into different sub-storage areas.
  • a first sub-storage area is used to save storage information of a file system object (a file or a directory), and the file itself may be stored in other sub-storage areas.
  • the first sub-storage area is used to store metadata of the file system object.
  • the first sub-storage area is used to store a file allocation table.
  • a physical storage location of the file in the memory may be acquired by querying the metadata or querying the file allocation table.
  • an identifier such as a file name
  • storage information of the file for example, the metadata or the file allocation table
  • the physical storage location information may be acquired based on the storage information. It can be understood that, the physical storage location of one file may be discontinuous due to a restriction of the file system. Therefore, one file may actually have multiple storage locations.
  • the physical storage location information of the file may include only a starting location of an actual storage of the file.
  • the data access interface may be implemented with any suitable programming languages. According to one embodiment, the data access interface is implemented based on the standard C language.
  • the data access interface only supports querying the physical storage location information of one file.
  • the data access interface can receive a file list as a parameter, and correspondingly return the physical storage location information of all files in the file list.
  • a method for accessing data includes the following steps 101 to 104. [0018] In the step 101, a data access interface is loaded. The data access interface is for acquiring physical storage location information of at least one file.
  • step 102 identifiers of at least two files are acquired.
  • the identifiers are file names. It can be understood that the file names should include complete storage paths. Furthermore, the identifiers are not limited to the file names. Any data which is supported by a file system and can be used to query corresponding files may be used as the identifiers. For example, in one case, the identifiers are file numbers (index numbers). The at least two files may be, for example, files to be accessed in a subsequent period of time in a program. [0021] In the step 103, the data access interface is called to acquire, based on the identifiers, the physical storage location information of the at least two files.
  • the data access interface can only query one file each time
  • the data access interface is called several times to acquire the physical storage location information of each of the at least two files.
  • a list of files to be queried may be generated, and submitted in a predetermined format to the data access interface as a parameter, and accordingly, the physical storage location information of the at least two files are queried simultaneously.
  • the identifiers are the file numbers
  • the data access interface is for querying offset values of the at least two files based on the file numbers to acquire the physical storage location information.
  • file access operations predetermined to be performed are schemed based on the physical storage location information, to conform to an expected access mode, and the file access operations are correspondingly performed.
  • the step 104 may include: arranging an order, based on the physical storage location information, for the file access operations predetermined to be performed, where a magnetic head moves a shortest distance in the case that the file access operations are performed in the order.
  • the at least two files include a.txt, b.txt and c.txt, storage locations of which in a memory are shown in Figure 2.
  • the three files are read in a normal operating order of a.txt, b.txt and c.txt.
  • a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from a buffer; after reading a.txt, the magnetic head moves to the storage location of b.txt; and then the magnetic head moves to the storage location of c.txt after reading b.txt.
  • a path of the movement is shown with a path 201 in Figure 2.
  • the order of the three files is a.txt, c.txt and b.txt. If the files are accessed in the order, a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from the buffer; after reading a.txt, the magnetic head moves to the storage location of c.txt; and then the magnetic head moves to the storage location of b.txt after reading c.txt. A path of the movement is shown with a path 202 in Figure 2.
  • the magnetic head moves a shorter distance in performing the file access operations based on the path 202. Hence, time required for accessing the data is reduced and an access speed is increased, and at the same time, a wear of a driving mechanism for the magnetic head is alleviated.
  • Figure 3 is a structural block diagram of an apparatus for accessing data according to a second embodiment. As shown in Figure 3, the apparatus includes a data access interface 21, an acquisition unit 22, an interface calling unit 23 and an access unit 24.
  • the data access interface 21 is for acquiring physical storage location information of at least one file in a memory.
  • the data access interface may query, based on an identifier (for example, a file name) of the file to be queried, storage information of a file, such as metadata or a file allocation table, to acquire the physical storage location information, where the identifier is acquired by the acquisition unit 22.
  • an identifier for example, a file name
  • storage information of a file such as metadata or a file allocation table
  • the data access interface may be implemented with any suitable programming languages.
  • the data access interface is implemented based on the standard C language.
  • the data access interface only supports querying the physical storage location information of one file.
  • the data access interface can receive a file list as a parameter, and correspondingly return the physical storage location information of all files in the file list.
  • the acquisition unit 22 is for acquiring identifiers of at least two files.
  • the identifiers are file names. It should be understood that the file names should include complete storage paths.
  • the identifiers are not limited to the file names. Any data which is supported by a file system and can be used to query corresponding files may be used as the identifiers.
  • the identifiers are file numbers (index numbers).
  • the at least two files may be, for example, files to be accessed in a subsequent period of time in a program.
  • the interface calling unit 23 is for calling the data access interface to acquire, based on the acquired identifiers, the physical storage location information of the at least two files.
  • the data access interface 21 can only query one file each time, the data access interface 21 is called several times to acquire the physical storage location information of each of the at least two files.
  • the data access interface supports a multi-file query, a list of files to be queried may be generated, and submitted in a predetermined format to the data access interface 21 as a parameter, and accordingly, the physical storage location information of the at least two files are queried simultaneously.
  • the identifiers are the file numbers, and accordingly, the data access interface is for querying offset values of the at least two files based on the file numbers acquired by the acquisition unit 22, to acquire the physical storage location information.
  • the access unit 24 is for scheduling file access operations predetermined to be performed, to conform to an expected access mode, based on the physical storage location information acquired by the data access interface 21, and correspondingly performing the file access operations.
  • file access operations predetermined to be performed are arranged in an order based on the physical storage location information, where a magnetic head moves a shortest distance in the case that the file access operations are performed in the order.
  • the at least two files include a.txt, b.txt and c.txt, storage locations of which in the memory are shown in Figure 2.
  • the three files are read in a normal operating order of a.txt, b.txt and c.txt.
  • a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from a buffer; after reading a.txt, the magnetic head moves to the storage location of b.txt; and then the magnetic head moves to the storage location of c.txt after reading b.txt.
  • a path of the movement is shown with a path 201 in Figure 2.
  • the order of the three files is a.txt, c.txt and b.txt. If the files are accessed in the order, a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from the buffer; after reading a.txt, the magnetic head moves to the storage location of c.txt; and then the magnetic head moves to the storage location of b.txt after reading c.txt. A path of the movement is shown with a path 202 in Figure 2.
  • the magnetic head moves a shorter distance in performing the file access operations based on the path 202. Hence, time required for accessing the data is reduced and an access speed is increased, and at the same time, a wear of a driving mechanism for the magnetic head is alleviated.
  • the program may be stored in a computer readable storage medium.
  • the storage medium may be a read-only memory, a magnetic disk or an optical disk, and the storage medium is non-transitionary.

Landscapes

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

Abstract

A method for accessing data includes: loading a data access interface which is for acquiring physical storage location information of at least one file in a memory; calling the data access interface to acquire the physical storage location information of at least two files based on identifiers of the files; and scheduling, based on the physical storage location information, file access operations predetermined to be performed, to conform to an expected access mode, and correspondingly performing the file access operations. Furthermore, an apparatus for accessing data is further provided. With the method for accessing the data and the apparatus thereof, a data access speed may be effectively improved and a wear of a driving mechanism for a magnetic head may be alleviated.

Description

METHOD FOR ACCESSING DATA AND APPARATUS THEREOF
CROSS REFERENCE OF RELATED APPLICATION
The present application claims the priority to Chinese Patent Application No. 201310359608.9, entitled "METHOD FOR ACCESSING DATA AND APPARATUS THEREOF", filed on August 16, 2013 with the State Intellectual Property Office of People's Republic of China, which is incorporated herein by reference in its entirety.
FIELD
[0001] The disclosure relates to storage technologies, and particularly, to a method for accessing data and an apparatus thereof.
BACKGROUND
[0002] In storage technologies, a file system may be accessed through a standard Portable Operating System Interface (POSIX) or through an interface provided by the standard C language. The POSIX defines a read interface and a write interface, and the standard C language provides a fread interface and a fwrite interface. These two most common interfaces have been widely used.
[0003] Conventionally, the file system is basically accessed based on a hard disk. Since the hard disk is a mechanical electronic device, time is required for a movement of a magnetic head. A movement of a short distance consumes little time, while a movement of a long distance consumes much time. With the conventional interfaces, a spatial correlation of access operations is not considered. If a physical distance between two files that are successively accessed is long, the magnetic head should move a long distance, which consumes much time and leads to a slow access speed and an aggravated wear of a driving mechanism for the magnetic head. SUMMARY
[0004] Accordingly, a method for accessing data and an apparatus thereof are provided in the disclosure, with which a data access speed may be effectively improved and a wear of a driving mechanism for a magnetic head is alleviated.
[0005] A method for accessing data provided according to an embodiment of the disclosure includes: loading a data access interface, where the data access interface is for acquiring physical storage location information of at least one file in a memory; acquiring identifiers of at least two files;
calling the data access interface to acquire the physical storage location information of the at least two files based on the identifiers; and
scheduling, based on the physical storage location information, file access operations predetermined to be performed, to conform to an expected access mode, and correspondingly performing the file access operations.
[0006] An apparatus for accessing data is provided according to an embodiment of the disclosure. The apparatus includes: a data access interface, for acquiring physical storage location information of at least one file in a memory;
an acquisition unit, for acquiring identifiers of at least two files; an interface calling unit, for calling the data access interface to acquire the physical storage location information of the at least two files based on the acquired identifiers; and an access unit, for scheduling, based on the physical storage location information acquired by the data access interface, file access operations predetermined to be performed, to conform to an expected access mode, and correspondingly performing the file access operations.
[0007] In the method for accessing the data and the apparatus thereof according to the embodiments of the disclosure, the data access interface is provided, where the data access interface is for acquiring the physical storage location information of the at least one file; the identifiers of the at least two files are acquired; the data access interface is called to acquire, based on the identifiers, the physical storage location information of the at least two files; and the file access operations predetermined to be performed are scheduled, based on the physical storage location information, to conform to the expected access mode, and correspondingly the file access operations are performed. Since the files are accessed in an order scheduled based on actual physical storage locations of the files, time required for accessing the data may be reduced and the access speed may be increased, and at the same time, the wear of the driving mechanism for the magnetic head may be alleviated.
BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a flowchart of a method for accessing data according to a first embodiment;
Figure 2 is a schematic diagram of the method for accessing the data according to the first embodiment; and
Figure 3 is a structural block diagram of an apparatus for accessing data according to a second embodiment.
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0009] To further set forth technical means and effects of the disclosure, embodiments of the disclosure are detailed hereinafter in conjunction with drawings.
[0010] A method for accessing data is provided according to an embodiment of the disclosure, which is applicable to a memory such as a hard disk or a compact disk, where the data is accessed based on a magnetic head. With the method, a data access speed may be effectively improved and a wear of a driving mechanism for the magnetic head may be alleviated.
[0011] A file system of a computer may be used to store and organize computer data, which makes it easy to access and search the data. In the file system, abstract logical concepts of file and directory tree are used to replace a concept of data block used in a physical device such as the hard disk or the compact disk. In the case that a user stores the data with the file system, the user is not aware where a data block in which the data is actually stored locates on the hard disk or on the compact disk. Before writing new data, the user does not have to care about which data blocks are not in use. A management (allocation and release) of storage spaces on the hard disk is automatically performed by the file system.
[0012] In creating (formatting) the file system, a storage area is divided into different sub-storage areas. A first sub-storage area is used to save storage information of a file system object (a file or a directory), and the file itself may be stored in other sub-storage areas. Take a Unix-like file system as an example, the first sub-storage area is used to store metadata of the file system object. For an FAT file system, the first sub-storage area is used to store a file allocation table. For both the above file systems, a physical storage location of the file in the memory may be acquired by querying the metadata or querying the file allocation table. [0013] A data access interface is provided according to an embodiment of the disclosure, which is for acquiring physical storage location information of at least one file. An implementation process of the data access interface is described as follows. First, an identifier (such as a file name) of the file to be queried is acquired; storage information of the file, for example, the metadata or the file allocation table is queried; and then the physical storage location information may be acquired based on the storage information. It can be understood that, the physical storage location of one file may be discontinuous due to a restriction of the file system. Therefore, one file may actually have multiple storage locations. For the data access interface, the physical storage location information of the file may include only a starting location of an actual storage of the file.
[0014] It can be understood that the data access interface may be implemented with any suitable programming languages. According to one embodiment, the data access interface is implemented based on the standard C language.
[0015] In one case, the data access interface only supports querying the physical storage location information of one file. [0016] In another case, the data access interface can receive a file list as a parameter, and correspondingly return the physical storage location information of all files in the file list.
A First Embodiment
[0017] Referring to Figure 1, a method for accessing data according to the first embodiment includes the following steps 101 to 104. [0018] In the step 101, a data access interface is loaded. The data access interface is for acquiring physical storage location information of at least one file.
[0019] In the step 102, identifiers of at least two files are acquired.
[0020] In one case, the identifiers are file names. It can be understood that the file names should include complete storage paths. Furthermore, the identifiers are not limited to the file names. Any data which is supported by a file system and can be used to query corresponding files may be used as the identifiers. For example, in one case, the identifiers are file numbers (index numbers). The at least two files may be, for example, files to be accessed in a subsequent period of time in a program. [0021] In the step 103, the data access interface is called to acquire, based on the identifiers, the physical storage location information of the at least two files.
[0022] In the case that the data access interface can only query one file each time, the data access interface is called several times to acquire the physical storage location information of each of the at least two files.
[0023] In the case that the data access interface supports a multi-file query, a list of files to be queried may be generated, and submitted in a predetermined format to the data access interface as a parameter, and accordingly, the physical storage location information of the at least two files are queried simultaneously.
[0024] In one case, the identifiers are the file numbers, and accordingly, the data access interface is for querying offset values of the at least two files based on the file numbers to acquire the physical storage location information.
[0025] In the step 104, file access operations predetermined to be performed are schemed based on the physical storage location information, to conform to an expected access mode, and the file access operations are correspondingly performed. [0026] The step 104 may include: arranging an order, based on the physical storage location information, for the file access operations predetermined to be performed, where a magnetic head moves a shortest distance in the case that the file access operations are performed in the order.
[0027] In one case, the at least two files include a.txt, b.txt and c.txt, storage locations of which in a memory are shown in Figure 2. In one program, the three files are read in a normal operating order of a.txt, b.txt and c.txt. In the process, a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from a buffer; after reading a.txt, the magnetic head moves to the storage location of b.txt; and then the magnetic head moves to the storage location of c.txt after reading b.txt. A path of the movement is shown with a path 201 in Figure 2.
[0028] If the related files are arranged in an order based on the physical storage location information according to the step 104, the order of the three files is a.txt, c.txt and b.txt. If the files are accessed in the order, a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from the buffer; after reading a.txt, the magnetic head moves to the storage location of c.txt; and then the magnetic head moves to the storage location of b.txt after reading c.txt. A path of the movement is shown with a path 202 in Figure 2.
[0029] Comparing the path 201 with the path 202, the magnetic head moves a shorter distance in performing the file access operations based on the path 202. Hence, time required for accessing the data is reduced and an access speed is increased, and at the same time, a wear of a driving mechanism for the magnetic head is alleviated.
A Second Embodiment
[0030] Figure 3 is a structural block diagram of an apparatus for accessing data according to a second embodiment. As shown in Figure 3, the apparatus includes a data access interface 21, an acquisition unit 22, an interface calling unit 23 and an access unit 24.
[0031] The data access interface 21 is for acquiring physical storage location information of at least one file in a memory. The data access interface may query, based on an identifier (for example, a file name) of the file to be queried, storage information of a file, such as metadata or a file allocation table, to acquire the physical storage location information, where the identifier is acquired by the acquisition unit 22. It should be understood that the data access interface may be implemented with any suitable programming languages. According to one embodiment, the data access interface is implemented based on the standard C language. In one case, the data access interface only supports querying the physical storage location information of one file. In another case, the data access interface can receive a file list as a parameter, and correspondingly return the physical storage location information of all files in the file list.
[0032] The acquisition unit 22 is for acquiring identifiers of at least two files. In one case, the identifiers are file names. It should be understood that the file names should include complete storage paths. Furthermore, the identifiers are not limited to the file names. Any data which is supported by a file system and can be used to query corresponding files may be used as the identifiers. For example, in one case, the identifiers are file numbers (index numbers). The at least two files may be, for example, files to be accessed in a subsequent period of time in a program. [0033] The interface calling unit 23 is for calling the data access interface to acquire, based on the acquired identifiers, the physical storage location information of the at least two files. In the case that the data access interface 21 can only query one file each time, the data access interface 21 is called several times to acquire the physical storage location information of each of the at least two files. In the case that the data access interface supports a multi-file query, a list of files to be queried may be generated, and submitted in a predetermined format to the data access interface 21 as a parameter, and accordingly, the physical storage location information of the at least two files are queried simultaneously. In one case, the identifiers are the file numbers, and accordingly, the data access interface is for querying offset values of the at least two files based on the file numbers acquired by the acquisition unit 22, to acquire the physical storage location information.
[0034] The access unit 24 is for scheduling file access operations predetermined to be performed, to conform to an expected access mode, based on the physical storage location information acquired by the data access interface 21, and correspondingly performing the file access operations. [0035] For example, file access operations predetermined to be performed are arranged in an order based on the physical storage location information, where a magnetic head moves a shortest distance in the case that the file access operations are performed in the order.
[0036] In one case, the at least two files include a.txt, b.txt and c.txt, storage locations of which in the memory are shown in Figure 2. In one program, the three files are read in a normal operating order of a.txt, b.txt and c.txt. In the process, a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from a buffer; after reading a.txt, the magnetic head moves to the storage location of b.txt; and then the magnetic head moves to the storage location of c.txt after reading b.txt. A path of the movement is shown with a path 201 in Figure 2.
[0037] Since the related files are arranged in an order based on the physical storage location by the access unit 24, the order of the three files is a.txt, c.txt and b.txt. If the files are accessed in the order, a movement of the magnetic head is described as follow: first, the magnetic head moves to the storage location of a.txt from the buffer; after reading a.txt, the magnetic head moves to the storage location of c.txt; and then the magnetic head moves to the storage location of b.txt after reading c.txt. A path of the movement is shown with a path 202 in Figure 2.
[0038] Comparing the path 201 with the path 202, the magnetic head moves a shorter distance in performing the file access operations based on the path 202. Hence, time required for accessing the data is reduced and an access speed is increased, and at the same time, a wear of a driving mechanism for the magnetic head is alleviated.
[0039] It should be noted that relational terms such as "first", "second" are only used herein to distinguish one entity or operation from another entity or operation, rather than to necessitate or imply that an actual relationship or order of the entities or operations. Furthermore, terms of "include", "comprise" or any other variants are intended to be non-exclusive. Therefore, a process, method, article or apparatus including a plurality of elements not only includes the elements, but also includes other elements that are not clearly enumerated or inherent elements of the process, method, article or apparatus. Without any further restrictions, an element limited by a statement of "includes one..." does not exclude the case that the process, method, article or apparatus further includes other similar elements.
[0040] It should be understood by those skilled in the art that all or part of steps according to the embodiments may be accomplished via hardware, or related hardware instructed by a program. The program may be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic disk or an optical disk, and the storage medium is non-transitionary.
[0041] The above described embodiments, which are only preferred embodiments of the disclosure, are not intended to limit the disclosure in any form. Those skilled in the art can make changes to the embodiments of the disclosure and modify to obtain equivalent embodiments, based on the disclosed technical contents without departing from the technical solution of the disclosure. Therefore, any simple changes, equivalent variations and modifications made to the embodiments based on the technical essence of the disclosure without departing from the technical solution of the disclosure should fall in the scope of the disclosure.

Claims

1. A method for accessing data, comprising: loading a data access interface, wherein the data access interface is configured to acquire physical storage location information of at least one file in a memory; acquiring identifiers of at least two files;
calling the data access interface to acquire the physical storage location information of the at least two files based on the identifiers; and
scheduling, based on the physical storage location information, file access operations predetermined to be performed, to conform to an expected access mode, and correspondingly performing the file access operations.
2. The method according to claim 1, wherein the scheduling, based on the physical storage location information, file access operations predetermined to be performed, to conform to an expected access mode comprises:
arranging, based on the physical storage location information, an order for the file access operations predetermined to be performed, wherein a magnetic head moves a shortest distance in the case that the file access operations are performed in the order.
3. The method according to claim 1, wherein the identifiers are file names.
4. The method according to claim 1, wherein the identifiers are file numbers and the data access interface is configured to query offset values of the at least two files based on the file numbers to acquire the physical storage location information.
5. The method according to claim 1, wherein the memory is a memory in which the data is accessed based on a magnetic head.
6. An apparatus for accessing data, comprising: a data access interface, configured to acquire physical storage location information of at least one file in a memory;
an acquisition unit, configured to acquire identifiers of at least two files;
an interface calling unit, configured to call the data access interface to acquire the physical storage location information of the at least two files based on the acquired identifiers; and an access unit, configured to schedule, based on the physical storage location information acquired by the data access interface, file access operations predetermined to be performed, to conform to an expected access mode, and correspondingly perform the file access operations.
7. The apparatus according to claim 6, wherein the access unit is configured to arrange, based on the physical storage location information, an order for the file access operations predetermined to be performed, wherein a magnetic head moves a shortest distance in the case that the file access operations are performed in the order.
8. The apparatus according to claim 6, wherein the identifiers are file names.
9. The apparatus according to claim 6, wherein the identifiers are file numbers, and the data access interface is configured to query offset values of the at least two files based on the file numbers acquired by the acquisition unit, to acquire the physical storage location information.
10. The apparatus according to claim 6, wherein the memory is a memory in which the data is accessed based on a magnetic head.
PCT/CN2014/084187 2013-08-16 2014-08-12 Method for accessing data and apparatus thereof WO2015021910A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310359608.9 2013-08-16
CN201310359608.9A CN104375781B (en) 2013-08-16 2013-08-16 Data access method and device

Publications (1)

Publication Number Publication Date
WO2015021910A1 true WO2015021910A1 (en) 2015-02-19

Family

ID=52468057

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/084187 WO2015021910A1 (en) 2013-08-16 2014-08-12 Method for accessing data and apparatus thereof

Country Status (2)

Country Link
CN (1) CN104375781B (en)
WO (1) WO2015021910A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106527960B (en) * 2015-09-14 2021-04-02 中兴通讯股份有限公司 Multi-storage-disk load management method and device, file system and storage network system
CN107357929B (en) * 2017-07-27 2020-06-23 Oppo广东移动通信有限公司 File reading method, mobile terminal and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567247A (en) * 2003-07-10 2005-01-19 上海龙林通信技术有限公司 Media file memory system and fetching mode thereof
CN101048822A (en) * 2004-10-26 2007-10-03 松下电器产业株式会社 Disk reproducing apparatus
CN101206554A (en) * 2006-12-15 2008-06-25 株式会社东芝 Hard disk drive and command execution method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8918554B2 (en) * 2011-10-06 2014-12-23 Marvell International Ltd. Method and apparatus for effectively increasing a command queue length for accessing storage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567247A (en) * 2003-07-10 2005-01-19 上海龙林通信技术有限公司 Media file memory system and fetching mode thereof
CN101048822A (en) * 2004-10-26 2007-10-03 松下电器产业株式会社 Disk reproducing apparatus
CN101206554A (en) * 2006-12-15 2008-06-25 株式会社东芝 Hard disk drive and command execution method

Also Published As

Publication number Publication date
CN104375781B (en) 2019-07-23
CN104375781A (en) 2015-02-25

Similar Documents

Publication Publication Date Title
EP2711856B1 (en) Method and device for metadata query
US9250819B2 (en) Learning machine to optimize random access in a storage system
KR102031588B1 (en) Method and system for implementing index when saving file
US20110295913A1 (en) Database apparatus
CN102289451A (en) Method and device for searching files or folders
WO2017161540A1 (en) Data query method, data object storage method and data system
CN111046036A (en) Data synchronization method, device, system and storage medium
WO2016070529A1 (en) Method and device for achieving duplicated data deletion
CN108182244B (en) A kind of time series data storage method based on multi-level column storage organization
CN102541982B (en) Method for organizing and accessing metadata file log
CN115168338A (en) Data processing method, electronic device and storage medium
CN109213898A (en) The video retrieval method and device of video monitoring system
US9710504B2 (en) Data processing and writing method and related apparatus
WO2015021910A1 (en) Method for accessing data and apparatus thereof
JP6002832B2 (en) Computer system, data management method, and recording medium for storing program
CN112306957A (en) Method and device for acquiring index node number, computing equipment and storage medium
US8024585B2 (en) Method for managing storage, program and system for the same
CN113918535A (en) Data reading method, device, equipment and storage medium
US20160154812A1 (en) Hybrid database management system
CN107450859B (en) Method and device for reading file data
CN112698866B (en) Code line life cycle tracing method based on Git and electronic device
CN114328018A (en) Snapshot creating method, computing device and storage medium
JP2009217688A (en) Information processing system, information processor and data management method
WO2014019479A1 (en) Method and device based on android system for tracking imported file
CN109558073A (en) A kind of disk based on educational system extends the method and electronic equipment in service life

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14836101

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02/06/16)

122 Ep: pct application non-entry in european phase

Ref document number: 14836101

Country of ref document: EP

Kind code of ref document: A1