CN105405457A - File content reading method and device - Google Patents

File content reading method and device Download PDF

Info

Publication number
CN105405457A
CN105405457A CN201510717761.3A CN201510717761A CN105405457A CN 105405457 A CN105405457 A CN 105405457A CN 201510717761 A CN201510717761 A CN 201510717761A CN 105405457 A CN105405457 A CN 105405457A
Authority
CN
China
Prior art keywords
data segment
data
file
address information
data section
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.)
Granted
Application number
CN201510717761.3A
Other languages
Chinese (zh)
Other versions
CN105405457B (en
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.)
Beijing Miaoshi Software Technology Co., Ltd
Original Assignee
Beijing Vidon Technology 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 Beijing Vidon Technology Co Ltd filed Critical Beijing Vidon Technology Co Ltd
Priority to CN201510717761.3A priority Critical patent/CN105405457B/en
Publication of CN105405457A publication Critical patent/CN105405457A/en
Application granted granted Critical
Publication of CN105405457B publication Critical patent/CN105405457B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The embodiment of the invention provides a file content reading method and a device. The method comprises steps: the end of the file is positioned, wherein the file comprises a main movie data segment located at the beginning of the file, and a first data segment, a second data segment and multiple logic data segments located at fixed lengths of the end of the file, address information of the second data segment is stored in the first data segment, and address information of each logic data segment is stored in the second data segment; the address information of the second data segment stored in the first data segment is read; according to the address information of the second data segment, the address information of each logic data segment stored in the second data segment is read; and according to the address information of each logic data segment, data stored in each logic data segment is read correspondingly to facilitate reading of file contents. Through the file content reading scheme provided by the embodiment of the invention, the file contents can be quickly read.

Description

