CN105893433A - File storage method, file access method, file storage device and file access device - Google Patents

File storage method, file access method, file storage device and file access device Download PDF

Info

Publication number
CN105893433A
CN105893433A CN201510903537.3A CN201510903537A CN105893433A CN 105893433 A CN105893433 A CN 105893433A CN 201510903537 A CN201510903537 A CN 201510903537A CN 105893433 A CN105893433 A CN 105893433A
Authority
CN
China
Prior art keywords
file
section
grouping
acquisition request
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510903537.3A
Other languages
Chinese (zh)
Inventor
刘斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LeTV Cloud Computing Co Ltd
Original Assignee
LeTV Cloud Computing 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 LeTV Cloud Computing Co Ltd filed Critical LeTV Cloud Computing Co Ltd
Priority to CN201510903537.3A priority Critical patent/CN105893433A/en
Publication of CN105893433A publication Critical patent/CN105893433A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/41Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a file storage method, a file access method, a file storage device and a file access device. Obtained slicing files are grouped according to the time sequence to obtain a plurality of file groups; a primary index file corresponding to each file group is generated according to the file identification information of each slicing file in each file group; each file group is respectively stored; according to the file identification information and the file storage information of each slicing file in each file group, a secondary index file corresponding to each file group is generated; a file obtaining request is obtained; the primary index file is found according to the file identification information of the slicing file obtained by the request; the file group in which the slicing file obtained by the request is located is obtained; according to the file identification information of the slicing file obtained by the request, the secondary index file corresponding to the file group is found, and the file storage information of the slicing file obtained by the request is obtained; and the slicing file obtained by the request is obtained through the downloading according to the file storage information. The methods and the devices provided by the embodiment of the invention have the advantage that the slicing file access efficiency is improved.

Description

