CN110062274A - A kind of video file caching method, device, equipment and readable storage medium storing program for executing - Google Patents

A kind of video file caching method, device, equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN110062274A
CN110062274A CN201910362815.7A CN201910362815A CN110062274A CN 110062274 A CN110062274 A CN 110062274A CN 201910362815 A CN201910362815 A CN 201910362815A CN 110062274 A CN110062274 A CN 110062274A
Authority
CN
China
Prior art keywords
video
target
file
caching
video file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910362815.7A
Other languages
Chinese (zh)
Inventor
陈文峰
张善湾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Xunlei Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xunlei Network Technology Co Ltd filed Critical Shenzhen Xunlei Network Technology Co Ltd
Priority to CN201910362815.7A priority Critical patent/CN110062274A/en
Publication of CN110062274A publication Critical patent/CN110062274A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Abstract

The invention discloses a kind of video file caching methods.The invention also discloses video file buffer storage, equipment and readable storage medium storing program for executing.The present invention can carry out the caching of video file using different cached parameters based on the network type of the networked network of terminal, can bring flexible service for user;Video file includes video header file and the corresponding video clip of current cache parameter simultaneously.That is, the present invention while buffered video header file, has also cached a part of video clip, in this way when loading specific video content according to video header file, this partial video segment that caching can be played first also improves user experience to realize the smooth playing of video.

Description