File content read method and device
Technical field
The present invention relates to file play-back technology field, particularly relate to a kind of file content read method and device.
Background technology
MKV is a kind of media file of Matroska, and Matroska is a kind of new multimedia encapsulation format, also claims multimedia container (MultimediaContainer).The video of multiple different coding and the audio frequency of more than 16 different-formats and the caption stream of different language can be encapsulated in the middle of a MatroskaMedia file by MKV file.The maximum feature of MKV file is exactly to hold the video of number of different types coding, audio frequency and caption stream.
And the broadcasting of the personalization of file is needed along with user, MKV extendfile has become the focus that technician studies.MKV extendfile is the file adding the format that multiple logical data section generates afterwards on the basis of MKV.MKV extendfile is managed by corresponding server after generating.When carrying out MKV extendfile and playing, player can be connected to server by wired or wireless mode, from server, then reads required file content play.
At present, player is when reading file content, need to read from first data segment of file, then according to each logical data section data reading successively and store in each logical data section that put in order hereof, until carry out data playback again after reading required data.Such as: required data are arranged in the 5th data segment of file, at present when reading desired data, then need to read data from first data segment of file, then read second, third successively, the 4th and the 5th data segment can obtain required data.
Visible, existing file content read schemes, when reading file content, need travel through the time of the total data section at substantial before the data segment at desired data place, cannot realize the quick reading to file content.Owing to needing the time of at substantial during file reading content, therefore, between player and server by wireless connections and connection speed slower time, cannot ensure to affect the experience of user by the fluency that file is play.
Summary of the invention
In view of existing file content read schemes cannot realize the reading problem soon to file content, propose the present invention to provide a kind of overcoming the problems referred to above or the file content read method solved the problem at least in part and device.
According to one aspect of the present invention, provide a kind of file content read method, comprising: the end being positioned to described file; Wherein, described file comprises: be positioned at the main cinematic data section of described file beginning, the first data segment being positioned at described end of file regular length, the second data segment and multiple logical data section, store the address information of described second data segment in described first data segment, in described second data segment, store the address information of each logical data section; Read in described first data segment the address information of described second data segment stored; Address information according to described second data segment reads the address information of each logical data section stored in described second data segment; Address information correspondence according to described each logical data section reads the data stored in each logical data section, to carry out file content reading.
Alternatively, the address information of each logical data section stored in described second data segment is arranged in address reference table, and the step that the described address information according to described second data segment reads the address information of each logical data section stored in described second data segment comprises: the address information according to described second data segment reads the address reference table stored in described second data segment; The address information of each logical data section is obtained from the described address reference table read.
Alternatively, the regular length of described first data segment is the first setting value, the step of the address information of described second data segment stored in described first data of described reading comprises: read apart from the data in described end of file first range of set value, obtains the address information of described second data segment from the data read.
Alternatively, the length of described first data segment is 63 bytes.
Alternatively, described file is MKV extendfile; Described each logical data section comprises: supplement and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section and mark flow data section.
According to another aspect of the present invention, provide a kind of file content reading device, comprising: locating module, for being positioned to the end of described file; Wherein, described file comprises: be positioned at the main cinematic data section of described file beginning, the first data segment being positioned at described end of file regular length, the second data segment and multiple logical data section, store the address information of described second data segment in described first data segment, in described second data segment, store the address information of each logical data section; First address information read module, for reading in described first data segment the address information of described second data segment stored; Second address information read module, for reading the address information of each logical data section stored in described second data segment according to the address information of described second data segment; File read module, reads the data stored in each logical data section, to carry out file content reading for the address information correspondence according to described each logical data section.
Alternatively, the address information of each logical data section stored in described second data segment is arranged in address reference table, described second address information read module comprises: table read module, reads for the address information according to described second data segment the address reference table stored in described second data segment; Information reading module, for obtaining the address information of each logical data section from the described address reference table read.
Alternatively, the regular length of described first data segment is the first setting value, when described first address information read module reads the address information of described second data segment stored in described first data: read apart from the data in described end of file first range of set value, from the data read, obtain the address information of described second data segment.
Alternatively, the length of described first data segment is 63 bytes.
Alternatively, described file is MKV extendfile; Described each logical data section comprises: supplement and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section and mark flow data section.
Compared with prior art, the present invention has the following advantages:
The file content read schemes that the embodiment of the present invention provides, carries out content reading for the file comprising multiple logical data section.Be provided with multiple logical data section, main cinematic data section in file, be positioned at the first data segment of end of file regular length and store the second data segment of each logical data sector address information.When carrying out file and reading, first navigate to the address information that the first data segment obtains the second data segment, then navigate to according to the address information got the second data segment storing each logical data sector address information, from the address information getting each logical number section these data are broken, then, according to the data that the address information that gets can be carried out needed for quick position reading to logical data section, to realize the reading to file content.Visible, the file content read schemes that the embodiment of the present invention provides, the required data segment read can be directly targeted to according to the address information of logical data section, first data segment compared to existing needs from file reads each data segment successively until reading the file content read schemes till required data segment, the reading speed of file content can be promoted, realize the quick reading to file content.Due to the quick reading to file content can be realized, therefore, even if when the wireless network network speed be connected between player with server is slow, the smooth playing of file also can be realized.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 is the flow chart of steps of a kind of file content read method according to the embodiment of the present invention one;
Fig. 2 is the flow chart of steps of a kind of file content read method according to the embodiment of the present invention two;
Fig. 3 is the structured flowchart of a kind of file content reading device according to the embodiment of the present invention three;
Fig. 4 is the structured flowchart of a kind of file content reading device according to the embodiment of the present invention four.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Embodiment one
With reference to Fig. 1, show the flow chart of steps of a kind of file content read method of the embodiment of the present invention one.
The file content read method of the embodiment of the present invention comprises the following steps:
Step S102: the end being positioned to file.
During file reading, being first positioned to the end of file from server, to read data from the end field of file.
File to be read can be the MKV extendfile of SD operating such, can also be the MKV extendfile of high definition operating such.Certainly, can be the file of other appropriate formats, in the embodiment of the present invention, the form treating file reading do concrete restriction.
Step S104: the address information reading the second data segment stored in the first data segment.
Wherein, file to be read comprises: be positioned at the main cinematic data section of file beginning, the first data segment being positioned at end of file regular length, the second data segment and multiple logical data section, and in the first data segment, store the address information of the second data segment, store the address information of each logical data section in the second data segment.First data segment is arranged on end of file and regular length, reads when being more convenient to File Open.
It should be noted that, first data segment and the second data segment can be named according to the actual requirements by those skilled in the art in embody rule process, such as, be identification data section by the first numerical nomenclature, by the second data segment called after carve information data segment.
The logical data section comprised in file can be arranged according to the actual requirements by those skilled in the art, does not do concrete restriction in the embodiment of the present invention to this.Such as: when file to be read is the MKV extendfile of SD operating such, the multiple logical data sections comprised in file are for supplementing and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section and mark flow data section.When file to be read is the definitely compatible MKV extendfile of high definition, the multiple logical data sections comprised in file are for supplementing and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section, chapters and sections information data section and mark flow data section.
Step S106: the address information according to the second data segment reads the address information of each logical data section stored in the second data segment.
It should be noted that, the address information of each logical data section stored in the second data segment, can store in any suitable form.Such as: the mark of the address information of each logical data section and each logical data section can be carried out one_to_one corresponding, be stored in address reference table; All right, directly successively each mark of logical data section and the address information of its correspondence are stored in the second data segment in order.
Step S108: the address information correspondence according to each logical data section reads the data stored in each logical data section, to carry out file content reading.
After the address information determining each logical data section, can read according to address the data stored in each data segment.Such as: the data in the 4th data segment in pre-read file, according to common reading manner, then first, second, third and the 4th data segment of file reading just can read required data successively.And the file content read method adopting the embodiment of the present invention to provide, only need to read last data segment, then the address information of the second data segment is therefrom got, the address information that the second data segment finally gets each data segment is read by the address information of the second data segment got, the data stored in the 4th data segment directly can be read according to address information, without the need to reading the data stored in each data segment from the first data segment successively, to realize the quick reading to file content.
The file content read method provided by the embodiment of the present invention, carries out content reading for the file comprising multiple logical data section.Be provided with multiple logical data section, main cinematic data section in file and be positioned at the first data segment of end of file regular length and store the second data segment of each logical data sector address information.When carrying out file and reading, first navigate to the address information that the first data segment obtains the second data segment, then navigate to according to the address information got the second data segment storing each logical data sector address information, from the address information getting each logical number section these data are broken, then, according to the data that the address information that gets can be carried out needed for quick position reading to logical data section, to realize the reading to file content.Visible, the file content read method that the embodiment of the present invention provides, the required data segment read can be directly targeted to according to the address information of logical data section, first data segment compared to existing needs from file reads each data segment successively until reading the file content read schemes till required data segment, the reading speed of file content can be promoted, realize the quick reading to file content.
Embodiment two
With reference to Fig. 2, show the flow chart of steps of a kind of file content read method of the embodiment of the present invention two.
The file content read method of the embodiment of the present invention comprises the following steps:
Step S202: player is positioned to the end of file.
Be read as example be described to carry out content to VIDON file in the embodiment of the present invention.It should be noted that, the file content read method provided in the embodiment of the present invention is not limited to and carries out content reading to VIDON file, is also applicable to the contents extraction that other comprises the file of multiple logical data section.Wherein, VIDON file is the file of another kind of form MKV file being expanded to rear generation.VIDON is only the suffix name of the file to this specific format, in specific implementation process, MKV extendfile can also be named with other suffix name, not do concrete restriction in the embodiment of the present invention to this.
VIDON file to be read determined by player from VIDON file server, and content reading is carried out to this file in the end then navigating to this file.In VIDON file server, store multiple VIDON file, each VIDON file has corresponding title and/or mark.Store the main film of multi-section film and main film supplemental content in VIDON file, player, when playing, after determining main film to be played and/or main film supplemental content, reads in player and plays in VIDON file server.It should be noted that player can be the player can playing MKV file suitable arbitrarily, such as: DVDWatchBox box player.Player can be undertaken by wired or wireless network and file server alternately.
VIDON file in the embodiment of the present invention is on the basis of MKV file layout, increases the data segment that multiple logical data section generates new form afterwards.VIDON file can be the MKV extendfile of high definition operating such, also can be the MKV file of SD operating such.
Wherein, described file comprises: be positioned at the main cinematic data section of file beginning, the first data segment being positioned at end of file regular length, the second data segment and multiple logical data section, store the address information of the second data segment in described first data segment, in the second data segment, store the address information of each logical data section.
Each logical data section that MKV extendfile comprises includes but not limited to: supplement and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section and mark flow data section.Further, when MKV extendfile is the MKV file of high definition operating such, logical data section also comprises chapters and sections information data section.
Respectively the data stored in each logical data section comprised in file are described below:
Store the main film of multistage in main cinematic data section, the data namely stored in this data segment are mixed by video, audio frequency and caption stream, are complete movie plot parts.Main cinematic data section is arranged to the data segment being positioned at file beginning, even if be do not adopt navigation player method carrying out broadcasting to file, and adopts common MKV player method also can carry out played in order to the main film stored in main cinematic data section.Visible, not only can meet the broadcasting demand of file navigation by main cinematic data section being arranged to first data segment but also the ordinary playing demand being similar to MKV and playing can be met.
In main cinematic data section, every section of main film is to there being multiclass audio frequency, and multiclass captions, audio categories can reach 16 kinds of national language, certainly, also more also several conventional audio categories can only can be set, for captions classification too, can be arranged according to the actual requirements by those skilled in the art for audio categories, specifically arranging of captions classification, in the embodiment of the present invention, concrete restriction not done to this.Moreover, in main cinematic data section, also comprise the information of each chapters and sections that each main film comprises, the concrete chapters and sections of main film can be navigated to by chapters and sections information.Wherein, chapters and sections information comprises chapters and sections mark, the initial time that each chapters and sections are corresponding and end time.
Supplement and store multistage film supplemental content in additional content data section, the data stored in this segment data are also mixed by video, audio frequency and caption stream, are some contents such as preview short-movie and menu background.
The address information of the second data segment is stored in first data segment.First data segment is arranged on end of file and is arranged to regular length and both can ensure the compatibility of file to MKV form, can reach again the object of the accurate location to the first data segment in file.
Each logical data section address information hereof in file is stored in second data segment.
File identification is stored in file identification data section.Specifically arranging of file identification can be arranged in actual application according to the actual requirements by those skilled in the art, as long as its place file can be indicated to be the file of specific format.Such as: identify VIDON file with " MKUDVD ".
The data generating navigate user interface are stored, such as: the information such as position, beginning displaying time of each display element when recording user shows alternately in navigate user interface data segment.The contents such as the audio categories that user needs when can set media stream data by the navigate user interface that these display elements generate, subtitle language classification and concrete chapters and sections.
The navigation control program for controlling complete navigation playing process is stored in navigation control data section.
The information such as media stream data index mark, each section of media stream data duration are stored in message stream data section.Wherein, media stream data comprises each section of main film stored in main cinematic data section and each section of film supplemental content of supplementing and storing in additional content data section.The information such as index mark, duration of each section of main film is stored in message stream data section; Also store the information such as index mark, duration of each section of film supplemental content simultaneously.
Store classification logotype symbol table in mark flow data section, record the mark of main film in this classification identifier list for every section of main film, and the audio categories of the different language of correspondence identifies and captions classification logotype.When user selects main film, audio categories and captions classification by navigate user interface, main Movie Identity, audio categories mark and captions classification logotype can be determined by this classification identifier list, from main cinematic data section, extract corresponding main film by these marks and carry out playing.
Initial time and the termination time of each chapters and sections in each main film stored in main cinematic data section is stored in chapters and sections information data section.
A kind of preferred storage mode is: the address information of each logical data section stored in the second data segment be arranged in address reference table.In the embodiment of the present invention, carry out follow-up explanation the address information of logical data section to be arranged in address reference table.
Step S204: player reads the address information of the second data segment stored in the first data segment.
Wherein, when arranging the length of the first data segment in file, the first data segment, length can be arranged to the first setting value.Preferably, the first setting value is 63 bytes.First data segment is arranged to 63 byte longs, both can meets the storage demand of the address information to the second data segment, the storage space taking file can exceeded again.If what the first setting value set is excessive, although the storage demand of the address information to the second data segment also can be met, effective storage space of file can be taken.If what the first setting value set is too small, although effective storage space of file can be saved, the storage demand of the address information to the second data segment cannot be met.
Certainly, the length of the first data segment is not limited to 63 bytes.In specific implementation process, can be arranged according to the actual requirements by those skilled in the art, as the first data segment being arranged to 70 bytes, 60 bytes, 55 bytes etc.
The mode of the address information of the second data segment stored in preferred reading first data segment is: read apart from the data in end of file first range of set value, obtain the address information of the second data segment from the data read.
Such as: the regular length of the first data segment is 63 bytes, during the address information of the second data segment stored in reading first data segment, navigate to the end of file, read the data reading forward 63 bytes from end of file, the address information of the second data segment can be obtained.
Step S206: the address information according to the second data segment reads the address reference table stored in the second data segment.
The concrete form of the address information of the second data segment can be arranged according to the actual requirements by those skilled in the art, does not do concrete restriction in the embodiment of the present invention to this.Such as: the address information of the second data segment can be start position information and the end position information of the second data segment, also can be the identification information of the second data segment and the start position information of this data segment.
Wherein, the length of the second data segment can be arranged according to the actual requirements by those skilled in the art, and the embodiment of the present invention does not do concrete restriction to this.As the length of the second data segment increases, along with the length of the second data segment reduces by the minimizing of logical data hop count amount by the increase along with logical data hop count amount.
Step S208: player obtains the address information of each logical data section from the address reference table read.
For the concrete file layout of address information in address reference table of each logical data section, can be arranged according to the actual requirements by those skilled in the art, in the embodiment of the present invention, concrete restriction not done to this.Such as: in address reference table, the mark of logical segment and address information one_to_one corresponding are stored.
Step S210: player reads the data stored in each logical data section, to carry out file content reading according to the address information correspondence of each logical data section.
Player, after the address information getting each logical data section in file, can navigate to logical data section according to address information targetedly, reads the data stored in logical data section.
Such as: need to carry out file navigation broadcasting, then need after the address information getting each logical data section, first navigate to navigation control data section and read navigation control data; Secondly, determine to need to obtain which logical data section according to the concrete navigation control program in navigation control data; And then read by the address information correspondence of logical data section the data stored in logical data section.Again such as: when opening file, need first to obtain the film supplemental content of supplementing and storing in additional content data section, then after the address information getting each logical data section, determine to supplement and the address information of additional content data section correspondence, and according to this address information this data segment positioned and carry out digital independent.
The file content read method provided by the embodiment of the present invention, carries out content reading for the file comprising multiple logical data section.Be provided with multiple logical data section, main cinematic data section in file and be positioned at the first data segment of end of file regular length and store the second data segment of each logical data sector address information.When carrying out file and reading, first navigate to the address information that the first data segment obtains the second data segment, then navigate to according to the address information got the second data segment storing each logical data sector address information, from the address information getting each logical number section these data are broken, then, according to the data that the address information that gets can be carried out needed for quick position reading to logical data section, to realize the reading to file content.Visible, the file content read method that the embodiment of the present invention provides, the required data segment read can be directly targeted to according to the address information of logical data section, first data segment compared to existing needs from file reads each data segment successively until reading the file content read schemes till required data segment, the reading speed of file content can be promoted, realize the quick reading to file content.
Be described with the file content read method of an instantiation to the embodiment of the present invention below:
Suppose that Vidon file comprises following data segment: main cinematic data Duan – trailer 1 data segment (namely supplements and additional content data section 1) – trailer 2 data segment (i.e. supplementary and additional content data section 1) – NavigationUI data segment (i.e. navigate user interface data segment) – NavigationControl data segment (navigation control data section).
Existing way does not set up each data segment address concordance list.Just store data segment contents successively in order, and mark is set in each data segment starting position.When navigating played file, first time reads, and reads five data segments in ground, can read the content stored in NavigationControl data segment and obtain navigation control program from first data segment order; Suppose that the Navigator set in navigation control program is as first playing trailer 2, then UI and navigate user interface is shown, so when carrying out file navigation, then needing second time file reading, reading the 3rd data segment from first data segment order and getting trailer 2 and play; When showing UI on request, then need third time file reading, from the first data, order reads the 4th data segment, reads UI and generates data genaration UI and show.Visible, the repeated multiple times from the beginning file reading of this process need.
In this instantiation, the first data segment of regular length is set in Vidon end of file, and, in the first data segment, set up address reference table, then the address information of logical data section each in Vidon file is stored in address reference table.That is, the Vidon file in the embodiment of the present invention comprises following data segment: main cinematic data section – trailer 1 data segment (namely supplementing and additional content data section 1) – trailer 2 data segment (namely supplementing and additional content data section 1) – NavigationUI data segment (i.e. navigate user interface data segment) – NavigationControl data segment (navigation control data section) – the 2nd number is according to section – first data segment.
When navigating played file, first reading the first data segment of Vidon end of file, obtaining the address information of the second data segment from the first data segment, the address information according to the second data segment obtains in the second data segment the address information of each data segment stored; Then determine the address information of NavigationControl data segment, obtain the content of determining to store in NavigationControl data segment to obtain navigation control program according to the address information determined.Still suppose that the Navigator set in navigation control program is as first playing trailer 2, then UI and navigate user interface is shown, so when carrying out file navigation, then first determine the address information of trailer 2 correspondence, read according to the address information determined the broadcasting that the data stored in trailer 2 carry out trailer 2; Then, determine the address information of NavigationUI data segment, the data of the generation UI stored under reading NavigationUI data segment according to the address information determined, generate UI and show.Visible, the file content read method that the embodiment of the present invention provides, the cumbersome process of repeatedly file reading from file can be avoided, only once read concordance list content, just know the positional information of total data section, when needing the content stored in certain data segment, file content extraction can be carried out by the fast data being positioned to corresponding data segment reading storage of address quick indexing, the quick reading to file content can be realized.
Embodiment three
With reference to Fig. 3, show the structured flowchart of a kind of file content reading device of the embodiment of the present invention three.
The file content reading device of the embodiment of the present invention comprises: locating module 302, for being positioned to the end of described file; Wherein, described file comprises: be positioned at the main cinematic data section of described file beginning, the first data segment being positioned at described end of file regular length, the second data segment and multiple logical data section, store the address information of described second data segment in described first data segment, in described second data segment, store the address information of each logical data section; First address information read module 304, for reading in described first data segment the address information of described second data segment stored; Second address information read module 306, for reading the address information of each logical data section stored in described second data segment according to the address information of described second data segment; File read module 308, reads the data stored in each logical data section, to carry out file content reading for the address information correspondence according to described each logical data section.
The file content reading device provided by the embodiment of the present invention, carries out content reading for the file comprising multiple logical data section.Be provided with multiple logical data section, main cinematic data section in file and be positioned at the first data segment of end of file regular length and store the second data segment of each logical data sector address information.When carrying out file and reading, first navigate to the address information that the first data segment obtains the second data segment, then navigate to according to the address information got the second data segment storing each logical data sector address information, from the address information getting each logical number section these data are broken, then, according to the data that the address information that gets can be carried out needed for quick position reading to logical data section, to realize the reading to file content.Visible, the file content reading device that the embodiment of the present invention provides, the required data segment read can be directly targeted to according to the address information of logical data section, first data segment compared to existing needs from file reads each data segment successively until reading the file content read schemes till required data segment, the reading speed of file content can be promoted, realize the quick reading to file content.
Embodiment four
With reference to Fig. 4, show the structured flowchart of a kind of file content reading device of the embodiment of the present invention four.
The file content reading device of the embodiment of the present invention is the further optimization to the file content reading device in embodiment three, and after optimizing, file Content reading apparatus comprises: locating module 402, for being positioned to the end of described file; Wherein, described file comprises: be positioned at the main cinematic data section of described file beginning, the first data segment being positioned at described end of file and multiple logical data section, store the address information of described second data segment in described first data segment, in described second data segment, store the address information of each logical data section; First address information read module 404, for reading in described first data segment the address information of described second data segment stored; Second address information read module 406, for reading the address information of each logical data section stored in described second data segment according to the address information of described second data segment; File read module 408, reads the data stored in each logical data section, to carry out file content reading for the address information correspondence according to described each logical data section.
Preferably, the address information of each logical data section stored in described second data segment is arranged in address reference table, described second address information read module 406 comprises: table read module 4062, reads for the address information according to described second data segment the address reference table stored in described second data segment; Information reading module 4064, for obtaining the address information of each logical data section from the described address reference table read.
Preferably, described first data segment length first setting value, when described first address information read module 404 reads in described first data the address information of described second data segment stored: read apart from the data in described end of file first range of set value, from this segment data read, obtain the address information of described second data segment.
Preferably, the length of described first data segment is 63 bytes.
Preferably, described file is MKV extendfile; Described each logical data section comprises: supplement and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section and mark flow data section.
The file content reading device of the embodiment of the present invention is used for realizing corresponding file content read method in previous embodiment one, two, and has the beneficial effect corresponding to embodiment of the method, does not repeat them here.
For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment at this file content read schemes provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure required by system that there is the present invention program is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as the following claims reflect, all features of inventive aspect disclosed single embodiment before being to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in detail in the claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all parts in the file content read schemes of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (10)

