Multimedia resource playback method and device
Technical field
This disclosure relates to field of computer technology more particularly to a kind of multimedia resource playback method and device.
Background technology
Continuous with terminal device is popularized, to the broadcasting demand of various multimedia resources (such as high definition/super clear video)
More and more, the broadcasting experience of multimedia resource is increasingly taken seriously.In the related art, when playing multimedia resource, lead to
The often direct play-on-demand file address of meeting calling system component or live TV stream address, may download the data of a part of redundancy,
For example, in the video definition of switching multi-media resource, meeting redundancy downloads the audio data in multimedia resource file;It is cutting
When changing the language form of audio, meeting redundancy downloads the video data in multimedia resource file.The download of these redundancies may increase
Add the stand-by period of user, and consume additional customer flow and CDN bandwidth, user experience is caused to be deteriorated.
Invention content
In view of this, the present disclosure proposes a kind of multimedia resource playback method and device, avoids downloading redundant data, carry
Rise user experience.
According to the one side of the disclosure, a kind of multimedia resource playback method is provided, the method includes:It obtains and the
The data of relevant first index file of the multimedia resource of one video type and the first audio types, first video type
The data slot of segment and first audio types;Based on first index file, to first video type
Data slot and the data slot of first audio types are parsed and are sorted respectively, and the first video data and the are obtained
One audio data;Play first video data and first audio data.
According to another aspect of the present disclosure, a kind of multimedia resource playing device is provided, described device includes:First money
Source acquisition module, for obtaining and the relevant first index text of the multimedia resource of the first video type and the first audio types
The data slot of part, the data slot of first video type and first audio types;
First data acquisition module, for being based on first index file, to the data slice of first video type
The data slot of section and first audio types is parsed and is sorted respectively, and the first video data and the first audio are obtained
Data;
First data playing module, for playing first video data and first audio data.
According to another aspect of the present disclosure, a kind of multimedia resource playing device is provided, described device includes:Processing
Device;Memory for storing processor-executable instruction;
Wherein, the processor is configured as:Obtain the multimedia resource with the first video type and the first audio types
The data slot of relevant first index file, the data slot of first video type and first audio types;
Based on first index file, the data slice of data slot and first audio types to first video type
Section is parsed and is sorted respectively, and the first video data and the first audio data are obtained;Play first video data and institute
State the first audio data.
According to another aspect of the present disclosure, a kind of non-volatile computer readable storage medium storing program for executing is provided, when the storage
When instruction in medium is executed by the processor of terminal and/or server so that terminal and/or server are able to carry out above-mentioned more
Media resource plays method, the method includes:Obtain the multimedia resource phase with the first video type and the first audio types
The first index file, the data slot of first video type and the data slot of first audio types closed;Base
In first index file, the data slot of data slot and first audio types to first video type
It is parsed and is sorted respectively, obtain the first video data and the first audio data;Play first video data and described
First audio data.
According to the multimedia resource playback method and device of the embodiment of the present disclosure, can be based on and the first video type and the
The data slot and the first audio class of relevant the first video type of first index file pair of multimedia resource of one audio types
The data slot of type is parsed and is sorted respectively, the first video data and the first audio data is obtained and play, to avoid
Redundant data is downloaded, user experience is promoted.
According to below with reference to the accompanying drawings to detailed description of illustrative embodiments, the other feature and aspect of the disclosure will become
It is clear.
Description of the drawings
Including in the description and the attached drawing of a part for constitution instruction and specification together illustrate the disclosure
Exemplary embodiment, feature and aspect, and for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.
Fig. 2 is the flow of the step S103 of multimedia resource playback method shown according to an exemplary embodiment a kind of
Figure.
Fig. 3 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.
Fig. 4 is the flow of the step S104 of multimedia resource playback method shown according to an exemplary embodiment a kind of
Figure.
Fig. 5 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.
Fig. 6 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.
Fig. 7 is the flow of the step S109 of multimedia resource playback method shown according to an exemplary embodiment a kind of
Figure.
Fig. 8 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.
Fig. 9 is a kind of block diagram of multimedia resource playing device shown according to an exemplary embodiment.
Figure 10 is a kind of block diagram of multimedia resource playing device shown according to an exemplary embodiment.
Figure 11 is a kind of block diagram of multimedia resource playing device shown according to an exemplary embodiment.
Specific implementation mode
Various exemplary embodiments, feature and the aspect of the disclosure are described in detail below with reference to attached drawing.It is identical in attached drawing
Reference numeral indicate functionally the same or similar element.Although the various aspects of embodiment are shown in the accompanying drawings, remove
It non-specifically points out, it is not necessary to attached drawing drawn to scale.
Dedicated word " exemplary " means " being used as example, embodiment or illustrative " herein.Here as " exemplary "
Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
In addition, in order to better illustrate the disclosure, numerous details is given in specific implementation mode below.
It will be appreciated by those skilled in the art that without certain details, the disclosure can equally be implemented.In some instances, for
Method, means, element and circuit well known to those skilled in the art are not described in detail, in order to highlight the purport of the disclosure.
Embodiment 1
Fig. 1 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.This method can
Applied in terminal device (such as smart mobile phone).As shown in Figure 1, according to the multimedia resource playback method of the embodiment of the present disclosure
Including:
Step S101 is obtained and the relevant first index text of the multimedia resource of the first video type and the first audio types
The data slot of part, the data slot of first video type and first audio types;
Step S102, is based on first index file, data slot to first video type and described the
The data slot of one audio types is parsed and is sorted respectively, and the first video data and the first audio data are obtained;
Step S103 plays first video data and first audio data.
It in accordance with an embodiment of the present disclosure can be based on the multimedia resource phase with the first video type and the first audio types
The data slot of first the first video type of index file pair and the data slot of the first audio types closed parses respectively
And sequence, the first video data and the first audio data are obtained and played, to avoid downloading redundant data, promotes user's body
It tests.
For example, when playing multimedia resource (such as video resource) in the related art, it will usually be provided to multimedia
Source file carries out physical segment, such as video resource is cut into 5 minutes one clip files.In playing process, under each
A clip file is carried to play out, currently playing clip file soon at the end of, download next clip file and continue
It plays.Whole fragment file can be downloaded every time under this traditional broadcast mode, it, can including all data of video resource
The redundancy of data can be caused to download.
In one possible implementation, can by authoring tool by existing multimedia resource file (such as regarding
Frequency file) video data segment of different clarity and the audio data fragment of different language are cut into batches and corresponding are regarded
Frequency and audio index file (such as tag index files).For specific video type and audio types (such as the first video class
Type is HD video, and the first audio types are Chinese), the multimedia with the first video type and the first audio types can be generated
Relevant first index file of resource.The video tag and of the first video type can be recorded in first index file respectively
The information such as the timestamp sequence of the byte initial position of the audio tag of one audio types, byte length and tag byte packets.Its
In, the first index file can be relevant multiple with the multimedia resource of the first video type and the first audio types respectively
Tag index files, can also be and meanwhile with the relevant tag of the multimedia resource of the first video type and the first audio types
Index file.Wherein, authoring tool can be according to disclosed various lattice to the parsing and cutting of existing multimedia resource file
Formula specification technique (such as flv, mp4 format specification) realizes that the disclosure is not restricted this.
In one possible implementation, the play mode of client can be set to data playing mode.With
When the multimedia resource of family the first video type of broadcasting and the first audio types, it can download and the first video type and the first sound
Relevant first index file of multimedia resource (tag index files) of frequency type.According to the information (example in the first index file
The data slot range setting of such as multimedia resource and index record), it can initiate that breakpoint is continuous to turn to ask (such as http simultaneously
206 requests), download the first currently playing video type (such as video code rate be high definition) and the first audio types (such as sound
Frequency language be Chinese) data slot.The data volume to be loaded can be preset, and data volume is carried out according to actual conditions
Adjustment.Wherein, the first video type and the first audio types can indicate the currently playing video type and audio types of user.
It in one possible implementation, can be to the data of the first video type and the first audio types downloaded
Segment carries out real time parsing, obtains the tag byte packets in data slot.According to information (such as the video in the first index file
The byte initial position of tag and audio tag, the timestamp sequence etc. of byte length and tag byte packets), it can be to data slice
Tag packets in section are spliced and are sorted, and the first video data and the first audio data after parsing and sequence are obtained.Example
Such as, the flv bytes of download can be analyzed and is sorted, tag flow datas (are lined up by the continuity of flv tag timestamps
One video data and the first audio data).It is then possible to by the first video data and the first audio data be supplied to player into
Row plays.Wherein, the various conventional players of client may be used in player, and the disclosure is not restricted this.
In this way, the least unit byte of the data slot of video file can be operated, it can be thinner
It causes the data area that ground control is loaded into and parsing splicing is carried out to video byte, improve treatment effeciency.
Fig. 2 is the flow of the step S103 of multimedia resource playback method shown according to an exemplary embodiment a kind of
Figure.As shown in Fig. 2, in one possible implementation, step S103 includes:
Step S1031, will be in first video data and first audio data storage to the first spatial cache;
Step S1032 plays first video data in first spatial cache and first audio data.
For example, it is solved respectively to the data slot of the first video type and the data slot of the first audio types
After analysis and sequence, the first video data after parsing and sequence and the first audio data can be obtained.It can be by the first video
In data and the storage to the first spatial cache of the first audio data, wherein the first spatial cache can be that tag flows buffer area, by
In byte arrays configurable size, therefore the storage object of memory range can be controlled according to the information in the first index file,
The deposit data byte (the first video data and the first audio data) as unit of flv tag that temporally stamp sorts, and can
To control all tag byte packets first in first out within the scope of the restriction of the first spatial cache.When the first spatial cache is close to completely
When storehouse, first key frame tag to second key frame in the first video data and/or the first audio data can be deleted
Tag data bytes between tag, or delete the tag data words between first key frame tag to n-th key frame tag
Section, wherein n indicates the quantity of key frame tag to be deleted.
In one possible implementation, for the first video data and the first audio number in the first spatial cache
According to the first video data and the first audio number can be taken out successively according to the sequence of the first video data and the first audio data
According to tag byte packets be supplied to player plays.
In this way, the first video data and the first audio data can be stored in the first spatial cache, in turn
Player plays are supplied to, ensure that the fluency that user plays, promote user experience.
Fig. 3 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.Such as Fig. 3 institutes
Show, in one possible implementation, the method further includes:
Step S104 stops in the case where receiving the video switching signal for the second video type described in acquisition
The data slot of first video type obtains the multimedia resource phase with second video type and first audio types
The data slot of the second index file and second video type that close;
Step S105, be based on second index file, to the data slot of second video type carry out parsing and
Sequence obtains the second video data;
Step S106 plays second video data and first audio data.
For example, in playing process, if the video switching signal for the second video type is received, such as with
Householder is dynamic to be switched to super clear (the second video type) by the clarity of video from high definition (the first video type), or different
Adjust automatically (switching) clarity under network condition can then stop the data slot for obtaining the first video type, and keep obtaining
Take the first audio data.Meanwhile it can obtain and the multimedia resource of the second video type and the first audio types relevant
Two index files.
In one possible implementation, if user played the multimedia resource of the second video type before,
Second index file then can be directly searched on the terminal device;If user did not played being somebody's turn to do for the second video type before
Multimedia resource can then download the second index file.The second video type can be recorded in second index file respectively
The byte initial position of video tag and the audio tag of the first audio types, byte length and tag byte packets timestamp sequence
The information such as row.Wherein, the second index file can be the multimedia resource with the second video type and the first audio types respectively
Relevant multiple tag index files, can also be and meanwhile with the multimedia resource phase of the second video type and the first audio types
The tag index file closed.
In one possible implementation, according to information (such as the data of multimedia resource in the second index file
Segment ranges setting and index record etc.), continuous turn of request (such as http206 is asked) of breakpoint can be initiated, the second video is downloaded
The data slot of type (such as video code rate is super clear).The the second video type data segment downloaded is solved in real time
Analysis obtains the tag byte packets in data slot.Also, according to information (such as the byte of video tag in the second index file
Timestamp sequence of initial position, byte length and tag byte packets etc.), the tag packets in data slot can be spliced
And sequence, obtain the second video data after parsing and sequence.Replacement first can temporally be stabbed with the second video data to regard
Second video data and the first audio data are supplied to player to play out by frequency evidence.
In this way, can when the video of multimedia resource switches only foradownloaded video data, it is superfluous to avoid data
Remainder carries, and reduces data traffic consumption, promotes user experience.
Fig. 4 is the flow of the step S104 of multimedia resource playback method shown according to an exemplary embodiment a kind of
Figure.As shown in figure 4, in one possible implementation, step S104 includes:
Step S1041 is obtained relevant with the multimedia resource of second video type and first audio types
Second index file;
Step S1042 is based on second index file, obtains after current point in time, and and current point in time
Time interval be greater than or equal to first time threshold second video type data slot.
For example, when being switched over to video type, the first video data and the first audio data can first be kept
Broadcasting.When getting the second index file, based on the information in the second index file, such as the video of the second video type
The information such as the timestamp sequence of the byte initial position of tag, byte length and tag byte packets, can initiate that breakpoint is continuous to be turned to ask
(such as http 206 is asked) is asked, acquisition is more than or waits after current point in time, and with the time interval of current point in time
In the data slot of the second video type of first time threshold.The first time threshold can be preset time threshold
Value, such as first time threshold can be set to 3 seconds.
In one possible implementation, it can will get after current point in time, and and current time
The data slot that the time interval of point is greater than or equal to the second video type of first time threshold is parsed and is sorted, and is obtained
Second video data.For example, the timestamp of the first video data and the first audio data corresponding to current point in time is 00:
37:30, when first time threshold is set as 3 seconds, it is 00 that can obtain corresponding timestamp:37:33 the second later videos
The data slot of type, and then it is 00 to obtain corresponding timestamp:37:33 the second later video datas.Again by the second video
Data are spliced to after the first currently playing video data.In this way, when reproduction time reaches first time threshold, it can be certainly
It is dynamic to be switched to the second video data of broadcasting by playing the first video data, realize smooth switching.
In this way, downloaded video data can be reduced when the video of multimedia resource switches, and is avoided
Redundancy downloads audio data, and reduction data traffic, which is consumed and realized, to be taken over seamlessly, and user experience is promoted.
Fig. 5 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.Such as Fig. 5 institutes
Show, in one possible implementation, the method further includes:
Step S104 stops in the case where receiving the video switching signal for the second video type described in acquisition
The data slot of first video type obtains the multimedia resource phase with second video type and first audio types
The data slot of the second index file and second video type that close;
Step S105, be based on second index file, to the data slot of second video type carry out parsing and
Sequence obtains the second video data;
Step S107, by first spatial cache after current point in time, and with the time of current point in time
Interval replaces with second video data more than or equal to first video data of first time threshold;
Step S108 plays second video data in first spatial cache and first audio data.
It for example,, can be with if receiving the video switching signal for the second video type in playing process
Stop obtaining the data slot of the first video type, and keeps obtaining the first audio data, meanwhile, it can obtain and the second video
Relevant second index file of the multimedia resource of type and the first audio types.It is downloaded based on the information in the second index file
The data slot of second video type, and the second video type data segment to being downloaded carries out real time parsing and sequence, obtains
Take the second video data.
In one possible implementation, can according to the sequence of timestamp, by the first spatial cache when current
Between put after, and with the time interval of current point in time be greater than or equal to first time threshold the first video data tag
Byte packet replaces with the tag byte packets of the second video data, is available to player and plays out.In this way, being reached in reproduction time
When to first time threshold, can it be switched to the second video data of broadcasting by playing the first video data automatically, realized smooth
Switching.The first time threshold can be preset time threshold, such as can set first time threshold to 3 seconds.
In this way, data replacement can be carried out in the first spatial cache, reduce the download of data and guarantee
The fluency of broadcasting promotes user experience.
Fig. 6 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.Such as Fig. 6 institutes
Show, in one possible implementation, the method further includes:
Step S109 stops in the case where receiving the Audio conversion signal for the second audio types described in acquisition
The data slot of first audio types obtains the multimedia resource phase with first video type and second audio types
The data slot of the third index file of pass and second audio types;
Step S110, be based on the third index file, to the data slot of second audio types carry out parsing and
Sequence obtains second audio data;
Step S111 plays first video data and the second audio data.
For example, in playing process, if the Audio conversion signal for the second audio types is received, such as with
The dynamic voice by audio of householder is switched to English (the second audio types) from Chinese (the first audio types), then can stop obtaining
The data slot of first audio types, and keep obtaining the first video data.Meanwhile it can obtain and the first video type and
The relevant third index file of multimedia resource of two audio types.
In one possible implementation, if user played the multimedia resource of the second audio types before,
The third index file then can be directly searched on the terminal device;If user did not played being somebody's turn to do for the second audio types before
Multimedia resource can then download third index file.The first video type can be recorded in third index file respectively
The byte initial position of video tag and the audio tag of the second audio types, byte length and tag byte packets timestamp sequence
The information such as row.Wherein, third index file can be the multimedia resource with the first video type and the second audio types respectively
Relevant multiple tag index files, can also be and meanwhile with the multimedia resource phase of the first video type and the second audio types
The tag index file closed.
In one possible implementation, according to information (such as the data of multimedia resource in third index file
Segment ranges setting and index record etc.), continuous turn of request (such as http206 is asked) of breakpoint can be initiated, the second audio is downloaded
The data slot of type (such as the voice of audio is English).The the second audio type data segment downloaded is solved in real time
Analysis obtains the tag byte packets in data slot.Also, according to information (such as the byte of audio tag in third index file
Timestamp sequence of initial position, byte length and tag byte packets etc.), the tag packets in data slot can be spliced
And sequence, obtain the second audio data after parsing and sequence.It can temporally be stabbed with second audio data and replace the first sound
First video data and second audio data are supplied to player to play out by frequency evidence.
In this way, audio data can be only downloaded in the Audio conversion of multimedia resource, it is superfluous avoids data
Remainder carries, and reduces data traffic consumption, promotes user experience.
Fig. 7 is the flow of the step S109 of multimedia resource playback method shown according to an exemplary embodiment a kind of
Figure.As shown in fig. 7, in one possible implementation, step S109 includes:
Step S1091 is obtained relevant with the multimedia resource of first video type and second audio types
Third index file;
Step S1092 is based on the third index file, obtains after current point in time, and and current point in time
Time interval be greater than or equal to second time threshold second audio types data slot.
For example, when being switched over to audio types, the first video data and the first audio data can first be kept
Broadcasting.When getting third index file, based on the information in third index file, such as the audio of the second audio types
The information such as the timestamp sequence of the byte initial position of tag, byte length and tag byte packets, can initiate that breakpoint is continuous to be turned to ask
(such as http 206 is asked) is asked, acquisition is more than or waits after current point in time, and with the time interval of current point in time
In the data slot of the second audio types of second time threshold.The second time threshold can be preset time threshold
Value, such as second time threshold can be set to 1 second.
In one possible implementation, it can will get after current point in time, and and current time
The data slot that the time interval of point is greater than or equal to the second audio types of second time threshold is parsed and is sorted, and is obtained
Second audio data.For example, the timestamp of the first video data and the first audio data corresponding to current point in time is 00:
37:30, when second time threshold is set as 1 second, it is 00 that can obtain corresponding timestamp:37:31 the second later audios
The data slot of type, and then it is 00 to obtain corresponding timestamp:37:31 later second audio datas.Again by the second audio
Data are spliced to after the first currently playing audio data.In this way, when reproduction time reaches second time threshold, it can be certainly
It is dynamic to be switched to broadcasting second audio data by playing the first audio data, realize smooth switching.
In this way, downloaded audio data can be reduced in the Audio conversion of multimedia resource, and is avoided
Redundancy foradownloaded video data, reduction data traffic, which is consumed and realized, to be taken over seamlessly, and user experience is promoted.
Fig. 8 is a kind of flow chart of multimedia resource playback method shown according to an exemplary embodiment.Such as Fig. 8 institutes
Show, in one possible implementation, the method further includes:
Step S109 stops in the case where receiving the Audio conversion signal for the second audio types described in acquisition
The data slot of first audio types obtains the multimedia resource phase with first video type and second audio types
The data slot of the third index file of pass and second audio types;
Step S110, be based on the third index file, to the data slot of second audio types carry out parsing and
Sequence obtains second audio data;
Step S112, by first spatial cache after current point in time, and with the time of current point in time
Interval replaces with the second audio data more than or equal to first audio data of second time threshold;
Step S113 plays first video data in first spatial cache and the second audio data.
It for example,, can be with if receiving the Audio conversion signal for the second audio types in playing process
Stop obtaining the data slot of the first audio types, and keeps obtaining the first video data, meanwhile, it can obtain and the first video
The relevant third index file of the multimedia resource of type and the second audio types.It is downloaded based on the information in third index file
The data slot of second audio types, and the second audio type data segment to being downloaded carries out real time parsing and sequence, obtains
Take second audio data.
In one possible implementation, can according to the sequence of timestamp, by the first spatial cache when current
Between put after, and with the time interval of current point in time be greater than or equal to second time threshold the first audio data tag
Byte packet replaces with the tag byte packets of second audio data, is available to player and plays out.In this way, being reached in reproduction time
When to second time threshold, can it be switched to broadcasting second audio data by playing the first audio data automatically, realized smooth
Switching.The second time threshold can be preset time threshold, such as can set second time threshold to 1 second.
In this way, data replacement can be carried out in the first spatial cache, reduce the download of data and guarantee
The fluency of broadcasting promotes user experience.
In accordance with an embodiment of the present disclosure, in entirely switching clarity (video switching) or it can switch that multilingual (audio is cut
Change) in playing process, the partial data for needing to change only is downloaded, reduces the transmission and waste of played data to greatest extent.
And it is continual to play in the process, is to broadcast to be achieved that switching in broadcasting, whole process is without flash, and the user experience is improved.
Embodiment 2
Fig. 9 is a kind of block diagram of multimedia resource playing device shown according to an exemplary embodiment.As shown in figure 9,
The multimedia resource playing device includes:First resource acquisition module 901, the first data acquisition module 902 and the first data
Playing module 903.
First resource acquisition module 901 is used to obtain the multimedia resource phase with the first video type and the first audio types
The first index file, the data slot of first video type and the data slot of first audio types closed;
First data acquisition module 902 is used to be based on first index file, to the data of first video type
The data slot of segment and first audio types is parsed and is sorted respectively, and the first video data and the first sound are obtained
Frequency evidence;
First data playing module 903 is for playing first video data and first audio data.
Figure 10 is a kind of block diagram of multimedia resource playing device shown according to an exemplary embodiment.Such as Figure 10 institutes
Show, in one possible implementation, described device further includes:
Secondary resource acquisition module 904, for the case where receiving the video switching signal for the second video type
Under, stop the data slot for obtaining first video type, obtains and second video type and first audio class
Relevant second index file of multimedia resource of type and the data slot of second video type;
Second data acquisition module 905, for being based on second index file, to the data of second video type
Segment is parsed and is sorted, and the second video data is obtained;
Second data playing module 906, for playing second video data and first audio data.
As shown in Figure 10, in one possible implementation, first data playing module 903 includes:First is slow
Submodule 9031 is deposited, for storing first video data and first audio data into the first spatial cache;
First plays submodule 9032, for playing first video data in first spatial cache and described
First audio data.
As shown in Figure 10, in one possible implementation, described device further includes:
Secondary resource acquisition module 904, for the case where receiving the video switching signal for the second video type
Under, stop the data slot for obtaining first video type, obtains and second video type and first audio class
Relevant second index file of multimedia resource of type and the data slot of second video type;
Second data acquisition module 905, for being based on second index file, to the data of second video type
Segment is parsed and is sorted, and the second video data is obtained;
First data replacement module 907, for by first spatial cache after current point in time, and with work as
First video data that the time interval at preceding time point is greater than or equal to first time threshold replaces with second video
Data;
Third data playing module 908, for playing second video data and institute in first spatial cache
State the first audio data.
As shown in Figure 10, in one possible implementation, the Secondary resource acquisition module 904 includes:First text
Part acquisition submodule 9041 is related to second video type and the multimedia resource of the first audio types for obtaining
The second index file;
First data acquisition submodule 9042 is obtained for being based on second index file after current point in time
, and the data slice with the time interval of current point in time more than or equal to second video type of first time threshold
Section.
As shown in Figure 10, in one possible implementation, described device further includes:
Information resources acquisition module 909, for the case where receiving the Audio conversion signal for the second audio types
Under, stop the data slot for obtaining first audio types, obtains and first video type and second audio class
The relevant third index file of multimedia resource of type and the data slot of second audio types;
Third data acquisition module 910, for being based on the third index file, to the data of second audio types
Segment is parsed and is sorted, and second audio data is obtained;
4th data playing module 911, for playing first video data and the second audio data.
As shown in Figure 10, in one possible implementation, described device further includes:
Information resources acquisition module 909, for the case where receiving the Audio conversion signal for the second audio types
Under, stop the data slot for obtaining first audio types, obtains and first video type and second audio class
The relevant third index file of multimedia resource of type and the data slot of second audio types;
Third data acquisition module 910, for being based on the third index file, to the data of second audio types
Segment is parsed and is sorted, and second audio data is obtained;
Second data replacement module 912, for by first spatial cache after current point in time, and with work as
First audio data that the time interval at preceding time point is greater than or equal to second time threshold replaces with second audio
Data;
5th data playing module 913, for playing first video data and institute in first spatial cache
State second audio data.
As shown in Figure 10, in one possible implementation, the information resources acquisition module 909 includes:Second text
Part acquisition submodule 9091 is related to first video type and the multimedia resource of the second audio types for obtaining
Third index file;
Second data acquisition submodule 9092 is obtained for being based on the third index file after current point in time
, and the data slice with the time interval of current point in time more than or equal to second audio types of second time threshold
Section.
It in accordance with an embodiment of the present disclosure can be based on the multimedia resource phase with the first video type and the first audio types
The data slot of first the first video type of index file pair and the data slot of the first audio types closed parses respectively
And sequence, the first video data and the first audio data are obtained and played, to avoid downloading redundant data, promotes user's body
It tests.
Embodiment 3
Figure 11 is a kind of block diagram of multimedia resource playing device 800 shown according to an exemplary embodiment.For example, dress
It can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, medical treatment to set 800
Equipment, body-building equipment, personal digital assistant etc..
Referring to Fig.1 1, device 800 may include following one or more components:Processing component 802, memory 804, power supply
Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and
Communication component 816.
The integrated operation of 802 usual control device 800 of processing component, such as with display, call, data communication, phase
Machine operates and record operates associated operation.Processing component 802 may include that one or more processors 820 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just
Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate
Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.These data are shown
Example includes instruction for any application program or method that are operated on device 800, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 may include power management system
System, one or more power supplys and other generated with for device 800, management and the associated component of distribution electric power.
Multimedia component 808 is included in the screen of one output interface of offer between described device 800 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 808 includes a front camera and/or rear camera.When device 800 is in operation mode, such as screening-mode or
When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and
Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike
Wind (MIC), when device 800 is in operation mode, when such as call model, logging mode and speech recognition mode, microphone by with
It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set
Part 816 is sent.In some embodiments, audio component 810 further includes a loud speaker, is used for exports audio signal.
I/O interfaces 812 provide interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock
Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented
Estimate.For example, sensor module 814 can detect the state that opens/closes of device 800, and the relative positioning of component, for example, it is described
Component is the display and keypad of device 800, and sensor module 814 can be with 800 1 components of detection device 800 or device
Position change, the existence or non-existence that user contacts with device 800,800 orientation of device or acceleration/deceleration and device 800
Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact
Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at
As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device
800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary implementation
In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application application-specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, it includes the non-volatile computer readable storage medium storing program for executing instructed, example to additionally provide a kind of
Such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of device 800 to complete the above method.
The disclosure can be system, method and/or computer program product.Computer program product may include computer
Readable storage medium storing program for executing, containing for making processor realize the computer-readable program instructions of various aspects of the disclosure.
Computer readable storage medium can be can keep and store the instruction used by instruction execution equipment tangible
Equipment.Computer readable storage medium for example can be-- but be not limited to-- storage device electric, magnetic storage apparatus, optical storage
Equipment, electromagnetism storage device, semiconductor memory apparatus or above-mentioned any appropriate combination.Computer readable storage medium
More specific example (non exhaustive list) includes:Portable computer diskette, random access memory (RAM), read-only is deposited hard disk
It is reservoir (ROM), erasable programmable read only memory (EPROM or flash memory), static RAM (SRAM), portable
Compact disk read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanical coding equipment, for example thereon
It is stored with punch card or groove internal projection structure and the above-mentioned any appropriate combination of instruction.Calculating used herein above
Machine readable storage medium storing program for executing is not interpreted that instantaneous signal itself, the electromagnetic wave of such as radio wave or other Free propagations lead to
It crosses the electromagnetic wave (for example, the light pulse for passing through fiber optic cables) of waveguide or the propagation of other transmission mediums or is transmitted by electric wire
Electric signal.
Computer-readable program instructions as described herein can be downloaded to from computer readable storage medium it is each calculate/
Processing equipment, or outer computer or outer is downloaded to by network, such as internet, LAN, wide area network and/or wireless network
Portion's storage device.Network may include copper transmission cable, optical fiber transmission, wireless transmission, router, fire wall, interchanger, gateway
Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment are received from network to be counted
Calculation machine readable program instructions, and the computer-readable program instructions are forwarded, for the meter being stored in each calculating/processing equipment
In calculation machine readable storage medium storing program for executing.
For execute the disclosure operation computer program instructions can be assembly instruction, instruction set architecture (ISA) instruction,
Machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programming languages
Arbitrarily combine the source code or object code write, the programming language include the programming language-of object-oriented such as
Smalltalk, C++ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer
Readable program instructions can be executed fully, partly execute on the user computer, is only as one on the user computer
Vertical software package executes, part executes or on the remote computer completely in remote computer on the user computer for part
Or it is executed on server.In situations involving remote computers, remote computer can pass through network-packet of any kind
It includes LAN (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as profit
It is connected by internet with ISP).In some embodiments, by using computer-readable program instructions
Status information carry out personalized customization electronic circuit, such as programmable logic circuit, field programmable gate array (FPGA) or can
Programmed logic array (PLA) (PLA), the electronic circuit can execute computer-readable program instructions, to realize each side of the disclosure
Face.
Referring herein to according to the flow chart of the method, apparatus (system) of the embodiment of the present disclosure and computer program product and/
Or block diagram describes various aspects of the disclosure.It should be appreciated that flowchart and or block diagram each box and flow chart and/
Or in block diagram each box combination, can be realized by computer-readable program instructions.
These computer-readable program instructions can be supplied to all-purpose computer, special purpose computer or other programmable datas
The processor of processing unit, to produce a kind of machine so that these instructions are passing through computer or other programmable datas
When the processor of processing unit executes, work(specified in one or more of implementation flow chart and/or block diagram box is produced
The device of energy/action.These computer-readable program instructions can also be stored in a computer-readable storage medium, these refer to
It enables so that computer, programmable data processing unit and/or other equipment work in a specific way, to be stored with instruction
Computer-readable medium includes then a manufacture comprising in one or more of implementation flow chart and/or block diagram box
The instruction of the various aspects of defined function action.
Computer-readable program instructions can also be loaded into computer, other programmable data processing units or other
In equipment so that series of operation steps are executed on computer, other programmable data processing units or miscellaneous equipment, with production
Raw computer implemented process, so that executed on computer, other programmable data processing units or miscellaneous equipment
Instruct function action specified in one or more of implementation flow chart and/or block diagram box.
Flow chart and block diagram in attached drawing show the system, method and computer journey of multiple embodiments according to the disclosure
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
One module of table, program segment or a part for instruction, the module, program segment or a part for instruction include one or more use
The executable instruction of the logic function as defined in realization.In some implementations as replacements, the function of being marked in box
It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can essentially be held substantially in parallel
Row, they can also be executed in the opposite order sometimes, this is depended on the functions involved.It is also noted that block diagram and/or
The combination of each box in flow chart and the box in block diagram and or flow chart can use function or dynamic as defined in executing
The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.
The presently disclosed embodiments is described above, above description is exemplary, and non-exclusive, and
It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes will be apparent from for the those of ordinary skill in art field.The selection of term used herein, purport
In the principle, practical application or technological improvement to the technology in market for best explaining each embodiment, or this technology is made to lead
Other those of ordinary skill in domain can understand each embodiment disclosed herein.