A kind of video file caching method, device, equipment and readable storage medium storing program for executing
Technical field
The present invention relates to technical field of video processing, in particular to a kind of video file caching method, device, equipment and can Read storage medium.
Background technique
Generally, video file includes video header file and specific video content.Wherein, video header file is for defining The other informations such as the broadcast information of video file, including video format, video track, audio track, therefore video file can be according to Video header file is played out and is shown.
It in the prior art, generally can be by the video heads of video file in order to realize that the quick load of video file plays File is cached in advance, thus corresponding video content can be loaded according to the video header file cached in advance, to mention Height load and broadcasting speed.But since the factor for influencing video file loading velocity is more, such as: the network of the networked network of terminal The cpu performance of quality, terminal itself, size of currently playing video file etc.;And after video header file caches in advance, also need Corresponding video content is loaded according to the video header file cached in advance;When encountering network quality difference, still can There are video playing Caton, the load time is long the problems such as, to affect user experience.
Summary of the invention
In view of this, the main purpose of the present invention is to provide a kind of video file caching method, device, equipment and readable Storage medium, it is intended to solve the technical problem of video playing Caton, load time length.Its concrete scheme is as follows:
To achieve the above object, the present invention provides a kind of video file caching method, applied to being equipped with target application The terminal of program, comprising:
When destination application starting, the network type of the networked network of the terminal is determined;
Determine target cache parameter corresponding with network type;
According to target cache parameter cache target video file;
Wherein, target video file includes: the video header file of target video, and mesh corresponding with target cache parameter Mark the video clip in video;Target video is the video of the default page presentation of destination application.
Preferably, determination target cache parameter corresponding with the network type, comprising:
Judge locally whether be stored with the corresponding target cache parameter of the network type;
If so, the target cache parameter described in local search.
Preferably, the method also includes:
When locally the corresponding target cache parameter of the not stored network type, the request for sending acquisition cached parameters extremely take Business end, so that the server-side returns to preset multiple cached parameters, the multiple cached parameters and multiple network types are one by one It is corresponding;Cached parameters corresponding with the network type are inquired in the multiple cached parameters, and the caching inquired is joined Number is determined as the target cache parameter.
Preferably, according to target cache parameter cache target video file, comprising:
If target cache parameter is target duration, cached in target video corresponding with target duration according to target duration Video clip;
Buffered video header file, and video clip and video header file are determined as target video file.
Preferably, according to target cache parameter cache target video file, comprising:
If target cache parameter is target cache amount, target corresponding with target cache amount is cached according to target cache amount and is regarded Video clip in frequency;
Buffered video header file, and video clip and video header file are determined as target video file.
Preferably, after according to target cache parameter cache target video file, further includes:
Receive the instruction for the broadcasting target video that user is inputted based on the default page;
Video clip is played according to instruction and video header file, while the remaining video segment of caching of target video and being connected It plays.
Preferably, further includes:
The target video file being locally stored is deleted according to algorithm is not used at most recently.
Preferably, according to target cache parameter cache target video file, comprising:
The target video file is obtained according to target cache parameter and is compressed;
Cache the compressed target video file.
To achieve the above object, the present invention provides a kind of video file buffer storage, applied to being equipped with target application The terminal of program, comprising:
First determining module determines the network type of the networked network of the terminal for starting when destination application;
Second determining module, for determining target cache parameter corresponding with network type;
Cache module, for according to target cache parameter cache target video file;Wherein, target video file includes: Video clip in the video header file of target video, and target video corresponding with target cache parameter;Target video is The video of the default page presentation of destination application.
To achieve the above object, the present invention provides a kind of video file buffer memory device, which includes memory and place Device is managed, is stored with the computer program that can be run on the processor on the memory, the computer program is processed Device realizes aforementioned disclosed video file caching method when executing.
To achieve the above object, the present invention provides a kind of readable storage medium storing program for executing, for saving computer program, wherein Aforementioned disclosed video file caching method is realized when computer program is executed by processor.
As it can be seen that video file caching method provided by the invention can be used based on the network type of the networked network of terminal Different cached parameters carry out the caching of video file, also, video file not only includes the video header file of video, but also wrap Include the video clip in video corresponding with current cache parameter.That is, the present invention is while buffered video header file, A part of video clip is also cached, in this way when loading specific video content according to video header file, so that it may broadcast first Slow down this partial video segment deposited, while playing this partial video segment, load plays remaining video content, thus Video playing " second opens " is achieved the effect that, has realized the smooth playing of video, has solved video load time length, plays Caton Etc. technical problems, also improve user experience.
Meanwhile the present invention also includes to cache using corresponding cached parameters based on the network type of the networked network of terminal The video file of video header file and a part of video clip.Such as: it is when terminal connection payment networks, then smaller using buffer memory Cached parameters, make caching video file in video clip it is small as far as possible, thus for user save flow;When terminal institute The network quality of networking network is poor, can also use the lesser cached parameters of buffer memory, make the video in the video file of caching Segment is small as far as possible, to improve the buffer efficiency and video playout speed of video file;When terminal connection free nets, then Using the biggish cached parameters of buffer memory, keep the video clip in the video file of caching larger, while guaranteeing the view of caching The quality of frequency file, to improve user experience.In short, whether charged according to the networked network of terminal, quality the features such as, can To be correspondingly arranged different cached parameters in advance, so as to bring more humane video playing service for user, improves and use Family experience.
Correspondingly, a kind of video file buffer storage, equipment and readable storage medium storing program for executing provided by the invention, similarly have Above-mentioned technical effect.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is method flow diagram disclosed in first embodiment of the invention;
Fig. 2 is method flow diagram disclosed in second embodiment of the invention;
Fig. 3 is method flow diagram disclosed in third embodiment of the invention;
Fig. 4 is method flow diagram disclosed in fourth embodiment of the invention;
Fig. 5 is schematic device disclosed in fifth embodiment of the invention;
Fig. 6 is equipment schematic diagram disclosed in sixth embodiment of the invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
Description and claims of this specification and term " first ", " second ", " third ", " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
First embodiment of the invention discloses the first video file caching method, is the present invention first referring to Fig. 1, Fig. 1 Method flow diagram disclosed in embodiment.
In the first embodiment, this method is applied to be equipped with the terminal of destination application, comprising:
S101, when destination application start, determine the network type of the networked network of terminal.
S102, determination target cache parameter corresponding with network type.
In the present embodiment, the network type of the networked network of terminal can be WLAN or mobile wireless network.Its In, WLAN can be WIFI network;Mobile wireless network can be 2G, 3G, 4G or 5G network etc..
Specifically, every kind of network can correspond to a default cached parameters.Such as: the corresponding cached parameters of WIFI network are The corresponding cached parameters of A, 2G network are B, and the corresponding cached parameters of 3G network are C etc..
Certainly, it for consolidated network type, can also specifically be preset according to the features such as network transfer speeds.Such as: needle If network transfer speeds are 3 seconds to cached parameters between 10M/S, are arranged in 0M/S the view of caching is set to WIFI network The playing duration of frequency segment is 3 seconds;If network transfer speeds are 5 seconds to cached parameters between 50M/S, are arranged in 10M/S, i.e., The playing duration of the video clip of caching is set as 5 seconds;If network transfer speeds are in 50M/S between 100M/S, setting is slow Depositing parameter is 8 seconds, that is, sets the playing duration of the video clip of caching as 8 seconds.It should be noted that cached parameters may be The size of video, such as: the video clip for setting caching is 10M.
That is, cached parameters and network type correspond, and in consolidated network type, it can also be according to network spy Property divides network, to obtain the heterogeneous networks under consolidated network type, to also make specific under consolidated network type The network of different characteristics corresponds to different cached parameters.
In the present embodiment, target cache parameter corresponding with network type is determined, comprising: local whether be stored with judged The corresponding target cache parameter of the network type of the networked network of terminal;When the network type pair that the networked network of terminal is locally stored The target cache parameter answered, then in local search target cache parameter.That is, the corresponding cached parameters of different network type It may be disposed in terminal or destination application, in this way when destination application starts, terminal can directly be inquired from local Corresponding cached parameters.
When the corresponding target cache parameter of network type of local not stored the networked network of terminal, then acquisition caching ginseng is sent Several requests is to server-side, so that server-side returns to preset multiple cached parameters, multiple cached parameters and multiple network types It corresponds;Cached parameters corresponding with network type are inquired in multiple cached parameters, and the cached parameters inquired are true It is set to target cache parameter.That is, server-side is preset with the corresponding different cached parameters of different network type, when target is answered Started with program, then the terminal of the destination application be installed to server-side and requests cached parameters, at this time due to server-side without Method determines the network type that the terminal is connected, and preset all cached parameters can be sent to terminal, such terminal Corresponding cached parameters are inquired from multiple cached parameters according to the network type of itself networked network, and slow by what is inquired It deposits parameter and is determined as target cache parameter.Certainly, terminal can also cache the cached parameters obtained from server-side, in this way Avoidable terminal frequently carries out data interaction with server-side.
S103, according to target cache parameter cache target video file;Target video file includes: the video of target video Video clip in header file, and target video corresponding with target cache parameter;Target video is destination application The video of default page presentation.
It should be noted that the target video file when a certain target video has been cached in present terminal, then terminal is just Will not caching of target video again target video file, that is, can avoid the repetition transmission of same data, to reach saving flow Purpose.
In the present embodiment, since the quantity of the video of the default page presentation of destination application may be more, Caching obtained target video file may also be more, can basis to avoid the memory space of terminal local from additionally being occupied The target video file that algorithm LRU (Least Recently Used) deletes terminal local storage is not used at most recently, in this way Cache hit rate can also be improved.Wherein, the default page of destination application can be the homepage of destination application, be used for Show the page etc. of the video to be played of user's addition.
As it can be seen that video file caching method provided in an embodiment of the present invention can be based on the network class of the networked network of terminal Type carries out the caching of video file using different cached parameters, also, video file not only includes the video heads text of video Part, and including the video clip in video corresponding with current cache parameter.That is, the present invention is in buffered video head text While part, a part of video clip is also cached, in this way when loading specific video content according to video header file, so that it may To play this partial video segment of caching first, while playing this partial video segment, load plays remaining video Content realizes the smooth playing of video to achieve the effect that video playing " second opens ", solves the video load time The technical problems such as long, broadcasting Caton, also improve user experience.
Meanwhile the present invention also includes to cache using corresponding cached parameters based on the network type of the networked network of terminal The video file of video header file and a part of video clip.Such as: it is when terminal connection payment networks, then smaller using buffer memory Cached parameters, make caching video file in video clip it is small as far as possible, thus for user save flow;When terminal institute The network quality of networking network is poor, can also use the lesser cached parameters of buffer memory, make the video in the video file of caching Segment is small as far as possible, to improve the buffer efficiency and video playout speed of video file;When terminal connection free nets, then Using the biggish cached parameters of buffer memory, keep the video clip in the video file of caching larger, while guaranteeing the view of caching The quality of frequency file, to improve user experience.In short, whether charged according to the networked network of terminal, quality the features such as, can To be correspondingly arranged different cached parameters in advance, so as to bring more humane video playing service for user, improves and use Family experience.
Second embodiment of the invention discloses second of video file caching method, and referring to fig. 2, Fig. 2 is the present invention second Method flow diagram disclosed in embodiment.
In a second embodiment, this method is applied to be equipped with the terminal of destination application, comprising:
S201, when destination application start, determine the network type of the networked network of terminal.
S202, determination target cache parameter corresponding with network type.
If S203, target cache parameter are target duration, target corresponding with target duration is cached according to target duration Video clip in video.
In the present embodiment, target cache parameter is target duration, then target video file includes: the view of target video Video clip in frequency header file, and target video corresponding with target duration;Target video is the pre- of destination application If the video of page presentation.
S204, buffered video header file, and video clip and video header file are determined as target video file.
If network type is WIFI network and mobile radio network, and 5 seconds a length of when the corresponding target of WIFI network, wirelessly It is 3 seconds a length of when the corresponding target of mobile network;So when the network type of the networked network of terminal is WIFI network, then caching of target The video header file of video and preceding 5 seconds video contents of target video, preceding 5 seconds video contents of target video are and mesh Mark the video clip in 5 seconds corresponding target videos of duration;When the networked network of terminal network type be mobile radio network, then The video header file of caching of target video and preceding 3 seconds video contents of target video, preceding 3 seconds video contents of target video Video clip in target video as corresponding with target duration 3 seconds.
S205, the instruction for receiving the broadcasting target video that user is inputted based on the default page of destination application.
S206, video clip, while the remaining video segment of caching of target video are played according to instruction and video header file And connect broadcasting.
Specifically, target video when the user clicks, then play the video clip of caching first;And mesh is cached in the same time The remaining video segment of video is marked, to realize that the connecting of target video plays, to solve the skill of broadcasting Caton, load time length Art problem.Wherein, user inputs the default page of play instruction and shows that the default page of target video can be identical, can also not Together.
In the present embodiment, cached parameters are specifically arranged with playing duration, and cache be target video original The video clip of beginning image quality can ensure the integrality of picture and easy to accomplish in this way.Because the image quality of different target video may Difference, therefore be that can ensure the integrality of picture according to setting cached parameters with playing duration.
It should be noted that other in the present embodiment realize that step is same as the previously described embodiments or similar, therefore this implementation Details are not described herein for example.
Therefore video file caching method provided in this embodiment can be based on the network class of the networked network of terminal Type carries out the caching of video file using different cached parameters, also, video file not only includes the video heads text of video Part, and including the video clip in video corresponding with current cache parameter.That is, the present invention is in buffered video head text While part, a part of video clip is also cached, in this way when loading specific video content according to video header file, so that it may To play this partial video segment of caching first, while playing this partial video segment, load plays remaining video Content realizes the smooth playing of video to achieve the effect that video playing " second opens ", solves the video load time The technical problems such as long, broadcasting Caton, also improve user experience.
Meanwhile the present invention also includes to cache using corresponding cached parameters based on the network type of the networked network of terminal The video file of video header file and a part of video clip.Such as: it is when terminal connection payment networks, then smaller using buffer memory Cached parameters, make caching video file in video clip it is small as far as possible, thus for user save flow;When terminal institute The network quality of networking network is poor, can also use the lesser cached parameters of buffer memory, make the video in the video file of caching Segment is small as far as possible, to improve the buffer efficiency and video playout speed of video file;When terminal connection free nets, then Using the biggish cached parameters of buffer memory, keep the video clip in the video file of caching larger, while guaranteeing the view of caching The quality of frequency file, to improve user experience.In short, whether charged according to the networked network of terminal, quality the features such as, can To be correspondingly arranged different cached parameters in advance, so as to bring more humane video playing service for user, improves and use Family experience.
Third embodiment of the invention discloses the third video file caching method, and referring to Fig. 3, Fig. 3 is third of the present invention Method flow diagram disclosed in embodiment.
In the third embodiment, this method is applied to be equipped with the terminal of destination application, comprising:
S301, when destination application start, determine the network type of the networked network of terminal.
S302, determination target cache parameter corresponding with network type.
If S303, target cache parameter are target cache amount, cached according to target cache amount corresponding with target cache amount Target video in video clip.
In the present embodiment, settable if the size of the frame picture of the same playing time of different target video is identical Target cache parameter is target cache amount, then target video file includes: the video header file of target video, and and target Video clip in the corresponding target video of buffer memory;Target video is the video of the default page presentation of destination application.
S304, buffered video header file, and video clip and video header file are determined as target video file.
If network type is WIFI network and mobile radio network, and the corresponding target cache amount of WIFI network is 20M, nothing The corresponding target cache amount of line mobile network is 10M;So when the network type of the networked network of terminal be WIFI network, then cache The video content of the preceding 20M of the video header file and target video of target video, the video content of the preceding 20M of target video are Video clip in target video corresponding with target cache amount 20M;When the network type of the networked network of terminal is wireless mobile Network, then the video content of the preceding 10M of the video header file and target video of caching of target video, the preceding 10M's of target video Video content is the video clip in target video corresponding with target cache amount 10M.
S305, the instruction for receiving the broadcasting target video that user is inputted based on the default page of destination application.
S306, video clip, while the remaining video segment of caching of target video are played according to instruction and video header file And connect broadcasting.
Specifically, target video when the user clicks, then play the video clip of caching first;And mesh is cached in the same time The remaining video segment of video is marked, to realize that the connecting of target video plays, to solve the skill of broadcasting Caton, load time length Art problem.
In the present embodiment, cached parameters are specifically arranged with video size, need different target in such cases The characteristic of video is identical, it may be assumed that and need the size of the frame picture of the same playing time of different target video identical, such as: For target video A and B, the size of first second frame picture of A is 2M, then the size of first second frame picture of B be also required to for Otherwise 2M cannot ensure video pictures in this way, just different target video can be cached according to same cached parameters well Integrality.
It should be noted that other in the present embodiment realize that step is same as the previously described embodiments or similar, therefore this implementation Details are not described herein for example.
Therefore video file caching method provided in this embodiment can be based on the network class of the networked network of terminal Type carries out the caching of video file using different cached parameters, also, video file not only includes the video heads text of video Part, and including the video clip in video corresponding with current cache parameter.That is, the present invention is in buffered video head text While part, a part of video clip is also cached, in this way when loading specific video content according to video header file, so that it may To play this partial video segment of caching first, while playing this partial video segment, load plays remaining video Content realizes the smooth playing of video to achieve the effect that video playing " second opens ", solves the video load time The technical problems such as long, broadcasting Caton, also improve user experience.
Meanwhile the present invention also includes to cache using corresponding cached parameters based on the network type of the networked network of terminal The video file of video header file and a part of video clip.Such as: it is when terminal connection payment networks, then smaller using buffer memory Cached parameters, make caching video file in video clip it is small as far as possible, thus for user save flow;When terminal institute The network quality of networking network is poor, can also use the lesser cached parameters of buffer memory, make the video in the video file of caching Segment is small as far as possible, to improve the buffer efficiency and video playout speed of video file;When terminal connection free nets, then Using the biggish cached parameters of buffer memory, keep the video clip in the video file of caching larger, while guaranteeing the view of caching The quality of frequency file, to improve user experience.In short, whether charged according to the networked network of terminal, quality the features such as, can To be correspondingly arranged different cached parameters in advance, so as to bring more humane video playing service for user, improves and use Family experience.
Fourth embodiment of the invention discloses the 4th kind of video file caching method, and referring to fig. 4, Fig. 4 is the present invention the 4th Method flow diagram disclosed in embodiment.
In the fourth embodiment, this method is applied to be equipped with the terminal of destination application, comprising:
S401, when destination application start, determine the network type of the networked network of terminal.
S402, determination target cache parameter corresponding with network type.
S403, according to target cache parameter cache target video file;Target video file includes the video of target video Video clip in header file, and target video corresponding with target cache parameter.
Specifically, video header file is the head information of video, generally comprise: video format, video track, video sound and frame etc. Information is used to define the broadcasting of video.The video format that the present embodiment is supported includes: AVI, MP4, RMVB etc..
For the video of MP4 format, video heads information is stored in box.The video header file of MP4 format is general It include: ftyp (File Type Box) and the part moov (Movie Box);Wherein, 1 mvhd and several are included in moov " trak ", usually an audio track and a video track.
Specifically, ftyp include 1 32 major brand, 1 32 minor version and 1 with 32 Position is the array compatible brands of unit element;The header information of moov is mvhd, 108 bytes of regular length; The header information of trak is tkhd, 92 bytes of regular length;As it can be seen that the data volume of video heads information generally all very little, therefore In buffered video header file, a part of video content can be cached simultaneously, and specific video content is typically expressed as mdat (Media Data Box)。
Specifically, the box of MP4 format refers to table 1:
Table 1
S404, the instruction for receiving the broadcasting target video that user is inputted based on the default page of destination application.
S405, video clip, while the remaining video segment of caching of target video are played according to instruction and video header file And connect broadcasting.
In the present embodiment, according to target cache parameter cache target video file, comprising: obtained according to target cache parameter It takes the target video file and compresses;Cache the compressed target video file.If caching of target video file it Before, target video file is compressed, then needing to decompress target video file before playing target video Contracting, specific compression and decompression mode can refer to the prior art, therefore details are not described herein for the present embodiment.
It should be noted that other in the present embodiment realize that step is same as the previously described embodiments or similar, therefore this implementation Details are not described herein for example.
Therefore video file caching method provided in this embodiment can be based on the network class of the networked network of terminal Type carries out the caching of video file using different cached parameters, also, video file not only includes the video heads text of video Part, and including the video clip in video corresponding with current cache parameter.That is, the present invention is in buffered video head text While part, a part of video clip is also cached, in this way when loading specific video content according to video header file, so that it may To play this partial video segment of caching first, while playing this partial video segment, load plays remaining video Content realizes the smooth playing of video to achieve the effect that video playing " second opens ", solves the video load time The technical problems such as long, broadcasting Caton, also improve user experience.
Meanwhile the present invention also includes to cache using corresponding cached parameters based on the network type of the networked network of terminal The video file of video header file and a part of video clip.Such as: it is when terminal connection payment networks, then smaller using buffer memory Cached parameters, make caching video file in video clip it is small as far as possible, thus for user save flow;When terminal institute The network quality of networking network is poor, can also use the lesser cached parameters of buffer memory, make the video in the video file of caching Segment is small as far as possible, to improve the buffer efficiency and video playout speed of video file;When terminal connection free nets, then Using the biggish cached parameters of buffer memory, keep the video clip in the video file of caching larger, while guaranteeing the view of caching The quality of frequency file, to improve user experience.In short, whether charged according to the networked network of terminal, quality the features such as, can To be correspondingly arranged different cached parameters in advance, so as to bring more humane video playing service for user, improves and use Family experience.
Fifth embodiment of the invention discloses a kind of video file buffer storage, is that the present invention the 5th is real referring to Fig. 5, Fig. 5 Apply schematic device disclosed in example.
In the 5th embodiment, which is applied to be equipped with the terminal of destination application, comprising:
First determining module 501, for starting when destination application, it is determined that the network class of the networked network of terminal Type;
Second determining module 502, for determining target cache parameter corresponding with network type;
Cache module 503, for according to target cache parameter cache target video file;Wherein, target video file packet It includes: the video clip in the video header file of target video, and target video corresponding with target cache parameter;Target video For the video of the default page presentation of destination application.
In a specific embodiment, the second determining module includes:
Judging unit, for judging locally whether be stored with the corresponding target cache parameter of the network type;
The corresponding target cache parameter of the network type has been locally stored for working as, then in local in first query unit Inquire the target cache parameter.
Wherein, the second determining module further include:
Second query unit, for when locally the corresponding target cache parameter of the not stored network type, transmission obtain The request of cached parameters is to server-side, so that the server-side returns to preset multiple cached parameters, the multiple cached parameters It is corresponded with multiple network types;Cached parameters corresponding with the network type are inquired in the multiple cached parameters, And the cached parameters inquired are determined as the target cache parameter.
In a specific embodiment, cache module includes:
First cache unit, if being target duration for target cache parameter, according to target duration caching and target duration Video clip in corresponding target video;
First determination unit is used for buffered video header file, and video clip and video header file is determined as target view Frequency file.
In a specific embodiment, cache module includes:
Second cache unit, if being target cache amount for target cache parameter, according to target cache amount caching and target Video clip in the corresponding target video of buffer memory;
Second determination unit is used for buffered video header file, and video clip and video header file is determined as target view Frequency file.
In a specific embodiment, video file buffer storage further include:
Receiving module, for receiving the instruction for the broadcasting target video that user is inputted based on the default page;
Playing module, for playing video clip, while the residue of caching of target video according to instruction and video header file Video clip simultaneously connects broadcasting.
In a specific embodiment, video file buffer storage further include:
Removing module, the target video file for being locally stored according to algorithm deletion is not used at most recently.
In a specific embodiment, cache module is specifically used for:
Target video file is obtained according to target cache parameter and is compressed;Cache compressed target video file.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description It with the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
As it can be seen that present embodiments providing a kind of video file buffer storage, comprising: the first determining module, second determine mould Block and cache module.When destination application starting, the net of the networked network of the terminal is determined by the first determining module first Network type;Then the second determining module determines target cache parameter corresponding with network type;Last cache module is according to target Cached parameters caching of target video file;Wherein, target video file includes: the video header file of target video, and and mesh Mark the video clip in the corresponding target video of cached parameters;Target video is the view of the default page presentation of destination application Frequently.Share out the work and help one another between such modules, Each performs its own functions, to realize the smooth playing of video, different network type makes Humanized broadcasting service can be brought for user with different cached parameters, improve user experience.
Sixth embodiment of the invention discloses a kind of video file buffer memory device, is that the present invention the 6th is real referring to Fig. 6, Fig. 6 Apply equipment schematic diagram disclosed in example.A kind of video file buffer memory device of the present embodiment description and a kind of above-described video text Part caching method and device can be cross-referenced.
In the sixth embodiment, which includes memory 601 and processor 602, in which:
The computer program that can be run on the processor is stored on the memory, the processor is for executing The computer program, to perform the steps of
When destination application starts, it is determined that the network type of the networked network of terminal;Determination is corresponding with network type Target cache parameter;According to target cache parameter cache target video file;Wherein, target video file includes: target video Video header file, and the video clip in target video corresponding with target cache parameter;Target video is target application The video of the default page presentation of program.
It in the present embodiment, can be specific when the processor executes the computer subprogram saved in the memory It performs the steps of and judges locally whether be stored with the corresponding target cache parameter of the network type;If so, being looked into locally Ask the target cache parameter.
It in the present embodiment, can be specific when the processor executes the computer subprogram saved in the memory It performs the steps of when locally the corresponding target cache parameter of the not stored network type, transmission obtain asking for cached parameters It asks to server-side, so that server-side returns to preset multiple cached parameters, multiple cached parameters and multiple network types one are a pair of It answers;Cached parameters corresponding with network type are inquired in multiple cached parameters, and the cached parameters inquired are determined as mesh Mark cached parameters.
It in the present embodiment, can be specific when the processor executes the computer subprogram saved in the memory Perform the steps of the video clip cached in target video corresponding with target duration according to target duration;Buffered video head File, and video clip and video header file are determined as target video file.
It in the present embodiment, can be specific when the processor executes the computer subprogram saved in the memory Perform the steps of the video clip cached in target video corresponding with target cache amount according to target cache amount;Caching view Frequency header file, and video clip and video header file are determined as target video file.
It in the present embodiment, can be specific when the processor executes the computer subprogram saved in the memory Perform the steps of the instruction for receiving the broadcasting target video that user is inputted based on the default page;According to instruction and video heads text Part plays video clip, while the remaining video segment of caching of target video and connecting broadcasting.
It in the present embodiment, can be specific when the processor executes the computer subprogram saved in the memory Perform the steps of the target video file being locally stored according to algorithm deletion is not used at most recently.
It in the present embodiment, can be specific when the processor executes the computer subprogram saved in the memory It performs the steps of and obtains the target video file according to target cache parameter and compress;Cache the compressed target Video file.
Seventh embodiment of the invention discloses a kind of readable storage medium storing program for executing, a kind of readable storage medium storing program for executing of the present embodiment description It can be cross-referenced with a kind of above-described video file caching method, device and equipment.
A kind of readable storage medium storing program for executing, for saving computer program, wherein when the computer program is executed by processor Realize video file caching method disclosed in previous embodiment.Specific steps about this method can be with reference in previous embodiment Disclosed corresponding contents, are no longer repeated herein.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other The difference of embodiment, same or similar part may refer to each other between each embodiment.For being filled disclosed in embodiment For setting, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part Explanation.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage readable storage medium storing program for executing well known in field.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of video file caching method, which is characterized in that applied to the terminal for being equipped with destination application, the method Include:
When destination application starting, the network type of the networked network of the terminal is determined;
Determine target cache parameter corresponding with the network type;
According to the target cache parameter cache target video file;
Wherein, the target video file includes: the video header file of target video, and corresponding with the target cache parameter The target video in video clip;The target video is the view of the default page presentation of the destination application Frequently.
2. video file caching method according to claim 1, which is characterized in that the determination and the network type pair The target cache parameter answered, comprising:
Judge locally whether be stored with the corresponding target cache parameter of the network type;
If so, the target cache parameter described in local search.
3. video file caching method according to claim 2, which is characterized in that the method also includes:
When locally the corresponding target cache parameter of the not stored network type, the request for sending acquisition cached parameters extremely service End, so that the server-side returns to preset multiple cached parameters, the multiple cached parameters and multiple network types one are a pair of It answers;Cached parameters corresponding with the network type, and the cached parameters that will be inquired are inquired in the multiple cached parameters It is determined as the target cache parameter.
4. video file caching method according to claim 3, which is characterized in that described according to the target cache parameter Caching of target video file, comprising:
It is corresponding with the target duration described according to target duration caching if the target cache parameter is target duration Video clip in target video;
The video header file is cached, and the video clip and the video header file are determined as the target video text Part.
5. video file caching method according to claim 3, which is characterized in that described according to the target cache parameter Caching of target video file, comprising:
If the target cache parameter is target cache amount, cached according to the target cache amount corresponding with the target cache amount The target video in video clip;
The video header file is cached, and the video clip and the video header file are determined as the target video text Part.
6. video file caching method according to claim 4 or 5, which is characterized in that described according to the target cache After parameter cache target video file, the method also includes:
Receive the instruction of the broadcasting target video of the user based on the default page input;
The video clip is played according to described instruction and the video header file, while caching the remaining view of the target video Frequency segment simultaneously connects broadcasting.
7. video file caching method according to claim 6, which is characterized in that the method also includes:
The target video file being locally stored is deleted according to algorithm is not used at most recently.
8. a kind of video file buffer storage, which is characterized in that applied to the terminal for being equipped with destination application, comprising:
First determining module determines the network type of the networked network of the terminal for starting when the destination application;
Second determining module, for determining target cache parameter corresponding with the network type;
Cache module, for according to the target cache parameter cache target video file;Wherein, the target video file packet It includes: the video clip in the video header file of target video, and the target video corresponding with the target cache parameter; The target video is the video of the default page presentation of the destination application.
9. a kind of video file buffer memory device, which is characterized in that the equipment includes memory and processor, on the memory It is stored with the computer program that can be run on the processor, is realized such as when the computer program is executed by the processor The described in any item video file caching methods of claim 1 to 7.
10. a kind of readable storage medium storing program for executing, which is characterized in that for saving computer program, wherein the computer program is located Reason device realizes video file caching method as described in any one of claim 1 to 7 when executing.
CN201910362815.7A 2019-04-30 2019-04-30 A kind of video file caching method, device, equipment and readable storage medium storing program for executing Pending CN110062274A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910362815.7A CN110062274A (en) 2019-04-30 2019-04-30 A kind of video file caching method, device, equipment and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910362815.7A CN110062274A (en) 2019-04-30 2019-04-30 A kind of video file caching method, device, equipment and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN110062274A true CN110062274A (en) 2019-07-26

