11003625

Method and Apparatus for Operating on File

PublishedMay 11, 2021
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
13 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method for operating on a file, comprising: by at least one processor: receiving a request of an operation on a target file, the request of the operation comprising a file name, and a data page identifier of a data page for storing the target file; acquiring index information associated with a storage space address of the data page based on the file name and the data page identifier, the index information being stored in an on-chip memory of a processor for executing a machine instruction corresponding to the operation, wherein the index information comprises first index information including the file name and a file identifier, and second index information including the storage space address of the data page; and finding the data page based on the index information, and performing the operation on the data page, wherein an index corresponding to the index information is a two-level index comprising a first-level index and a second-level index, the first-level index being an index from the file name to the file identifier, the second-level index being an index from the file identifier and the data page identifier to the data page, wherein the first index information is set for the first-level index, and the second index information is set for the second-level index, wherein the method further comprises: selecting a second data page from a storage space of the on-chip memory for storing the second-level index; creating a second hash table with the file identifier and the data page identifier as a key value; storing the second index information at a location corresponding to the key value in the second hash table; and storing the second hash table into the second data page, and wherein the target file comprises an executable file and the method further comprises: receiving a loading request for the executable file, the loading request comprising the file name and a data page identifier of a first data page of data pages storing the executable file; acquiring the file identifier in the first index information stored at a location corresponding to the file name in a first hash table; acquiring the second index information stored at a location corresponding to the file identifier and the data page identifier of the first data page in the second hash table, and finding the first data page according to the storage space address of the first data page in the second index information; determining, based on a storage space parameter stored in the first data page and indicating a size of the storage space of the executable file, data pages in which the executable file is stored, the data pages having contiguous storage space addresses; and loading the executable file by reading data stored in the data pages.

2

2. The method according to claim 1 , further comprising: selecting a first data page from the storage space of the on-chip memory; creating a first hash table with the file name as a key value; storing the first index information at the location corresponding to the file name in the first hash table; and storing the first hash table into the first data page.

3

3. The method according to claim 2 , wherein finding the data page based on the index information comprises: acquiring the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; acquiring the second index information stored at the location corresponding to the file identifier and the data page identifier in the second hash table; and finding the data page according to the storage space address of the data page in the second index information.

4

4. The method according to claim 3 , wherein before receiving the request of the operation on the target file, the method further comprises: receiving a creation request for the target file, the creation request comprising the file name; allocating the file identifier corresponding to the file name; and generating the first index information including the file name and the file identifier, and storing the first index information at the location corresponding to the file name in the first hash table.

5

5. The method according to claim 4 , wherein the method further comprises: receiving a write request for the executable file; allocating the data pages having contiguous storage space addresses and data identifiers of the data pages, and storing the storage space parameter indicating the size of the storage space of the executable file into the first data page; generating the second index information including the storage space address of the first data page; and storing the second index information at the location corresponding to the file identifier and the data page identifier of the first data page in the second hash table.

6

6. The method according to claim 4 , wherein the target file comprises a data file, and the method further comprises: receiving an appending request for the data file, the appending request comprising the file name; acquiring the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; allocating a data page for storing data written to the data file in an append mode, and a data page identifier of the data page; and generating the second index information including a storage space address of the data page, and storing the second index information at the location corresponding to the file identifier and the data page identifier in the second hash table.

7

7. An apparatus for operating on a file, comprising: at least one processor; and a memory storing instructions, which when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising: receiving a request of an operation on a target file, the request of the operation comprising a file name, and a data page identifier of a data page for storing the target file; acquiring index information associated with a storage space address of the data page based on the file name and the data page identifier, the index information being stored in an on-chip memory of a processor for executing a machine instruction corresponding to the operation, wherein the index information comprises first index information including the file name and a file identifier, and second index information including the storage space address of the data page; and finding the data page based on the index information, and performing the operation on the data page, wherein an index corresponding to the index information is a two-level index comprising a first-level index and a second-level index, the first-level index being an index from the file name to the file identifier, the second-level index being an index from the file identifier and the data page identifier to the data page, wherein the first index information is set for the first-level index, and the second index information is set for the second-level index, wherein the operations further comprise: selecting a second data page from a storage space of the on-chip memory for storing the second-level index; creating a second hash table with the file identifier and the data page identifier as a key value; storing the second index information at a location corresponding to the key value in the second hash table; and storing the second hash table into the second data page, and wherein the target file comprises an executable file and the operations further comprise: receiving a loading request for the executable file, the loading request comprising the file name and a data page identifier of a first data page of data pages storing the executable file; acquiring the file identifier in the first index information stored at a location corresponding to the file name in a first hash table; acquiring the second index information stored at a location corresponding to the file identifier and the data page identifier of the first data page in the second hash table, and finding the first data page according to the storage space address of the first data page in the second index information; determining, based on a storage space parameter stored in the first data page and indicating a size of the storage space of the executable file, data pages in which the executable file is stored, the data pages having contiguous storage space addresses; and loading the executable file by reading data stored in the data pages.