File memory method, access method and device
Technical field
The present embodiments relate to file processing technology field, particularly relate to a kind of regard file memory method, Access method and device.
Background technology
In order to support the function such as network direct broadcasting, video retrieval, it is provided that the source server of audio/video flow is permissible Audio/video flow is cut, it is thus achieved that multiple little audio/video flows, namely section file, carrying out sound Frequently during streaming namely transmission for section file.
Owing to being split by audio stream, substantial amounts of section file can be obtained, in the prior art, this A little section files are typically to store according to time order and function order, and searching from a large amount of section files please Seeking the section file of acquisition, need to search one by one, workload is big, and therefore file access is inefficient.
Summary of the invention
The embodiment of the present invention provides a kind of file memory method, access method and device, existing in order to solve The technical problem that file access of cutting into slices in technology is inefficient.
The embodiment of the present invention provides a kind of file memory method, including:
The section file that will obtain, is grouped according to time order and function order, it is thus achieved that multiple file grouping;
According to the file identification information of each section file in each file grouping, generate each file grouping Corresponding one-level index file;
Each file grouping is stored respectively, and according to each section file in each file grouping File identification information and file storage information, generate the secondary index file that each file grouping is corresponding; Wherein, described one-level index file is used for when getting file acquisition request, cutting according to acquisition request The file identification information of sheet file searches corresponding one-level index file, it is thus achieved that the section of described acquisition request The file grouping at file place;The file identification information of the section file according to described acquisition request searches institute State the secondary index file that file grouping is corresponding, it is thus achieved that the file storage of the section file of described acquisition request Information;The section file obtaining described acquisition request is downloaded according to described file storage information.
The embodiment of the present invention provides a kind of file access method, including:
Acquisition file acquisition is asked;
The file identification information of the section file according to acquisition request searches one-level index file, it is thus achieved that described The file grouping at the section file place of acquisition request;Wherein, described one-level index file is to obtain Section file, is grouped according to time order and function order, it is thus achieved that multiple file grouping;According to each file In packet, the file identification information of each section file generates;
The file identification information of the section file according to described acquisition request, searches described file grouping corresponding Secondary index file, it is thus achieved that described acquisition request section file file storage information;Wherein, institute State secondary index file for each file grouping to be stored respectively, and according to each in each file grouping The file identification information of individual section file and file storage information generate;
The section file obtaining described acquisition request is downloaded according to described file storage information.
The embodiment of the present invention provides a kind of file storage device, including:
File grouping module, for the section file that will obtain, is grouped according to time order and function order, Obtain multiple file grouping;
One-level index generation module, for according to the file identification of each section file in each file grouping Information, generates the one-level index file that each file grouping is corresponding;
File storage module, for storing each file grouping respectively;
Secondary index generation module, for according to the file identification of each section file in each file grouping Information and file storage information, generate the secondary index file that each file grouping is corresponding;Wherein, institute State one-level index file for when receiving file acquisition request, according to the section file of acquisition request File identification information searches corresponding one-level index file, it is thus achieved that the section file place of described acquisition request File grouping;The file identification information of the section file according to described acquisition request is searched described file and is divided The secondary index file that group is corresponding, it is thus achieved that the file storage information of the section file of described acquisition request;Root The section file obtaining described acquisition request is downloaded according to described file storage information.
The embodiment of the present invention provides a kind of file access device, including:
Acquisition request module, is used for obtaining file acquisition request;
File grouping acquisition module, the file identification information for the section file according to acquisition request is searched One-level index file, it is thus achieved that the file grouping at the section file place of described acquisition request;Wherein, described One-level index file is the section file that will obtain, and is grouped according to time order and function order, it is thus achieved that multiple File grouping;Generate according to the file identification information of each section file in each file grouping;
Storage data obtaining module, for the file identification information of the section file according to described acquisition request, Search the secondary index file that described file grouping is corresponding, it is thus achieved that the literary composition of the section file of described acquisition request Part storage information;Wherein, described secondary index file for each file grouping is stored respectively, and Generate according to file identification information and the file storage information of each section file in each file grouping 's;
File download module, obtains cutting of described acquisition request for downloading according to described file storage information Sheet file.
File memory method, access method and the device that the embodiment of the present invention provides, by file of cutting into slices Packet stores, and is that each group of file grouping generates one-level index file and secondary index file, Utilize described one-level index file and secondary index file can realize looking into of section file easily and fast Look for, thus improve the access efficiency of section file.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that under, Accompanying drawing during face describes is some embodiments of the present invention, for those of ordinary skill in the art, On the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is file memory method embodiment flow chart of the present invention;
Fig. 2 is file access method embodiment flow chart of the present invention;
Fig. 3 is file storage device example structure schematic diagram of the present invention;
Fig. 4 is file access device example structure schematic diagram of the present invention.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention, Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise The every other embodiment obtained, broadly falls into the scope of protection of the invention.
In an actual application of the present invention, it is mainly used in based on HLS (HTTP Live Streaming, real time streaming) protocol realization audio, video data in the storage of file and access, HLS is a kind of Streaming transfer protocol based on HTTP, mainly include TS (Transport Stream, Transmission stream) file and the description file of TS file, i.e. M3U8 file, it is by whole audio frequency and video Stream cuts into the TS file can downloaded by HTTP, and generates the M3U8 file of TS file, client According to M3U8 file, i.e. can obtain TS file, to realize the broadcasting of audio/video flow, TS file is also I.e. refer to a kind of section file in the embodiment of the present invention.
Owing to being split by audio/video flow, can obtain substantial amounts of section file, these section files are typically to press Storing according to time order and function order, therefore searching work amount is relatively big, and file access is inefficient.
In order to solve this technical problem, in embodiments of the present invention, by obtain section file according to time Between sequencing be grouped, it is thus achieved that multiple file grouping;According to each section literary composition in each file grouping The file identification information of part, can generate the one-level index file that each file grouping is corresponding;Each file Packet stores respectively, it is possible to according to the file identification letter of each section file in each file grouping Breath and file storage information, generate the secondary index file that each file grouping is corresponding;Thus carry out literary composition When part is searched, search corresponding one-level index literary composition according to the file identification information of the section file of acquisition request Part, it is possible to obtain the file grouping at the section file place of described acquisition request;According to described acquisition request The file identification information of section file search secondary index file corresponding to described file grouping, it is thus achieved that institute State the file storage information of the section file of acquisition request;I.e. can download according to described file storage information Obtain the section file of described acquisition request.Achieved by one-level index file and secondary index file Section file is quickly searched, thus improves file access efficiency.
In current a kind of netcast framework, storage and the access of a large amount of section files usually occur in Relay Server, the section file that source server provides first transmits to Relay Servers such as Edge Servers, Being transmitted to client by Relay Server, Relay Server can store substantial amounts of section file, therefore again In an actual application, technical solution of the present invention can be applied particularly in Relay Server.Certainly, This is the most specifically limited by the present invention, can apply to need appointing that a large amount of section files store In what equipment.
Below in conjunction with accompanying drawing, technical solution of the present invention is described in detail.
The flow chart of one embodiment of a kind of file memory method that Fig. 1 provides for the embodiment of the present invention, should Method can include following step:
101: the section file that will obtain, it is grouped according to time order and function order, it is thus achieved that multiple files divide Group.
This acquisition section file can be the file of cutting into slices in a large number that Relay Server obtains from source server, when So may also mean that source server cutting obtains file of cutting into slices in a large number.Therefore service at Relay Server or source Device all can carry out file storage according to file storage scheme of the present invention.
First, section file is grouped according to time order and function order, it is thus achieved that multiple file grouping.
In each file grouping, can comprise the section file of predetermined number, this predetermined number is permissible It is set according to practical situation.
In an actual application, this section file i.e. may refer to TS file.
102: according to the file identification information of each section file in each file grouping, generate each file The one-level index file that packet is corresponding.
After determining file grouping, i.e. can generate the one-level index file of corresponding each file grouping, This one-level index file at least includes the file identification information of each section file in this document packet, when So, it is also possible to include each information such as the section time span of file and file size.
The corresponding one-level index file of each file grouping, distinguishes for convenience, indexes in this one-level File can also include the group character of the file grouping of its correspondence.
103: each file grouping is stored respectively, and according to each section literary composition in each file grouping The file identification information of part and file storage information, generate the secondary index literary composition that each file grouping is corresponding Part.
Each file grouping stores respectively, i.e. can obtain each section in each file grouping The file storage information of file, this document storage information can be the storage address of section file, storage position The information such as put.
Thus store information and file identification according to the file of each section file of each file grouping Information, can generate the secondary index file of correspondence.This secondary index file i.e. includes the file of its correspondence The file storage information of each section file of packet and file identification information.
Distinguishing for convenience, this secondary index file can also include the packet mark of the file grouping of its correspondence Know.
Thus each file grouping a corresponding one-level index file and secondary index file i.e. respectively.
When getting file acquisition request, can first look for one-level index file, this document obtains please The file identification information of the section file that the request of carrying in asking obtains, from the section file according to acquisition request File identification information search corresponding one-level index file, i.e. can obtain the section of described acquisition request The file grouping at file place.
The secondary index file that the file grouping at the section file place of search request acquisition is corresponding the most again; The file identification information of the section file according to described acquisition request searches two grades that described file grouping is corresponding Index file, i.e. can obtain the file storage information of the section file of described acquisition request;Thus according to Described file storage information downloads the section file of described acquisition request.
Wherein, this document obtains request for client transmission.
The embodiment of the present invention, a large amount of section file grouping store, and are that the generation of each file grouping is right The one-level index file answered and secondary index file, by one-level index file and secondary index file, Facilitate the lookup of section file, thus improve the search efficiency of section file.
The all corresponding one-level index file of each file grouping and secondary index file, one-level index file And secondary index file can store respectively in respective file packet, thus when carrying out ff, File identification information in file identification information according to acquisition request and each one-level index file is permissible Find the one-level index file of correspondence, and then the file grouping that this one-level index file is corresponding can be found.
One-level index file and secondary index file can store respectively with each file grouping, for Convenience distinguishes corresponding relation, can be each file grouping arranges group character, one-level index file And secondary index file can include group character, thus according to the group character of one-level index file File grouping can be found, secondary index file can be found according to the group character of file grouping, and then I.e. can realize the lookup of section file.
In a kind of possible implementation, described one-level index file includes dividing of described file grouping The file identification information of each section file in group mark and described file grouping, described one-level index literary composition Part is for when receiving file acquisition request, according to the file identification information of the section file of acquisition request Search corresponding one-level index file, obtain according to the group character in corresponding one-level index file described The file grouping at the section file place of acquisition request.
Wherein, the group character of file grouping can have multiple possible set-up mode, as long as being capable of The differentiation of different file grouping, as a kind of possible implementation, due to each file of cutting into slices Having temporal information, temporal information includes the data of a section file and rises between sowing time and the end time, In each group of file grouping, each section file arranges according to time order and function order, therefore can basis In each file grouping each section file rise between sowing time and the end time, determine described file grouping Corresponding rises between sowing time and the end time, as the group character of described file grouping.
File identification information is to may be used for distinguishing the identification information of different section file, such as can be with often One section file rise between sowing time and the end time is as file identification information.
In the embodiment of the present invention, secondary index file includes each section literary composition in the file grouping of its correspondence The file identification information of part and file storage information, this document storage information, as a kind of possible reality Existing mode, can specifically refer to file storage side-play amount, owing to each section file is suitable according to time order and function Sequence stores, the literary composition of each file of cutting into slices before therefore document misregistration amount may refer to current slice file Part length sum;
Therefore, described according to each section file identification information of file and file in each file grouping Storage information, the secondary index file generating each file grouping corresponding includes:
According to the file size of each section file in each file grouping, determine that described section file is corresponding File storage side-play amount, described file storage side-play amount be the file of respectively cutting into slices before current slice file File size sum;
Offset according to file identification information and the file storage of each section file in each file grouping Amount, generates the secondary index file that each file grouping is corresponding.
Now, described secondary index file can be specifically for the file of the section file according to acquisition request Identification information searches secondary index file, it is thus achieved that the file storage skew of the section file of described acquisition request Amount;The file size of the section file according to acquisition request and described file storage side-play amount, from described File storage side-play amount corresponding position is downloaded and is obtained the section file that described file size is corresponding.
Such as one file grouping includes 4 section files, and the file size of first section file is 3MB (MByte, Mbytes), the file size of second section file are 4MB, the 3rd section The file size of file be 3MB and the 4th section file file size be 2MB, cut for first Sheet file, second section file, the 3rd section file, the 4th section file store successively.
Then the file storage side-play amount of the first section file is 0MB, and the file storage of the second section file is partially Shifting amount is 3MB, the file storage side-play amount of the 3rd section file is 7MB, the 4th section file File storage side-play amount is 9MB.
Assume acquisition request section file file size be 3MB, according to the section file of acquisition request File identification information, can search obtain file storage side-play amount be 7MB, then from file storage skew Amount 7MB corresponding position, downloads the section file obtaining 3MB, is the 3rd section file.
The flow chart of one embodiment of a kind of file access method that Fig. 2 provides for the embodiment of the present invention, should Method can include following step:
201: obtain file acquisition request.
202: search one-level index file according to the file identification information of the section file of acquisition request, it is thus achieved that The file grouping at the section file place of described acquisition request.
Wherein, described one-level index file is the section file that will obtain, and carries out according to time order and function order Packet, it is thus achieved that multiple file grouping;According to the file identification letter of each section file in each file grouping Breath generates.
203: according to the file identification information of the section file of described acquisition request, search described file grouping Corresponding secondary index file, it is thus achieved that the file storage information of the section file of described acquisition request.
Wherein, described secondary index file is for store each file grouping respectively, and according to each In file grouping, file identification information and the file of each section file store what information generated;
204: download the section file obtaining described acquisition request according to described file storage information.
Wherein, the generation of one-level index file and secondary index file may refer to institute in above-described embodiment State, do not repeat them here.
Wherein, the file storage information in secondary index file can be specially file storage side-play amount, should The acquisition of file storage side-play amount may refer to, described in above-described embodiment, not repeat them here.Thus have Body is the section file downloaded from file storage side-play amount corresponding position and obtain acquisition request.
When file storage information in secondary index file is file storage side-play amount, file acquisition is asked In can also carry file size, therefore as another embodiment, according under described file storage information The section file carrying the described acquisition request of acquisition can be specifically:
The file size of the section file according to described acquisition request and described file storage side-play amount, from Described file storage side-play amount corresponding position is downloaded and is obtained the section file that described file size is corresponding.
In the embodiment of the present invention, substantial amounts of section file stores according to time order and function sequential packet, each File grouping correspondence one-level index file and secondary index file, one-level index file includes that it is corresponding File grouping in each section file file identification information, secondary index file includes its correspondence In file grouping, file identification information and the file of each section file store information, and each file divides Group can have group character, can also store the packet of the file grouping of its correspondence in one-level index file Mark, can also include the group character of the file grouping of its correspondence in secondary index file.
Thus the file identification information in asking according to file acquisition, the one-level index literary composition of correspondence can be searched Part, and then may determine that the file grouping that one-level index file is corresponding, namely the section file of acquisition request The file grouping at place, and then the file grouping pair at the section file place of this acquisition request can be found The secondary index file answered, from secondary index file, according to the files-designated of the section file of acquisition request Knowledge information, can store information with the file that locating file identification information is corresponding, thus store according to this document Information i.e. can download the section file obtaining acquisition request.
The embodiment of the present invention, by section file carries out packet storage, and is respectively provided with each file and divides The one-level index file of group and secondary index file, can facilitate the lookup of section file, thus improve The access efficiency of section file.
The structural representation of one embodiment of a kind of file storage device that Fig. 3 provides for the embodiment of the present invention Scheming, device described in the embodiment of the present invention can apply in any equipment needing to carry out section file storage, This device may include that
File grouping module 301, for the section file that will obtain, is carried out point according to time order and function order Group, it is thus achieved that multiple file grouping.
In each file grouping, can comprise the section file of predetermined number, this predetermined number is permissible It is set according to practical situation.
In an actual application, this section file i.e. may refer to TS file.
One-level index generation module 302, for according to the file of each section file in each file grouping Identification information, generates the one-level index file that each file grouping is corresponding.
The corresponding one-level index file of each file grouping, distinguishes for convenience, indexes in this one-level File can also include the group character of the file grouping of its correspondence.
File storage module 303, for storing each file grouping respectively.
Secondary index generation module 304, for according to the file of each section file in each file grouping Identification information and file storage information, generate the secondary index file that each file grouping is corresponding.
Each file grouping stores respectively, i.e. can obtain each section in each file grouping The file storage information of file, this document storage information can be the storage address of section file, storage position The information such as put.
Thus store information and file identification according to the file of each section file of each file grouping Information, can generate the secondary index file of correspondence.This secondary index file i.e. includes the file of its correspondence The file storage information of each section file of packet and file identification information.
Distinguishing for convenience, this secondary index file can also include the packet mark of the file grouping of its correspondence Know.Thus each file grouping a corresponding one-level index file and secondary index file i.e. respectively.
When receiving file acquisition request, can first look for one-level index file, this document obtains please The file identification information of the section file that the request of carrying in asking obtains, from the section file according to acquisition request File identification information search corresponding one-level index file, i.e. can obtain the section of described acquisition request The file grouping at file place.
Search the secondary index file that this document packet is corresponding the most again;Section according to described acquisition request The file identification information of file searches the secondary index file that described file grouping is corresponding, i.e. can obtain institute State the file storage information of the section file of acquisition request;Thus download institute according to described file storage information State the section file of acquisition request.
The embodiment of the present invention, a large amount of section file grouping store, and are that the generation of each file grouping is right The one-level index file answered and secondary index file, by one-level index file and secondary index file, Facilitate the lookup of section file, thus improve the search efficiency of section file.
The all corresponding one-level index file of each file grouping and secondary index file, one-level index file And secondary index file can store respectively in respective file packet, thus when carrying out ff, File identification information in file identification information according to acquisition request and each one-level index file is permissible Find the one-level index file of correspondence, and then the file grouping that this one-level index file is corresponding can be found.
One-level index file and secondary index file can store respectively with each file grouping, for Convenience distinguishes corresponding relation, can be each file grouping arranges group character, one-level index file And secondary index file can include group character, thus according to the group character of one-level index file File grouping can be found, secondary index file can be found according to the group character of file grouping, and then I.e. can realize the lookup of section file.
In a kind of possible implementation, described one-level index file includes dividing of described file grouping The file identification information of each section file in group mark and described file grouping, described one-level index literary composition Part is for when receiving file acquisition request, according to the file identification information of the section file of acquisition request Search corresponding one-level index file, obtain according to the group character in corresponding one-level index file described The file grouping at the section file place of acquisition request.
Wherein, the group character of file grouping can have multiple possible set-up mode, as long as being capable of The differentiation of different file grouping, as a kind of possible implementation, due to each file of cutting into slices Having temporal information, temporal information includes the data of a section file and rises between sowing time and the end time, In each group of file grouping, each section file arranges according to time order and function order, therefore one-level index Module 302 can be specifically for:
According in each file grouping each section file rise between sowing time and the end time, determine described What file grouping was corresponding rises between sowing time and the end time, as the group character of described file grouping.
The file of each section file in group character according to each file grouping and each file grouping Identification information, generates the one-level index file that each file grouping is corresponding.
In the embodiment of the present invention, secondary index file includes each section literary composition in the file grouping of its correspondence The file identification information of part and file storage information, this document storage information, as a kind of possible reality Existing mode, can specifically refer to file storage side-play amount, owing to each section file is suitable according to time order and function Sequence stores, the literary composition of each file of cutting into slices before therefore document misregistration amount may refer to current slice file Part length sum;
Accordingly, as another embodiment, described secondary index generation module 304 can be specifically for:
According to the file size of each section file in each file grouping, determine that described section file is corresponding File storage side-play amount, described file storage side-play amount be the file of respectively cutting into slices before current slice file File size sum;
Offset according to file identification information and the file storage of each section file in each file grouping Amount, generates the secondary index file that each file grouping is corresponding.
Described secondary index file is looked into specifically for the file identification information of the section file according to acquisition request Look for secondary index file, it is thus achieved that the file storage side-play amount of the section file of described acquisition request;According to asking Ask file size and the described file storage side-play amount of the section file of acquisition, from the storage of described file partially Shifting amount corresponding position is downloaded and is obtained the section file that described file size is corresponding.
The structural representation of one embodiment of a kind of file access device that Fig. 4 provides for the embodiment of the present invention Figure, this device may include that
Acquisition request module 401, is used for obtaining file acquisition request;
File grouping acquisition module 402, for the file identification information of the section file according to acquisition request Search one-level index file, it is thus achieved that the file grouping at the section file place of described acquisition request;Wherein, Described one-level index file is the section file that will obtain, and is grouped according to time order and function order, it is thus achieved that Multiple file grouping;Generate according to the file identification information of each section file in each file grouping;
Storage data obtaining module 403, for the file identification of the section file according to described acquisition request Information, searches the secondary index file that described file grouping is corresponding, it is thus achieved that the section literary composition of described acquisition request The file storage information of part;Wherein, described secondary index file is for deposit each file grouping respectively Storage, and store information according to file identification information and the file of each section file in each file grouping Generate;
File download module 404, obtains described acquisition request for downloading according to described file storage information Section file.
Wherein, the generation of one-level index file and secondary index file may refer to institute in above-described embodiment State, do not repeat them here.
Wherein, the file storage information in secondary index file can be specially file storage side-play amount, should The acquisition of file storage side-play amount may refer to, described in above-described embodiment, not repeat them here.Thus have Body is the section file downloaded from file storage side-play amount corresponding position and obtain acquisition request.
When file storage information in secondary index file is file storage side-play amount, file acquisition is asked In can also carry file size, therefore as another embodiment, described file download module 304 can With specifically for:
The file size of the section file according to described acquisition request and described file storage side-play amount, from Described file storage side-play amount corresponding position is downloaded and is obtained the section file that described file size is corresponding.
Wherein, when one-level index file includes group character, file grouping acquisition module 402, permissible File identification information specifically for the section file according to acquisition request searches one-level index file, according to The corresponding group character in one-level index file obtains the file at the section file place of described acquisition request Packet.
In the embodiment of the present invention, substantial amounts of section file stores according to time order and function sequential packet, each File grouping correspondence one-level index file and secondary index file, one-level index file includes that it is corresponding File grouping in each section file file identification information, secondary index file includes its correspondence In file grouping, file identification information and the file of each section file store information, and each file divides Group can have group character, can also store the packet of the file grouping of its correspondence in one-level index file Mark, can also include the group character of the file grouping of its correspondence in secondary index file.
Thus the file identification information in asking according to file acquisition, the one-level index literary composition of correspondence can be searched Part, and then may determine that the file grouping that one-level index file is corresponding, namely the section file of acquisition request The file grouping at place, and then the file grouping pair at the section file place of this acquisition request can be found The secondary index file answered, from secondary index file, according to the files-designated of the section file of acquisition request Knowledge information, can store information with the file that locating file identification information is corresponding, thus store according to this document Information i.e. can download the section file obtaining acquisition request.
The embodiment of the present invention, by section file carries out packet storage, and is respectively provided with each file and divides The one-level index file of group and secondary index file, can facilitate the lookup of section file, thus improve The access efficiency of section file.
Device embodiment described above is only schematically, wherein said illustrates as separating component Unit can be or may not be physically separate, the parts shown as unit can be or Person may not be physical location, i.e. may be located at a place, or can also be distributed to multiple network On unit.Some or all of module therein can be selected according to the actual needs to realize the present embodiment The purpose of scheme.Those of ordinary skill in the art are not in the case of paying performing creative labour, the most permissible Understand and implement.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive each reality The mode of executing can add the mode of required general hardware platform by software and realize, naturally it is also possible to by firmly Part.Based on such understanding, the portion that prior art is contributed by technique scheme the most in other words Dividing and can embody with the form of software product, this computer software product can be stored in computer can Read in storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that one Computer equipment (can be personal computer, server, or the network equipment etc.) performs each to be implemented The method described in some part of example or embodiment.
Last it is noted that above example is only in order to illustrate technical scheme, rather than to it Limit;Although the present invention being described in detail with reference to previous embodiment, the ordinary skill of this area Personnel it is understood that the technical scheme described in foregoing embodiments still can be modified by it, or Person carries out equivalent to wherein portion of techniques feature;And these amendments or replacement, do not make corresponding skill The essence of art scheme departs from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (12)