Family

ID=67321954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910362815.7A Pending CN110062274A (en) 2019-04-30 2019-04-30 A kind of video file caching method, device, equipment and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN110062274A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112770132A (en) * 2021-01-05 2021-05-07 北京东方网信科技股份有限公司 Method and system for reducing MP4 video outlet flow in proxy cache
CN112954409A (en) * 2021-03-31 2021-06-11 百果园技术(新加坡)有限公司 Video downloading method, device, server and storage medium
CN113590699A (en) * 2021-07-14 2021-11-02 车智互联(北京)科技有限公司 Interface request processing method and system and computing equipment
CN113596513A (en) * 2021-08-02 2021-11-02 典基网络科技(上海)有限公司 Video content distribution method and system
CN114125517A (en) * 2020-08-27 2022-03-01 腾讯科技(北京)有限公司 Video playing method and device, electronic equipment and readable storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009124521A (en) * 2007-11-16 2009-06-04 Hitachi Kokusai Electric Inc Video reproducing apparatus
CN102547447A (en) * 2010-12-14 2012-07-04 腾讯科技(深圳)有限公司 Method, device and system for downloading video files
CN102651883A (en) * 2011-02-25 2012-08-29 中兴通讯股份有限公司 Method and apparatus for detecting connection loss of terminal
CN102711093A (en) * 2012-04-18 2012-10-03 奇智软件(北京)有限公司 Method and device for downloading mobile terminal data
CN103365266A (en) * 2013-06-20 2013-10-23 中国科学院光电技术研究所 Distributed intelligent photoetching device based on Agent
CN103685474A (en) * 2013-11-21 2014-03-26 中兴通讯股份有限公司 File downloading method and file downloading device
CN106162224A (en) * 2016-07-26 2016-11-23 北京金山安全软件有限公司 Video transmission method and device and electronic equipment
CN106326326A (en) * 2016-06-07 2017-01-11 武汉科技大学 Picture caching optimization method in Android system
CN106358062A (en) * 2016-08-24 2017-01-25 乐视控股(北京)有限公司 Browser video file playing processing method and equipment
CN107818022A (en) * 2017-10-25 2018-03-20 努比亚技术有限公司 Application programming interfaces merging method, mobile terminal and computer-readable recording medium
CN107888981A (en) * 2017-11-16 2018-04-06 北京小米移动软件有限公司 Audio frequency and video preload method, apparatus, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009124521A (en) * 2007-11-16 2009-06-04 Hitachi Kokusai Electric Inc Video reproducing apparatus
CN102547447A (en) * 2010-12-14 2012-07-04 腾讯科技(深圳)有限公司 Method, device and system for downloading video files
CN102651883A (en) * 2011-02-25 2012-08-29 中兴通讯股份有限公司 Method and apparatus for detecting connection loss of terminal
CN102711093A (en) * 2012-04-18 2012-10-03 奇智软件(北京)有限公司 Method and device for downloading mobile terminal data
CN103365266A (en) * 2013-06-20 2013-10-23 中国科学院光电技术研究所 Distributed intelligent photoetching device based on Agent
CN103685474A (en) * 2013-11-21 2014-03-26 中兴通讯股份有限公司 File downloading method and file downloading device
CN106326326A (en) * 2016-06-07 2017-01-11 武汉科技大学 Picture caching optimization method in Android system
CN106162224A (en) * 2016-07-26 2016-11-23 北京金山安全软件有限公司 Video transmission method and device and electronic equipment
CN106358062A (en) * 2016-08-24 2017-01-25 乐视控股(北京)有限公司 Browser video file playing processing method and equipment
CN107818022A (en) * 2017-10-25 2018-03-20 努比亚技术有限公司 Application programming interfaces merging method, mobile terminal and computer-readable recording medium
CN107888981A (en) * 2017-11-16 2018-04-06 北京小米移动软件有限公司 Audio frequency and video preload method, apparatus, equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125517A (en) * 2020-08-27 2022-03-01 腾讯科技(北京)有限公司 Video playing method and device, electronic equipment and readable storage medium
CN114125517B (en) * 2020-08-27 2024-04-05 腾讯科技(北京)有限公司 Video playing method and device, electronic equipment and readable storage medium
CN112770132A (en) * 2021-01-05 2021-05-07 北京东方网信科技股份有限公司 Method and system for reducing MP4 video outlet flow in proxy cache
CN112770132B (en) * 2021-01-05 2023-01-24 北京东方网信科技股份有限公司 Method and system for reducing MP4 video outlet flow in proxy cache
CN112954409A (en) * 2021-03-31 2021-06-11 百果园技术(新加坡)有限公司 Video downloading method, device, server and storage medium
CN113590699A (en) * 2021-07-14 2021-11-02 车智互联(北京)科技有限公司 Interface request processing method and system and computing equipment
CN113590699B (en) * 2021-07-14 2023-12-01 车智互联(北京)科技有限公司 Interface request processing method, system and computing device
CN113596513A (en) * 2021-08-02 2021-11-02 典基网络科技(上海)有限公司 Video content distribution method and system

