Background
In the past, when people watch videos through a mobile terminal, the whole video file is generally downloaded and stored in the mobile terminal, and then the videos are watched. However, as the popularity and speed of mobile networks have increased, online viewing of videos has become a trend. In order to ensure the fluency of online video playing, a buffering technology is usually adopted, and a situation that playing is frozen when a video is watched is avoided by buffering certain stream data.
The inventor of the present application found in long-term research and development that the probability that the user abandons playing halfway when watching a video online is high, which results in the waste of data that is not played in the buffer. Bandwidth resources are at a premium in wireless networks, and this data waste will increase the load on the network ecosystem, and will also increase the traffic cost of the user and the power consumption of the terminal, which is not favorable for maintaining the endurance of the terminal.
Disclosure of Invention
The invention mainly solves the technical problem of providing a video buffer control method, a terminal and a storage device, which can solve the problem of data flow and bandwidth resource waste caused by giving up playing midway when a user watches videos on line.
In order to solve the above technical problem, one technical solution adopted by the present invention is to provide a video buffering control method, including:
playing a video and monitoring the buffering time of the video;
judging whether the buffering time of the video exceeds a first threshold value;
and if so, reducing the downloading speed of the video.
In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a terminal for controlling video buffering, comprising a display screen and a processor coupled to each other;
the processor is used for controlling the display screen to play videos, monitoring the buffering time of the videos and judging whether the buffering time of the videos exceeds a first threshold value or not;
the processor is further configured to reduce a download speed of the video when a buffering time of the video exceeds a first threshold.
In order to solve the above technical problem, another technical solution of the present invention is to provide a storage device storing program data, which can be executed to implement the above method.
According to the invention, by monitoring the buffering time of the video, the downloading speed of the video is reduced when the buffering time of the video exceeds the first threshold, the current playing of the video can be ensured to be smooth when the buffering time reaches the first threshold, and meanwhile, the data flow and bandwidth resources required by video buffering can be reduced by reducing the downloading speed of the video, so that even if a user abandons playing the video, the wasted data flow and bandwidth resources can be correspondingly reduced.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Referring to fig. 1, an embodiment of a video buffering control method according to the present invention includes:
s1, playing the video and monitoring the buffering time of the video;
optionally, the video may be a video that can be played by a terminal such as a mobile phone and a tablet computer.
In this embodiment, the buffering time is counted from the time when the video is turned on as the starting point of the counting. The buffering time can be judged by monitoring the time display of the video software, and can also be timed by the timing software of the terminal.
S2, judging whether the buffering time of the video exceeds a first threshold value;
optionally, the first threshold may be a default first threshold, or may be set by a user. For example, the first threshold may be 5 minutes, 10 minutes, etc.
And S3, if yes, reducing the downloading speed of the video.
Optionally, the reduced downloading speed may be a default downloading speed, may also be a downloading speed preset by the user, and may also be adjusted according to the normally buffered downloading speed. For example, the reduced download speed is set to be 100kB/s (kilobyte/s) and 200kB/s, or the download speed of the normal buffer is set to be 600kB/s, and the reduced download speed is half of the download speed of the normal buffer (300kB/s) or 1/3(200kB/s), and so on.
According to the embodiment of the invention, by monitoring the buffering time of the video, the downloading speed of the video is reduced when the buffering time of the video exceeds the first threshold, the current playing of the video can be ensured to be smooth when the buffering time reaches the first threshold, and meanwhile, the data flow and bandwidth resources required by video buffering can be reduced by reducing the downloading speed of the video, so that even if a user abandons playing the video, the wasted data flow and bandwidth resources can be correspondingly reduced.
Referring to fig. 2, another embodiment of the video buffering control method of the present invention comprises:
s101, judging whether the terminal is connected with a mobile network or not;
optionally, whether the terminal is connected to the mobile network may be determined by detecting whether a mobile network function of the terminal is turned on, whether data traffic is generated, and the like.
Optionally, the terminal may be a terminal capable of playing video, such as a mobile phone and a tablet computer.
S102, if yes, acquiring the total duration of the video;
optionally, the total duration of the video may be obtained by time display of video software or by detecting the file size and resolution of the video.
S103, if not, normally buffering the video;
optionally, the normal buffering may be a default buffering time, or may be set by a user. For example, the buffering time is within 2 minutes and 5 minutes from the playback point.
S104, judging whether the total duration of the video exceeds a second threshold value or not;
optionally, the second threshold may be a default second threshold, or may be set by a user. For example, the second threshold may be 15 minutes, 30 minutes, etc.
S105, if yes, playing the video and monitoring the buffering time of the video, otherwise, normally buffering the video;
in this embodiment, the buffering time is counted from the time when the video is turned on as the starting point of the counting. The buffering time can be judged by monitoring the time display of the video software, and can also be timed by the timing software of the terminal.
S106, judging whether the buffering time of the video exceeds a first threshold value;
optionally, the first threshold may be a default first threshold, or may be set by a user. For example, the first threshold may be 5 minutes, 10 minutes, etc.
S107, if yes, reducing the downloading speed of the video, otherwise, normally buffering the video;
the optional reduced download speed may be a default download speed, may also be a download speed preset by the user, and may also be adjusted according to the download speed of the normal buffer. For example, the reduced download speed is set to be 100kB/s (kilobyte/s) and 200kB/s, or the download speed of the normal buffer is set to be 600kB/s, and the reduced download speed is half of the download speed of the normal buffer (300kB/s) or 1/3(200kB/s), and so on.
S108, judging whether the playing time of the video exceeds a third threshold value;
optionally, the third threshold may be a default third threshold, or may be set by a user. For example, the third threshold may be 10 minutes, 20 minutes, etc.
And S103, if so, normally buffering the video, otherwise, returning to the step S107, and continuing to buffer the video at the reduced video downloading speed.
Referring to fig. 3, another embodiment of the video buffering control method of the present invention comprises:
s201, playing a video and monitoring the buffering time of the video;
s202, detecting whether a fast forward operation aiming at a video is received in real time;
optionally, whether the fast forward operation for the video is received may be determined by detecting whether the fast forward operation is displayed in the video software or determining whether a time difference between a playing point of the video and a last playing point is greater than a threshold.
S203, if yes, judging whether the time length between the time point of the fast forward operation and the timing starting point exceeds a first threshold value;
s204, if the fast forward operation aiming at the video is not detected, the video is normally buffered;
in this embodiment, if the duration between the time point after the fast forward operation and the starting point of the timer exceeds the first threshold, the time point after the fast forward operation exceeds the range for determining whether the download speed of the video needs to be reduced, and the buffering time of the video cannot be monitored at the starting point of the timer.
S205, when the time length between the time point of the fast forward operation and the timing starting point exceeds a first threshold value, updating the timing starting point to the time point of the fast forward operation to monitor the buffering time of the video again, otherwise, buffering the video normally;
s206, judging whether the buffering time for re-monitoring exceeds a first threshold value;
s207, if yes, reducing the downloading speed of the video, and otherwise, normally buffering the video;
s208, judging whether the playing time monitored again exceeds a third threshold value;
and S204, if so, normally buffering the video, otherwise, returning to the step S207, and continuing to buffer the video at the reduced download speed of the control video.
In this embodiment, the playing method of monitoring the video again is similar to the above-mentioned method of starting monitoring from video playing, and is not described herein again.
According to the embodiment of the invention, by monitoring the buffering time of the video, the downloading speed of the video is reduced when the buffering time of the video exceeds the first threshold, the current playing of the video can be ensured to be smooth when the buffering time reaches the first threshold, and meanwhile, the data flow and bandwidth resources required by video buffering can be reduced by reducing the downloading speed of the video, so that even if a user abandons playing the video, the wasted data flow and bandwidth resources can be correspondingly reduced.
Referring to fig. 4, an embodiment of the terminal for controlling video buffering according to the present invention includes a display 401 and a processor 402 coupled to each other;
the processor 402 is configured to control the display screen 401 to play a video, monitor buffering time of the video, and determine whether the buffering time of the video exceeds a first threshold;
the processor 402 is further configured to reduce the download speed of the video when the buffering time of the video exceeds a first threshold.
Specifically, the method for implementing video buffering control according to the embodiment of the present invention refers to the above-mentioned embodiment of the video buffering control method, and details thereof are not repeated herein.
According to the embodiment of the invention, by monitoring the buffering time of the video, the downloading speed of the video is reduced when the buffering time of the video exceeds the first threshold, the current playing of the video can be ensured to be smooth when the buffering time reaches the first threshold, and meanwhile, the data flow and bandwidth resources required by video buffering can be reduced by reducing the downloading speed of the video, so that even if a user abandons playing the video, the wasted data flow and bandwidth resources can be correspondingly reduced.
Referring to fig. 5, the storage device 50 of the present invention stores program data 501, and the program data 501 can be executed to implement the above-mentioned method for controlling video buffering.
The device with storage function of the embodiment can be, but is not limited to, a usb disk, an SD card, a PD optical drive, a removable hard disk, a high-capacity floppy drive, a flash memory, a multimedia memory card, or a server.
Specifically, the method for implementing video buffering control according to the embodiment of the present invention refers to the above-mentioned embodiment of the video buffering control method, and details thereof are not repeated herein.
According to the embodiment of the invention, by monitoring the buffering time of the video, the downloading speed of the video is reduced when the buffering time of the video exceeds the first threshold, the current playing of the video can be ensured to be smooth when the buffering time reaches the first threshold, and meanwhile, the data flow and bandwidth resources required by video buffering can be reduced by reducing the downloading speed of the video, so that even if a user abandons playing the video, the wasted data flow and bandwidth resources can be correspondingly reduced.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.