1. a file content read method, is characterized in that, comprising:
Be positioned to the end of described file; Wherein, described file comprises: be positioned at the main cinematic data section of described file beginning, the first data segment being positioned at described end of file regular length, the second data segment and multiple logical data section, store the address information of described second data segment in described first data segment, in described second data segment, store the address information of each logical data section;
Read in described first data segment the address information of described second data segment stored;
Address information according to described second data segment reads the address information of each logical data section stored in described second data segment;
Address information correspondence according to described each logical data section reads the data stored in each logical data section, to carry out file content reading.
2. method according to claim 1, it is characterized in that, the address information of each logical data section stored in described second data segment is arranged in address reference table, and the step that the described address information according to described second data segment reads the address information of each logical data section stored in described second data segment comprises:
Address information according to described second data segment reads the address reference table stored in described second data segment;
The address information of each logical data section is obtained from the described address reference table read.
3. method according to claim 2, is characterized in that, the regular length of described first data segment is the first setting value, and the step of the address information of described second data segment stored in described first data of described reading comprises:
Read apart from the data in described end of file first range of set value, from the data read, obtain the address information of described second data segment.
4. method according to claim 3, is characterized in that, the length of described first data segment is 63 bytes.
5. the method according to any one of claim 1-4, is characterized in that, described file is MKV extendfile;
Described each logical data section comprises: supplement and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section and mark flow data section.
6. a file content reading device, is characterized in that, comprising:
Locating module, for being positioned to the end of described file; Wherein, described file comprises: be positioned at the main cinematic data section of described file beginning, the first data segment being positioned at described end of file regular length, the second data segment and multiple logical data section, store the address information of described second data segment in described first data segment, in described second data segment, store the address information of each logical data section;
First address information read module, for reading in described first data segment the address information of described second data segment stored;
Second address information read module, for reading the address information of each logical data section stored in described second data segment according to the address information of described second data segment;
File read module, reads the data stored in each logical data section, to carry out file content reading for the address information correspondence according to described each logical data section.
7. device according to claim 6, is characterized in that, the address information of each logical data section stored in described second data segment is arranged in address reference table, and described second address information read module comprises:
Table read module, reads for the address information according to described second data segment the address reference table stored in described second data segment;
Information reading module, for obtaining the address information of each logical data section from the described address reference table read.
8. device according to claim 7, is characterized in that, the regular length of described first data segment is the first setting value, when described first address information read module reads the address information of described second data segment stored in described first data:
Read apart from the data in described end of file first range of set value, from the data read, obtain the address information of described second data segment.
9. device according to claim 8, is characterized in that, the length of described first data segment is 63 bytes.
10. the device according to any one of claim 6-9, is characterized in that, described file is MKV extendfile;
Described each logical data section comprises: supplement and additional content data section, file identification data section, navigate user interface data segment, navigation control data section, message stream data section and mark flow data section.
CN201510717761.3A 2015-10-29 2015-10-29 File content read method and device Active CN105405457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510717761.3A CN105405457B (en) 2015-10-29 2015-10-29 File content read method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510717761.3A CN105405457B (en) 2015-10-29 2015-10-29 File content read method and device