Similar Documents

Publication Publication Date Title
CN110062274A (en) A kind of video file caching method, device, equipment and readable storage medium storing program for executing
EP3901779B1 (en) Video distribution system including progressive playback
US8660181B2 (en) Method of compressing video data and a media player for implementing the method
CN108063769B (en) Method and device for realizing content service and content distribution network node
CN107197359B (en) Video file caching method and device
US10701461B2 (en) Video Processing Method, Terminal and Server
CN107306219A (en) Picture transmission method and device in instant messaging
CN103067748B (en) A kind of streaming media video player method
CN109640113A (en) A kind of processing method and proxy server of dilatory video data
EP1879353B1 (en) Contents distribution system, contents distribution server, contents reproduction terminal, and contents distribution method
WO2018233539A1 (en) Video processing method, computer storage medium, and device
CN205430501U (en) Mobile terminal web advertisement video and positive video seamless handover device
CN101277211A (en) Method and apparatus for buffering data
CN110933517A (en) Code rate switching method, client and computer readable storage medium
CN112104897B (en) Video acquisition method, terminal and storage medium
CN108174280A (en) A kind of online playback method of audio and video and system
CN108513162A (en) Caching, playback method and the system reviewed is broadcast live
CN110139123A (en) The broadcasting of files in stream media, transmission, treating method and apparatus
CN110290396B (en) Video processing method, device, system, equipment and storage medium
CN106572383A (en) Video switching method and system based on multi-screen interaction
EP3142376A1 (en) Information device
CN114025184A (en) Video live broadcast method and electronic equipment
WO2017071524A1 (en) Multimedia resource publishing method and apparatus
CN112533016B (en) Method for triggering mobile phone HTML5 low-delay live video based on early warning information
KR102511949B1 (en) Method of Efficient Video Pacing Considering User's Random Watching Point and Apparatus therefor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190726