1. a file memory method, it is characterised in that including:
The section file that will obtain, is grouped according to time order and function order, it is thus achieved that multiple file grouping;
According to the file identification information of each section file in each file grouping, generate each file grouping Corresponding one-level index file;
Each file grouping is stored respectively, and according to each section file in each file grouping File identification information and file storage information, generate the secondary index file that each file grouping is corresponding; Wherein, described one-level index file is used for when getting file acquisition request, cutting according to acquisition request The file identification information of sheet file searches corresponding one-level index file, it is thus achieved that the section of described acquisition request The file grouping at file place;The file identification information of the section file according to described acquisition request searches institute State the secondary index file that file grouping is corresponding, it is thus achieved that the file storage of the section file of described acquisition request Information;The section file obtaining described acquisition request is downloaded according to described file storage information.
Method the most according to claim 1, it is characterised in that described one-level index file includes The file identification letter of each section file in the group character of described file grouping and described file grouping Breath, described one-level index file is for when receiving file acquisition request, according to the section of acquisition request The file identification information of file searches corresponding one-level index file, according in corresponding one-level index file Group character obtain described acquisition request section file place file grouping.
Method the most according to claim 1, it is characterised in that described according in each file grouping The file identification information of each section file and file storage information, generate each file grouping corresponding Secondary index file includes:
According to the file size of each section file in each file grouping, determine that described section file is corresponding File storage side-play amount, described file storage side-play amount be the file of respectively cutting into slices before current slice file File size sum;
Offset according to file identification information and the file storage of each section file in each file grouping Amount, generates the secondary index file that each file grouping is corresponding, and described secondary index file is specifically for root Secondary index file is searched, it is thus achieved that described request obtains according to the file identification information of the section file of acquisition request The file storage side-play amount of the section file taken;According to acquisition request section file file size and Described file storage side-play amount, downloads from described file storage side-play amount corresponding position and obtains described file The section file that length is corresponding.
Method the most according to claim 2, it is characterised in that described according in each file grouping The file identification information of each section file, generates the one-level index file that each file grouping is corresponding;
According in each file grouping each section file rise between sowing time and the end time, determine described What file grouping was corresponding rises between sowing time and the end time, as the group character of described file grouping;
The file of each section file in group character according to each file grouping and each file grouping Identification information, generates the one-level index file that each file grouping is corresponding.
5. a file access method, it is characterised in that including:
Acquisition file acquisition is asked;
The file identification information of the section file according to acquisition request searches one-level index file, it is thus achieved that described The file grouping at the section file place of acquisition request;Wherein, described one-level index file is to obtain Section file, is grouped according to time order and function order, it is thus achieved that multiple file grouping;According to each file In packet, the file identification information of each section file generates;
The file identification information of the section file according to described acquisition request, searches described file grouping corresponding Secondary index file, it is thus achieved that described acquisition request section file file storage information;Wherein, institute State secondary index file for each file grouping to be stored respectively, and according to each in each file grouping The file identification information of individual section file and file storage information generate;
The section file obtaining described acquisition request is downloaded according to described file storage information.
Method the most according to claim 5, it is characterised in that file in described secondary index file The file storage information that identification information is corresponding is that file stores side-play amount, and described file storage side-play amount is literary composition The file size sum of each section file before current slice file in part packet;
The described section file according to the described file storage information download described acquisition request of acquisition includes:
The file size of the section file according to described acquisition request and described file storage side-play amount, from Described file storage side-play amount corresponding position is downloaded and is obtained the section file that described file size is corresponding.
7. a file storage device, it is characterised in that including:
File grouping module, for the section file that will obtain, is grouped according to time order and function order, Obtain multiple file grouping;
One-level index generation module, for according to the file identification of each section file in each file grouping Information, generates the one-level index file that each file grouping is corresponding;
File storage module, for storing each file grouping respectively;
Secondary index generation module, for according to the file identification of each section file in each file grouping Information and file storage information, generate the secondary index file that each file grouping is corresponding;Wherein, institute State one-level index file for when receiving file acquisition request, according to the section file of acquisition request File identification information searches corresponding one-level index file, it is thus achieved that the section file place of described acquisition request File grouping;The file identification information of the section file according to described acquisition request is searched described file and is divided The secondary index file that group is corresponding, it is thus achieved that the file storage information of the section file of described acquisition request;Root The section file obtaining described acquisition request is downloaded according to described file storage information.
Device the most according to claim 7, it is characterised in that described one-level index file includes The file identification letter of each section file in the group character of described file grouping and described file grouping Breath, described one-level index file is for when receiving file acquisition request, according to the section of acquisition request The file identification information of file searches corresponding one-level index file, according in corresponding one-level index file Group character obtain described acquisition request section file place file grouping.
Device the most according to claim 7, it is characterised in that described secondary index generation module has Body is used for:
According to the file size of each section file in each file grouping, determine that described section file is corresponding File storage side-play amount, described file storage side-play amount be the file of respectively cutting into slices before current slice file File size sum;
Offset according to file identification information and the file storage of each section file in each file grouping Amount, generates the secondary index file that each file grouping is corresponding, and described secondary index file is specifically for root Secondary index file is searched, it is thus achieved that described request obtains according to the file identification information of the section file of acquisition request The file storage side-play amount of the section file taken;According to acquisition request section file file size and Described file storage side-play amount, downloads from described file storage side-play amount corresponding position and obtains described file The section file that length is corresponding.
Device the most according to claim 8, it is characterised in that described one-level index file module Specifically for:
According in each file grouping each section file rise between sowing time and the end time, determine described What file grouping was corresponding rises between sowing time and the end time, as the group character of described file grouping;
The file of each section file in group character according to each file grouping and each file grouping Identification information, generates the one-level index file that each file grouping is corresponding.
11. 1 kinds of file access devices, it is characterised in that including:
Acquisition request module, is used for obtaining file acquisition request;
File grouping acquisition module, the file identification information for the section file according to acquisition request is searched One-level index file, it is thus achieved that the file grouping at the section file place of described acquisition request;Wherein, described One-level index file is the section file that will obtain, and is grouped according to time order and function order, it is thus achieved that multiple File grouping;Generate according to the file identification information of each section file in each file grouping;
Storage data obtaining module, for the file identification information of the section file according to described acquisition request, Search the secondary index file that described file grouping is corresponding, it is thus achieved that the literary composition of the section file of described acquisition request Part storage information;Wherein, described secondary index file for each file grouping is stored respectively, and Generate according to file identification information and the file storage information of each section file in each file grouping 's;
File download module, obtains cutting of described acquisition request for downloading according to described file storage information Sheet file.
12. devices according to claim 11, it is characterised in that described secondary index file Chinese The file storage information that part identification information is corresponding is that file stores side-play amount, and described file storage side-play amount is In file grouping before current slice file each section file file size sum;
Described file download module specifically for:
The file size of the section file according to described acquisition request and described file storage side-play amount, from Described file storage side-play amount corresponding position is downloaded and is obtained the section file that described file size is corresponding.
CN201510903537.3A 2015-12-09 2015-12-09 File storage method, file access method, file storage device and file access device Pending CN105893433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510903537.3A CN105893433A (en) 2015-12-09 2015-12-09 File storage method, file access method, file storage device and file access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510903537.3A CN105893433A (en) 2015-12-09 2015-12-09 File storage method, file access method, file storage device and file access device

