CN105405457B - File content read method and device - Google Patents
File content read method and device Download PDFInfo
- Publication number
- CN105405457B CN105405457B CN201510717761.3A CN201510717761A CN105405457B CN 105405457 B CN105405457 B CN 105405457B CN 201510717761 A CN201510717761 A CN 201510717761A CN 105405457 B CN105405457 B CN 105405457B
- Authority
- CN
- China
- Prior art keywords
- data
- data segment
- file
- address information
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B27/00—Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
- G11B27/10—Indexing; 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 embodiments of the invention provide a kind of file content read method and device, wherein method, including:Position to the end of the file;Wherein, the file includes:Positioned at main film data segment, the first data segment positioned at the end of file regular length, the second data segment and the multiple logical data sections of file beginning, the address information of second data segment is stored with first data segment, the address information of each logical data section is stored with second data segment;Read the address information of second data segment stored in first data segment;Address information according to second data segment reads the address information of each logical data section stored in second data segment;Address information according to each logical data section correspondingly reads the data stored in each logical data section, to carry out file content reading.By file content read schemes provided in an embodiment of the present invention, file content can quickly be read.
Description
Technical field
The present invention relates to file play-back technology field, more particularly to a kind of file content read method and device.
Background technology
MKV is a kind of Matroska media file, and Matroska is a kind of new multimedia encapsulation format, also referred to as more
Media container (Multimedia Container).MKV files can be by the not apposition of the video of a variety of different codings and more than 16
The audio of formula and the caption stream of different language are encapsulated among a Matroska Media file.The characteristics of MKV file maximums
Video, audio and the caption stream of a variety of different type codings can exactly be accommodated.
And as personalized broadcasting of the user to file needs, MKV extensions file has turned into what technical staff was studied
Focus.MKV extension files are the files that the format generated after multiple logical data sections is added on the basis of MKV.MKV expands
It is managed after exhibition file generated by corresponding server.When carrying out MKV extension file broadcastings, player can be by wired
Or server is wirelessly connected to, required file content is then read from server and is played out.
At present, player when being read out to file content, it is necessary to proceed by reading from first data segment of file
Take, then the data for being successively read and being stored in each logical data section that put in order according to each logical data section hereof, directly
Data playback is carried out again to after reading required data.Such as:Required data are located in the 5th data segment in file,
At present in data needed for reading, then need to read data since first data segment of file, be then successively read second,
Three, the 4th and the 5th data segments can just access required data.
It can be seen that existing file content read schemes, when being read out to file content, need to be traveled through where required data
Data segment before total data section take a substantial amount of time, the quick reading to file content can not be realized.Due to reading text
Need to take a substantial amount of time during part content, therefore, when between player and server by wireless connection and connection speed compared with
When slow, the fluency that file plays can not be ensured, influence the usage experience of user.
The content of the invention
In view of existing file content read schemes can not realize that problem is read in the fast reading to file content, it is proposed that this hair
It is bright to provide a kind of file content read method and device for overcoming above mentioned problem or solving the above problems at least in part.
According to one aspect of the present invention, there is provided a kind of file content read method, including:Position to the file
End;Wherein, the file includes:Positioned at the file beginning main film data segment, positioned at the end of file fix grow
The first data segment, the second data segment and the multiple logical data sections of degree, second number is stored with first data segment
According to the address information of section, the address information of each logical data section is stored with second data segment;Read first data
The address information of second data segment stored in section;Address information according to second data segment reads second number
According to the address information of each logical data section stored in section;Corresponding read of address information according to each logical data section is respectively patrolled
The data stored in data segment are collected, to carry out file content reading.
Alternatively, the address information of each logical data section stored in second data segment is arranged on address reference table
In, the address information according to second data segment reads the ground of each logical data section stored in second data segment
The step of location information, includes:Address information according to second data segment reads the address rope stored in second data segment
Draw table;The address information of each logical data section is obtained from the address reference table of reading.
Alternatively, the regular length of first data segment is the first setting value, and described read in first data is deposited
The step of address information of second data segment of storage, includes:Read away from the number in the range of set value of end of file first
According to obtaining the address information of second data segment from the data of reading.
Alternatively, the length of first data segment is 63 bytes.
Alternatively, the file is that MKV extends file;Each logical data section includes:Supplement and additional content data
Section, file identification data section, navigation user interface data section, navigation control data section, message stream data section and mark fluxion
According to section.
According to another aspect of the present invention, there is provided a kind of file content reading device, including:Locating module, it is used for
Position to the end of the file;Wherein, the file includes:Positioned at the file beginning main film data segment, positioned at institute
The first data segment, the second data segment and multiple logical data sections of end of file regular length are stated, in first data segment
The address information of second data segment is stored with, the address information of each logical data section is stored with second data segment;
First address information read module, for reading the address information of second data segment stored in first data segment;
Second address information read module, stored for being read according to the address information of second data segment in second data segment
Each logical data section address information;File read module, it is corresponding for the address information according to each logical data section
The data stored in each logical data section are read, to carry out file content reading.
Alternatively, the address information of each logical data section stored in second data segment is arranged on address reference table
In, the second address information read module includes:Table read module, for the address information reading according to second data segment
Take the address reference table stored in second data segment;Information reading module, for from the address reference table of reading
Obtain the address information of each logical data section.
Alternatively, the regular length of first data segment is the first setting value, the first address information read module
When reading the address information of second data segment stored in first data:Reading is set away from the end of file first
Data in the range of value, the address information of second data segment is obtained from the data of reading.
Alternatively, the length of first data segment is 63 bytes.
Alternatively, the file is that MKV extends file;Each logical data section includes:Supplement and additional content data
Section, file identification data section, navigation user interface data section, navigation control data section, message stream data section and mark fluxion
According to section.
Compared with prior art, the present invention has advantages below:
File content read schemes provided in an embodiment of the present invention, in the file progress comprising multiple logical data sections
Hold and read.Multiple logical data sections, main film data segment, the first data positioned at end of file regular length are provided with file
Section and the second data segment for being stored with each logical data sector address information.When carrying out file reading, the first number is first navigated to
The address information of the second data segment is obtained according to section, is then navigated to according to the address information got and is stored with each logical data section
Second data segment of address information, the address information of each logical number section is got under disconnected from the data, then, according to what is got
Address information can carry out fast positioning to logical data section and read required data, to realize the reading to file content.Can
See, file content read schemes provided in an embodiment of the present invention, can be directly targeted to according to the address information of logical data section
The data segment of required reading, need to be successively read each data segment up to reading from the first data segment of file compared to existing
File content read schemes untill required data segment, can lift the reading speed of file content, realize to file content
Quick reading.Due to the quick reading to file content can be realized, therefore, even connected between player and server
Wireless network network speed it is slow when, the smooth playing of file can also be realized.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention
Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 is a kind of step flow chart of according to embodiments of the present invention one file content read method;
Fig. 2 is a kind of step flow chart of according to embodiments of the present invention two file content read method;
Fig. 3 is a kind of structured flowchart of according to embodiments of the present invention three file content reading device;
Fig. 4 is a kind of structured flowchart of according to embodiments of the present invention four file content reading device.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Embodiment one
Reference picture 1, show a kind of step flow chart 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:Position to the end of file.
When reading file from server, position first to the end of file, so as to since the end field of file
Read data.
File to be read can be that the compatible MKV of SD standard extends file, can also be the compatible MKV of high definition standard
Extend file.Of course, it is possible to be the file of other appropriate formats, in the embodiment of the present invention, the form of file to be read is not made
Concrete restriction.
Step S104:Read the address information of the second data segment stored in the first data segment.
Wherein, file to be read includes:Positioned at file beginning main film data segment, positioned at end of file regular length
The first data segment, the second data segment and multiple logical data sections, and the ground of the second data segment is stored with the first data segment
Location information, the address information of each logical data section is stored with the second data segment.By the first data segment be arranged on end of file and
Regular length, it is read out when easily facilitating File Open.
It should be noted that the first data segment and the second data segment can be by art technologies during concrete application
Personnel are named according to the actual requirements, for example, be mark data section by the first numerical nomenclature, the second data segment is named as point
Cut information data section.
The logical data section included in file can be configured according to the actual requirements by those skilled in the art, the present invention
This is not specifically limited in embodiment.Such as:When file to be read is that the compatible MKV of SD standard extends file, text
The multiple logical data sections included in part are supplement and additional content data section, file identification data section, navigation user interface number
According to section, navigation control data section, message stream data section and mark flow data section.When file to be read is that high definition standard is compatible
MKV extension files when, the multiple logical data sections included in file are supplement and additional content data section, file identification data
Section, navigation user interface data section, navigation control data section, message stream data section, chapters and sections information data section and mark fluxion
According to section.
Step S106:According to each logical data section stored in address information the second data segment of reading of the second data segment
Address information.
It should be noted that the address information of each logical data section stored in the second data segment, can be with any appropriate
Form stored.Such as:The mark of the address information of each logical data section and each logical data section can be carried out one
One correspondence, is stored in address reference table;It is also possible that directly in sequence successively by the mark of each logical data section and its is right
The address information answered is stored in the second data segment.
Step S108:Address information according to each logical data section correspondingly reads the data stored in each logical data section,
To carry out file content reading.
It is determined that after the address information of each logical data section, you can read the data stored in each data segment according to address.
Such as:The data in fourth data section in pre-read file, according to common reading manner, are then successively read file
First, second, third and fourth data section can just read required data.And the embodiment of the present invention is used to provide
File content read method, it is only necessary to read last data segment, then therefrom get the address information of the second data segment,
The address information of each data segment is finally got by address information the second data segment of reading of the second data segment got, according to
The data stored in the 4th data segment can be directly read according to address information, without being successively read each number since the first data segment
According to the data stored in section, to realize the quick reading to file content.
By file content read method provided in an embodiment of the present invention, enter for the file comprising multiple logical data sections
Row content is read.Multiple logical data sections, main film data segment are provided with file and positioned at end of file regular length
First data segment and the second data segment for being stored with each logical data sector address information.When carrying out file reading, first position
The address information of the second data segment is obtained to the first data segment, then navigates to be stored with according to the address information got and respectively patrols
The second data segment of data segment address information is collected, gets the address information of each logical number section, then, foundation under disconnected from the data
The address information got can carry out fast positioning to logical data section and read required data, to realize to file content
Read.It can be seen that file content read method provided in an embodiment of the present invention, can according to logical data section address information it is direct
The data segment of reading needed for navigating to, compared to it is existing need from the first data segment of file be successively read each data segment up to
The file content read schemes untill required data segment are read, the reading speed of file content can be lifted, realized to text
The quick reading of part content.
Embodiment two
Reference picture 2, show a kind of step flow chart 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.
Illustrated in the embodiment of the present invention exemplified by carrying out content reading to VIDON files.It should be noted that this hair
The file content read method provided in bright embodiment is not limited to carry out content reading to VIDON files, applies also for it
It includes the contents extraction of the file of multiple logical data sections.Wherein, VIDON files are to be generated after being extended to MKV files
Another form file.VIDON is only the suffix name to the file of the specific format, during specific implementation, may be used also
So that MKV extension files to be named with other suffix names, this is not specifically limited in the embodiment of the present invention.
Player determines VIDON files to be read from VIDON file servers, then navigates to the end of this document
Content reading is carried out to this document.It is stored with multiple VIDON files in VIDON file servers, each VIDON files have pair
The title and/or mark answered.The main film and main film supplemental content of multi-section film, player are stored with VIDON files
When playing out, after main film to be played and/or main film supplemental content are determined in VIDON file servers, read
Played out into player.It should be noted that player can be any appropriate player that can play MKV files,
Such as:DVD Watch Box box players.Player can be handed over by wired or wireless network with file server
Mutually.
VIDON files in the embodiment of the present invention are on the basis of MKV file formats, after increasing multiple logical data sections
Generate the data segment of new form.VIDON files can be the compatible MKV extension files or SD mark of high definition standard
Accurate compatible MKV files.
Wherein, the file includes:Main film data segment positioned at file beginning, the positioned at end of file regular length
One data segment, the second data segment and multiple logical data sections, the address of the second data segment is stored with first data segment
Information, the address information of each logical data section is stored with the second data segment.
Each logical data section that MKV extension files include includes but is not limited to:Supplement and additional content data section, file
Mark data section, navigation user interface data section, navigation control data section, message stream data section and mark flow data section.And
And when MKV extension files are the compatible MKV files of high definition standard, logical data section also includes chapters and sections information data section.
The data stored in each logical data section for being included in file are illustrated separately below:
Multistage main film is stored with main film data segment, i.e., the data stored in the data segment are by video, audio and word
Curtain stream mixes, and is complete movie plot part.Main film data segment is arranged to the data segment positioned at file beginning, right
Even if it is not use navigation player method that file, which plays out, and use common MKV player methods can also be to main film number
Played in order is carried out according to the main film stored in section.It can be seen that both can be with by the way that main film data segment is arranged into first data segment
Meet that the broadcasting demand of file navigation can meet to be similar to the ordinary playing demand that MKV is played again.
In main film data segment, every section of main film is corresponding with more class audio frequencies, and multiclass captions, and audio categories can reach
16 kinds of national language, it is of course also possible to several conventional audio categories more can also be only set, it is also same for captions classification
Sample, the specific setting for audio categories, captions classification can be configured according to the actual requirements by those skilled in the art, this
This is not specifically limited in inventive embodiments.Moreover, each chapter that each main film includes also is included in main film data segment
The information of section, the specific chapters and sections of main film can be navigated to by chapters and sections information.Wherein, chapters and sections information identifies including chapters and sections, respectively
Initial time corresponding to chapters and sections and end time.
Be stored with multistage film supplemental content in supplement and additional content data section, the data stored in the segment data also by
Video, audio and caption stream mix, and are the contents such as some preview short-movies and menu background.
The address information of the second data segment is stored with first data segment.First data segment is arranged on end of file and setting
Compatibility of the file to MKV forms can both have been ensured into regular length, can have been reached again to the accurate of the first data segment in file
The purpose of positioning.
The address information of each logical data section hereof in file is stored with second data segment.
File identification is stored with file identification data section.The specific setting of file identification can be by those skilled in the art
Be configured according to the actual requirements in actual application, if can indicate file where it for specific format file i.e.
Can.Such as:VIDON files are identified with " MKUDVD ".
The data of generation navigation user interface are stored with navigation user interface data section, such as:Record user mutual shows
The position of each display elements when showing, start to show the information such as time.Navigation user circle that user is generated by these display elements
Face, which can be set, plays the contents such as audio categories, subtitle language classification and the specific chapters and sections needed during media stream data.
The navigation control program for controlling complete navigation playing process is stored with navigation control data section.
The information such as media stream data index mark, each section of media stream data duration are stored with message stream data section.Wherein,
Media stream data includes each section of main film storing in main film data segment and stored in supplement and additional content data section
Each section of film supplemental content.The information such as index mark, the duration of each section of main film are stored with message stream data section;Also deposit simultaneously
Contain the information such as index mark, the duration of each section of film supplemental content.
Category identifier table is stored with mark flow data section, is had in category identifier table for every section of main film record
The mark of main film, and the audio categories mark and captions classification logotype of corresponding different language.When user is used by navigating
Family interface selection main film, audio categories and during captions classification, can determine that by the category identifier table main film identify,
Audio categories identify and captions classification logotype, extract corresponding main film from main film data segment by these marks and enter
Row plays.
Stored in chapters and sections information data section in main film data segment the initial time of each chapters and sections in each main film for storing,
And terminate the time.
A kind of preferable storage mode is:The address information of each logical data section stored in second data segment is arranged on
In address reference table.In the embodiment of the present invention, entered exemplified by the address information of logical data section is arranged in address reference table
The follow-up explanation of row.
Step S204:Player reads the address information of the second data segment stored in the first data segment.
Wherein, when the length of the first data segment in file is configured, the first data segment, length can be set
Into the first setting value.Preferably, the first setting value is 63 bytes.First data segment is arranged to 63 byte longs, can both be met
Storage demand to the address information of the second data segment, the memory space of occupancy file that again can not be excessive.If first is set
Definite value is set excessive, although can also meet the storage demand of the address information to the second data segment, can take file
Effective memory space.If, can not although effective memory space of file can be saved by the too small of the first setting value setting
Meet the storage demand to the address information of the second data segment.
Certainly, the length of the first data segment is not limited to 63 bytes., can be by this area skill during specific implementation
Art personnel are configured according to the actual requirements, and the first data segment can be such as arranged to 70 bytes, 60 bytes, 55 bytes.
A kind of mode of the preferable address information for reading the second data segment stored in the first data segment is:Read away from text
Data in the range of set value of part end first, the address information of the second data segment is obtained from the data of reading.
Such as:The regular length of first data segment is 63 bytes, the second data segment stored in the first data segment is read
Address information when, navigate to the end of file, read the data for reading 63 bytes forward from end of file, you can obtain
The address information of two data segments.
Step S206: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 second data segment can be set according to the actual requirements by those skilled in the art
Put, this is not specifically limited in the embodiment of the present invention.Such as:The address information of second data segment can be the second data segment
Start position information and end position information, or the identification information of the second data segment and the start bit of the data segment
Confidence ceases.
Wherein, the length of the second data segment can be configured according to the actual requirements by those skilled in the art, the present invention
Embodiment is not specifically limited to this.Such as the length of the second data segment is increased with the increase of logical data segment number, with
The reduction of logical data segment number reduces the length of the second data segment.
Step S208:Player obtains the address information of each logical data section from the address reference table of reading.
, can be by this area skill for specific storage form of the address information in address reference table of each logical data section
Art personnel are configured according to the actual requirements, and this is not specifically limited in the embodiment of the present invention.Such as:In address reference table
The mark of logical segment is corresponded with address information and stored.
Step S210:Player correspondingly reads what is stored in each logical data section according to the address information of each logical data section
Data, to carry out file content reading.
Player is after the address information of each logical data section in getting file, you can according to address information specific aim
Navigate to logical data section, read the data stored in logical data section.
Such as:Need to carry out file navigation broadcasting, then need after the address information of each logical data section is got, first
Navigate to navigation control data section and read navigation control data;Secondly, according to the specific Navigation Control journey in navigation control data
Sequence determines need which logical data section obtained;Then logical data section is correspondingly read by the address information of logical data section again
The data of middle storage.Again for example:Mended when opening file, it is necessary to obtain the film stored in supplement and additional content data section first
Content is filled, then after the address information of each logical data section is got, it is determined that address corresponding to supplement and additional content data section
Information, and the data segment is positioned according to the address information and carries out digital independent.
By file content read method provided in an embodiment of the present invention, enter for the file comprising multiple logical data sections
Row content is read.Multiple logical data sections, main film data segment are provided with file and positioned at end of file regular length
First data segment and the second data segment for being stored with each logical data sector address information.When carrying out file reading, first position
The address information of the second data segment is obtained to the first data segment, then navigates to be stored with according to the address information got and respectively patrols
The second data segment of data segment address information is collected, gets the address information of each logical number section, then, foundation under disconnected from the data
The address information got can carry out fast positioning to logical data section and read required data, to realize to file content
Read.It can be seen that file content read method provided in an embodiment of the present invention, can according to logical data section address information it is direct
The data segment of reading needed for navigating to, compared to it is existing need from the first data segment of file be successively read each data segment up to
The file content read schemes untill required data segment are read, the reading speed of file content can be lifted, realized to text
The quick reading of part content.
The file content read method of the embodiment of the present invention is illustrated with an instantiation below:
Assuming that Vidon files include data below section:Main film data segment-the data segment of trailer 1 is (in supplementing and being extra
Holding data segment 1) 2 data segment of-trailer (i.e. supplement and additional content data section 1)-Navigation UI data segments (navigate
User interface data section)-Navigation Control data segments (navigation control data section).
Existing way does not establish each data segment address concordance list.Simply data storage section content successively in order, and
Set and identify in each data segment starting position.When navigating played file, read, read from first data segment order for the first time
To five, ground data segment, the content stored in Navigation Control data segments can be read and obtain Navigation Control journey
Sequence;Assuming that the Navigator set in navigation control program first to play trailer 2, then shows that UI navigates user interface,
So when carrying out file navigation, then second of reading file is needed, the 3rd data segment is read from first data segment order
Trailer 2 is got to play out;When showing UI on request, then third time is needed to read file, it is suitable since the first data
Sequence reads fourth data section, reads UI generation data generation UI and shows.From the beginning read it can be seen that this process needs are repeated multiple times
Take file.
In this instantiation, the first data segment of regular length is set in Vidon end of file, also, in the first data
Address reference table is established in section, then the address information of each logical data section in Vidon files is stored in address reference table.
That is, the Vidon files in the embodiment of the present invention include data below section:Main film data segment-the data segment of trailer 1
(i.e. supplement and additional content data section 1)-trailer 2 data segment (i.e. supplement and additional content data section 1)-Navigation
UI data segments (user interface data section of navigating)-Navigation Control data segments (navigation control data section)-the second
The data segment of data segment-the first.
When navigating played file, the first data segment of Vidon end of file is read first, is obtained from the first data segment
The address information of second data segment, according to each data segment stored in address information the second data segment of acquisition of the second data segment
Address information;It is then determined that the address information of Navigation Control data segments, it is fixed to be obtained according to the address information determined
The content stored in Navigation Control data segments is to obtain navigation control program.Still assume in navigation control program
Then the Navigator set shows that UI navigates user interface first to play trailer 2, then when carrying out file navigation,
Address information corresponding to trailer 2 is then first determined, it is pre- that the data progress stored in trailer 2 is read according to the address information determined
Accuse the broadcasting of piece 2;Then, it is determined that the address information of Navigation UI data segments, reads according to the address information determined
The generation UI stored under Navigation UI data segments data, generation UI are shown.It can be seen that the embodiment of the present invention provides
File content read method, can avoid repeatedly since file read file cumbersome process, only once read rope
Draw table content, be known that the positional information of total data section, can be by address in the content stored in needing some data segment
The data that quick indexing speed positioning to corresponding data segment reads storage carry out file content extraction, can realize to file content
Quick reading.
Embodiment three
Reference picture 3, show a kind of structured flowchart 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 includes:Locating module 302, for positioning to the end of the file
Tail;Wherein, the file includes:Positioned at the file beginning main film data segment, positioned at the end of file regular length
The first data segment, the second data segment and multiple logical data sections, be stored with second data in first data segment
The address information of section, the address information of each logical data section is stored with second data segment;First address information reads mould
Block 304, for reading the address information of second data segment stored in first data segment;Second address information is read
Module 306, each logical data stored in second data segment is read for the address information according to second data segment
The address information of section;File read module 308, for correspondingly reading each logic according to the address information of each logical data section
The data stored in data segment, to carry out file content reading.
By file content reading device provided in an embodiment of the present invention, enter for the file comprising multiple logical data sections
Row content is read.Multiple logical data sections, main film data segment are provided with file and positioned at end of file regular length
First data segment and the second data segment for being stored with each logical data sector address information.When carrying out file reading, first position
The address information of the second data segment is obtained to the first data segment, then navigates to be stored with according to the address information got and respectively patrols
The second data segment of data segment address information is collected, gets the address information of each logical number section, then, foundation under disconnected from the data
The address information got can carry out fast positioning to logical data section and read required data, to realize to file content
Read.It can be seen that file content reading device provided in an embodiment of the present invention, can according to logical data section address information it is direct
The data segment of reading needed for navigating to, compared to it is existing need from the first data segment of file be successively read each data segment up to
The file content read schemes untill required data segment are read, the reading speed of file content can be lifted, realized to text
The quick reading of part content.
Example IV
Reference picture 4, show a kind of structured flowchart 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 to enter one to the file content reading device in embodiment three
Step optimization, file Content reading apparatus includes after optimization:Locating module 402, for positioning to the end of the file;Wherein,
The file includes:Positioned at the file beginning main film data segment, the first data segment positioned at the end of file and
Multiple logical data sections, the address information of second data segment, second data segment are stored with first data segment
In be stored with the address information of each logical data section;First address information read module 404, for reading first data segment
The address information of second data segment of middle storage;Second address information read module 406, for according to second data
The address information of section reads the address information of each logical data section stored in second data segment;File read module 408,
For correspondingly reading the data stored in each logical data section according to the address information of each logical data section, to carry out file
Content is read.
Preferably, the address information of each logical data section stored in second data segment is arranged on address reference table
In, the second address information read module 406 includes:Table read module 4062, for the ground according to second data segment
Location information reads the address reference table stored in second data segment;Information reading module 4064, for from described in reading
The address information of each logical data section is obtained in address reference table.
Preferably, the first setting value of the first data segment length, the first address information read module 404 read described
During the address information of second data segment stored in the first data:Read away from the range of set value of end of file first
Data, the address information of second data segment is obtained from the segment data of reading.
Preferably, the length of first data segment is 63 bytes.
Preferably, the file is that MKV extends file;Each logical data section includes:Supplement and additional content data
Section, file identification data section, navigation user interface data section, navigation control data section, message stream data section and mark fluxion
According to section.
The file content reading device of the embodiment of the present invention is used to realize corresponding file content in previous embodiment one, two
Read method, and there is beneficial effect corresponding with embodiment of the method, it will not be repeated here.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is related
Part illustrates referring to the part of embodiment of the method.
File content read schemes are not intrinsic with any certain computer, virtual system or miscellaneous equipment provided herein
It is related.Various general-purpose systems can also be used together with teaching based on this.As described above, construction has the present invention
Structure required by the system of scheme is obvious.In addition, the present invention is not also directed to any certain programmed language.Should be bright
In vain, various programming languages can be utilized to realize the content of invention described herein, and that is done above to language-specific retouches
State is to disclose the preferred forms of the present invention.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as right
As claim reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows tool
Thus claims of body embodiment are expressly incorporated in the embodiment, wherein the conduct of each claim in itself
The separate embodiments of the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any
Mode it can use in any combination.
The all parts embodiment of the present invention can be realized with hardware, or to be run on one or more processor
Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice
Microprocessor or digital signal processor (DSP) realize one in file content read schemes according to embodiments of the present invention
The some or all functions of a little or whole parts.The present invention is also implemented as performing method as described herein
Some or all equipment or program of device (for example, computer program and computer program product).Such realization
The program of the present invention can store on a computer-readable medium, or can have the form of one or more signal.This
The signal of sample can be downloaded from internet website and obtained, and either provided on carrier signal or carried in the form of any other
For.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real
It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
Claims (10)
- A kind of 1. file content read method, it is characterised in that including:Position to the end of the file;Wherein, the file includes:Main film data segment, position positioned at file beginning In the first data segment of the end of file regular length, the second data segment and multiple logical data sections, first data The address information of second data segment is stored with section, the address letter of each logical data section is stored with second data segment Breath;Read the address information of second data segment stored in first data segment;Address information according to second data segment reads the address of each logical data section stored in second data segment Information;Address information according to each logical data section correspondingly reads the data stored in each logical data section, to carry out file Content is read.
- 2. according to the method for claim 1, it is characterised in that each logical data section stored in second data segment Address information is arranged in address reference table, and the address information according to second data segment reads second data segment The step of address information of each logical data section of middle storage, includes:Address information according to second data segment reads the address reference table stored in second data segment;The address information of each logical data section is obtained from the address reference table of reading.
- 3. according to the method for claim 2, it is characterised in that the regular length of first data segment is the first setting Value, it is described read second data segment stored in first data address information the step of include:Read away from the data in the range of set value of end of file first, second data segment is obtained from the data of reading Address information.
- 4. according to the method for claim 3, it is characterised in that the length of first data segment is 63 bytes.
- 5. according to the method described in claim any one of 1-4, it is characterised in that the file is that MKV extends file;Each logical data section includes:Supplement and additional content data section, file identification data section, navigation user interface data Section, navigation control data section, message stream data section and mark flow data section.
- A kind of 6. file content reading device, it is characterised in that including:Locating module, for positioning to the end of the file;Wherein, the file includes:Positioned at the master of file beginning Cinematic data section, the first data segment positioned at the end of file regular length, the second data segment and multiple logical data sections, The address information of second data segment is stored with first data segment, each logical number is stored with second data segment According to the address information of section;First address information read module, the address for reading second data segment stored in first data segment are believed Breath;Second address information read module, read for the address information according to second data segment in second data segment The address information of each logical data section of storage;File read module, stored for correspondingly being read in each logical data section according to the address information of each logical data section Data, to carry out file content reading.
- 7. device according to claim 6, it is characterised in that each logical data section stored in second data segment Address information is arranged in address reference table, and the second address information read module includes:Table read module, the address stored in second data segment is read for the address information according to second data segment Concordance list;Information reading module, for obtaining the address information of each logical data section from the address reference table of reading.
- 8. device according to claim 7, it is characterised in that the regular length of first data segment is the first setting Value, the first address information read module read the address information of second data segment stored in first data When:Read away from the data in the range of set value of end of file first, second data segment is obtained from the data of reading Address information.
- 9. device according to claim 8, it is characterised in that the length of first data segment is 63 bytes.
- 10. according to the device described in claim any one of 6-9, it is characterised in that the file is that MKV extends file;Each logical data section includes:Supplement and additional content data section, file identification data section, navigation user interface data Section, navigation control data section, message stream data section and mark flow data section.
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 CN105405457A (en) | 2016-03-16 |
CN105405457B true 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)
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 |
-
2015
- 2015-10-29 CN CN201510717761.3A patent/CN105405457B/en active Active
Patent Citations (5)
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 |
---|---|
CN105405457A (en) | 2016-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
ES2394330T3 (en) | Apparatus and method for reproducing a storage medium that stores metadata to provide an enhanced search function | |
CN101299345B (en) | Reproduction device, reproduction method, and program | |
EP1834330B1 (en) | Storage medium storing metadata for providing enhanced search function | |
US20050262149A1 (en) | Method of and apparatus for reproducing downloaded data along with data recorded on storage medium | |
CN105765657A (en) | Recording medium, playback device, and playback method | |
US20070217305A1 (en) | Method for configuring composite file structure for data reproduction, and method and apparatus for reproducing data using the composite file structure | |
US20160086636A1 (en) | Subtitle processing device and associated method and subtitle parsing method | |
CN101373624B (en) | Apparatus and method for converting information | |
CN106463150A (en) | Recording medium, playback method, and playback device | |
MX2011001760A (en) | Information processing device, information processing method, playback device, playback method, and program. | |
CN1918649A (en) | Recording medium and method and apparatus for decoding text subtitle streams | |
US7826713B2 (en) | Storage medium storing multimedia data for reproduction of AV data and programming function, and reproducing apparatus and method thereof | |
WO2004077417A1 (en) | Recording medium having data structure for managing random/shuffle reproduction of video data recorded thereon and recording and reproducing methods and apparatuses | |
CN105405457B (en) | File content read method and device | |
CN104768083B (en) | A kind of video broadcasting method and device of chapters and sections content displaying | |
US8229278B2 (en) | Portfolios in disc authoring | |
CN103503073B (en) | Transcriber, reproducting method and integrated circuit | |
CN106463149A (en) | Recording medium, reproduction method, and reproduction device | |
KR101684577B1 (en) | Method of providing tag-based list of content and apparatus for the same | |
EP1702332B1 (en) | Method and apparatus for generating an electronic menu | |
EP1879187A2 (en) | Recording medium having a data structure for managing reproduction of data streams recorded thereon and recording and reporducing methods and apparatuses | |
CN104902342A (en) | Scene frame based system and method for locating video | |
CN105338417B (en) | file navigation playing method and device | |
KR101715966B1 (en) | Apparatus and method for providing contents using image | |
CN101256566A (en) | Multimedia system framework having layer consolidating access to multiple media devices |
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 |
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 |
|
TR01 | Transfer of patent right |