US11003625B2 - Method and apparatus for operating on file - Google Patents

Method and apparatus for operating on file Download PDF

Info

Publication number
US11003625B2
US11003625B2 US15/564,165 US201615564165A US11003625B2 US 11003625 B2 US11003625 B2 US 11003625B2 US 201615564165 A US201615564165 A US 201615564165A US 11003625 B2 US11003625 B2 US 11003625B2
Authority
US
United States
Prior art keywords
file
data page
index information
identifier
data
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.)
Expired - Fee Related, expires
Application number
US15/564,165
Other versions
US20180285376A1 (en
Inventor
Lian Duan
Hua Zhou
Qingxing WANG
Guohua Zhang
Hao Su
Haijun PAN
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.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing 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 Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Publication of US20180285376A1 publication Critical patent/US20180285376A1/en
Assigned to BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD. reassignment BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD. EMPLOYMENT AGREEMENT Assignors: WANG, QINGXING
Assigned to BAIDU (CHINA) CO., LTD. reassignment BAIDU (CHINA) CO., LTD. EMPLOYMENT AGREEMENT WITH SIGNATURE OF TRANSLATOR AT PAGE 4 Assignors: DUAN, LIAN
Assigned to BAIDU (CHINA) CO., LTD. reassignment BAIDU (CHINA) CO., LTD. EMPLOYMENT AGREEMENT WITH ASSIGNOR'S SIGNATURE AT PAGE 15 AND SIGNATURE OF TRANSLATOR AT PAGE 4 Assignors: SU, Hao
Assigned to BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD. reassignment BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: BAIDU (CHINA) CO., LTD.
Assigned to BAIDU (CHINA) CO., LTD. reassignment BAIDU (CHINA) CO., LTD. EMPLOYMENT AGREEMENT Assignors: PAN, Haijun
Assigned to BAIDU (CHINA) CO., LTD. reassignment BAIDU (CHINA) CO., LTD. EMPLOYMENT AGREEMENT Assignors: ZHANG, GUOHUA
Assigned to BAIDU (CHINA) CO., LTD. reassignment BAIDU (CHINA) CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: ZHOU, HUA
Publication of US11003625B2 publication Critical patent/US11003625B2/en
Application granted granted Critical
Expired - Fee Related legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1847File system types specifically adapted to static storage, e.g. adapted to flash memory or SSD
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9014Indexing; Data structures therefor; Storage structures hash tables

Definitions

  • the present disclosure relates to the field of computer technology, specifically to the field of file system, and more specifically to a method and apparatus for operating on a file.
  • an operation on a file is performed by an embedded file system.
  • a log structure is generally used to store the file, that is, indexes and file data are stored in the file at the same time, and data pages of the file are non-contiguous in the storage space.
  • the approach used is to find the data page via the index, and operate the data page as a unit.
  • the index occupies a large memory space, resulting in a large overhead during the file operating process, thereby increasing the system overheads of the entire embedded system.
  • the data pages of the file are not contiguous in the storage space, and thus, a dynamic loading of an executable file from a third party application cannot be implemented.
  • the present disclosure provides a method and apparatus for operating on a file to solve the technical problems mentioned in the foregoing Background section.
  • the present disclosure provides 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; and finding the data page based on the index information, and performing the operation on the data page.
  • the present disclosure provides an apparatus for operating on a file, comprising: a receiving unit, configured to receive 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; an acquiring unit, configured to acquire 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; and a processing unit, configured to find the data page based on the index information, and perform the operation on the data page.
  • the method and apparatus for operating on a file provided by the present disclosure, by receiving a request of an operation on a target file, acquire index information associated with a storage space address of a data page based on a file name and a 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; and find the data page based on the index information, and perform the operation on the data page. Accordingly, the operation on the file is implemented depending on an index stored in the on-chip memory, so that memory overheads of accessing the index are equivalent to 0, and memory resources are saved, thereby reducing system overheads.
  • FIG. 1 is an exemplary system architecture diagram in which the present disclosure may be applied
  • FIG. 2 is a flowchart of an embodiment according to a method of the present disclosure
  • FIG. 3 is a schematic structural diagram of a data page storing a first-level index
  • FIG. 4 is a schematic structural diagram of a data page storing a second-level index
  • FIG. 5 is a schematic diagram of finding a data page via a two-level index
  • FIG. 6 is a flowchart of another embodiment according to a method for operating on a file of the present disclosure
  • FIG. 7 is a layout of a data page of an executable file
  • FIG. 8 is a layout of a data page of a data file
  • FIG. 9 is an exemplary flowchart of creating a file
  • FIG. 10 is an exemplary flowchart of writing data into a data page
  • FIG. 11 is a schematic structural diagram of an embodiment according to an apparatus for operating on a file of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a computer system adapted to implement a terminal device or a server according to embodiments of the present disclosure.
  • FIG. 1 shows an exemplary architecture of a system 100 of an embodiment in which a method and apparatus for operating on a file according to the present disclosure may be applied.
  • the system architecture 100 may include terminal devices 101 , 102 and 103 , a network 104 and a server 105 .
  • the network 104 serves as a medium providing a transmission link between the terminal devices 101 , 102 and 103 and the server 105 .
  • the network 104 may include various types of connections, such as wired or wireless transmission links, or optical fibers.
  • a user may interact with the server 105 to receive or send messages by using the terminal devices 101 , 102 and 103 via the network 104 .
  • Various communication applications may be installed on the terminal devices 101 , 102 and 103 .
  • the terminal devices 101 , 102 and 103 may be various electronic devices capable of possessing display screens and supporting network communication, including but not limited to, smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers.
  • MP3 Motion Picture Experts Group Audio Layer III
  • MP4 Motion Picture Experts Group Audio Layer IV
  • the server 105 may be a server providing various services, for example, a cloud server providing a file storage service to the applications on the terminal devices 101 , 102 and 103 .
  • the server may process a received file operation request, and feed a processed result (for example, read file data) back to the terminal devices.
  • terminal devices the numbers of the terminal devices, the networks and the servers in FIG. 1 are merely illustrative. Any number of terminal devices, networks and servers may be provided based on the actual requirements.
  • FIG. 2 which illustrates a process 200 of an embodiment according to a method for operating on a file of the present disclosure.
  • the method for operating on a file provided in embodiments of the present disclosure is generally performed by the terminal devices 101 , 102 and 103 or the server 105 in FIG. 1 , and accordingly, an apparatus for operating on a file is generally installed on the terminal devices 101 , 102 and 103 or the server 105 .
  • This method includes the following steps.
  • step 201 receiving a request of an operation on a target file.
  • an electronic device on which the method for operating on a file operates may receive the request of the operation on the target file by means of wired connection or wireless connection.
  • the request of the operation includes a file name, and a data page identifier of a data page for storing the target file.
  • types of the request of the operation on the target file may be a write operation, a read operation and an update request.
  • the target file may be stored with a data page as a unit, and accordingly, the operation on the file is also performed with a data page as a unit.
  • data in one target file may be stored on a plurality of data pages (i.e., flash pages).
  • the operation on the target file is completed by the operation on the data page storing the target file.
  • step 202 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 may be stored in an on-chip memory of a processor for executing a machine instruction corresponding to the operation.
  • the processor executing the operation on the data page is a MCU (Microcontroller Unit)
  • the index information may be stored in an on-chip memory (which may also be referred to as an on-board flash) of the MCU.
  • the index information may be information associated with the storage space address of the data page, for example, a physical address recording the data page in the index information.
  • index (which may also be referred to as a file index) is directly stored on the flash memory by simply using a one-level index
  • sizes of storage spaces occupied by files are different, and numbers of the data pages occupied by the files are different, therefore, sizes of storage spaces occupied by the indexes are not fixed when correspondence between the file name and the data page is directly stored. In this way, when a data page storing the file is added or updated, the entire index will be modified.
  • the storage space occupied by the index is very large, and when the data page is added, reduced or updated, the index can only be copied into the memory to be modified and then written back to the flash memory but cannot be directly modified on the flash memory, resulting in a heavy memory consumption.
  • 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.
  • the structure of the index may be a two-level index.
  • a first-level index is an index from the file name to the file identifier, that is, an index that the file identifier is found by the file name.
  • a second-level index is an index from a file name identifier and the data page identifier to the data page, that is, an index that the page data is found by the file name identifier and the data page identifier. Accordingly, for the two-level index structure, the first index information and the second index information are set.
  • the first index information may include the file name and the file identifier
  • the second index information may include the storage space address of the data page, i.e., the physical address of the data page.
  • the method for operating on a file further includes: selecting a first data page from a 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 a location corresponding to the key value in the first hash table; and storing the first hash table into the first data page.
  • a data page for storing the first-level index i.e., the first data page
  • the first hash table is created with the file name of the target file as the key value, and the first index information may be stored at the location corresponding to the key value, i.e., a slot, in the first hash table.
  • the first hash table is stored into the first data page.
  • there may be a plurality of first data pages for storing the first-level index and different first data pages may be distinguished through data page identifiers, and contiguous first data pages are not necessary in the storage space.
  • the method for operating on a file further includes: selecting a second data page from the storage space of the on-chip memory; 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.
  • a data page for storing the second-level index i.e., the second data page
  • the second hash table is created with the file identifier and the data page identifier as the key value, and the second index information may be stored at the location corresponding to the key value, i.e., a slot, in the second hash table.
  • the second hash table is stored into the second data page.
  • there may be a plurality of second data pages storing the second-level index different second data pages may be distinguished through data page identifiers, and contiguous second data pages are not necessary in the storage space.
  • a type number indicates a type of a file.
  • a file identifier indicates the file to which the data page storing the first-level index belongs, this file is a data file (which may also be referred to as an ordinary file), and a file identifier 0 may be used as the file identifier of this file.
  • a data page identifier indicates a sequence number of the data page in the file.
  • a version number indicates a version of data stored on the data page.
  • the key value of the first hash table is the file name, and a linked list may be stored on the slot of the first hash table. Each node in the linked list may correspond to one storage node (hash node).
  • the storage node stores the first index information including the file name and the file identifier.
  • a number parameter (count) indicates a number of used storage nodes.
  • a type number indicates a type of a file.
  • a file identifier indicates the file to which the data page storing the second-level index belongs, this file may be the data file, and a file identifier 1 may be used as the file identifier of this file.
  • a data page identifier indicates a sequence number of the data page in the file.
  • a version number indicates a version of data stored on the data page.
  • the key value of the second hash table is the file identifier and the data page identifier, and a storage node (hash node) may be stored on the slot of the second hash table.
  • the storage node stores the second index information including the physical address of the data page.
  • a number parameter (count) indicates a number of used storage nodes.
  • a sum of data structures related to the first-level index and the second-level index may be referred to as a first index table and a second index table. Sizes of storage spaces occupied by storage nodes storing the first index information and the second index information may be of fixed length.
  • a plurality of index tables may be adopted to indicate a respective mapping, that is, a large index table occupying a large storage space is divided into a plurality of small index tables occupying small storage spaces, and the small index tables do not need to be stored on contiguous data pages. Accordingly, the adding, reducing and updating of the data pages may be limited on a single data page storing the index to be performed, and thus, the problem of consuming a large amount of memory in the index maintaining process will be avoided.
  • step 203 finding the data page based on the index information, and performing the operation on the data page.
  • the data page may be found based on the physical address of the data page in the index information, and the operation on the data page may be performed, such as an operation of writing data into the data page, and an operation of reading data from the data page.
  • the finding the data page based on the index information includes: acquiring the file identifier in the first index information stored at a location corresponding to the file name in the first hash table; acquiring the second index information stored at a 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.
  • FIG. 5 is a schematic diagram of finding the data page via the two-level index.
  • a request of an operation on a first file includes a first file name of the first file (filename1), and a first data page identifier (pageid1).
  • a request of an operation on a second file includes a second file name of the second file (filename2), and a second data page identifier (pageid2) and a third data page identifier (pageid3).
  • the first data page identifier is 255.
  • the second data page identifier and the third data page identifier are 1 and 2.
  • the first file name (filename1) and the second file name (filename2) may be served as key values to calculate and obtain hash values, and linked lists stored on slots corresponding to these hash values in the first hash table are respectively acquired.
  • Storage node 1 and storage node 2 corresponding to the first file name and the second file name in the linked lists are respectively determined.
  • the storage node 1 stores the first index information including the first file name (filename1) and a file identifier of the first file (fileid1).
  • the storage node 2 stores the second index information including the second file name (filename2) and a file identifier of the second file (fileid2). Accordingly, the file identifier of the first file (fileid1) and the file identifier of the second file (fileid2) will be acquired.
  • the file identifier of the first file (fileid1) and the first data page identifier (pageid1) may be served as a key value to calculate and obtain a hash value, and storage node 5 is found on a slot corresponding to this hash value in the second hash table.
  • the storage node 5 stores the second index information including a physical address of a data page corresponding to the first data page identifier (pageid1), and thus, the data page in the first file will be found.
  • the second data page identifier (pageid2) and the third data page identifier (pageid3) may be served as key values respectively with the file identifier of the second file (fileid2) to calculate and obtain hash values, and storage node 3 and storage node 4 are found on slots corresponding to these hash values in the second hash table.
  • the storage node 3 stores the second index information including a physical address of a data page corresponding to the second data page identifier (pageid2), and thus, the data page corresponding to the second data page identifier (pageid2) on the second file will be found.
  • the storage node 4 stores the second index information including a physical address of a data page corresponding to the third data page identifier (pageid 3), and thus, the data page corresponding to the third data page identifier (pageid 3) on the second file will be found.
  • the index occupies a larger memory space.
  • the index structure is directly stored on a data page in the on-chip memory.
  • the processor can directly access the data page of the on-chip memory without the file system, and thus, in a resource-constrained embedded system, memory overhead of accessing the index are equivalent to 0, and memory resources are saved, thereby reducing system overheads of the entire embedded system.
  • FIG. 6 which shows a process 600 of another embodiment according to a method for operating on a file of the present disclosure.
  • the method for operating on a file provided in embodiments of the present disclosure is generally performed by the terminal devices 101 , 102 and 103 or the server 105 in FIG. 1 , and this method includes the following steps.
  • step 601 creating a target file.
  • the target file may be created by allocating a file identifier corresponding to a file name; and generating first index information including the file name and the file identifier, and storing the first index information at a location corresponding to the file name in a first hash table.
  • one file identifier may be first allocated for the file, and then, the file name and the file identifier are saved in a data page storing a first-level index. For instance, a hash value is first calculated and obtained for the file name, and then, an existence of an idle storage node is searched on a linked list of a slot corresponding to the hash value in a hash table in the data page storing the first-level index.
  • the first index information including the file name and the file identifier will be stored in this storage node. If the idle storage node does not exist, a storage node will be added to the linked list, and the first index information including the file name and the file identifier will be stored into the added storage node.
  • FIG. 7 which shows a layout of a data page of an executable file.
  • the executable file may be stored in a storage area including a plurality of contiguous data pages.
  • a data structure may be stored on a first data page, i.e., a data page with a data page identifier as 0, and this data structure may include a type number (magic number), a file identifier (fileid), a data page identifier (pageid), a file name and a storage space parameter (size).
  • a numerical value of the type number indicates that a type of the file to which the data page belongs is the executable file.
  • the file identifier indicates a file identifier of the executable file
  • the data page identifier is a data page identifier of the executable file
  • the file name is a file name of the executable file
  • a file size parameter indicates a size of the executable file.
  • a data area is used to store data of the executable file.
  • FIG. 8 which shows a layout of a data page of a data file.
  • the data file may include a plurality of data pages, a first data page may be served as a file header to save attribute information of the file, and the other data pages store data of the file.
  • Each data page of the data file may include one data structure (which may also be referred to as a tag data structure), and this data structure may include a type number (magic number), a file identifier (fileid), a data page identifier (pageid), and a version number.
  • the type number indicates that a type of the file to which the data page belongs is the data file.
  • the file identifier is a globally unique file identifier
  • the data page identifier indicates a location of a current data page in the file
  • the version number is a version of data stored on the data page.
  • the version number may be used to distinguish data pages having the same file identifier and the same data page identifier, and a larger version number indicates that the data in the data page are newer data.
  • the version number may be set to 1 when the data are written into the data page at first time.
  • a length parameter indicates a length of valid data saved in the data page, and a data area is used to store the data of the data file.
  • the data pages belonging to the same file may be arranged by data page identifiers from small to large. Then all the data of the file can be obtained by comparing sizes of version numbers of data pages having the same data page identifier, and removing pages with smaller version numbers.
  • FIG. 9 is an exemplary flowchart of creating a file.
  • the creating includes the following steps.
  • step 9001 allocating an available file identifier.
  • the file identifier is a globally unique file identifier.
  • step 9002 determining whether an index table having an idle storage node exists.
  • a sum of data structures related to the first-level index may be referred to as a first index table.
  • the above mentioned index table is the first index table.
  • the existence of the idle storage node in the index table may be determined. If the idle storage node exists, step 9003 is performed. If the idle storage node does not exist, step 9004 is performed.
  • step 9003 saving a file name and a corresponding file identifier into the idle storage node in the index table.
  • step 9004 adding a new index table, and storing the file name and the corresponding file identifier into one storage node.
  • step 9005 allocating to a new data page, and writing data of the file into the data page.
  • step 602 receiving a request of an operation on the target file.
  • the request of the operation includes the file name, and a data page identifier of a data page for storing the target file.
  • a type of the request of the operation on the target file may be a write operation and a read operation.
  • the target file may be stored with a data page as a unit, and accordingly, the operation on the file is also performed with a data page as a unit. For instance, when the target file is stored in a flash memory, data of one target file may be stored on a plurality of data pages (i.e., flash pages). In other words, the operation on the target file is completed by the operation on the data page storing the target file.
  • step 603 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 is stored in an on-chip memory of a processor for executing a machine instruction corresponding to the operation.
  • the index information may be information associated with the storage space address of the data page, for example, a physical address recording the data page in the index information, and thus, the data page will be found via the index information.
  • the index information may be stored in the on-chip memory.
  • the processor executing the operation on the data page is a MCU
  • the index information may be stored in an on-chip memory (which may also be referred to as an on-board flash) of the MCU.
  • a structure of an index may be a two-level index, and a first-level index is an index from the file name to the file identifier, i.e., an index that the file identifier is found by the file name.
  • a second-level index is an index from a file name identifier and the data page identifier to the data page, i.e., an index that the data page is found by the file name identifier and the data page identifier.
  • first index information and second index information are set.
  • the first index information may include the file name and the file identifier
  • the second index information may include the storage space address of the data page, i.e., the physical address of the data page.
  • step 604 finding the data page based on the index information, and performing an operation corresponding to an operation type identifier on the found data page.
  • a write request for the executable file may be processed by determining a number of data pages for storing the executable file; allocating the number of data pages having contiguous storage space addresses and data identifiers of the data pages, and storing a storage space parameter indicating a size of the storage space of the executable file into a first data page of the data pages; generating the second index information including a storage space address of the first data page; and storing the second index information at a location corresponding to the file identifier and a data page identifier of the first data page in a second hash table.
  • the data pages having contiguous storage space addresses and storing the executable file may be first allocated before the executable file is stored. Next, data of the executable file may be written to the data pages having contiguous addresses, and meanwhile, the file name of the executable file is stored into the first-level index, and a physical address of the first data page is stored into the second-level index. In this embodiment, the file name and the file size of the executable file may be written into the first data page storing the executable file.
  • a loading request which includes the file name and the data page identifier of the first data page, for the executable file may be processed by 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 first data page according to the storage space address of the data page in the second index information; calculating the number of data pages having contiguous storage space addresses, according to the storage space parameter stored in the first data page; and reading data in the number of data pages to load the executable file.
  • the first data page when the executable file is loaded, the first data page may be found via the two-level index according to the file identifier of the executable file and the data page identifier of the first data page, i.e., 0.
  • the number of data pages having contiguous storage space addresses i.e., the number of data pages of the executable file
  • the storage space parameter i.e., a size field
  • an appending request for the data file may be processed by receiving an appending request for the data file, the appending request including 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.
  • the appending request for the data file when the appending request for the data file is processed, that is, when new data are written in an append mode, the data need to be written to a new allocated data page. And then, the version number is set to 1. Meanwhile, after the writing in an append mode is completed, a storage node is added into the second-level index, and the second storage information including the file identifier and a data page identifier of the new allocated data page is stored into the storage node.
  • the data page when an update request for the data file is processed, that is, when the existing data on the data page are overwritten, the data page may be first found, and one page of data having update data are then written into the data page, and meanwhile, the version number corresponding to the data page is added.
  • FIG. 10 shows an exemplary flowchart of writing data into a data page, comprising the following steps.
  • step 1001 calculating a data page identifier according to a written location of the file, and searching a data page corresponding to the file identifier and the data page identifier. That is, the data page identifier is calculated according to the written location, and the file name and the data page corresponding to the data page identifier are searched.
  • the written location indicates a location of to-be-written data in the whole file, and the data page identifier of the data page where the to-be-written data locate may be calculated and determined according to the written location and a size of the file.
  • the data page corresponding to the file identifier and the data page identifier may be searched via the second-level index.
  • step 1002 determining whether the data page corresponding to the file identifier and the data page identifier is found. If the data page is found, step 1003 will be performed, and if the data page is not found, step 1004 will be performed.
  • step 1003 modifying file data on the data page, and adding 1 to the version number to be stored to a new data page.
  • step 1004 storing data into a new allocated data page, and storing the calculated data page identifier. That is, a new data page is allocated, the to-be-written data is stored to the new allocated data page, and the calculated data page identifier is stored into the new data page.
  • step 1005 adding a file identifier and a data page identifier of the new allocated data page into the second-level index.
  • the process 600 of the method for operating on a file in this embodiment emphasizes the step 601 of creating the target file.
  • the executable file is stored by pre-allocating the data pages having contiguous addresses, so that binary codes of the executable file may be stored into the data pages having contiguous addresses.
  • the binary codes of the executable file may be read out from the data pages having contiguous addresses, and thus the dynamic loading of the executable file from a third party application is implemented.
  • the operation approach described in the above embodiments may be combined with a management approach of a log-structured file system to the file to build an embedded file system. That is, the two-level index structure is built in the on-chip memory, and then, the two-level index structure may be combined with the management approach of the log-structured file system to the file, so that embedded file system will be built in the on-chip memory.
  • the existing embedded file system In the existing embedded file system, the data page is stored and managed with the log structure, and the file cannot be stored on the storage spaces having contiguous addresses, that is, the addresses of the data pages in the file are non-contiguous. Therefore, the existing embedded file system is not capable of supporting the dynamic loading of the executable file, i.e., the dynamic loading of the binary codes of the executable file. Further, an embedded device using the above-mentioned embedded file system (for example, an Internet of Things device) is not capable of supporting the dynamic loading of the executable file from the third party application.
  • the embedded file system built in the present disclosure implements an effective operation on the data page with a few of memory overheads in a storage resource constrained embedded system. On the other hand, the embedded file system built in the present disclosure supports the dynamic loading of the executable file from the third party application.
  • the present disclosure provides an embodiment of an apparatus for operating on a file
  • the embodiment of this apparatus corresponds to the embodiment of the method as illustrated in FIG. 2
  • this apparatus may be applied in various electronic devices.
  • the apparatus for operating on a file 1100 in this embodiment includes: a receiving unit 1101 , an acquiring unit 1102 , and a processing unit 1103 .
  • the receiving unit 1101 is configured to receive 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;
  • the acquiring unit 1102 is configured to acquire 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;
  • the processing unit 1103 is configured to find the data page based on the index information, and perform the operation on the data page.
  • the receiving unit 1101 may receive the request of the operation on the target file.
  • a type of the request of the operation on the target file may be a write operation, a read operation and an update request.
  • the target file may be stored with a data page as a unit, and accordingly, the operation on the file is also performed with a data page as a unit.
  • the acquiring unit 1102 may acquire the index information associated with the storage space address of the data page, based on the file name and the data page identifier.
  • the index information may be stored in the on-chip memory of the processor for executing the machine instruction corresponding to the operation.
  • the index information may be stored in an on-chip memory (which may also be referred to as an on-board flash) of the MCU.
  • the index information may be information associated with the storage space address of the data page, for example, a physical address recording the data page in the index information.
  • the processing unit 1103 may find the data page based on the index information, for example, the physical address of the data page in the index information, and perform the operation on the data page, for example, an operation of writing data into the data page, and an operation of reading data from the data page.
  • 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.
  • the apparatus 1100 further includes: a first selecting unit (not shown), configured to select a first data page from a storage space of the on-chip memory; a first creating unit (not shown), configured to create a first hash table with the file name as a key value; a first index information storing unit (not shown), configured to store the first index information at a location corresponding to the key value in the first hash table; and a first hash table storing unit (not shown), configured to store the first hash table into the first data page.
  • a first selecting unit (not shown), configured to select a first data page from a storage space of the on-chip memory
  • a first creating unit configured to create a first hash table with the file name as a key value
  • a first index information storing unit configured to store the first index information at a location corresponding to the key value in the first hash table
  • a first hash table storing unit configured to store the first hash table into the first data page.
  • the apparatus 1100 further includes: a second selecting unit (not shown), configured to select a second data page from the storage space of the on-chip memory; a second creating unit (not shown), configured to create a second hash table with the file identifier and the data page identifier as a key value; a second index information storing unit (not shown), configured to store the second index information at a location corresponding to the key value in the second hash table; and a second hash table storing unit (not shown), configured to store the second hash table into the second data page.
  • a second selecting unit configured to select a second data page from the storage space of the on-chip memory
  • a second creating unit configured to create a second hash table with the file identifier and the data page identifier as a key value
  • a second index information storing unit configured to store the second index information at a location corresponding to the key value in the second hash table
  • a second hash table storing unit configured to store the second hash table into the second data page.
  • the processing unit 1103 includes: a file identifier acquiring subunit (not shown), configured to acquire the file identifier in the first index information stored at a location corresponding to the file name in the first hash table; a second index information acquiring subunit (not shown), configured to acquire the second index information stored at a location corresponding to the file identifier and the data page identifier in the second hash table; and a searching subunit (not shown), configured to find the data page according to the storage space address of the data page in the second index information.
  • the apparatus 1100 further includes: a creation request receiving unit (not shown), configured to receive a creation request for the target file before the request of the operation on the target file is received, the creation request comprising the file name; a file identifier allocating unit (not shown), configured to allocate the file identifier corresponding to the file name; and an index information generating unit (not shown), configured to generate 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.
  • the apparatus 1100 further includes: a write request receiving unit (not shown), configured to receive a write request for an executable file, and determine a number of data pages for storing the executable file; a first allocating unit (not shown), configured to allocate the number of data pages having contiguous storage space addresses, and data identifiers of the data pages, and store a storage space parameter indicating a size of the storage space of the executable file into a first data page of the data pages; a second index information generating unit (not shown), configured to generate the second index information including a storage space address of the first data page; and a second index information storing unit (not shown), configured to store the second index information at a location corresponding to the file identifier and a data page identifier of the first data page in the second hash table.
  • a write request receiving unit configured to receive a write request for an executable file, and determine a number of data pages for storing the executable file
  • a first allocating unit configured to allocate the number of data pages having contiguous
  • the apparatus 1100 further includes: a loading request receiving unit (not shown), configured to receive a loading request for the executable file, the loading request comprising the file name and the data page identifier of the first data page; a first file identifier acquiring unit (not shown), configured to acquire the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; a data page searching unit (not shown), configured to acquire the second index information stored at the location corresponding to the file identifier and the data page identifier in the second hash table, and find the first data page according to the storage space address of the data page in the second index information; a calculating unit (not shown), configured to calculate the number of data pages having contiguous storage space addresses, according to the storage space parameter stored in the first data page; and a reading unit (not shown), configured to read data in the number of data pages to load the executable file.
  • a loading request receiving unit configured to receive a loading request for the executable file, the loading request comprising the file name and
  • the apparatus 1100 further includes: an appending request receiving unit (not shown), configured to receive an appending request for a data file, the appending request comprising the file name; a second file identifier acquiring unit (not shown), configured to acquire the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; a second allocating unit (not shown), configured to allocate 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 a second index information processing unit (not shown), configured to generate the second index information including a storage space address of the data page, and store the second index information at the location corresponding to the file identifier and the data page identifier in the second hash table.
  • an appending request receiving unit configured to receive an appending request for a data file, the appending request comprising the file name
  • a second file identifier acquiring unit configured to acquire the file identifier in the first index information stored at the location corresponding to the file
  • the above-mentioned apparatus for operating on a file 1100 further includes some other common structures, such as a processor and a memory, and these common structures are not shown in FIG. 11 in order to unnecessarily blur the embodiment of the present disclosure.
  • FIG. is a schematic structural diagram of a computer system adapted to implement a terminal device or a server according to embodiments of the present disclosure.
  • the computer system 1200 includes a central processing unit (CPU) 1201 , which may execute various appropriate actions and processes in accordance with a program stored in a read-only memory (ROM) 1202 or a program loaded into a random access memory (RAM) 1203 from a storage portion 1208 .
  • the RAM 1203 also stores various programs and data required by operations of the system 1200 .
  • the CPU 1201 , the ROM 1202 and the RAM 1203 are connected to each other through a bus 1204 .
  • An input/output (I/O) interface 1205 is also connected to the bus 1204 .
  • the following components are connected to the I/O interface 1205 : an input portion 1206 including a keyboard, a mouse etc.; an output portion 1207 comprising a cathode ray tube (CRT), a liquid crystal display device (LCD), a speaker etc.; a storage portion 1208 including a hard disk and the like; and a communication portion 1209 comprising a network interface card, such as a LAN card and a modem.
  • the communication portion 1209 performs communication processes via a network, such as the Internet.
  • a driver 1210 is also connected to the I/O interface 1205 as required.
  • a removable medium 1211 such as a magnetic disk, an optical disk, a magneto-optical disk, and a semiconductor memory, may be installed on the driver 1210 , to facilitate the retrieval of a computer program from the removable medium 1211 , and the installation thereof on the storage portion 1208 as needed.
  • an embodiment of the present disclosure includes a computer program product, which comprises a computer program that is tangibly embedded in a machine-readable medium.
  • the computer program comprises program codes for executing the method as illustrated in the flow chart.
  • the computer program may be downloaded and installed from a network via the communication portion 1209 , and/or may be installed from the removable media 1211 .
  • each block in the flow charts and block diagrams may represent a module, a program segment, or a code portion.
  • the module, the program segment, or the code portion comprises one or more executable instructions for implementing the specified logical function.
  • the functions denoted by the blocks may occur in a sequence different from the sequences shown in the figures. For example, in practice, two blocks in succession may be executed, depending on the involved functionalities, substantially in parallel, or in a reverse sequence.
  • each block in the block diagrams and/or the flow charts and/or a combination of the blocks may be implemented by a dedicated hardware-based system executing specific functions or operations, or by a combination of a dedicated hardware and computer instructions.
  • the present disclosure further provides a non-volatile computer storage medium.
  • the non-volatile computer storage medium may be the non-volatile computer storage medium included in the apparatus in the above embodiments, or a stand-alone non-volatile computer storage medium which has not been assembled into the apparatus.
  • the non-volatile computer storage medium stores one or more programs.
  • the one or more programs when executed by a device, cause the device to: receive 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; acquire 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; and find the data page based on the index information, and perform the operation on the data page.
  • inventive scope of the present disclosure is not limited to the technical solutions formed by the particular combinations of the above technical features.
  • inventive scope should also cover other technical solutions formed by any combinations of the above technical features or equivalent features thereof without departing from the concept of the invention, such as, technical solutions formed by replacing the features as disclosed in the present disclosure with (but not limited to), technical features with similar functions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Library & Information Science (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure discloses a method and apparatus for operating on a file. A specific embodiment of the method comprises: receiving a request of an operation on a target file, acquiring index information associated with a storage space address of a data page based on a file name and a 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; and finding the data page based on the index information, and performing the operation on the data page. Accordingly, the operation on the file is implemented depending on an index stored in the on-chip memory, so that memory overheads of accessing the index are equivalent to 0, and memory resources are saved, thereby reducing system overheads.

Description

CROSS-REFERENCE TO RELATED APPLICATION
This application claims the priority of Chinese Application No. 201510993999.9, filed on Dec. 25, 2015, the content of which is incorporated herein by reference in its entirety.
TECHNICAL FIELD
The present disclosure relates to the field of computer technology, specifically to the field of file system, and more specifically to a method and apparatus for operating on a file.
BACKGROUND
In an embedded device, an operation on a file is performed by an embedded file system. In the existing embedded file system, a log structure is generally used to store the file, that is, indexes and file data are stored in the file at the same time, and data pages of the file are non-contiguous in the storage space. When operating on the file, the approach used is to find the data page via the index, and operate the data page as a unit.
However, when the above approach is used to operate on the file, on one hand, the index occupies a large memory space, resulting in a large overhead during the file operating process, thereby increasing the system overheads of the entire embedded system. On the other hand, the data pages of the file are not contiguous in the storage space, and thus, a dynamic loading of an executable file from a third party application cannot be implemented.
SUMMARY
The present disclosure provides a method and apparatus for operating on a file to solve the technical problems mentioned in the foregoing Background section.
In a first aspect, the present disclosure provides 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; and finding the data page based on the index information, and performing the operation on the data page.
In a second aspect, the present disclosure provides an apparatus for operating on a file, comprising: a receiving unit, configured to receive 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; an acquiring unit, configured to acquire 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; and a processing unit, configured to find the data page based on the index information, and perform the operation on the data page.
The method and apparatus for operating on a file provided by the present disclosure, by receiving a request of an operation on a target file, acquire index information associated with a storage space address of a data page based on a file name and a 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; and find the data page based on the index information, and perform the operation on the data page. Accordingly, the operation on the file is implemented depending on an index stored in the on-chip memory, so that memory overheads of accessing the index are equivalent to 0, and memory resources are saved, thereby reducing system overheads.
BRIEF DESCRIPTION OF THE DRAWINGS
After reading detailed descriptions of non-limiting embodiments with reference to the following accompanying drawings, other features, objectives and advantages of the present disclosure will be more apparent:
FIG. 1 is an exemplary system architecture diagram in which the present disclosure may be applied;
FIG. 2 is a flowchart of an embodiment according to a method of the present disclosure;
FIG. 3 is a schematic structural diagram of a data page storing a first-level index;
FIG. 4 is a schematic structural diagram of a data page storing a second-level index;
FIG. 5 is a schematic diagram of finding a data page via a two-level index;
FIG. 6 is a flowchart of another embodiment according to a method for operating on a file of the present disclosure;
FIG. 7 is a layout of a data page of an executable file;
FIG. 8 is a layout of a data page of a data file;
FIG. 9 is an exemplary flowchart of creating a file;
FIG. 10 is an exemplary flowchart of writing data into a data page;
FIG. 11 is a schematic structural diagram of an embodiment according to an apparatus for operating on a file of the present disclosure; and
FIG. 12 is a schematic structural diagram of a computer system adapted to implement a terminal device or a server according to embodiments of the present disclosure.
DETAILED DESCRIPTION OF EMBODIMENTS
The present disclosure will be further described below in detail in combination with the accompanying drawings and the embodiments. It should be appreciated that the specific embodiments described herein are merely used for explaining the relevant invention, rather than limiting the invention. In addition, it should be noted that, for the ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
It should also be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other on a non-conflict basis. The present disclosure will be described below in detail with reference to the accompanying drawings and in combination with the embodiments.
FIG. 1 shows an exemplary architecture of a system 100 of an embodiment in which a method and apparatus for operating on a file according to the present disclosure may be applied.
As shown in FIG. 1, the system architecture 100 may include terminal devices 101, 102 and 103, a network 104 and a server 105. The network 104 serves as a medium providing a transmission link between the terminal devices 101, 102 and 103 and the server 105. The network 104 may include various types of connections, such as wired or wireless transmission links, or optical fibers.
A user may interact with the server 105 to receive or send messages by using the terminal devices 101, 102 and 103 via the network 104. Various communication applications may be installed on the terminal devices 101, 102 and 103.
The terminal devices 101, 102 and 103 may be various electronic devices capable of possessing display screens and supporting network communication, including but not limited to, smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers.
The server 105 may be a server providing various services, for example, a cloud server providing a file storage service to the applications on the terminal devices 101, 102 and 103. The server may process a received file operation request, and feed a processed result (for example, read file data) back to the terminal devices.
It should be appreciated that the numbers of the terminal devices, the networks and the servers in FIG. 1 are merely illustrative. Any number of terminal devices, networks and servers may be provided based on the actual requirements.
Referring to FIG. 2, which illustrates a process 200 of an embodiment according to a method for operating on a file of the present disclosure. It should be noted that the method for operating on a file provided in embodiments of the present disclosure is generally performed by the terminal devices 101, 102 and 103 or the server 105 in FIG. 1, and accordingly, an apparatus for operating on a file is generally installed on the terminal devices 101, 102 and 103 or the server 105. This method includes the following steps.
In step 201, receiving a request of an operation on a target file.
In this embodiment, an electronic device (for example, the terminal devices or servers as illustrated in FIG. 1) on which the method for operating on a file operates may receive the request of the operation on the target file by means of wired connection or wireless connection. The request of the operation includes a file name, and a data page identifier of a data page for storing the target file. In this embodiment, types of the request of the operation on the target file may be a write operation, a read operation and an update request. The target file may be stored with a data page as a unit, and accordingly, the operation on the file is also performed with a data page as a unit. For instance, when the target file is stored in a flash memory, data in one target file may be stored on a plurality of data pages (i.e., flash pages). In other words, the operation on the target file is completed by the operation on the data page storing the target file.
In step 202, acquiring index information associated with a storage space address of the data page based on the file name and the data page identifier.
In this embodiment, the index information may be stored in an on-chip memory of a processor for executing a machine instruction corresponding to the operation. For instance, when the processor executing the operation on the data page is a MCU (Microcontroller Unit), the index information may be stored in an on-chip memory (which may also be referred to as an on-board flash) of the MCU. In this embodiment, the index information may be information associated with the storage space address of the data page, for example, a physical address recording the data page in the index information.
Before describing a structure of an index in the present disclosure, problems existing when the index (which may also be referred to as a file index) is directly stored on the flash memory by simply using a one-level index will be first described. On one hand, sizes of storage spaces occupied by files are different, and numbers of the data pages occupied by the files are different, therefore, sizes of storage spaces occupied by the indexes are not fixed when correspondence between the file name and the data page is directly stored. In this way, when a data page storing the file is added or updated, the entire index will be modified. On the other hand, the storage space occupied by the index is very large, and when the data page is added, reduced or updated, the index can only be copied into the memory to be modified and then written back to the flash memory but cannot be directly modified on the flash memory, resulting in a heavy memory consumption.
In some alternative implementations of this embodiment, 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.
In this embodiment, the structure of the index may be a two-level index. A first-level index is an index from the file name to the file identifier, that is, an index that the file identifier is found by the file name. A second-level index is an index from a file name identifier and the data page identifier to the data page, that is, an index that the page data is found by the file name identifier and the data page identifier. Accordingly, for the two-level index structure, the first index information and the second index information are set. The first index information may include the file name and the file identifier, and the second index information may include the storage space address of the data page, i.e., the physical address of the data page.
In some alternative implementations of this embodiment, the method for operating on a file further includes: selecting a first data page from a 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 a location corresponding to the key value in the first hash table; and storing the first hash table into the first data page.
In this example, a data page for storing the first-level index, i.e., the first data page, may be selected from the on-chip memory. Next, the first hash table is created with the file name of the target file as the key value, and the first index information may be stored at the location corresponding to the key value, i.e., a slot, in the first hash table. After that, the first hash table is stored into the first data page. In this embodiment, there may be a plurality of first data pages for storing the first-level index, and different first data pages may be distinguished through data page identifiers, and contiguous first data pages are not necessary in the storage space.
In some alternative implementations of this embodiment, the method for operating on a file further includes: selecting a second data page from the storage space of the on-chip memory; 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.
In this example, a data page for storing the second-level index, i.e., the second data page, may be selected from the on-chip memory. Next, the second hash table is created with the file identifier and the data page identifier as the key value, and the second index information may be stored at the location corresponding to the key value, i.e., a slot, in the second hash table. After that, the second hash table is stored into the second data page. In this embodiment, there may be a plurality of second data pages storing the second-level index, different second data pages may be distinguished through data page identifiers, and contiguous second data pages are not necessary in the storage space.
Referring to FIG. 3, which is a schematic structural diagram of the data page storing the first-level index. In FIG. 3, a type number (magic number) indicates a type of a file. A file identifier (fileid) indicates the file to which the data page storing the first-level index belongs, this file is a data file (which may also be referred to as an ordinary file), and a file identifier 0 may be used as the file identifier of this file. A data page identifier (pageid) indicates a sequence number of the data page in the file. A version number indicates a version of data stored on the data page. The key value of the first hash table is the file name, and a linked list may be stored on the slot of the first hash table. Each node in the linked list may correspond to one storage node (hash node). The storage node stores the first index information including the file name and the file identifier. A number parameter (count) indicates a number of used storage nodes.
Referring to FIG. 4, which is a schematic structural diagram of the data page storing the second-level index. In FIG. 4, a type number (magic number) indicates a type of a file. A file identifier (fileid) indicates the file to which the data page storing the second-level index belongs, this file may be the data file, and a file identifier 1 may be used as the file identifier of this file. A data page identifier (pageid) indicates a sequence number of the data page in the file. A version number indicates a version of data stored on the data page. The key value of the second hash table is the file identifier and the data page identifier, and a storage node (hash node) may be stored on the slot of the second hash table. The storage node stores the second index information including the physical address of the data page. A number parameter (count) indicates a number of used storage nodes.
In this embodiment, when the first-level index and the second-level index are stored in the first data page and the second data page, a sum of data structures related to the first-level index and the second-level index may be referred to as a first index table and a second index table. Sizes of storage spaces occupied by storage nodes storing the first index information and the second index information may be of fixed length. For a situation where the two-level index comprises a plurality of data pages, a plurality of index tables may be adopted to indicate a respective mapping, that is, a large index table occupying a large storage space is divided into a plurality of small index tables occupying small storage spaces, and the small index tables do not need to be stored on contiguous data pages. Accordingly, the adding, reducing and updating of the data pages may be limited on a single data page storing the index to be performed, and thus, the problem of consuming a large amount of memory in the index maintaining process will be avoided.
In step 203, finding the data page based on the index information, and performing the operation on the data page.
In this embodiment, the data page may be found based on the physical address of the data page in the index information, and the operation on the data page may be performed, such as an operation of writing data into the data page, and an operation of reading data from the data page.
In some alternative implementations of this embodiment, the finding the data page based on the index information includes: acquiring the file identifier in the first index information stored at a location corresponding to the file name in the first hash table; acquiring the second index information stored at a 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.
By taking the two-level index as an example, the process of finding the data page will be described below. Referring to FIG. 5, which is a schematic diagram of finding the data page via the two-level index.
Assuming that a request of an operation on a first file includes a first file name of the first file (filename1), and a first data page identifier (pageid1). A request of an operation on a second file includes a second file name of the second file (filename2), and a second data page identifier (pageid2) and a third data page identifier (pageid3). The first data page identifier is 255. The second data page identifier and the third data page identifier are 1 and 2. Then the first file name (filename1) and the second file name (filename2) may be served as key values to calculate and obtain hash values, and linked lists stored on slots corresponding to these hash values in the first hash table are respectively acquired. Storage node 1 and storage node 2 corresponding to the first file name and the second file name in the linked lists are respectively determined. The storage node 1 stores the first index information including the first file name (filename1) and a file identifier of the first file (fileid1). The storage node 2 stores the second index information including the second file name (filename2) and a file identifier of the second file (fileid2). Accordingly, the file identifier of the first file (fileid1) and the file identifier of the second file (fileid2) will be acquired. The file identifier of the first file (fileid1) and the first data page identifier (pageid1) may be served as a key value to calculate and obtain a hash value, and storage node 5 is found on a slot corresponding to this hash value in the second hash table. The storage node 5 stores the second index information including a physical address of a data page corresponding to the first data page identifier (pageid1), and thus, the data page in the first file will be found. The second data page identifier (pageid2) and the third data page identifier (pageid3) may be served as key values respectively with the file identifier of the second file (fileid2) to calculate and obtain hash values, and storage node 3 and storage node 4 are found on slots corresponding to these hash values in the second hash table. The storage node 3 stores the second index information including a physical address of a data page corresponding to the second data page identifier (pageid2), and thus, the data page corresponding to the second data page identifier (pageid2) on the second file will be found. The storage node 4 stores the second index information including a physical address of a data page corresponding to the third data page identifier (pageid 3), and thus, the data page corresponding to the third data page identifier (pageid 3) on the second file will be found.
Differences between the index in this embodiment and the prior art are described below. In an existing embedded file system, the index occupies a larger memory space. By taking a yaffs file system that is the embedded file system as an example, assuming that the yaffs file system stores 32 files, and the size of the data page is 1 KB. The memory space to be occupied by the index is larger than 3 KB in a situation with a worst space complexity. However, in this embodiment, the index structure is directly stored on a data page in the on-chip memory. The processor can directly access the data page of the on-chip memory without the file system, and thus, in a resource-constrained embedded system, memory overhead of accessing the index are equivalent to 0, and memory resources are saved, thereby reducing system overheads of the entire embedded system.
Referring to FIG. 6, which shows a process 600 of another embodiment according to a method for operating on a file of the present disclosure. It should be noted that, the method for operating on a file provided in embodiments of the present disclosure is generally performed by the terminal devices 101, 102 and 103 or the server 105 in FIG. 1, and this method includes the following steps.
In step 601, creating a target file.
In this embodiment, the target file may be created by allocating a file identifier corresponding to a file name; and generating first index information including the file name and the file identifier, and storing the first index information at a location corresponding to the file name in a first hash table. In this embodiment, when the target file is created, one file identifier may be first allocated for the file, and then, the file name and the file identifier are saved in a data page storing a first-level index. For instance, a hash value is first calculated and obtained for the file name, and then, an existence of an idle storage node is searched on a linked list of a slot corresponding to the hash value in a hash table in the data page storing the first-level index. If the idle storage exists, the first index information including the file name and the file identifier will be stored in this storage node. If the idle storage node does not exist, a storage node will be added to the linked list, and the first index information including the file name and the file identifier will be stored into the added storage node.
Referring to FIG. 7, which shows a layout of a data page of an executable file.
In this embodiment, the executable file may be stored in a storage area including a plurality of contiguous data pages. A data structure may be stored on a first data page, i.e., a data page with a data page identifier as 0, and this data structure may include a type number (magic number), a file identifier (fileid), a data page identifier (pageid), a file name and a storage space parameter (size). A numerical value of the type number indicates that a type of the file to which the data page belongs is the executable file. The file identifier indicates a file identifier of the executable file, the data page identifier is a data page identifier of the executable file, the file name is a file name of the executable file, and a file size parameter indicates a size of the executable file. A data area is used to store data of the executable file.
Referring to FIG. 8, which shows a layout of a data page of a data file.
In this embodiment, the data file may include a plurality of data pages, a first data page may be served as a file header to save attribute information of the file, and the other data pages store data of the file. Each data page of the data file may include one data structure (which may also be referred to as a tag data structure), and this data structure may include a type number (magic number), a file identifier (fileid), a data page identifier (pageid), and a version number. The type number indicates that a type of the file to which the data page belongs is the data file. The file identifier is a globally unique file identifier, the data page identifier indicates a location of a current data page in the file, and the version number is a version of data stored on the data page. The version number may be used to distinguish data pages having the same file identifier and the same data page identifier, and a larger version number indicates that the data in the data page are newer data. The version number may be set to 1 when the data are written into the data page at first time. A length parameter indicates a length of valid data saved in the data page, and a data area is used to store the data of the data file. In this embodiment, the data pages belonging to the same file may be arranged by data page identifiers from small to large. Then all the data of the file can be obtained by comparing sizes of version numbers of data pages having the same data page identifier, and removing pages with smaller version numbers.
Referring to FIG. 9, which is an exemplary flowchart of creating a file. The creating includes the following steps.
In step 9001, allocating an available file identifier. The file identifier is a globally unique file identifier.
In step 9002, determining whether an index table having an idle storage node exists. When the first-level index is stored in a first data page, a sum of data structures related to the first-level index may be referred to as a first index table. The above mentioned index table is the first index table. The existence of the idle storage node in the index table may be determined. If the idle storage node exists, step 9003 is performed. If the idle storage node does not exist, step 9004 is performed.
In step 9003, saving a file name and a corresponding file identifier into the idle storage node in the index table.
In step 9004, adding a new index table, and storing the file name and the corresponding file identifier into one storage node.
In step 9005, allocating to a new data page, and writing data of the file into the data page.
In step 602, receiving a request of an operation on the target file.
In this embodiment, the request of the operation includes the file name, and a data page identifier of a data page for storing the target file. In this embodiment, a type of the request of the operation on the target file may be a write operation and a read operation. The target file may be stored with a data page as a unit, and accordingly, the operation on the file is also performed with a data page as a unit. For instance, when the target file is stored in a flash memory, data of one target file may be stored on a plurality of data pages (i.e., flash pages). In other words, the operation on the target file is completed by the operation on the data page storing the target file.
In step 603, acquiring index information associated with a storage space address of the data page based on the file name and the data page identifier.
In this embodiment, the index information is stored in an on-chip memory of a processor for executing a machine instruction corresponding to the operation. In this embodiment, the index information may be information associated with the storage space address of the data page, for example, a physical address recording the data page in the index information, and thus, the data page will be found via the index information. In this embodiment, the index information may be stored in the on-chip memory. For instance, when the processor executing the operation on the data page is a MCU, the index information may be stored in an on-chip memory (which may also be referred to as an on-board flash) of the MCU.
In this embodiment, a structure of an index may be a two-level index, and a first-level index is an index from the file name to the file identifier, i.e., an index that the file identifier is found by the file name. A second-level index is an index from a file name identifier and the data page identifier to the data page, i.e., an index that the data page is found by the file name identifier and the data page identifier. Accordingly, for the two-level index structure, first index information and second index information are set. The first index information may include the file name and the file identifier, and the second index information may include the storage space address of the data page, i.e., the physical address of the data page.
In step 604, finding the data page based on the index information, and performing an operation corresponding to an operation type identifier on the found data page.
In this embodiment, when the target file is the executable file, a write request for the executable file may be processed by determining a number of data pages for storing the executable file; allocating the number of data pages having contiguous storage space addresses and data identifiers of the data pages, and storing a storage space parameter indicating a size of the storage space of the executable file into a first data page of the data pages; generating the second index information including a storage space address of the first data page; and storing the second index information at a location corresponding to the file identifier and a data page identifier of the first data page in a second hash table.
In this embodiment, the data pages having contiguous storage space addresses and storing the executable file may be first allocated before the executable file is stored. Next, data of the executable file may be written to the data pages having contiguous addresses, and meanwhile, the file name of the executable file is stored into the first-level index, and a physical address of the first data page is stored into the second-level index. In this embodiment, the file name and the file size of the executable file may be written into the first data page storing the executable file.
In this embodiment, when the target file is the executable file, a loading request, which includes the file name and the data page identifier of the first data page, for the executable file may be processed by 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 first data page according to the storage space address of the data page in the second index information; calculating the number of data pages having contiguous storage space addresses, according to the storage space parameter stored in the first data page; and reading data in the number of data pages to load the executable file.
In this embodiment, when the executable file is loaded, the first data page may be found via the two-level index according to the file identifier of the executable file and the data page identifier of the first data page, i.e., 0. Next, the number of data pages having contiguous storage space addresses, i.e., the number of data pages of the executable file, is calculated according to the storage space parameter, i.e., a size field, stored on the first data page, and then, the above-mentioned data pages having contiguous storage space addresses are read out to implement a dynamic loading of the executable file.
In this embodiment, the write operation of the data file is divided into two kinds of operations in which one is to overwrite existing data on the data page, and the other is to write new data in an append mode. In this embodiment, an appending request for the data file may be processed by receiving an appending request for the data file, the appending request including 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. In this embodiment, when the appending request for the data file is processed, that is, when new data are written in an append mode, the data need to be written to a new allocated data page. And then, the version number is set to 1. Meanwhile, after the writing in an append mode is completed, a storage node is added into the second-level index, and the second storage information including the file identifier and a data page identifier of the new allocated data page is stored into the storage node.
In this embodiment, when an update request for the data file is processed, that is, when the existing data on the data page are overwritten, the data page may be first found, and one page of data having update data are then written into the data page, and meanwhile, the version number corresponding to the data page is added.
Referring to FIG. 10, which shows an exemplary flowchart of writing data into a data page, comprising the following steps.
In step 1001, calculating a data page identifier according to a written location of the file, and searching a data page corresponding to the file identifier and the data page identifier. That is, the data page identifier is calculated according to the written location, and the file name and the data page corresponding to the data page identifier are searched. The written location indicates a location of to-be-written data in the whole file, and the data page identifier of the data page where the to-be-written data locate may be calculated and determined according to the written location and a size of the file. Afterwards, the data page corresponding to the file identifier and the data page identifier may be searched via the second-level index.
In step 1002, determining whether the data page corresponding to the file identifier and the data page identifier is found. If the data page is found, step 1003 will be performed, and if the data page is not found, step 1004 will be performed.
In step 1003, modifying file data on the data page, and adding 1 to the version number to be stored to a new data page.
In step 1004, storing data into a new allocated data page, and storing the calculated data page identifier. That is, a new data page is allocated, the to-be-written data is stored to the new allocated data page, and the calculated data page identifier is stored into the new data page.
In step 1005, adding a file identifier and a data page identifier of the new allocated data page into the second-level index.
As shown in FIG. 6, different from the embodiment corresponding to FIG. 2, the process 600 of the method for operating on a file in this embodiment emphasizes the step 601 of creating the target file. In step 601, the executable file is stored by pre-allocating the data pages having contiguous addresses, so that binary codes of the executable file may be stored into the data pages having contiguous addresses.
Accordingly, when the executable file is loaded, the binary codes of the executable file may be read out from the data pages having contiguous addresses, and thus the dynamic loading of the executable file from a third party application is implemented.
In the present disclosure, the operation approach described in the above embodiments may be combined with a management approach of a log-structured file system to the file to build an embedded file system. That is, the two-level index structure is built in the on-chip memory, and then, the two-level index structure may be combined with the management approach of the log-structured file system to the file, so that embedded file system will be built in the on-chip memory.
Differences between the built embedded file system and the prior art are described below.
In the existing embedded file system, the data page is stored and managed with the log structure, and the file cannot be stored on the storage spaces having contiguous addresses, that is, the addresses of the data pages in the file are non-contiguous. Therefore, the existing embedded file system is not capable of supporting the dynamic loading of the executable file, i.e., the dynamic loading of the binary codes of the executable file. Further, an embedded device using the above-mentioned embedded file system (for example, an Internet of Things device) is not capable of supporting the dynamic loading of the executable file from the third party application. However, the embedded file system built in the present disclosure, on one hand, implements an effective operation on the data page with a few of memory overheads in a storage resource constrained embedded system. On the other hand, the embedded file system built in the present disclosure supports the dynamic loading of the executable file from the third party application.
Further referring to FIG. 11, as an implementation of the method shown in each of the above-mentioned figures, the present disclosure provides an embodiment of an apparatus for operating on a file, the embodiment of this apparatus corresponds to the embodiment of the method as illustrated in FIG. 2, and this apparatus may be applied in various electronic devices.
As shown in FIG. 11, the apparatus for operating on a file 1100 in this embodiment includes: a receiving unit 1101, an acquiring unit 1102, and a processing unit 1103. The receiving unit 1101 is configured to receive 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; the acquiring unit 1102 is configured to acquire 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; and the processing unit 1103 is configured to find the data page based on the index information, and perform the operation on the data page.
In this embodiment, the receiving unit 1101 may receive the request of the operation on the target file. A type of the request of the operation on the target file may be a write operation, a read operation and an update request. The target file may be stored with a data page as a unit, and accordingly, the operation on the file is also performed with a data page as a unit.
In this embodiment, the acquiring unit 1102 may acquire the index information associated with the storage space address of the data page, based on the file name and the data page identifier. The index information may be stored in the on-chip memory of the processor for executing the machine instruction corresponding to the operation. For instance, when the processor executing the operation on the data page is a MCU, the index information may be stored in an on-chip memory (which may also be referred to as an on-board flash) of the MCU. In this embodiment, the index information may be information associated with the storage space address of the data page, for example, a physical address recording the data page in the index information.
In this embodiment, the processing unit 1103 may find the data page based on the index information, for example, the physical address of the data page in the index information, and perform the operation on the data page, for example, an operation of writing data into the data page, and an operation of reading data from the data page.
In some alternative implementations of this embodiment, 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.
In some alternative implementations of this embodiment, the apparatus 1100 further includes: a first selecting unit (not shown), configured to select a first data page from a storage space of the on-chip memory; a first creating unit (not shown), configured to create a first hash table with the file name as a key value; a first index information storing unit (not shown), configured to store the first index information at a location corresponding to the key value in the first hash table; and a first hash table storing unit (not shown), configured to store the first hash table into the first data page.
In some alternative implementations of this embodiment, the apparatus 1100 further includes: a second selecting unit (not shown), configured to select a second data page from the storage space of the on-chip memory; a second creating unit (not shown), configured to create a second hash table with the file identifier and the data page identifier as a key value; a second index information storing unit (not shown), configured to store the second index information at a location corresponding to the key value in the second hash table; and a second hash table storing unit (not shown), configured to store the second hash table into the second data page.
In some alternative implementations of this embodiment, the processing unit 1103 includes: a file identifier acquiring subunit (not shown), configured to acquire the file identifier in the first index information stored at a location corresponding to the file name in the first hash table; a second index information acquiring subunit (not shown), configured to acquire the second index information stored at a location corresponding to the file identifier and the data page identifier in the second hash table; and a searching subunit (not shown), configured to find the data page according to the storage space address of the data page in the second index information.
In some alternative implementations of this embodiment, the apparatus 1100 further includes: a creation request receiving unit (not shown), configured to receive a creation request for the target file before the request of the operation on the target file is received, the creation request comprising the file name; a file identifier allocating unit (not shown), configured to allocate the file identifier corresponding to the file name; and an index information generating unit (not shown), configured to generate 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.
In some alternative implementations of this embodiment, the apparatus 1100 further includes: a write request receiving unit (not shown), configured to receive a write request for an executable file, and determine a number of data pages for storing the executable file; a first allocating unit (not shown), configured to allocate the number of data pages having contiguous storage space addresses, and data identifiers of the data pages, and store a storage space parameter indicating a size of the storage space of the executable file into a first data page of the data pages; a second index information generating unit (not shown), configured to generate the second index information including a storage space address of the first data page; and a second index information storing unit (not shown), configured to store the second index information at a location corresponding to the file identifier and a data page identifier of the first data page in the second hash table.
In some alternative implementations of this embodiment, the apparatus 1100 further includes: a loading request receiving unit (not shown), configured to receive a loading request for the executable file, the loading request comprising the file name and the data page identifier of the first data page; a first file identifier acquiring unit (not shown), configured to acquire the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; a data page searching unit (not shown), configured to acquire the second index information stored at the location corresponding to the file identifier and the data page identifier in the second hash table, and find the first data page according to the storage space address of the data page in the second index information; a calculating unit (not shown), configured to calculate the number of data pages having contiguous storage space addresses, according to the storage space parameter stored in the first data page; and a reading unit (not shown), configured to read data in the number of data pages to load the executable file.
In some alternative implementations of this embodiment, the apparatus 1100 further includes: an appending request receiving unit (not shown), configured to receive an appending request for a data file, the appending request comprising the file name; a second file identifier acquiring unit (not shown), configured to acquire the file identifier in the first index information stored at the location corresponding to the file name in the first hash table; a second allocating unit (not shown), configured to allocate 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 a second index information processing unit (not shown), configured to generate the second index information including a storage space address of the data page, and store the second index information at the location corresponding to the file identifier and the data page identifier in the second hash table.
It could be appreciated by those skilled in the art that the above-mentioned apparatus for operating on a file 1100 further includes some other common structures, such as a processor and a memory, and these common structures are not shown in FIG. 11 in order to unnecessarily blur the embodiment of the present disclosure.
FIG. is a schematic structural diagram of a computer system adapted to implement a terminal device or a server according to embodiments of the present disclosure.
As shown in FIG. 12, the computer system 1200 includes a central processing unit (CPU) 1201, which may execute various appropriate actions and processes in accordance with a program stored in a read-only memory (ROM) 1202 or a program loaded into a random access memory (RAM) 1203 from a storage portion 1208. The RAM 1203 also stores various programs and data required by operations of the system 1200. The CPU 1201, the ROM 1202 and the RAM 1203 are connected to each other through a bus 1204. An input/output (I/O) interface 1205 is also connected to the bus 1204.
The following components are connected to the I/O interface 1205: an input portion 1206 including a keyboard, a mouse etc.; an output portion 1207 comprising a cathode ray tube (CRT), a liquid crystal display device (LCD), a speaker etc.; a storage portion 1208 including a hard disk and the like; and a communication portion 1209 comprising a network interface card, such as a LAN card and a modem. The communication portion 1209 performs communication processes via a network, such as the Internet. A driver 1210 is also connected to the I/O interface 1205 as required. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, and a semiconductor memory, may be installed on the driver 1210, to facilitate the retrieval of a computer program from the removable medium 1211, and the installation thereof on the storage portion 1208 as needed.
In particular, according to an embodiment of the present disclosure, the process described above with reference to the flow chart may be implemented in a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which comprises a computer program that is tangibly embedded in a machine-readable medium. The computer program comprises program codes for executing the method as illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1209, and/or may be installed from the removable media 1211.
The flowcharts and block diagrams in the figures illustrate architectures, functions and operations that may be implemented according to the system, the method and the computer program product of the various embodiments of the present disclosure. In this regard, each block in the flow charts and block diagrams may represent a module, a program segment, or a code portion. The module, the program segment, or the code portion comprises one or more executable instructions for implementing the specified logical function. It should be noted that, in some alternative implementations, the functions denoted by the blocks may occur in a sequence different from the sequences shown in the figures. For example, in practice, two blocks in succession may be executed, depending on the involved functionalities, substantially in parallel, or in a reverse sequence. It should also be noted that, each block in the block diagrams and/or the flow charts and/or a combination of the blocks may be implemented by a dedicated hardware-based system executing specific functions or operations, or by a combination of a dedicated hardware and computer instructions.
In another aspect, the present disclosure further provides a non-volatile computer storage medium. The non-volatile computer storage medium may be the non-volatile computer storage medium included in the apparatus in the above embodiments, or a stand-alone non-volatile computer storage medium which has not been assembled into the apparatus. The non-volatile computer storage medium stores one or more programs. The one or more programs, when executed by a device, cause the device to: receive 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; acquire 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; and find the data page based on the index information, and perform the operation on the data page.
The foregoing is only a description of the preferred embodiments of the present disclosure and the applied technical principles. It should be appreciated by those skilled in the art that the inventive scope of the present disclosure is not limited to the technical solutions formed by the particular combinations of the above technical features. The inventive scope should also cover other technical solutions formed by any combinations of the above technical features or equivalent features thereof without departing from the concept of the invention, such as, technical solutions formed by replacing the features as disclosed in the present disclosure with (but not limited to), technical features with similar functions.

Claims (13)

What is claimed is:
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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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.
US15/564,165 2015-12-25 2016-06-17 Method and apparatus for operating on file Expired - Fee Related US11003625B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201510993999.9 2015-12-25
CN201510993999.9A CN105550345B (en) 2015-12-25 2015-12-25 File operation method and device
PCT/CN2016/086216 WO2017107414A1 (en) 2015-12-25 2016-06-17 File operation method and device

Publications (2)

Publication Number Publication Date
US20180285376A1 US20180285376A1 (en) 2018-10-04
US11003625B2 true US11003625B2 (en) 2021-05-11

Family

ID=55829534

Family Applications (1)

Application Number Title Priority Date Filing Date
US15/564,165 Expired - Fee Related US11003625B2 (en) 2015-12-25 2016-06-17 Method and apparatus for operating on file

Country Status (6)

Country Link
US (1) US11003625B2 (en)
EP (1) EP3260993A4 (en)
JP (1) JP6542909B2 (en)
KR (1) KR101994021B1 (en)
CN (1) CN105550345B (en)
WO (1) WO2017107414A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12147347B2 (en) 2022-08-18 2024-11-19 Samsung Electronics Co., Ltd System and method for performing caching in hashed storage

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550345B (en) * 2015-12-25 2019-03-26 百度在线网络技术(北京)有限公司 File operation method and device
WO2018115992A1 (en) * 2016-12-22 2018-06-28 Itext Group Distributed blockchain-based method for saving the location of a file
US11016932B2 (en) * 2017-09-21 2021-05-25 Alibaba Group Holding Limited Systems, methods, and apparatuses for simplifying filesystem operations utilizing a key-value storage system
CN114089916B (en) * 2018-01-12 2022-12-20 珠海极海半导体有限公司 Data acquisition system and temperature and humidity sensor system
CN108763582B (en) * 2018-06-11 2023-04-21 腾讯科技(深圳)有限公司 File searching method, device, terminal and storage medium
CN109857718A (en) * 2019-02-01 2019-06-07 广州亚美信息科技有限公司 A kind of Journal File System applied to embedded system
US10817466B2 (en) 2019-03-22 2020-10-27 Bank Of America Corporation Dynamic server pool data segmentation using dynamic ordinal partition key without locks
US11580162B2 (en) 2019-04-18 2023-02-14 Samsung Electronics Co., Ltd. Key value append
CN110489425B (en) * 2019-08-26 2022-04-12 上海达梦数据库有限公司 Data access method, device, equipment and storage medium
CN111400267B (en) * 2019-11-19 2023-09-01 杭州海康威视系统技术有限公司 Method and device for recording logs
CN111290714B (en) * 2020-02-06 2023-09-05 北京百度网讯科技有限公司 Data reading method and device
CN111309985B (en) * 2020-03-10 2023-08-25 支付宝(杭州)信息技术有限公司 High-dimensional vector storage method and device based on PostgreSQL database
CN114647626A (en) * 2020-12-21 2022-06-21 苏州三六零智能安全科技有限公司 Method, device and equipment for reading data blocks of snapshot file and storage medium
CN115480692B (en) * 2021-06-16 2025-11-07 华为技术有限公司 Data compression method and device
CN113553300B (en) * 2021-07-27 2024-05-24 北京字跳网络技术有限公司 File processing method, device, readable medium and electronic device
CN113742307B (en) * 2021-08-11 2023-08-25 达梦数据技术(江苏)有限公司 Method and system for storing and inquiring secondary index based on value log system
CN114817626B (en) * 2022-04-15 2025-08-22 厦门星纵物联科技有限公司 Video data processing method, device and computer-readable storage medium
CN115712624B (en) * 2022-11-23 2025-01-24 上海宏力达信息技术股份有限公司 A single file storage method and system for feeder terminal unit
CN117093881B (en) * 2023-10-19 2024-01-12 深圳大普微电子股份有限公司 Data compression method and device, electronic equipment and storage medium
CN117235078B (en) 2023-11-15 2024-01-30 湖南速子文化科技有限公司 Method, system, device and storage medium for processing mass data at high speed
CN119806417B (en) * 2024-12-20 2025-08-22 中国银行保险信息技术管理有限公司 Data storage method and device

Citations (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304601B1 (en) * 1995-09-27 2001-10-16 Canon Research Centre Europe Ltd. Data compression apparatus
US6324637B1 (en) * 1999-08-13 2001-11-27 Sun Microsystems, Inc. Apparatus and method for loading objects from a primary memory hash index
US20020073068A1 (en) * 1997-03-07 2002-06-13 Guha Ramanathan V. System and method for rapidly identifying the existence and location of an item in a file
US20030074341A1 (en) * 2001-10-11 2003-04-17 International Business Machines Corporation Method and system for dynamically managing hash pool data structures
US6567817B1 (en) * 2000-09-08 2003-05-20 Hewlett-Packard Development Company, L.P. Cache management system using hashing
US20050131961A1 (en) * 2000-02-18 2005-06-16 Margolus Norman H. Data repository and method for promoting network storage of data
US6961739B2 (en) * 2002-03-14 2005-11-01 Electronics And Telecommunciations Research Institute Method for managing directories of large-scale file system
US20050289133A1 (en) * 2004-06-25 2005-12-29 Yan Arrouye Methods and systems for managing data
US20060059204A1 (en) * 2004-08-25 2006-03-16 Dhrubajyoti Borthakur System and method for selectively indexing file system content
CN1818887A (en) 2006-03-16 2006-08-16 浙江大学 Built-in file system realization based on SRAM
US20060184720A1 (en) 2005-02-16 2006-08-17 Sinclair Alan W Direct data file storage in flash memories
US7158999B2 (en) * 2004-02-20 2007-01-02 Mainstar Software Corporation Reorganization and repair of an ICF catalog while open and in-use in a digital data storage system
US20070180084A1 (en) * 2006-02-01 2007-08-02 Subhashis Mohanty Wireless system and method for managing logical documents
US20070277227A1 (en) * 2004-03-04 2007-11-29 Sandbox Networks, Inc. Storing Lossy Hashes of File Names and Parent Handles Rather than Full Names Using a Compact Table for Network-Attached-Storage (NAS)
WO2008109647A1 (en) * 2007-03-05 2008-09-12 Appassure Software, Inc. A method and apparatus for efficiently merging, storing and retrieving incremental data
US7444499B2 (en) * 2006-03-28 2008-10-28 Sun Microsystems, Inc. Method and system for trace generation using memory index hashing
WO2009125027A1 (en) 2008-04-11 2009-10-15 Microelectronica Española S.A.U. Method for accessing a storage system with multiple file systems
US20100023726A1 (en) * 2008-07-28 2010-01-28 Aviles Joaquin J Dual Hash Indexing System and Methodology
US20100057750A1 (en) * 2008-09-04 2010-03-04 Vmware, Inc. File Transfer Using Standard Blocks and Standard-Block Identifiers
US20100083003A1 (en) * 2008-09-26 2010-04-01 Spackman Stephen P Method and apparatus for non-redundant encrypted storage
US20100106734A1 (en) * 2008-10-24 2010-04-29 Microsoft Corporation Blob manipulation in an integrated structured storage system
US20100174684A1 (en) * 2006-10-31 2010-07-08 Rebit, Inc. System for automatically shadowing encrypted data and file directory structures for a plurality of network-connected computers using a network-attached memory with single instance storage
US20100217926A1 (en) * 2005-02-16 2010-08-26 Sinclair Alan W Direct Data File Storage Implementation Techniques in Flash Memories
CN101901263A (en) 2010-07-22 2010-12-01 华为终端有限公司 Access method and device of file system
US20100332846A1 (en) * 2009-06-26 2010-12-30 Simplivt Corporation Scalable indexing
US20120150869A1 (en) * 2010-12-10 2012-06-14 Inventec Corporation Method for creating a index of the data blocks
WO2012092213A2 (en) * 2010-12-28 2012-07-05 Microsoft Corporation Fast and low-ram-footprint indexing for data deduplication
CN102629234A (en) 2012-01-18 2012-08-08 物联微电子(常熟)有限公司 Fast retrieval method for data of built-in Flash of single chip microcomputer
US20120311004A1 (en) * 2010-03-19 2012-12-06 Hitachi, Ltd. File-sharing system and method for processing files, and program
US20130290648A1 (en) * 2012-04-27 2013-10-31 Netapp, Inc. Efficient data object storage and retrieval
US20130339314A1 (en) * 2012-06-13 2013-12-19 Caringo, Inc. Elimination of duplicate objects in storage clusters
US20140181119A1 (en) * 2012-12-26 2014-06-26 Industrial Technology Research Institute Method and system for accessing files on a storage system
WO2014164016A2 (en) * 2013-03-13 2014-10-09 Nimbus Data Systems, Inc. Low-overhead deduplication within a block-based data storage
CN104346357A (en) 2013-07-29 2015-02-11 中国科学院声学研究所 File accessing method and system for embedded terminal
US20150215389A1 (en) * 2014-01-30 2015-07-30 Salesforce.Com, Inc. Distributed server architecture
CN105550345A (en) 2015-12-25 2016-05-04 百度在线网络技术(北京)有限公司 File operation method and apparatus

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8788788B2 (en) * 2011-08-11 2014-07-22 Pure Storage, Inc. Logical sector mapping in a flash storage array
US8793467B2 (en) * 2011-09-30 2014-07-29 Pure Storage, Inc. Variable length encoding in a storage system
JP6150785B2 (en) * 2014-12-05 2017-06-21 アビニシオ テクノロジー エルエルシー Managing storage of individually accessible data units

Patent Citations (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304601B1 (en) * 1995-09-27 2001-10-16 Canon Research Centre Europe Ltd. Data compression apparatus
US20020073068A1 (en) * 1997-03-07 2002-06-13 Guha Ramanathan V. System and method for rapidly identifying the existence and location of an item in a file
US6324637B1 (en) * 1999-08-13 2001-11-27 Sun Microsystems, Inc. Apparatus and method for loading objects from a primary memory hash index
US20050131961A1 (en) * 2000-02-18 2005-06-16 Margolus Norman H. Data repository and method for promoting network storage of data
US6567817B1 (en) * 2000-09-08 2003-05-20 Hewlett-Packard Development Company, L.P. Cache management system using hashing
US20030074341A1 (en) * 2001-10-11 2003-04-17 International Business Machines Corporation Method and system for dynamically managing hash pool data structures
US6961739B2 (en) * 2002-03-14 2005-11-01 Electronics And Telecommunciations Research Institute Method for managing directories of large-scale file system
US7158999B2 (en) * 2004-02-20 2007-01-02 Mainstar Software Corporation Reorganization and repair of an ICF catalog while open and in-use in a digital data storage system
US20070277227A1 (en) * 2004-03-04 2007-11-29 Sandbox Networks, Inc. Storing Lossy Hashes of File Names and Parent Handles Rather than Full Names Using a Compact Table for Network-Attached-Storage (NAS)
US20050289133A1 (en) * 2004-06-25 2005-12-29 Yan Arrouye Methods and systems for managing data
US20060059204A1 (en) * 2004-08-25 2006-03-16 Dhrubajyoti Borthakur System and method for selectively indexing file system content
US20060184720A1 (en) 2005-02-16 2006-08-17 Sinclair Alan W Direct data file storage in flash memories
WO2006088727A2 (en) 2005-02-16 2006-08-24 Sandisk Corporation Direct data file storage in flash memories
KR20070116792A (en) 2005-02-16 2007-12-11 쌘디스크 코포레이션 Data file storage directly in flash memories
US20100217926A1 (en) * 2005-02-16 2010-08-26 Sinclair Alan W Direct Data File Storage Implementation Techniques in Flash Memories
US20070180084A1 (en) * 2006-02-01 2007-08-02 Subhashis Mohanty Wireless system and method for managing logical documents
CN1818887A (en) 2006-03-16 2006-08-16 浙江大学 Built-in file system realization based on SRAM
US7444499B2 (en) * 2006-03-28 2008-10-28 Sun Microsystems, Inc. Method and system for trace generation using memory index hashing
US20100174684A1 (en) * 2006-10-31 2010-07-08 Rebit, Inc. System for automatically shadowing encrypted data and file directory structures for a plurality of network-connected computers using a network-attached memory with single instance storage
WO2008109647A1 (en) * 2007-03-05 2008-09-12 Appassure Software, Inc. A method and apparatus for efficiently merging, storing and retrieving incremental data
WO2009125027A1 (en) 2008-04-11 2009-10-15 Microelectronica Española S.A.U. Method for accessing a storage system with multiple file systems
US20100023726A1 (en) * 2008-07-28 2010-01-28 Aviles Joaquin J Dual Hash Indexing System and Methodology
US20100057750A1 (en) * 2008-09-04 2010-03-04 Vmware, Inc. File Transfer Using Standard Blocks and Standard-Block Identifiers
US20100083003A1 (en) * 2008-09-26 2010-04-01 Spackman Stephen P Method and apparatus for non-redundant encrypted storage
US20100106734A1 (en) * 2008-10-24 2010-04-29 Microsoft Corporation Blob manipulation in an integrated structured storage system
US20100332846A1 (en) * 2009-06-26 2010-12-30 Simplivt Corporation Scalable indexing
US20120311004A1 (en) * 2010-03-19 2012-12-06 Hitachi, Ltd. File-sharing system and method for processing files, and program
CN101901263A (en) 2010-07-22 2010-12-01 华为终端有限公司 Access method and device of file system
US20120150869A1 (en) * 2010-12-10 2012-06-14 Inventec Corporation Method for creating a index of the data blocks
WO2012092213A2 (en) * 2010-12-28 2012-07-05 Microsoft Corporation Fast and low-ram-footprint indexing for data deduplication
CN102629234A (en) 2012-01-18 2012-08-08 物联微电子(常熟)有限公司 Fast retrieval method for data of built-in Flash of single chip microcomputer
US20130290648A1 (en) * 2012-04-27 2013-10-31 Netapp, Inc. Efficient data object storage and retrieval
US20130339314A1 (en) * 2012-06-13 2013-12-19 Caringo, Inc. Elimination of duplicate objects in storage clusters
US20140181119A1 (en) * 2012-12-26 2014-06-26 Industrial Technology Research Institute Method and system for accessing files on a storage system
WO2014164016A2 (en) * 2013-03-13 2014-10-09 Nimbus Data Systems, Inc. Low-overhead deduplication within a block-based data storage
CN104346357A (en) 2013-07-29 2015-02-11 中国科学院声学研究所 File accessing method and system for embedded terminal
US20150215389A1 (en) * 2014-01-30 2015-07-30 Salesforce.Com, Inc. Distributed server architecture
CN105550345A (en) 2015-12-25 2016-05-04 百度在线网络技术(北京)有限公司 File operation method and apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
File System Implementation, <https://www.cs.odu.edu/˜cs471w/spring10/lectures/FileSystemImplementation>, (XP055577253)—12 pages (Mar. 4, 2019).
International Search Report in PCT/CN2016/086216 dated Aug. 25, 2016 in 2 pages.

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12147347B2 (en) 2022-08-18 2024-11-19 Samsung Electronics Co., Ltd System and method for performing caching in hashed storage

Also Published As

Publication number Publication date
JP6542909B2 (en) 2019-07-10
CN105550345B (en) 2019-03-26
CN105550345A (en) 2016-05-04
EP3260993A4 (en) 2018-01-24
KR101994021B1 (en) 2019-06-27
EP3260993A1 (en) 2017-12-27
JP2018518733A (en) 2018-07-12
US20180285376A1 (en) 2018-10-04
KR20170123336A (en) 2017-11-07
WO2017107414A1 (en) 2017-06-29

Similar Documents

Publication Publication Date Title
US11003625B2 (en) Method and apparatus for operating on file
CN107870728B (en) Method and apparatus for moving data
CN111949605B (en) Method, apparatus and computer program product for implementing a file system
US10394847B2 (en) Processing data in a distributed database across a plurality of clusters
US11314689B2 (en) Method, apparatus, and computer program product for indexing a file
CN107526743B (en) Method and apparatus for compressing file system metadata
US11086638B2 (en) Method and apparatus for loading application
US10649905B2 (en) Method and apparatus for storing data
CN105677904B (en) Small documents storage method and device based on distributed file system
US11822912B2 (en) Software installation through an overlay file system
US11113249B2 (en) Multitenant application server using a union file system
US10515055B2 (en) Mapping logical identifiers using multiple identifier spaces
US11232078B2 (en) Multitenancy using an overlay file system
CN111488242B (en) Method and system for tagging and routing striped backups to single deduplication instances on a deduplication device
CN106713250A (en) Data access method and device based on distributed system
CN105808451B (en) Data caching method and related device
US11176089B2 (en) Systems and methods for implementing dynamic file systems
US11451627B2 (en) System and method for content management with intelligent data store access across distributed stores
US11960721B2 (en) Dynamic storage in key value solid state drive
CN113849524B (en) Data processing method and device
CN114385630A (en) Blood relationship combing method, apparatus, device, storage medium, and program product
CN112732174B (en) Data processing method and device, electronic equipment and storage medium
CN107330118A (en) A kind of method and device of storage COS files
CN115344254A (en) Page style display method and device, electronic equipment, server and storage medium
US10067945B2 (en) File and move data to shrink datafiles

Legal Events

Date Code Title Description
FEPP Fee payment procedure

Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: FINAL REJECTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: ADVISORY ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE AFTER FINAL ACTION FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

AS Assignment

Owner name: BAIDU (CHINA) CO., LTD., CHINA

Free format text: EMPLOYMENT AGREEMENT WITH SIGNATURE OF TRANSLATOR AT PAGE 4;ASSIGNOR:DUAN, LIAN;REEL/FRAME:057666/0236

Effective date: 20170612

Owner name: BAIDU (CHINA) CO., LTD., CHINA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:ZHOU, HUA;REEL/FRAME:055842/0349

Effective date: 20150506

Owner name: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD., CHINA

Free format text: EMPLOYMENT AGREEMENT;ASSIGNOR:WANG, QINGXING;REEL/FRAME:055845/0958

Effective date: 20150401

Owner name: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD., CHINA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:BAIDU (CHINA) CO., LTD.;REEL/FRAME:055846/0059

Effective date: 20210402

Owner name: BAIDU (CHINA) CO., LTD., CHINA

Free format text: EMPLOYMENT AGREEMENT;ASSIGNOR:PAN, HAIJUN;REEL/FRAME:055846/0037

Effective date: 20150617

Owner name: BAIDU (CHINA) CO., LTD., CHINA

Free format text: EMPLOYMENT AGREEMENT;ASSIGNOR:ZHANG, GUOHUA;REEL/FRAME:055846/0001

Effective date: 20150708

Owner name: BAIDU (CHINA) CO., LTD., CHINA

Free format text: EMPLOYMENT AGREEMENT WITH ASSIGNOR'S SIGNATURE AT PAGE 15 AND SIGNATURE OF TRANSLATOR AT PAGE 4;ASSIGNOR:SU, HAO;REEL/FRAME:056957/0364

Effective date: 20150401

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STCF Information on status: patent grant

Free format text: PATENTED CASE

FEPP Fee payment procedure

Free format text: MAINTENANCE FEE REMINDER MAILED (ORIGINAL EVENT CODE: REM.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

LAPS Lapse for failure to pay maintenance fees

Free format text: PATENT EXPIRED FOR FAILURE TO PAY MAINTENANCE FEES (ORIGINAL EVENT CODE: EXP.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20250511