Publications (1)

Publication Number Publication Date
CN105893433A true CN105893433A (en) 2016-08-24

Family

ID=57002335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510903537.3A Pending CN105893433A (en) 2015-12-09 2015-12-09 File storage method, file access method, file storage device and file access device

Country Status (1)

Country Link
CN (1) CN105893433A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953892A (en) * 2017-02-14 2017-07-14 北京时间股份有限公司 A kind of method for obtaining file, apparatus and system
CN108235151A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of method and apparatus of net cast
CN109104447A (en) * 2017-06-20 2018-12-28 杭州海康威视数字技术股份有限公司 A kind of vehicle-mounted data reading/writing method and device
CN109981751A (en) * 2019-03-06 2019-07-05 珠海金山网络游戏科技有限公司 A kind of document transmission method and system, computer equipment and storage medium
CN111459883A (en) * 2020-03-31 2020-07-28 潍柴动力股份有限公司 Data processing method and device
CN115905122A (en) * 2023-02-20 2023-04-04 成都九洲电子信息***股份有限公司 Flight track data storage and retrieval system, method and storage medium
CN116954745A (en) * 2023-05-25 2023-10-27 成都融见软件科技有限公司 Target file partial loading system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412962A (en) * 2013-09-04 2013-11-27 国家测绘地理信息局卫星测绘应用中心 Storage method and reading method for mass tile data
CN103455631A (en) * 2013-09-22 2013-12-18 广州中国科学院软件应用技术研究所 Method, device and system for processing data
CN104794162A (en) * 2015-03-25 2015-07-22 中国人民大学 Real-time data storage and query method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412962A (en) * 2013-09-04 2013-11-27 国家测绘地理信息局卫星测绘应用中心 Storage method and reading method for mass tile data
CN103455631A (en) * 2013-09-22 2013-12-18 广州中国科学院软件应用技术研究所 Method, device and system for processing data
CN104794162A (en) * 2015-03-25 2015-07-22 中国人民大学 Real-time data storage and query method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953892A (en) * 2017-02-14 2017-07-14 北京时间股份有限公司 A kind of method for obtaining file, apparatus and system
CN109104447A (en) * 2017-06-20 2018-12-28 杭州海康威视数字技术股份有限公司 A kind of vehicle-mounted data reading/writing method and device
CN108235151A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of method and apparatus of net cast
CN109981751A (en) * 2019-03-06 2019-07-05 珠海金山网络游戏科技有限公司 A kind of document transmission method and system, computer equipment and storage medium
CN109981751B (en) * 2019-03-06 2022-06-17 珠海金山网络游戏科技有限公司 File transmission method and system, computer equipment and storage medium
CN111459883A (en) * 2020-03-31 2020-07-28 潍柴动力股份有限公司 Data processing method and device
CN111459883B (en) * 2020-03-31 2023-08-18 潍柴动力股份有限公司 Data processing method and device
CN115905122A (en) * 2023-02-20 2023-04-04 成都九洲电子信息***股份有限公司 Flight track data storage and retrieval system, method and storage medium
CN116954745A (en) * 2023-05-25 2023-10-27 成都融见软件科技有限公司 Target file partial loading system
CN116954745B (en) * 2023-05-25 2024-02-09 成都融见软件科技有限公司 Target file partial loading system