8

8. The apparatus according to claim 7 , wherein the operations further comprise: selecting a first data page from the storage space of the on-chip memory; creating a first hash table with the file name as a key value; storing the first index information at the location corresponding to the file name in the first hash table; and storing the first hash table into the first data page.

9

9. The apparatus according to claim 8 , wherein the finding the data page based on the index information comprises: acquiring the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; acquiring the second index information stored at the location corresponding to the file identifier and the data page identifier in the second hash table; and finding the data page according to the storage space address of the data page in the second index information.

10

10. The apparatus according to claim 9 , wherein the operations further comprise, before receiving the request of the operation on the target file: receiving a creation request for the target file, the creation request comprising the file name; allocating the file identifier corresponding to the file name; and generating the first index information including the file name and the file identifier, and storing the first index information at the location corresponding to the file name in the first hash table.

11

11. The apparatus according to claim 10 , wherein the operations further comprise: receiving a write request for the executable file; allocating the data pages having contiguous storage space addresses and data identifiers of the data pages, and storing the storage space parameter indicating the size of the storage space of the executable file into the first data page; generating the second index information including the storage space address of the first data page; and storing the second index information at the location corresponding to the file identifier and the data page identifier of the first data page in the second hash table.

12

12. The apparatus according to claim 10 , wherein the target file comprises a data file, the operations further comprise: receiving an appending request for the data file, the appending request comprising the file name; acquiring the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; allocating a data page for storing data written to the data file in an append mode, and a data page identifier of the data page; and generating second index information including a storage space address of the data page, and storing the second index information at the location corresponding to the file identifier and the data page identifier in the second hash table.

13

13. A non-transitory computer storage medium storing computer readable instructions executable by a processor, the instructions, when executed by the processor, causing the processor to perform a method for operating on a file, comprising: receiving a request of an operation on a target file, the request of the operation comprising a file name, and a data page identifier of a data page for storing the target file; acquiring index information associated with a storage space address of the data page based on the file name and the data page identifier, the index information being stored in an on-chip memory of a processor for executing a machine instruction corresponding to the operation, wherein the index information comprises first index information including the file name and a file identifier, and second index information including the storage space address of the data page; and finding the data page based on the index information, and performing the operation on the data page, wherein an index corresponding to the index information is a two-level index comprising a first-level index and a second-level index, the first-level index being an index from the file name to the file identifier, the second-level index being an index from the file identifier and the data page identifier to the data page, wherein the first index information is set for the first-level index, and the second index information is set for the second-level index, wherein the method further comprises: selecting a second data page from a storage space of the on-chip memory for storing the second-level index; creating a second hash table with the file identifier and the data page identifier as a key value; storing the second index information at a location corresponding to the key value in the second hash table; and storing the second hash table into the second data page, and wherein the target file comprises an executable file and the method further comprises: receiving a loading request for the executable file, the loading request comprising the file name and a data page identifier of a first data page of data pages storing the executable file; acquiring the file identifier in the first index information stored at a location corresponding to the file name in a first hash table; acquiring the second index information stored at a location corresponding to the file identifier and the data page identifier of the first data page in the second hash table, and finding the first data page according to the storage space address of the first data page in the second index information; determining, based on a storage space parameter stored in the first data page and indicating a size of the storage space of the executable file, data pages in which the executable file is stored, the data pages having contiguous storage space addresses; and loading the executable file by reading data stored in the data pages.

Patent Metadata

Filing Date

Unknown

Publication Date

May 11, 2021

Inventors

Lian DUAN
Hua ZHOU
Qingxing WANG
Guohua ZHANG
Hao SU
Haijun PAN

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “METHOD AND APPARATUS FOR OPERATING ON FILE” (11003625). https://patentable.app/patents/11003625

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.

METHOD AND APPARATUS FOR OPERATING ON FILE — Lian DUAN | Patentable