Publications (2)

Publication Number Publication Date
CN105405457A true CN105405457A (en) 2016-03-16
CN105405457B CN105405457B (en) 2018-03-16

Family

ID=55470898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510717761.3A Active CN105405457B (en) 2015-10-29 2015-10-29 File content read method and device

Country Status (1)

Country Link
CN (1) CN105405457B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1542624A (en) * 2003-04-29 2004-11-03 大唐移动通信设备有限公司 Method for quickening logic block mapping speed in Flash file system
CN1554094A (en) * 2001-09-10 2004-12-08 ��ķ��ɭ Extension of M3U file format to support user interface and navigation tasks in a digital audio player
WO2008048067A1 (en) * 2006-10-19 2008-04-24 Lg Electronics Inc. Encoding method and apparatus and decoding method and apparatus
CN101325681A (en) * 2008-07-25 2008-12-17 北京声迅电子有限公司 Method for storing AVS encoding file format for video recorder and video server
CN101477575A (en) * 2009-01-22 2009-07-08 中兴通讯股份有限公司 Multimedia information storing and playing method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1554094A (en) * 2001-09-10 2004-12-08 ��ķ��ɭ Extension of M3U file format to support user interface and navigation tasks in a digital audio player
CN1542624A (en) * 2003-04-29 2004-11-03 大唐移动通信设备有限公司 Method for quickening logic block mapping speed in Flash file system
WO2008048067A1 (en) * 2006-10-19 2008-04-24 Lg Electronics Inc. Encoding method and apparatus and decoding method and apparatus
CN101325681A (en) * 2008-07-25 2008-12-17 北京声迅电子有限公司 Method for storing AVS encoding file format for video recorder and video server
CN101477575A (en) * 2009-01-22 2009-07-08 中兴通讯股份有限公司 Multimedia information storing and playing method and apparatus

