CN109640159A - Caching method for determining speed, device, system and storage medium based on player - Google Patents

Caching method for determining speed, device, system and storage medium based on player Download PDF

Info

Publication number
CN109640159A
CN109640159A CN201811612155.5A CN201811612155A CN109640159A CN 109640159 A CN109640159 A CN 109640159A CN 201811612155 A CN201811612155 A CN 201811612155A CN 109640159 A CN109640159 A CN 109640159A
Authority
CN
China
Prior art keywords
caching
time interval
target
target object
cache
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
CN201811612155.5A
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.)
Thunder Computer (shenzhen) Co Ltd
Original Assignee
Thunder Computer (shenzhen) 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 Thunder Computer (shenzhen) Co Ltd filed Critical Thunder Computer (shenzhen) Co Ltd
Priority to CN201811612155.5A priority Critical patent/CN109640159A/en
Publication of CN109640159A publication Critical patent/CN109640159A/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/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • 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/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8173End-user applications, e.g. Web browser, game

Abstract

The invention discloses a kind of caching method for determining speed based on AVPlayer player, comprising: receives the acquisition instruction to target object caching speed;Obtain the target object target bit rate of the cache-time interval of caching of target object and target object at cache-time interval in target time interval;Determine target object in the caching total amount of byte of target time interval;According to caching total amount of byte and target time interval, the caching speed of target object is determined, and be shown in the display interface of AVPlayer player.As it can be seen that in the present solution, can quickly calculate caching speed after receiving acquisition instruction by caching total amount of byte and target time interval, and be shown in the display interface of player, so that user is understood the caching speed of player in time, improve user experience;The invention also discloses a kind of caching velocity determination apparatus, system and computer readable storage mediums, are equally able to achieve above-mentioned technical effect.

Description