Similar Documents

Publication Publication Date Title
CN105893433A (en) File storage method, file access method, file storage device and file access device
US20170149922A1 (en) Cdn scale down
CN104506493B (en) A kind of method for realizing HLS contents Hui Yuan and caching
EP3396924B1 (en) Real-time processing of iot data
US20140337417A1 (en) Method and apparatus for processing server load balancing by using the result of hash function
CN103634361B (en) The method and apparatus for downloading file
CN103297270A (en) Application type recognition method and network equipment
CN104378234A (en) Cross-data-center data transmission processing method and system
CN103778236A (en) Webpage data distribution processing method and device as well as webpage generation processing method and device
CN103248645A (en) BT (Bit Torrent) off-line data downloading system and method
CN104283723A (en) Network access log processing method and device
CN105354132A (en) Mobile application release processing method and release channel tracking method and system
CN102571788A (en) Sample collection method and system
CN101645927A (en) System, method and server for slicing media files
CN106686083B (en) A kind of video file method for down loading and device
US20170187837A1 (en) Ad download method, the client and the server
CN104702978B (en) A kind of method and netcast equipment of video data positioning
EP1536336A3 (en) Method, system and server for performing backup in a computer system with multiple file servers
CN105469381A (en) Information processing method and terminal
CN105338421A (en) HLS streaming media transmission method and device
KR101966430B1 (en) System and Method for Determining Fog Server Number and Placement in Local Area Network Environment
CN114222086B (en) Method, system, medium and electronic device for scheduling audio and video code stream
CN108134746B (en) Method and device for processing rail transit data
KR101505845B1 (en) Apparatus for processing packet and method thereof
CN107517237B (en) Video identification method and device

Legal Events

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

Application publication date: 20160824