Also Published As

Publication number Publication date
CN105405457B (en) 2018-03-16

Similar Documents

Publication Publication Date Title
US7772998B2 (en) Method and apparatus for encoding/decoding metadata
CN101099210B (en) Storage medium storing metadata for providing enhanced search function
CN1784734B (en) Recording medium having data structure for managing to resume reproduction of video data recorded thereon, and recording and reproducing methods and apparatuses
US20050262149A1 (en) Method of and apparatus for reproducing downloaded data along with data recorded on storage medium
US7826713B2 (en) Storage medium storing multimedia data for reproduction of AV data and programming function, and reproducing apparatus and method thereof
EP1012753B1 (en) A computer implemented method of generating virtual files for sharing information of a physical information file
US9197908B2 (en) Method for file formation according to freeview AV service
CN101842840A (en) Recording medium, transcriber, pen recorder, reproducting method and recording method
US20160086636A1 (en) Subtitle processing device and associated method and subtitle parsing method
CN103402104A (en) Data structure, recording medium, playing device, playing method, and program
CN101770371A (en) Application theme content preview method and device
KR20010033912A (en) Signal processing on information files so as to obtain characteristic point information sequences
CN101937695B (en) Rich media business example playing method and file player
CN116436936B (en) Data storage system, method, storage medium and electronic equipment
CN105405457A (en) File content reading method and device
CN104768083B (en) A kind of video broadcasting method and device of chapters and sections content displaying
US11677929B2 (en) Apparatus and method for displaying multi-depth image
CN103503073B (en) Transcriber, reproducting method and integrated circuit
CN114495190B (en) Training method of face-changing network model, image face-changing method and related equipment
CN113852857A (en) Sound playing method and system based on HTML5 video frame stepping
CN105338417A (en) File navigation playing method and device
CN105338415A (en) File navigation playing method and device
CN104967899A (en) Method and device for multilevel display of omnimedia data
CN118695038A (en) Method and device for manufacturing operation guidance video and electronic equipment
KR20120097693A (en) Method and apparatus for generating and playing contents, and recorded medium for storing the contents

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211115

Address after: 100024 c1147, floor 1, No. 1063-1, Huihe South Street, Banbidian village, Gaobeidian Township, Chaoyang District, Beijing

Patentee after: Beijing Miaoshi Software Technology Co., Ltd

Address before: 100084 office b-521-b153, floor 5, building 2, courtyard 1, Nongda South Road, Haidian District, Beijing

Patentee before: Beijing Weidong Technology Co., Ltd