Caching method for determining speed, device, system and storage medium based on player
Technical field
It is a kind of based on AVPlayer player that the present invention relates to audio and video buffer technical fields more particularly to denomination of invention Cache method for determining speed, device, system and computer readable storage medium.
Background technique
It is also more and more using client terminal playing audio/screen quantity with using the user of internet more and more. By taking audio and video player AVPlayer as an example, AVPlayer is the global function audio and video player that can play any format, is used Family can play network video, audio by AVPlayer, can also play local video, audio.But AVPlayer is broadcast When putting network video and audio, user can not understand the speed of current cache video or audio, make user can not be according to current Speed is cached to choose whether to continue the functions such as buffered video and audio, user experience is poor.
Summary of the invention
The main purpose of the present invention is to provide a kind of caching method for determining speed based on AVPlayer player, dress Set, system and computer readable storage medium, it is intended to solve AVPlayer player not display caching speed the technical issues of.
To achieve the above object, a kind of caching method for determining speed based on AVPlayer player provided by the invention, The described method includes:
Receive the acquisition instruction to target object caching speed;The target object is audio and/or video;
According to the acquisition instruction, the target object is obtained in target time interval when the caching of caching of target object Between be spaced and the target object the cache-time interval target bit rate;
Using the cache-time interval and the target bit rate, determine the target object between the object time Every caching total amount of byte;
According to the caching total amount of byte and the target time interval, the caching speed of the target object is determined, and It is shown in the display interface of AVPlayer player.
Optionally, the acquisition target object is in target time interval between the cache-time of caching of target object Every and the target object the cache-time interval target bit rate, comprising:
Target object described in AVPlayerItem object acquisition by FTP client FTP caches in target time interval The target bit rate of the cache-time interval of target object and the target object at the cache-time interval.
Optionally, described according to the acquisition instruction, obtain target object caching of target in target time interval The cache-time interval of object, comprising:
FTP client FTP is obtained in the first time point of current time;
Obtain the first cache-time of AVPlayer player target object described in the first time point cache Point;
Obtain second time point of the FTP client FTP after being spaced scheduled duration;
Obtain the second cache-time of AVPlayer player target object described in the second time point cache Point;
Using the difference of second time point and the first time point as the target time interval, by described second The difference of cache-time point and the first cache-time point is as the cache-time interval.
Optionally, the target object is obtained in the target bit rate at the cache-time interval, comprising:
If target object is audio, by the bit of the audio track of any point-in-time in the cache-time interval Rate, as the target bit rate;
If target object is video, by the bit of the track of video of any point-in-time in the cache-time interval Rate, as the target bit rate;
If target object is audio-video, by the bit of the audio track of any point-in-time in the cache-time interval The sum of rate and the bit rate of track of video, as the target bit rate.
Optionally, described according to the acquisition instruction, obtain target object caching of target in target time interval The target bit rate of the cache-time interval of object and the target object at the cache-time interval, comprising:
Judge whether the acquisition instruction is real-time acquisition instruction;
If so, executing the acquisition target object between the object time continuously in each target time interval Every interior caching of target object cache-time interval and the target object the cache-time interval target bit rate The step of;
If it is not, executing the acquisition target object in target then in the target time interval from current time Between be spaced in caching of target object cache-time interval and the target object the cache-time interval target ratio The step of special rate.
Optionally, after the caching speed of the determination target object, further includes:
The caching speed is detected whether less than the first predetermined threshold;
If so, the display interface display reminding information for passing through the AVPlayer player.
Optionally, described according to the caching total amount of byte and the target time interval, determine the target object Speed is cached, and is shown in the display interface of AVPlayer player, comprising:
According to the caching total amount of byte and the target time interval, the caching speed of the target object is determined;
Judge whether the caching speed exceeds the second predetermined threshold;
If it is not, the caching speed is then shown the display interface in the AVPlayer player.
To achieve the above object, the present invention further provides a kind of caching speed based on AVPlayer player to determine dress It sets, described device includes memory and processor, and the caching speed that can be run on the processor is stored on the memory It spends and determines program, the caching speed, which determines, realizes above-mentioned caching method for determining speed when program is executed by the processor.
To achieve the above object, the present invention further provides a kind of caching speed based on AVPlayer player to determine system System, the system comprises:
Instruction receiving unit, for receiving the acquisition instruction to target object caching speed;The target object is audio And/or video;
First acquisition unit, for obtaining the target object and delaying in target time interval according to the acquisition instruction Deposit the cache-time interval of target object;
Second acquisition unit, for obtaining the target object at the cache-time interval according to the acquisition instruction Target bit rate;
First determination unit, for determining the target pair using the cache-time interval and the target bit rate As the caching total amount of byte in the target time interval;
Second determination unit, for determining the target according to the caching total amount of byte and the target time interval The caching speed of object;
Display unit, for the caching speed to be shown the display interface in AVPlayer player.
To achieve the above object, the present invention further provides a kind of computer readable storage mediums, described computer-readable It is stored with caching speed on storage medium and determines that program, the caching speed determine that program can be held by one or more processor Row, to realize above-mentioned caching method for determining speed.
By above scheme it is found that the embodiment of the present invention provides a kind of caching speed determination based on AVPlayer player Method, comprising: receive the acquisition instruction to target object caching speed;Target object is audio and/or video;Referred to according to acquisition It enables, obtains target object the cache-time interval of caching of target object and target object in target time interval and caching The target bit rate of time interval;Using cache-time interval and target bit rate, determine target object in target time interval Caching total amount of byte;According to caching total amount of byte and target time interval, the caching speed of target object is determined, and be shown in The display interface of AVPlayer player.
As it can be seen that in the present solution, caching total amount of byte and target time interval can be passed through after receiving acquisition instruction Caching speed is quickly calculated, and is shown in the display interface of AVPlayer player, user is made to understand the slow of player in time Speed is deposited, user experience is improved;The invention also discloses a kind of caching velocity determination apparatus based on AVPlayer player, it is System and computer readable storage medium, are equally able to achieve above-mentioned technical effect.
Detailed description of the invention
Fig. 1 is the flow diagram of one embodiment of the invention;
Fig. 2 is the flow diagram of another embodiment of the present invention;
Fig. 3 is the flow diagram of another embodiment of the present invention;
Fig. 4 is to invent the caching speed that an embodiment discloses to determine system structure diagram;
Fig. 5 is the caching velocity determination apparatus inventing an embodiment and disclosing.
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.
The description and claims of this application 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.
The embodiment of the invention discloses a kind of based on the caching method for determining speed of AVPlayer player, device, system And computer readable storage medium, it is intended to solve AVPlayer player not display caching speed the technical issues of
The embodiment of the present invention discloses a kind of caching method for determining speed based on AVPlayer player.
Referring to Fig.1, Fig. 1 is the flow diagram of one embodiment of the invention, in the present embodiment, this method comprises:
S101, the acquisition instruction that speed is cached to target object is received;The target object is audio and/or video;
Wherein, the target object in the present embodiment can be the audio video or audio of browser broadcasting And video namely audio-video, therefore the acquisition instruction may be implemented to obtain the caching speed of audio, or obtain the caching of screen The caching speed of speed or audio-video, user can be according to the types of the actual demand selection target object of oneself.
S102, according to the acquisition instruction, obtain target object caching of target object in target time interval The target bit rate of cache-time interval and the target object at the cache-time interval;
It should be noted that target time interval can be set according to the actual situation, and such as: user wants to obtain target At this moment smaller, such as 1s can be arranged in target time interval by the real-time caching speed of object, namely: S102 can be understood as Obtain the cache-time interval in 1s and target bit rate.The cache-time interval are as follows: the mesh cached in target time interval The caching duration of object is marked, such as: target object is audio-video, and target time interval 1s is then divided into sound view between cache-time In the case that if the duration network speed that frequency caches in 1s is good, which may be 60s, namely: it is cached in 1s The audio-video of 60s, if in the case that network speed is poor, which may be 0.5s, namely: it is cached in 1s The audio-video of 0.5s.In turn, the unit of target bit rate is bps (Bit Per Second), i.e., the bit (bit) per second for including Number, as the difference of target object has different bit rates, if target object is audio, target bit rate is audio Bit rate, if target object is video, target bit rate is the bit rate of video, if target object is audio-video, Target bit rate is the sum of audio and the bit rate of video.
S103, using the cache-time interval and the target bit rate, determine the target object in the target The caching total amount of byte of time interval;
It is understood that can be calculated when determining caching total amount of byte by cache-time interval and target bit rate The product of the two is cached word as target object by the product at cache-time interval and target bit rate in target time interval The sum of section.
S104, according to the caching total amount of byte and the target time interval, determine the caching speed of the target object Degree, and it is shown in the display interface of AVPlayer player.
After caching total amount of byte is calculated by previous step, can will caching total amount of byte divided by target time interval, The caching speed of target object can be obtained, also, caching speed can not be calculated in AVPlayer player at present, therefore In the present solution, determining the caching of target object by S102-S104 after receiving the acquisition instruction to target object caching speed After speed, which can be shown to the display interface in AVPlayer player, user can self-setting caching speed It is particularly shown position, such as: it can be displayed in the upper right corner of AVPlayer player display interface, it is attached also to can be displayed in menu button Closely, such as: being shown near the full frame button of AVPlayer player.
As can be seen that this programme after receiving acquisition instruction, can pass through caching total amount of byte and target time interval Caching speed is quickly calculated, and is shown in the display interface of AVPlayer player, user is made to understand the slow of player in time Speed is deposited, such user can execute corresponding processing operation after understanding caching speed, such as: if caching speed is slower, At this moment user can press pause button, until audio-video buffering one is further continued for watching after the meeting, to improve the user experience.
Further, the embodiment of the present invention discloses a kind of caching method for determining speed based on AVPlayer player.
It is the flow diagram of another embodiment of the present invention referring to Fig. 2, Fig. 2, in the present embodiment, this method comprises:
S201, the acquisition instruction that speed is cached to target object is received;The target object is audio and/or video;
S202, FTP client FTP is obtained in the first time point of current time;The AVPlayer player is obtained in institute State the first cache-time point of target object described in first time point cache;
S203, second time point of the FTP client FTP after being spaced scheduled duration is obtained;Obtain the AVPlayer Second cache-time point of player target object described in the second time point cache;
S204, using the difference of second time point and the first time point as the target time interval, by institute The difference of the second cache-time point and the first cache-time point is stated as the cache-time interval;
S205, according to the acquisition instruction, obtain the target object in the target bit rate at the cache-time interval;
S206, using the cache-time interval and the target bit rate, determine the target object in the target The caching total amount of byte of time interval;
S207, according to the caching total amount of byte and the target time interval, determine the caching speed of the target object Degree, and it is shown in the display interface of AVPlayer player.
In the present embodiment, when determining target time interval and cache-time interval, it can record current point in time as the One time point startTime, while record has currently cached total time o'clock as the first cache-time point bufferDuration (unit second), the first time point can be 16:00:00, which can be with are as follows: 5s;After waiting preset duration, The now time o'clock is recorded as the second time point nowTime, record has cached total time o'clock as the second cache-time now Point nowBufferDuration, second time point can be 16:00:01, which can be with are as follows: 10s.
As can be seen that the present embodiment in target time interval be nowTime-startTime namely 16:00:01 with The difference of 16:00:00, i.e. 1s, also, the target time interval is identical as scheduled duration, also, the first time point and second Time point is all the time point of FTP client FTP, and acquisition modes can call directly iOS system acquisition, such as obtain at the first time Point startTime are as follows: let startTime=Date ().
Be divided between cache-time in the present embodiment nowBufferDuration-bufferDuration namely 10s with The difference of 5s, i.e. 5s, the time interval are that the time of AVPlayer player caching of target object in target time interval is long Degree, therefore, can target object described in the AVPlayerItem object acquisition by FTP client FTP delay in target time interval The cache-time interval of target object is deposited, such as: the first cache-time can be provided by AVPlayerItem object in iOS system Point:
This programme obtains target object in the target bit rate at the cache-time interval according to acquisition instruction, if Target object is audio, then by the bit rate of the audio track of any point-in-time in the cache-time interval, as described Target bit rate;If target object is video, by the ratio of the track of video of any point-in-time in the cache-time interval Special rate, as the target bit rate;If target object is audio-video, by any time in the cache-time interval The sum of bit rate and the bit rate of track of video of the audio track of point, as the target bit rate.In the present embodiment, Target object described in the AVPlayerItem object acquisition of FTP client FTP be again may be by the cache-time interval Target bit rate, such as: if target object is audio-video, the bit rate of all track of video, audio track is obtained, is then asked With obtain gross bit rate totalDataRate, which can equally obtain according to AVPlayerItem calculation and object in iOS system It arrives:
Further, pass through formula cacheSpeed=(nowBufferDuration-bufferDuration) * TotalDataRate/ (nowTime-startTime) can calculate the caching speed of target object, wherein NowBufferDuration-bufferDuration is cache-time interval, and totalDataRate is target bit rate, (nowBufferDuration-bufferDuration) * totalDataRate is to cache total amount of byte, nowTime- StartTime is target time interval.
As can be seen that this mode for calculating caching speed provided in this embodiment, only according to iOS system frame The parameter provided under AVFoundation can obtain caching speed, without being made any adjustments to playing flow, calculation method letter It is single and accurate.
Further, in the present embodiment, described according to the acquisition instruction, the target object is obtained between the object time Every interior caching of target object cache-time interval and the target object the cache-time interval target bits Rate, comprising:
Judge whether the acquisition instruction is real-time acquisition instruction;
If so, executing the acquisition target object between the object time continuously in each target time interval Every interior caching of target object cache-time interval and the target object the cache-time interval target bit rate The step of;
If it is not, executing the acquisition target object in target then in the target time interval from current time Between be spaced in caching of target object cache-time interval and the target object the cache-time interval target ratio The step of special rate.
That is, two classes can be divided into for the acquisition instruction in this programme, if it is real-time acquisition instruction, then Target time interval can be set at lesser interval, such as 1s, then needing continuously after receiving acquisition instruction every Caching speed will be calculated in a 1s, and is shown in the display interface of AVPlayer player, so for a user, caching It speed, that is, real-time update and shows on the screen in real time;The triggering form of the acquisition instruction can be with are as follows: play audio and/or It when video, is actively triggered by system, so as to real-time display in the display interface, real-time display caching can also be wanted in user When speed, shown on the display screen by way of active triggers.
If the acquisition instruction is not real-time acquisition instruction, after at this moment receiving the acquisition instruction, only from current time Target time interval in obtain caching speed, such as: user by click caching speed obtain icon, obtain current caching At this moment speed can calculate the caching speed in the target time interval from current time by this programme, and be shown in boundary Face just terminates, the caching speed without calculating next target time interval.
As can be seen that type of this programme according to acquisition instruction, provides two kinds of caching speed acquisition modes, one kind is real When obtain the mode of caching speed, real-time display caching speed, another kind is only obtains and shows the caching speed at current time Mode, user can set according to actual needs, to improve and use for a variety of caching speed display modes that user improves Family experience.
Further, the embodiment of the present invention discloses a kind of caching method for determining speed based on AVPlayer player.
It is the flow diagram of another embodiment of the present invention referring to Fig. 3, Fig. 3, in the present embodiment, this method comprises:
S301, the acquisition instruction that speed is cached to target object is received;The target object is audio and/or video;
S302, according to the acquisition instruction, obtain target object caching of target object in target time interval The target bit rate of cache-time interval and the target object at the cache-time interval;
S303, using the cache-time interval and the target bit rate, determine the target object in the target The caching total amount of byte of time interval;
S304, according to the caching total amount of byte and the target time interval, determine the caching speed of the target object Degree;
S305, judge whether the caching speed exceeds the second predetermined threshold;If it is not, then the caching speed is shown The display interface of the AVPlayer player, if so, not in the display interface display caching of the AVPlayer player Speed.
In the present embodiment, after obtaining caching speed, corresponding function, example can be executed according to the size of caching speed Such as: whether detection caching speed is less than the first predetermined threshold;It is mentioned if so, being shown by the display interface of AVPlayer player Show information.First preset threshold is the pre-set caching threshold speed that can not meet user's normal play demand, if The caching speed of acquisition is less than first predetermined threshold, then can be able to be in display interface display reminding information, the prompt information The prompt information for prompting user's network speed poor, such as: current network speed is poor, can suspend the subsequent continued broadcasting of caching and put, or are as follows: it is current Network speed is poor, the information such as replaceable broadcast source.
Further, if the acquisition instruction is not the acquisition instruction that user actively triggers, refer to for the acquisition of system trigger It enables, at this moment can be determined whether according to preset condition, which will cache speed, shows at interface, such as: detect caching speed Afterwards, judge whether the caching speed exceeds the second predetermined threshold, which can satisfy user to be pre-set The threshold value of normal play demand, second predetermined threshold are greater than first predetermined threshold, if detecting that caching speed is greater than the Two predetermined thresholds then illustrate that current network speed is preferable, are not in that at this moment may be selected not show caching speed the case where playing Caton Show in display interface, and if caching speed without departing from the second predetermined threshold, illustrates the mistake in audio and/or video in broadcasting It is likely to Caton occur in journey to show, at this moment caching speed can be shown in display interface, to prompt user.
As can be seen that this programme calculate caching speed after, can be automatically decided whether according to preset condition by Caching speed is shown on interface, and prompt information can also be issued automatically, to prompt user to work as when caching speed is lower Preceding caching speed is poor, to further promote user experience.
Further, the present embodiment also discloses the caching speed based on AVPlayer player and determines system.
Referring to fig. 4, the caching speed disclosed for one embodiment of the invention determines system structure diagram, which includes:
Instruction receiving unit 100, for receiving the acquisition instruction to target object caching speed;The target object is sound Frequency and/or video;
First acquisition unit 200, for obtaining the target object in target time interval according to the acquisition instruction The cache-time interval of caching of target object;
Second acquisition unit 300, for obtaining the target object between the cache-time according to the acquisition instruction Every target bit rate;
First determination unit 400, for determining the target using the cache-time interval and the target bit rate Caching total amount of byte of the object in the target time interval;
Second determination unit 500, for determining the mesh according to the caching total amount of byte and the target time interval Mark the caching speed of object;
Display unit 600, for the caching speed to be shown the display interface in AVPlayer player.
Wherein, target object described in the AVPlayerItem object acquisition that the first acquisition unit passes through FTP client FTP The cache-time interval of caching of target object in target time interval, the second acquisition unit pass through FTP client FTP Target bit rate of the target object described in AVPlayerItem object acquisition at the cache-time interval.
Wherein, first acquisition unit includes:
First obtains subelement, for obtaining FTP client FTP in the first time point of current time;
Second obtains subelement, for obtaining AVPlayer player target described in the first time point cache First cache-time point of object;
Third obtains subelement, for obtaining second time point of the FTP client FTP after being spaced scheduled duration;
4th obtains subelement, for obtaining AVPlayer player target described in the second time point cache Second cache-time point of object;
Target time interval determines subelement, for using the difference of second time point and the first time point as The target time interval,
Cache-time interval determines subelement, for by the second cache-time point and the first cache-time point Difference is as the cache-time interval.
Wherein, second acquisition unit includes:
First object bit rate determines subelement, is used for when target object is audio, will be in the cache-time interval Any point-in-time audio track bit rate, as the target bit rate;
Second target bit rate determines subelement, is used for when target object is video, will be in the cache-time interval Any point-in-time track of video bit rate, as the target bit rate;
Third target bit rate determines subelement, is used for when target object is audio-video, by the cache-time interval In any point-in-time audio track bit rate and the sum of the bit rate of track of video, as the target bit rate.
Wherein, this programme includes:
Judging unit, for judging whether the acquisition instruction is real-time acquisition instruction;If so, continuously in each target In time interval, first acquisition unit is triggered;If it is not, triggering second obtains then in the target time interval from current time Unit.
Wherein, this programme further include:
Detection unit, for whether detecting the caching speed less than the first predetermined threshold;
Prompt unit, for passing through the AVPlayer player when the caching speed is less than the first predetermined threshold Display interface display reminding information.
Wherein, display unit includes:
Judgment sub-unit, for judging whether the caching speed exceeds the second predetermined threshold;If it is not, then by the caching Speed is shown in the display interface of the AVPlayer player.
Further, the embodiment of the present invention also provides a kind of computer readable storage medium, the computer-readable storage It is stored with caching speed on medium and determines that program, the caching speed determine that program can be executed by one or more processor, To realize above-mentioned any means caching method for determining speed as described in the examples.
Further, the present embodiment also discloses a kind of caching velocity determination apparatus based on AVPlayer player.
It is the caching velocity determination apparatus that one embodiment of the invention discloses referring to Fig. 5, described device includes 11 He of memory Processor 12 is stored with the caching speed that can be run on the processor on the memory 11 and determines program 01, described slow It deposits speed and determines the method for realizing that above-mentioned any means embodiment is realized when program 01 is executed by the processor.
In the present embodiment, caching velocity determination apparatus 1 can be PC (PersonalComputer, PC), It can be the terminal devices such as smart phone, tablet computer, palm PC, portable computer.
The caching velocity determination apparatus 1 may include memory 11, processor 12 and bus 13.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 It can be the internal storage unit of caching velocity determination apparatus 1, such as the caching velocity determination apparatus 1 in some embodiments Hard disk.Memory 11 is also possible to cache the External memory equipment of velocity determination apparatus 1 in further embodiments, such as caches The plug-in type hard disk being equipped on velocity determination apparatus 1, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include caching The internal storage unit of velocity determination apparatus 1 also includes External memory equipment.Memory 11 can be not only used for storage and be installed on The application software and Various types of data of velocity determination apparatus 1 are cached, such as caching speed determines the code etc. of program 01, can also use In temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as execute caching speed and determine program 01 etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA) Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 5 only with one slightly Line indicates, it is not intended that an only bus or a type of bus.
Further, caching velocity determination apparatus can also include network interface 14, and network interface 14 optionally can wrap Wireline interface and/or wireless interface (such as WI-FI interface, blue tooth interface) are included, commonly used in setting in the device 1 with other electronics Communication connection is established between standby.
Optionally, which can also include user interface, and user interface may include display (Display), input Unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optional Ground, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate Referred to as display screen or display unit, for being shown in the information handled in caching velocity determination apparatus 1 and for showing visually The user interface of change.
Fig. 5 illustrates only the caching velocity determination apparatus 1 that program 01 is determined with component 11-14 and caching speed, this Field technical staff, can be with it is understood that the structure shown in Fig. 5 does not constitute the restriction to caching velocity determination apparatus 1 Including perhaps combining certain components or different component layouts than illustrating less perhaps more components.
Further, the embodiment of the present invention also provides a kind of computer program product, including computer instruction, when it is being counted When running on calculation machine, computer is allowed to execute above-mentioned any means caching method for determining speed as described in the examples.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead Body medium (such as solid state hard disk Solid State Disk (SSD)) etc.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read- OnlyMemory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various to deposit Store up the medium of program code.
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.
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 caching method for determining speed based on AVPlayer player, which is characterized in that the described method includes:
Receive the acquisition instruction to target object caching speed;The target object is audio and/or video;
According to the acquisition instruction, the target object is obtained in target time interval between the cache-time of caching of target object Every and the target object the cache-time interval target bit rate;
Using the cache-time interval and the target bit rate, determine the target object in the target time interval Cache total amount of byte;
According to the caching total amount of byte and the target time interval, the caching speed of the target object is determined, and show In the display interface of AVPlayer player.
2. caching method for determining speed according to claim 1, which is characterized in that described to obtain the target object in mesh Mark time interval in caching of target object cache-time interval and the target object the cache-time interval mesh Mark bit rate, comprising:
The caching of target in target time interval of target object described in AVPlayerItem object acquisition by FTP client FTP The target bit rate of the cache-time interval of object and the target object at the cache-time interval.
3. caching method for determining speed according to claim 1, which is characterized in that it is described according to the acquisition instruction, it obtains Take the cache-time interval of target object caching of target object in target time interval, comprising:
FTP client FTP is obtained in the first time point of current time;
Obtain the first cache-time point of AVPlayer player target object described in the first time point cache;
Obtain second time point of the FTP client FTP after being spaced scheduled duration;
Obtain the second cache-time point of AVPlayer player target object described in the second time point cache;
Using the difference of second time point and the first time point as the target time interval, described second is cached The difference of time point and the first cache-time point is as the cache-time interval.
4. caching method for determining speed according to claim 3, which is characterized in that obtain the target object described slow Deposit the target bit rate of time interval, comprising:
If target object is audio, the bit rate of the audio track of any point-in-time in the cache-time interval is made For the target bit rate;
If target object is video, the bit rate of the track of video of any point-in-time in the cache-time interval is made For the target bit rate;
If target object be audio-video, by the bit rate of the audio track of any point-in-time in the cache-time interval with And the sum of bit rate of track of video, as the target bit rate.
5. caching method for determining speed according to claim 1, which is characterized in that it is described according to the acquisition instruction, it obtains Take the target object in target time interval the cache-time interval of caching of target object and the target object in institute State the target bit rate at cache-time interval, comprising:
Judge whether the acquisition instruction is real-time acquisition instruction;
If so, executing the acquisition target object in target time interval continuously in each target time interval The step of the cache-time interval of caching of target object and the target object in the target bit rate at the cache-time interval Suddenly;
If it is not, executing the acquisition target object between the object time then in the target time interval from current time Every interior caching of target object cache-time interval and the target object the cache-time interval target bit rate The step of.
6. caching method for determining speed as claimed in any of claims 1 to 5, which is characterized in that the determining institute After the caching speed for stating target object, further includes:
The caching speed is detected whether less than the first predetermined threshold;
If so, the display interface display reminding information for passing through the AVPlayer player.
7. caching method for determining speed as claimed in any of claims 1 to 5, which is characterized in that described according to institute Caching total amount of byte and the target time interval are stated, determines the caching speed of the target object, and be shown in AVPlayer The display interface of player, comprising:
According to the caching total amount of byte and the target time interval, the caching speed of the target object is determined;
Judge whether the caching speed exceeds the second predetermined threshold;
If it is not, the caching speed is then shown the display interface in the AVPlayer player.
8. a kind of caching velocity determination apparatus based on AVPlayer player, which is characterized in that described device includes memory And processor, it is stored with the caching speed that can be run on the processor on the memory and determines program, the caching speed It spends when determining program is executed by the processor and realizes caching method for determining speed as described in any one of claim 1 to 7.
9. a kind of caching speed based on AVPlayer player determines system, which is characterized in that the system comprises:
Instruction receiving unit, for receiving the acquisition instruction to target object caching speed;The target object be audio and/or Video;
First acquisition unit, for obtaining the target object and caching mesh in target time interval according to the acquisition instruction Mark the cache-time interval of object;
Second acquisition unit, for obtaining the target object in the mesh at the cache-time interval according to the acquisition instruction Mark bit rate;
First determination unit, for determining that the target object exists using the cache-time interval and the target bit rate The caching total amount of byte of the target time interval;
Second determination unit, for determining the target object according to the caching total amount of byte and the target time interval Caching speed;
Display unit, for the caching speed to be shown the display interface in AVPlayer player.
10. a kind of computer readable storage medium, which is characterized in that be stored with caching speed on the computer readable storage medium Spend and determine program, the caching speed determines that program can be executed by one or more processor, with realize such as claim 1 to Method for determining speed is cached described in any one of 7.
CN201811612155.5A 2018-12-27 2018-12-27 Caching method for determining speed, device, system and storage medium based on player Pending CN109640159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811612155.5A CN109640159A (en) 2018-12-27 2018-12-27 Caching method for determining speed, device, system and storage medium based on player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811612155.5A CN109640159A (en) 2018-12-27 2018-12-27 Caching method for determining speed, device, system and storage medium based on player

Publications (1)

Publication Number Publication Date
CN109640159A true CN109640159A (en) 2019-04-16

Family

ID=66078272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811612155.5A Pending CN109640159A (en) 2018-12-27 2018-12-27 Caching method for determining speed, device, system and storage medium based on player

Country Status (1)

Country Link
CN (1) CN109640159A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022062619A1 (en) * 2020-09-22 2022-03-31 International Business Machines Corporation Real-time vs non-real time audio streaming
CN114416013A (en) * 2022-01-04 2022-04-29 深圳Tcl新技术有限公司 Data transmission method, data transmission device, electronic equipment and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291599A (en) * 2011-05-07 2011-12-21 董友球 Network video playing method and network video playing device
CN104683857A (en) * 2015-01-23 2015-06-03 华为技术有限公司 Method and device for realizing visual presentation of data preloading
US20180054649A1 (en) * 2016-08-17 2018-02-22 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and device for switching video streams

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291599A (en) * 2011-05-07 2011-12-21 董友球 Network video playing method and network video playing device
CN104683857A (en) * 2015-01-23 2015-06-03 华为技术有限公司 Method and device for realizing visual presentation of data preloading
US20180054649A1 (en) * 2016-08-17 2018-02-22 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and device for switching video streams

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022062619A1 (en) * 2020-09-22 2022-03-31 International Business Machines Corporation Real-time vs non-real time audio streaming
US11355139B2 (en) 2020-09-22 2022-06-07 International Business Machines Corporation Real-time vs non-real time audio streaming
GB2617910A (en) * 2020-09-22 2023-10-25 Ibm Real-time vs non-real time audio streaming
CN114416013A (en) * 2022-01-04 2022-04-29 深圳Tcl新技术有限公司 Data transmission method, data transmission device, electronic equipment and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN106095804B (en) A kind of processing method of video clip, localization method and terminal
US11259090B2 (en) Method for adjusting multimedia playing progress
CN105573538B (en) Sliding broken line compensation method and electronic equipment
CN105320417B (en) Page switching method and client
US20130167093A1 (en) Display apparatus for releasing locked state and method thereof
TW201516845A (en) Target element moving method, device and electronic equipment thereof
CN107562539B (en) Application program processing method and device, computer equipment and storage medium
CN108073346A (en) A kind of record screen method, terminal and computer readable storage medium
CN108845751A (en) Processing method, device, storage medium and the electronic equipment of touch information
US20150089439A1 (en) Electronic device, method for controlling the same, and control program
EP3201739B1 (en) Determining unintended touch rejection
CN109640159A (en) Caching method for determining speed, device, system and storage medium based on player
CN105681648A (en) Picture viewing method and device and electronic equipment
CN103399959A (en) Display method of interactive control of webpage and terminal
CN110740373B (en) Method and related device for buffering audio/video file
KR20160020486A (en) Independent hit testing for touchpad manipulations and double-tap zooming
CN103399711A (en) Display control method of pop-up window and terminal
WO2016112791A1 (en) Method and device for displaying interface of application program on mobile terminal
CN107277032B (en) Video definition switching method and device, storage medium and terminal
CN108415646B (en) Touch function setting method and device
WO2020024640A1 (en) Application display method and apparatus, and storage medium and electronic device
CN111212316A (en) Video generation method and electronic equipment
CN110401869A (en) A kind of net cast method, system and electronic equipment and storage medium
CN105549857B (en) A kind of control method and electric terminal of electric terminal
US20140267133A1 (en) Off-Center Sensor Target Region

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: 20190416