WO2023169262A1 - 一种视频动态下载方法、装置、电子设备及存储介质 - Google Patents

一种视频动态下载方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2023169262A1
WO2023169262A1 PCT/CN2023/078822 CN2023078822W WO2023169262A1 WO 2023169262 A1 WO2023169262 A1 WO 2023169262A1 CN 2023078822 W CN2023078822 W CN 2023078822W WO 2023169262 A1 WO2023169262 A1 WO 2023169262A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
current
playback
video segment
data
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.)
Ceased
Application number
PCT/CN2023/078822
Other languages
English (en)
French (fr)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to US18/844,777 priority Critical patent/US20250310597A1/en
Publication of WO2023169262A1 publication Critical patent/WO2023169262A1/zh
Anticipated expiration legal-status Critical
Ceased 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream 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/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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44204Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
    • 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

Definitions

  • Embodiments of the present disclosure relate to the field of computer data processing technology, for example, to a video dynamic downloading method, device, electronic device, and storage medium.
  • the terminal player will continue to request video data from the cloud service and place the downloaded data in the video buffer.
  • the playback progress will load some data in advance.
  • the playback progress includes the progress bar that has been watched and the progress bar that has not been watched but has been downloaded.
  • the progress bar that has been downloaded but not played can also be called the player buffer, which exists to solve the problem of lagging during playback caused by bandwidth jitter.
  • the player buffer of the player is a fixed buffer, which has the disadvantage of conflicting user playback experience and data cost.
  • the larger the fixed buffer the more data will be downloaded and the possibility of user lag is smaller, but the amount of data waste will be higher. If the buffer is reduced, the amount of pre-downloaded data will be reduced.
  • the probability of playback freezes will greatly increase, ultimately affecting the user's video viewing experience and causing the video service provider to lose users.
  • Embodiments of the present disclosure provide a video dynamic downloading method, device, electronic device, and storage medium to solve the problem of a high waste rate of downloaded data when playing in a fixed buffer, and achieve reduction in the number of downloads without affecting the user's viewing experience. Waste of video download data.
  • embodiments of the present disclosure provide a method for dynamic video downloading, which method includes:
  • a download strategy for the current video is determined.
  • embodiments of the present disclosure also provide a video dynamic downloading device, which includes:
  • the video segment determination module is configured to determine the current video segment corresponding to the current playback moment during the playback of the current video
  • the cache judgment threshold acquisition module is configured to obtain the cache judgment threshold corresponding to the current video segment
  • a download strategy determination module is configured to determine a download strategy for the current video based on the amount of cached data that is currently cached and not played and the cache judgment threshold.
  • embodiments of the present disclosure also provide an electronic device, where the electronic device includes:
  • a storage device arranged to store at least one program
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor is caused to implement the video dynamic downloading method as described in any one of the embodiments of the present disclosure.
  • embodiments of the present disclosure also provide a storage medium containing computer-executable instructions, which when executed by a computer processor are used to perform video dynamics as described in any embodiment of the present disclosure. Download method.
  • Figure 1 is a schematic flow chart of a video dynamic downloading method provided by an embodiment of the present disclosure
  • Figure 2 is a schematic diagram of a data cache structure provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of another video dynamic downloading method provided by an embodiment of the present disclosure.
  • Figure 4 is a cumulative distribution function diagram of video viewing proportion provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart of yet another video dynamic downloading method provided by an embodiment of the present disclosure.
  • Figure 6 is a schematic structural diagram of a video dynamic downloading device provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the term “include” and its variations are open-ended, ie, “including but not limited to.”
  • the term “based on” means “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; and the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1 is a schematic flowchart of a video dynamic downloading method provided by an embodiment of the present disclosure.
  • the embodiment of the present disclosure is adapted to the situation of dynamically downloading a video to be played in a player.
  • This method can be provided by the video provided by an embodiment of the present disclosure.
  • the video dynamic downloading device can be implemented in the form of software and/or hardware.
  • it can be implemented through electronic equipment.
  • the electronic equipment can be a mobile terminal or a personal computer (Personal Computer, PC), etc. .
  • the first part includes the player
  • the second part includes the data download module.
  • the data download module is responsible for downloading video data from the server and caching the downloaded video data.
  • the player reads the video data from the data cached by the data download module and decodes and renders the video data. displayed to the user.
  • the cached data of the data download module includes video data that has been downloaded but has not been read by the player.
  • the player cache data includes the video data that the player has read from the data download module but has not yet been played.
  • the played data is the video data that the user has already watched.
  • the data download module is responsible for downloading video data.
  • the data downloaded from the network will first be placed in the data download module for data caching.
  • the player continuously reads the cached video data from the data download module and stores the read video data. Placed in the player buffer.
  • the player buffer size can be understood as the maximum amount of data that the player can read from the data download module.
  • the biggest shortcoming of fixed buffer logic in players in related technologies is the contradiction between user playback experience and data cost.
  • the larger the fixed buffer the more data is downloaded and the possibility of user lag is smaller, but the amount of data waste is higher. If the buffer is reduced, the amount of data downloaded in advance will be reduced. When the network condition is jittery, the probability of playback freezes will greatly increase.
  • the first part is the data that is not viewed in the player buffer, and the second part is the part that has been downloaded in the data download module but has not been read by the player.
  • embodiments of the present disclosure provide a method for dynamically downloading videos. As shown in Figure 1, the technical solution of this embodiment includes:
  • the amount of cached data that is currently cached and not played is obtained in real time.
  • the amount of cached data is the amount of data that the player can play without lagging.
  • the download strategy for the current video is determined based on the judgment results.
  • the download strategy for the current video may include continuing to download undownloaded videos, stopping downloading of undownloaded videos, and playing the cached data amount.
  • determining the download strategy for the current video based on the amount of cached data that is currently cached and not played and the cache judgment threshold may include: the amount of cached data that is currently cached and not played is greater than or equal to the cache judgment threshold, Indicates that the amount of cached data is sufficient. Stop downloading undownloaded videos and play the cached data to avoid excessive amounts of cached data when the user terminates playing the video. The amount of cached data that is currently cached and not played is less than the cache judgment threshold. , indicating that the amount of cached data is insufficient, continue downloading undownloaded videos to avoid playback freezes caused by insufficient amount of cached data.
  • the download strategy for the current video can be dynamically adjusted to take into account the smoothness of video playback and the efficient use of download resources.
  • the user has different viewing needs for the video, and the corresponding probabilities of terminating the video playback are also different.
  • the user initially learns the video content and determines whether to continue watching based on the learned playback content or playback duration. That is, in the early stage of video playback, the user's video viewing status is unstable and the probability of terminating video playback is high. There is a high probability of wasting cached data; at the end of video playback, the user is in a stable video viewing state, and the probability of terminating video playback is small, that is, the probability of wasting cached data is small.
  • the amount of cached data in different playback stages is judged based on the same cache judgment threshold.
  • the judgment is single, has poor flexibility, and cannot adapt to the different playback needs of different playback stages.
  • the video is divided into multiple video segments,
  • the cache judgment threshold is set for each video segment to adaptively determine the download strategy for different video segments.
  • Video segmentation can be understood as segmenting the complete current video according to preset segmentation conditions.
  • Each video may have at least two video segments.
  • the video segment distribution includes each video segment corresponding to a video range.
  • the video range may be a video playback ratio range, such as 1-50% of the video.
  • the segment is the first video segment, and 50%-100% of the video segment is the second video segment.
  • the video segments are divided according to the playback ratio.
  • the complete video includes n video segments, which can be divided by n-1 playback ratios.
  • the playback ratios can be 10%, 50%, etc., which are not limited.
  • the playback ratio corresponding to each video segment can be determined according to different segmentation conditions, and there is no limit to this.
  • the video range can be a playback duration range, and the video segments can also be divided according to the playback duration.
  • a video segment of 0-10 minutes is the first video segment
  • a video segment of 10-30 minutes is the second video segment.
  • the video segmentation divides the video based on multiple preset duration ranges, wherein the multiple preset duration ranges may be determined based on the total duration of the video, and the playback duration used to divide the video segments is less than the total duration of the video.
  • the playback duration corresponding to each video segment can be determined according to different segmentation conditions, and there is no limit to this.
  • determining the current video segment corresponding to the current playback moment in real time may be based on the video range to which the current playback moment belongs, and determining the video segment corresponding to the video range to which the current playback moment belongs as the current video segment. part.
  • the current playback ratio is determined based on the current playback moment and video duration
  • the playback ratio range to which the current playback ratio belongs is determined based on matching between the current playback ratio and the playback ratio ranges corresponding to multiple video segments, so as to determine the playback ratio.
  • the current video segment corresponding to the range is determined based on the current playback moment and video duration
  • the playback duration range to which the current playback moment belongs is determined to determine the current video segment corresponding to the playback duration range.
  • a corresponding cache judgment threshold is set for each video segment, and the cache judgment thresholds corresponding to different video segments are the same or different. There may be at least one cache judgment threshold corresponding to each video segment, and there is no limit to this.
  • different video segments correspond to different cache determination thresholds, where the cache determination threshold is positively correlated with the playback duration of the video segments.
  • the cache judgment threshold and the corresponding video segment are in The position in the video is related. The position of the video segment in the video can be characterized by the distance relative to the playback starting point. The greater the distance between the video segment and the playback start point, the greater the cache judgment threshold, and the video segmentation The smaller the distance relative to the playback starting point, the smaller the cache judgment threshold.
  • the cache judgment threshold can be set in advance based on historical video data, or of course can also be set based on actual conditions. There is no limit to the numerical setting of the cache judgment threshold.
  • the cache judgment threshold corresponding to the video segment to which the current playback moment belongs is determined in real time to judge the amount of cached data that is currently cached and not played, and to determine the download strategy for the video at the current moment.
  • dynamic cache judgment thresholds different download needs are met at different playback stages, achieving the effect of taking into account the smoothness of video playback and efficient utilization of download resources.
  • the technical solution of the embodiment of the present disclosure determines the current video segment corresponding to the current playback moment during the playback process of the current video; obtains the cache judgment threshold corresponding to the current video segment; and based on the currently cached and unplayed cache data Volume and cache judgment thresholds to determine the download strategy for the current video.
  • the above solution dynamically caches video data according to the video playback progress, and achieves precise control of the cache by the player link while meeting the need to save costs, thereby reducing the waste of video download data without affecting the user's viewing experience.
  • FIG. 3 is a schematic flowchart of another video dynamic downloading method provided by an embodiment of the present disclosure. Based on the above embodiment, a step of "determining the current video segment corresponding to the current playback moment" is added before the step of "determining the current video segment corresponding to the current playback moment".
  • Video segment distribution as shown in Figure 3, the method in this embodiment may also include:
  • S240 Determine a download strategy for the current video based on the amount of cached data that is currently cached and not played and the cache judgment threshold.
  • video segment distribution can be understood as the current view based on preset distribution conditions.
  • the video segment distribution obtained after frequency segmentation. Different video segment distributions can be obtained based on different distribution conditions.
  • the video segment distribution corresponding to the current video may be determined based on the video duration of the current video, where the video duration of the current video is the total duration of the current video. The shorter the video duration, the greater the probability that users will play it completely; the longer the video duration, the greater the probability that users will quit playing midway.
  • 0.5 hours is used as the dividing interval of the video duration range, that is, 0-0.5 hours is used as the first video duration range, 0.5 hours-1 hour is used as the second video duration range, and multiple video duration ranges are set in sequence, each Each video duration range corresponds to a video segment distribution. If it is determined that the video duration of the current video is 45 minutes, that is, 0.75 hours, it can be determined that the video segment distribution corresponding to the current video is the video segment distribution corresponding to the second video duration range, thereby determining the video segment distribution of the current video. .
  • the video segment distribution corresponding to the current video is determined according to the video resolution of the current video.
  • the video resolution affects the user's viewing experience of the video. If the video resolution is low, the video playback quality is poor, and the user exits the video playback. The probability is high. Correspondingly, the video resolution is high, the video playback quality is good, and the probability of the user exiting the video playback is small.
  • Multiple video segment distributions are set according to the video resolution, and the cache judgment thresholds at different times are set from the dimension of the video resolution. . Different video segment distributions are preset for different video resolutions, or different video segment distributions are preset for different video resolution ranges.
  • the video segment resolution of the current video is obtained, including but not limited to resolutions such as 360p, 720p, and 1080p; and the video segment distribution corresponding to the video segment resolution of the current video is further called.
  • the video resolution is 360p, corresponding to the first video segment
  • the video resolution is 720p, corresponding to the second video segment distribution, and so on, thereby determining the video segment distribution of the current video.
  • the current video is determined based on its video resolution and video duration.
  • the corresponding video segment distribution corresponds to the video resolution and video duration range respectively.
  • By obtaining the video resolution and video duration of the current video it is matched with the video resolution and video duration range of multiple video segment distributions to match Get the video segment distribution corresponding to the current video.
  • the video segment distribution of the current video is jointly determined by video resolution and video duration to improve the accuracy of video segment distribution.
  • the video segment distribution may include at least two video segments, and different video segment distributions may include the same number of video segments.
  • the video segment distribution includes three video segments.
  • each video segment in the video segment distribution may correspond to a preset segment duration range. For example, taking a video duration of 30 minutes as an example, the video segment distribution may divide the video into 0- There are three segments: 5 minutes, 5-15 minutes, and 15-30 minutes; taking the video duration range as 30-45 minutes as an example, corresponding to a video segment distribution, the video segment distribution can be divided into 0-5 There are three segments: minutes, 5-15 minutes, and 15 minutes to the end of the video.
  • each video segment in the video segment distribution may correspond to a preset segment ratio range, and different video segments correspond to different segment ratio ranges, where the segment ratio is the segment point at The proportion of duration in the total duration of the video.
  • the video segment distribution may be to divide the video into three segments: 0-10%, 10%-50%, and 50%-100%.
  • the cache judgment thresholds corresponding to different playback moments can be determined based on the video segments corresponding to multiple playback moments of the current video.
  • the dynamic cache judgment threshold Through the dynamic cache judgment threshold, different download requirements can be set for different playback moments. It avoids the problem of inflexible judgment caused by judging the amount of cached data in videos of different video segments based on the same cache judgment threshold, and achieves the effect of taking into account the smoothness of video playback and the efficient use of download resources.
  • the method for determining video segment distribution includes: determining historical playback videos based on at least one of video duration and video resolution; determining historical playback videos based on the exit rate of multiple playback moments.
  • the historically played videos may be acquired online videos played by the current player or other players.
  • multiple video segment distributions can be set according to at least one of the video duration and the video resolution as the setting dimension of the video segment distribution, so as to facilitate the determination of the video segment corresponding to the played video. segment distribution.
  • the historical video playback is determined based on the video duration, determine the historical video playback corresponding to each video duration or each video duration range. For example, obtain the video durations of ten seconds, one minute, ten minutes, half an hour, one hour, or other different lengths. of played videos as history played videos. If the historically played videos are determined based on the video resolution, the played videos of different resolutions are obtained as the historically played videos.
  • the historically played video is determined based on the video resolution and video duration, then the played video corresponding to the condition combination consisting of different resolutions and each video duration range is determined as the historically played video.
  • the historically played videos can also be determined based on other methods, and the method of determining the historically played videos is not limited.
  • the historical play videos corresponding to each set condition determine a video segment distribution. For example, a group of historical play videos with a video duration of ten seconds (or within ten seconds) is obtained, and the video duration is determined to be ten seconds (or within ten seconds).
  • Seconds corresponding to the video segment distribution; for example, obtain a set of historical playback videos with a video resolution of 1080P, and determine the video segment distribution corresponding to the video with a video resolution of 1080P; for example, obtain the video For a set of historically played videos with a resolution of 1080P and a video duration ranging from half an hour to one hour, determine the video segment distribution corresponding to the videos with a video resolution of 1080P and a video duration ranging from half an hour to one hour.
  • the method of determining the exit rate at any playback moment may include: obtaining the value-added value of the video viewing ratio at the current video playback moment, and the proportion of viewing records at the current video playback moment to the total viewing records. Value-added, and the exit rate at the current moment is determined based on the ratio of the added value of the video viewing ratio and the increased value of the viewing record to the total viewing record ratio.
  • Figure 4 shows a cumulative distribution function diagram of video viewing proportion.
  • the abscissa in the figure represents the user's video viewing ratio.
  • the user's video viewing ratio may be determined based on the playback duration when the user exits viewing and the total duration of the currently played video.
  • the vertical axis in the figure represents the proportion of current viewing records to the total viewing records. For example, it can be based on the number of users currently watching the video and The total number of users who watched the video determines the proportion of the current viewing record to the total viewing record.
  • the increment of the video viewing ratio is determined based on the difference between the video viewing ratio value at the second moment (X2) and the video viewing ratio at the first moment (X1), and based on the proportion of the second viewing record to the total viewing record.
  • the difference between (y2) and the proportion of the first viewing record to the total viewing records (y1) determines the increase in the proportion of viewing records to the total viewing records, and is determined based on the ratio of the increase in the video viewing ratio to the increase in the proportion of viewing records to the total viewing records.
  • the exit rate of the current video segment Continuing to refer to Figure 4, we can see that the exit rate in the cumulative distribution function curve increases faster in the early stage of video playback, indicating that more users exit video viewing in the early stage of video playback.
  • the exit rate threshold can be set in advance, and each group of historically played videos can be segmented based on the exit rate threshold to determine the video segment distribution of each group of historically played videos.
  • the video is divided into three video segments based on the exit rate threshold and the exit rate of each group of historically played videos at multiple video playback moments.
  • the exit rate threshold includes a first threshold and a second threshold. The first threshold is smaller than the second threshold.
  • the video segment distribution includes the video starting play point to the play point corresponding to the first threshold.
  • the first threshold corresponds to from the play point corresponding to the second threshold to the play point corresponding to the second threshold, and from the play point corresponding to the second threshold to the play end point, where the play point corresponding to the exit rate threshold may be the play time, or may be the ratio of the play time to the total duration of the video .
  • each video segment includes the first video segment with the highest exit rate from the start of playback to the first dotted line; the second video between the first dotted line and the second dotted line has a higher exit rate. Segment; third video segment with smooth exit rate after the second dotted line.
  • video segment distribution methods introduced above are only optional distribution methods. In this embodiment, other distribution methods can also be selected.
  • the comparison in this embodiment is not limited, but it is no longer necessary to list them one by one.
  • the method of determining the current video segment corresponding to the current playback moment based on the video segment distribution also includes: determining the respective video segments of each video segment in the video segment distribution. Corresponding playback duration range; determine the current video segment corresponding to the current playback moment based on the playback duration range to which the current playback moment belongs.
  • the technical solution of the embodiment of the present disclosure determines the video segment distribution of the current video during the playback process of the current video; and determines the current video segment corresponding to the current playback moment; and obtains the current video
  • the cache judgment threshold corresponding to the segment based on the amount of cached data that has been cached and not played and the cache judgment threshold, determine the download strategy for the current video.
  • the above solution pre-sets the video segment distribution of the currently playing video, and dynamically caches video data according to the video playback progress and the video segment at the current playback moment. It meets the need to save costs and minimizes the impact on users. The impact of viewing experience, thereby reducing the waste of video download data without affecting the user's viewing experience.
  • FIG. 5 is a schematic flowchart of another video dynamic downloading method provided by an embodiment of the present disclosure. Based on the above embodiment, the step "obtaining the cache judgment threshold corresponding to the current video segment” is refined into “obtaining the current video segment.
  • the method in this embodiment also includes:
  • the cache judgment threshold is preset to include a danger threshold and a safety threshold, and the safety threshold is greater than the danger threshold.
  • the danger threshold can be understood as the cache threshold where the amount of cached data that has been cached and not played is not enough to support the playback at the next moment, that is, no longer downloading video data will cause a high probability of video freezing;
  • the safety threshold can be understood
  • the amount of cached data that has been cached and not played can also support the current player to play for a period of time, which is a cache threshold that will not immediately cause video freezes even if the video data is not downloaded.
  • the above-mentioned division of danger thresholds and safety thresholds is only an optional embodiment, and other forms of division can also be carried out according to actual conditions, without limitation.
  • the danger threshold and the safety threshold can be preset based on the video duration and video resolution, or can be set based on the actual situation. Of course, they can also be set after playing. During the process, the same or different danger thresholds and safety thresholds are determined according to the video segment corresponding to the current playback moment. This embodiment does not impose restrictions on the settings of the danger threshold and safety threshold.
  • the method for determining the download policy for the current video also includes: triggering when the amount of cached data that is currently cached and not played is less than the danger threshold. Download the current video; when the amount of currently cached and unplayed cached data is greater than the safety threshold, stop downloading the undownloaded video and continue to obtain the current amount of cached and unplayed cached data in real time (i.e. the player Playback cached data amount).
  • the amount of cached data that has been cached but not played during the playback process of the current video can be obtained based on a preset time interval. Compare the current playback cache progress with the danger threshold and safety threshold in the cache judgment threshold, and determine the download strategy based on the comparison results. For example, the playback cache progress is compared with the danger threshold and the safety threshold respectively. If the current playback cache progress is lower than the danger threshold, the current download operation for the current video is triggered. After the current video data download is completed, continue to obtain the playback cache progress stored in the player's data cache area and continue to compare it with the danger threshold and safety threshold.
  • the data download module stops downloading undownloaded videos and plays the cached data. If the playback cache progress is higher than the danger threshold and lower than the safety threshold, the current state is maintained, the current playback cache progress is continuously updated, and the updated current playback cache progress is compared with the danger threshold and the safety threshold respectively.
  • the danger threshold and safety threshold corresponding to the current video can be determined according to the video segment distribution corresponding to the current video. For example, continue to refer to FIG. 4 .
  • the current video is divided into different video segments.
  • Figure 4 includes three video segments. Each video segment corresponds to a set of risk thresholds and safety thresholds, so that the download strategy can be dynamically determined based on different risk thresholds and safety thresholds in different video segments. This can maximize cost savings.
  • the probability of user exit is high, and a smaller danger threshold and safety threshold are set to make the amount of cached and unplayed data as small as possible, thereby reducing the waste of data.
  • the user exit probability becomes smaller.
  • the threshold range of the danger threshold and the safety threshold is raised, so that the current player can cache an appropriate amount of video data to ensure that the current video smooth playback.
  • the user exit rate is the slowest, indicating that users have a greater probability of completing watching the video. Therefore, setting a larger danger threshold and safety threshold can not only ensure the user's viewing experience but also control the amount of data waste.
  • the data download module will stop downloading only when all videos are downloaded. In this case, if the user quits watching, the unread data in the buffer and data download module will be wasted.
  • the technical solution of this embodiment pre-sets the safety threshold and the danger threshold. When the danger threshold is reached, the data download module starts downloading, and when the safety threshold is met, the data download module stops downloading. This can effectively control the progress of video downloading and reduce the amount of downloaded data. volume and reduce data waste, thereby maximizing cost savings.
  • the method of triggering the download of the current video may include: generating a download request for the next video block, and sending the download request to the server to download the next video block.
  • the video block can be understood as video data with a preset data amount.
  • the generated download request may be a video data download request including a preset data amount.
  • the video data reading request is sent to the server, so that the data download module obtains a preset amount of video data and caches the data.
  • generating a video data download request with a preset data amount may include determining the download data amount based on the duration of the next video block and the current code rate, and generating a download request based on the download data amount.
  • the video duration of the video data in the next video block is obtained and the network rate of the current downloaded data is determined, that is, the download data amount of the next video block is determined based on the video duration and the network rate, and a download request is generated based on the download data amount.
  • the above technical solution splits the video data requested in the download request into blocks, and each request for video blocks of a fixed duration can avoid the data download module from continuously caching resources and reduce the cached data inside the data download module.
  • the technical solution of the embodiment of the present disclosure is to pre-set the safety threshold and the danger threshold.
  • the data download module starts downloading.
  • the safety threshold is met, the data download module starts to download.
  • the download module stops downloading and requests a fixed-length video block for each download, which can effectively control the progress of video downloading, reduce the amount of downloaded data, and reduce data waste, thereby maximizing cost savings.
  • Figure 6 is a schematic structural diagram of a video dynamic downloading device provided by an embodiment of the present disclosure. As shown in Figure 6, the device includes: a video segment determination module 410, a cache judgment threshold acquisition module 420, and a download strategy determination module 430; wherein,
  • the video segment determination module 410 is configured to determine the current video segment corresponding to the current playback moment during the playback process of the current video;
  • the cache judgment threshold acquisition module 420 is configured to obtain the cache judgment threshold corresponding to the current video segment
  • the download strategy determination module 430 is configured to determine a download strategy for the current video based on the amount of cached data that is currently cached and not played and the cache judgment threshold.
  • the technical solution of the embodiment of the present disclosure determines the current video segment corresponding to the current playback moment during the playback process of the current video; obtains the cache judgment threshold corresponding to the current video segment; and based on the currently cached and unplayed The amount of cached data and the cache judgment threshold determine the download strategy for the current video.
  • the above solution dynamically caches video data according to the video playback progress, while meeting the need to save costs, and realizes that the player link requires precise control of the cache, thereby reducing the waste of video download data without affecting the user's viewing experience. .
  • the video segment determination module 410 includes:
  • the playback duration range determination unit is configured to determine the playback duration range corresponding to each video segment in the video segment distribution
  • the current video segment determination unit is configured to determine the current video segment corresponding to the current playback moment according to the playback duration range to which the current playback moment belongs.
  • the device further includes:
  • the determining module of the first video segment distribution is set to determine based on the video duration of the current video. Determine the video segment distribution corresponding to the current video.
  • the device further includes:
  • the second video segment distribution determining module is configured to determine the video segment distribution corresponding to the current video according to the video resolution of the current video.
  • the device further includes:
  • the historically played video determination module is configured to determine the historically played video based on at least one of video duration and video resolution;
  • the third video segment distribution determining module is configured to determine the video segment distribution based on exit rates at multiple playback moments in historical video playback.
  • different video segments correspond to different cache judgment thresholds, wherein the cache judgment threshold is positively related to the playback duration of the video segments.
  • the cache judgment threshold includes a danger threshold and a safety threshold
  • the download policy determination module 430 includes:
  • the first download strategy determination sub-module is configured to trigger the download of the current video when the amount of cached data that is currently cached and not played is less than the risk threshold;
  • the second download strategy determination sub-module is configured to stop downloading undownloaded videos when the amount of currently cached and unplayed cached data is greater than the safety threshold, and continue to obtain the currently cached and unplayed videos in real time. The amount of cached data that has not been played.
  • the first download strategy determination sub-module includes:
  • the first video chunk download unit is configured to generate a download request for the next video chunk, and send the download request to the server to download the next video chunk.
  • the first video block download unit includes:
  • the download request generating subunit is configured to determine the download data amount based on the duration of the next video block and the current code rate, and generate a download request based on the download data amount.
  • the device provided by the embodiments of the present disclosure can execute the method provided by any embodiment of the present disclosure, and has Execute the function module corresponding to the method.
  • Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA), PAD (tablet computers), portable multimedia players (Portable Media Player , PMP), mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital televisions (Television, TV), desktop computers, etc.
  • PDA Personal Digital Assistant
  • PAD tablet computers
  • PMP portable multimedia players
  • mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals)
  • fixed terminals such as digital televisions (Television, TV), desktop computers, etc.
  • the electronic device shown in FIG. 7 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 400 may include a processing device (such as a central processing unit, a graphics processor, etc.) 401, which may process data according to a program stored in a read-only memory (Read-Only Memory, ROM) 402 or from a storage device. 408 loads the program in the random access memory (Random Access Memory, RAM) 403 to perform various appropriate actions and processing. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored.
  • the processing device 401, ROM 402 and RAM 403 are connected to each other via a bus 404.
  • An input/output (I/O) interface 405 is also connected to bus 404.
  • the following devices can be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) , an output device 407 such as a speaker, a vibrator, etc.; a storage device 408 including a magnetic tape, a hard disk, etc.; and a communication device 409.
  • the communication device 409 may allow the electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data.
  • Figure 7 shows the There are various means for the electronic device 400, but it should be understood that implementation or having all illustrated means are not required. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication device 409, or from storage device 408, or from ROM 402.
  • the processing device 401 When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
  • the electronic device provided by the embodiments of the present disclosure and the video dynamic downloading method provided by the above embodiments belong to the same inventive concept. Technical details that are not described in detail in this embodiment can be referred to the above embodiments.
  • Embodiments of the present disclosure provide a computer storage medium on which a computer program is stored.
  • the program is executed by a processor, the video dynamic downloading method provided in the above embodiments is implemented.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof.
  • Computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmable read-only memory ((Erasable Programmable Read-Only Memory, EPROM) or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or the above any suitable combination.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. code. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
  • the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communications e.g., communications network
  • Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any current network for knowledge or future research and development.
  • LANs Local Area Networks
  • WANs Wide Area Networks
  • the Internet e.g., the Internet
  • end-to-end networks e.g., ad hoc end-to-end networks
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries at least one program.
  • the electronic device executes the above-mentioned at least one program.
  • a download strategy for the current video is determined.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages—such as "C” or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • remote computing In the case of a computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). .
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure can be implemented in software or hardware. Among them, the name of the unit/module does not constitute a limitation on the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: field programmable gate array (Field Programmable Gate Array, FPGA), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), application specific standard product (Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or Semiconductor systems, devices or equipment, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • Example 1 provides a video dynamic downloading method, which method includes:
  • a download strategy for the current video is determined.
  • Example 2 provides a video dynamic downloading method, further including:
  • Determining the current video segment corresponding to the current playback moment includes:
  • the current video segment corresponding to the current playback moment is determined.
  • Example 3 provides a method for dynamically downloading videos, further including:
  • the method for determining the video segment distribution includes:
  • the video segment distribution corresponding to the current video is determined.
  • Example 4 provides a method for dynamically downloading videos, further including:
  • the method for determining the video segment distribution includes:
  • the video segment distribution corresponding to the current video is determined.
  • Example 5 provides a method for dynamically downloading videos, Also includes:
  • the method for determining the video segment distribution includes:
  • video segment distribution is determined based on the exit rate at multiple playback moments.
  • Example 6 provides a method for dynamically downloading videos, further including:
  • Different video segments correspond to different cache judgment thresholds, where the cache judgment threshold is positively correlated with the playback duration of the video segments.
  • Example 7 provides a method for dynamically downloading videos, further including:
  • the cache judgment threshold includes a danger threshold and a safety threshold
  • Determining the download strategy for the current video based on the amount of cached data that is currently cached and not played and the cache judgment threshold includes:
  • Example 8 provides a method for dynamically downloading videos, further including:
  • the triggering of downloading the current video includes:
  • a download request for the next video chunk is generated and sent to the server to download the next video chunk.
  • Example 9 provides a method for dynamically downloading videos, including:
  • the method of generating a download request for the next video block includes:
  • the amount of downloaded data is determined, and a download request is generated based on the amount of downloaded data.
  • Example 10 provides a video dynamic downloading device, which includes:
  • the video segment determination module is configured to determine the current video segment corresponding to the current playback moment during the playback of the current video
  • the cache judgment threshold acquisition module is configured to obtain the cache judgment threshold corresponding to the current video segment
  • a download strategy determination module is configured to determine a download strategy for the current video based on the amount of cached data that is currently cached and not played and the cache judgment threshold.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本公开实施例公开了一种视频动态下载方法、装置、电子设备及存储介质。该方法包括:在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;获取所述当前视频分段对应的缓存判断阈值;基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。

Description

一种视频动态下载方法、装置、电子设备及存储介质
本公开要求在2022年3月8日提交中国专利局、申请号为202210220649.9的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及计算机数据处理技术领域,例如涉及一种视频动态下载方法、装置、电子设备及存储介质。
背景技术
在线视频的观看过程中,终端的播放器会持续向云服务请求视频数据并且将下载得到的数据放在视频缓冲区。播放器加载资源数据时,为了抵抗网络抖动问题,播放进度会提前加载部分数据。播放进度包括已经观看的进度和未被观看但是已经下载的进度条。已经下载还未播放的进度条也可以称作播放器缓冲区,其存在是为了解决带宽抖动导致播放过程中的卡顿。
但是相关技术中播放器的播放器缓冲区为固定缓冲区,其缺点是用户播放体验和数据成本的矛盾。固定的缓冲区越大,下载的数据也就越多,造成用户卡顿的可能性更小,但是数据浪费量也就越高。如果减小缓冲区,则预先下载的数据量变少,在网络状况抖动时,播放发生卡顿的概率大大增加,最终影响到用户的视频观看体验,造成视频服务提供商的用户流失。
发明内容
本公开实施例提供了一种视频动态下载方法、装置、电子设备及存储介质,以解决固定缓冲区情况下播放下载数据浪费率较高的问题,实现了在不影响用户观看体验的情况下减少视频下载数据的浪费。
第一方面,本公开实施例提供了一种视频动态下载方法,该方法包括:
在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
获取所述当前视频分段对应的缓存判断阈值;
基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
第二方面,本公开实施例还提供了一种视频动态下载装置,该装置包括:
视频分段确定模块,设置为在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
缓存判断阈值获取模块,设置为获取所述当前视频分段对应的缓存判断阈值;
下载策略确定模块,设置为基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
第三方面,本公开实施例还提供了一种电子设备,所述电子设备包括:
至少一个处理器;
存储装置,设置为存储至少一个程序,
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如本公开实施例任一所述的视频动态下载方法。
第四方面,本公开实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如本公开实施例任一所述的视频动态下载方法。
附图说明
贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例提供的一种视频动态下载方法流程示意图;
图2是本公开实施例提供的一种数据缓存结构示意图;
图3是本公开实施例提供的另一种视频动态下载方法流程示意图;
图4是本公开实施例提供的视频观看比例的累计分布函数图;
图5是本公开实施例提供的又一种视频动态下载方法流程示意图;
图6为本公开实施例提供的一种视频动态下载装置的结构示意图;
图7是本公开实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“至少一个”。
图1为本公开实施例所提供的一种视频动态下载方法流程示意图,本公开实施例适应于在对播放器中待播放的视频进行动态下载的情况,该方法可以由本公开实施例提供的视频动态下载装置来执行,该视频动态下载装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端或个人电脑(Personal Computer,PC)端等。
在对本公开实施例的技术方案进行介绍之前,先对本实施例公开的技术方 案的应用场景进行示例性的介绍。当前,下述应用场景只是作为本公开实施例的可选应用场景,本实施例的技术方案还可以应用于其他需要动态下载的场景,本实施例对技术方案的应用场景不加以限制。示例性的,应用场景包括:
在线视频的观看过程中,视频播放需要两个模块的配合。其中,第一部分包括播放器,第二部分包括数据下载模块。数据下载模块负责从服务器下载视频数据,并对下载的视频数据进行缓存,播放器则从数据下载模块缓存的数据中进行视频数据读取,并通过对读取的视频数据进行解码渲染后将视频展示给用户。如图2所示,数据下载模块缓存数据包括已经下载但是播放器还没有读取的视频数据。播放器缓存数据包括播放器已经从数据下载模块读取但是还未被播放的视频数据,已经播放数据是目前用户已经观看的视频数据。数据下载模块负责视频数据的下载,从网络下载的数据会先被放置在数据下载模块进行数据缓存,播放器持续不断的从数据下载模块读取已经缓存的视频数据,并将读取的视频数据放置在播放器缓冲区。
目前来说,播放器一般使用固定大小的播放器缓冲区,播放器缓冲区大小可以理解为播放器可以从数据下载模块读取的最大数据量。在网络状况不变的情况下,缓冲区越大,可进行缓存数据也就越多,造成用户卡顿的可能性更小。但是如果用户在观看过程中终止观看,则缓冲的数据就会被浪费,形成下载资源的损耗。相关技术中播放器中固定缓冲区逻辑最大的缺点是用户播放体验和数据成本的矛盾。固定的缓冲区越大,下载的数据越多,造成用户卡顿的可能性更小,但是数据浪费量也就越高。如果减小缓冲区,则预先下载的数据量变少,在网络状况抖动时,播放发生卡顿的概率大大增加。
数据浪费会发生在两个部分,第一部分是播放器缓冲区没有被观看的数据,第二个部分是数据下载模块中已经下载但是没有被播放器读取的部分。
为了解决上述用户播放体验和数据成本的矛盾,即实现不影响用户观看体验的情况下减少视频下载数据的浪费,本公开实施例提供了一种视频动态下载方法。如图1,本实施例的技术方案包括:
S110、在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段。
S120、获取当前视频分段对应的缓存判断阈值。
S130、基于当前已缓存且未播放的缓存数据量和缓存判断阈值,确定对当前视频的下载策略。
在本实施例中,实时获取当前已缓存且未播放的缓存数据量,该缓存数据量为播放器可进行无卡顿播放的数据量。通过设置缓存判断阈值,对当前已缓存且未播放的缓存数据量进行判别,并根据判别结果确定对当前视频的下载策略。其中,对当前视频的下载策略可以包括对未下载视频的继续下载和停止对未下载视频的下载,并播放已缓存数据量。
在一些实施例中,基于当前已缓存且未播放的缓存数据量和缓存判断阈值,确定对当前视频的下载策略,可以包括:当前已缓存且未播放的缓存数据量大于或等于缓存判断阈值,表明缓存数据量充足,停止对未下载视频的下载,并播放已缓存数据量,避免用户终止播放该视频时缓存数据量过多的情况;当前已缓存且未播放的缓存数据量小于缓存判断阈值,表明缓存数据量不足,对未下载视频的继续下载,避免缓存数据量不足导致的播放卡顿的情况。通过设置缓存判断阈值,可动态调节对当前视频的下载策略,以兼顾视频播放的流畅性和下载资源的高效利用。
在上述实施例的基础上,根据视频播放的不同阶段,用户对视频的观看需求不同,相应的终止视频播放的概率也不同。示例性的,在视频的播放初期,用户初步获知视频内容,会根据所获知的播放内容或者播放时长判断是否继续观看,即在播放初期用户的视频观看状态不稳定,终止视频播放的概率高,存在较高的缓存数据浪费概率;在视频的播放末期,用户处于稳定的视频观看状态,终止视频播放的概率小,即缓存数据的浪费概率小。基于同一缓存判断阈值对不同播放阶段的缓存数据量进行判别,判别单一,灵活性差,无法适应不同播放阶段的不同播放需求。针对上述技术问题,将视频划分为多个视频分段, 并对每个视频分段分别设置缓存判断阈值,以在不同视频分段自适应的确定下载策略。视频分段可以理解为按预设分段条件将完整的当前视频进行分段。
每一视频的视频分段可以是为至少两个,视频分段分布中包括每个视频分段分别对应视频范围,可选的,视频范围可以是视频播放比例范围,例如1-50%的视频段为第一视频分段,50%-100%的视频段为第二视频分段。相应的,视频分段根据播放比例划分得到。示例性的,完整视频包括n个视频分段,可通过n-1个播放比例进行划分得到,例如播放比例可以是10%、50%等,对此不作限定。每个视频分段对应的播放比例,可根据不同的分段条件确定,对此不作限定。
可选的,视频范围可以是播放时长范围,视频分段还可以是根据播放时长划分,例如0-10分钟的视频段为第一视频分段,10-30分钟为第二视频分段。相应的,视频分段基于多个预设时长范围将视频划分,其中,多个预设时长范围可以是根据视频总时长确定,用于划分视频分段的播放时长小于视频总时长。每个视频分段对应的播放时长可根据不同的分段条件确定,对此不作限定。
在当前视频的播放过程中,实时确定当前播放时刻对应的当前视频分段,可以是基于当前播放时刻所属的视频范围,将当前播放时刻所属的视频范围对应的视频分段,确定为当前视频分段。示例性的,根据当前播放时刻和视频时长确定当前播放比例,基于当前播放比例和多个视频分段分别对应的播放比例范围进行匹配,确定当前播放比例所属的播放比例范围,以确定该播放比例范围对应的当前视频分段。或者,根据当前播放时刻对应的播放时长和多个视频分段对应的播放时长范围相匹配,确定当前播放时刻所属的播放时长范围,以确定该播放时长范围对应的当前视频分段。
每一视频分段分别设置对应的缓存判断阈值,不同视频分段对应的缓存判断阈值相同或不同。每一视频分段对应的缓存判断阈值可以是至少一个,对此不作限定。在一些实施例中,不同视频分段对应不同的缓存判断阈值,其中,缓存判断阈值与视频分段的播放时长正相关。缓存判断阈值与对应视频分段在 视频中的位置相关,其中,视频分段在视频中的位置可以是通过相对于播放起始点的距离表征,视频分段相对于播放起始点的距离越大,缓存判断阈值越大,视频分段相对于播放起始点的距离越小,缓存判断阈值越小。
缓存判断阈值可以是基于历史视频数据预先进行设置,当然还可以是基于实际情况进行设置,对缓存判断阈值的数值设置不加以限制。
在视频播放的过程中,实时确定当前播放时刻所属的视频分段对应的缓存判断阈值,以对当前已缓存且未播放的缓存数据量进行判断,确定当前时刻对视频的下载策略。通过动态的缓存判断阈值,在不同播放阶段满足不同的下载需求,达到了兼顾视频播放的流畅性和下载资源的高效利用的效果。
本公开实施例的技术方案,通过在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;获取当前视频分段对应的缓存判断阈值;基于当前已缓存且未播放的缓存数据量和缓存判断阈值,确定对当前视频的下载策略。上述方案通过根据视频播放进度动态地缓存视频数据,在满足节约成本的需求下,实现播放器链路对缓存进行精确控制,从而在不影响用户观看体验的情况下减少视频下载数据的浪费。
图3为本公开实施例所提供的另一种视频动态下载方法流程示意图,在上述实施例的基础上,在步骤“确定当前播放时刻对应的当前视频分段”之前增加了步骤“确定当前视频的视频分段分布”;如图3,本实施例的方法还可以包括:
S210、确定当前视频的视频分段分布。
S220、在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段。
S230、获取当前视频分段对应的缓存判断阈值。
S240、基于当前已缓存且未播放的缓存数据量和缓存判断阈值,确定对当前视频的下载策略。
在本公开实施例中,视频分段分布可以理解为基于预设分布条件对当前视 频进行分段之后得到的视频分段分布情况。基于不同的分布条件可以得到不同的视频分段分布情况。
在一些实施例中,可以基于当前视频的视频时长,确定当前视频对应的视频分段分布,其中,当前视频的视频时长为当前视频总时长。视频时长越小,用户完整播放的概率越大,视频时长越大,用户中途退出播放的概率越大。基于视频时长设置视频分段分布,从视频时长的维度设置各不同时刻的缓存判断阈值。示例性的,不同的视频时长对应不同的视频分段分布,或者,不同的视频时长范围对应不同的视频分段分布,确定当前视频的视频时长所属的视频时长范围,将所属的视频时长范围对应的视频分段分布确定为当前视频的视频分段分布。示例性的,以0.5小时为视频时长范围的划分间隔,即将0-0.5小时作为第一个视频时长范围,0.5小时-1时作为第二视频时长范围,依次设置多个视频时长范围,每个视频时长范围分别对应一种视频分段分布。若确定当前视频的视频时长为45分钟,即为0.75小时,则可以确定当前视频对应的视频分段分布为第二视频时长范围对应的视频分段分布,从而确定当前视频的视频分段分布情况。
在一些实施例中,根据当前视频的视频分辨率,确定当前视频对应的视频分段分布,视频分辨率影响用户对视频的观看感受,视频分辨率低,视频播放画质差,用户退出视频播放概率大,相应的,视频分辨率高,视频播放画质良好,用户退出视频播放概率小,根据视频分辨率设置多个视频分段分布,从视频分辨率的维度设置各不同时刻的缓存判断阈值。不同的视频分辨率预先设置不同的视频分段分布,或者,不同视频分辨率范围预先设置不同的视频分段分布。示例性的,获取当前视频的视频分段分辨率,例如包括但不限于360p、720p以及1080p等分辨率;进一步地调用当前视频的视频分段分辨率对应的视频分段分布。例如视频分辨率为360p,对应第一视频分段,视频分辨率为720p,对应第二视频分段分布,并以此类推,从而确定当前视频的视频分段分布情况。
在一些实施例中,根据当前视频的视频分辨率和视频时长,确定当前视频 对应的视频分段分布。其中,每个视频分段分布分别对应视频分辨率和视频时长范围,通过获取当前视频的视频分辨率和视频时长,与多个视频分段分布的视频分辨率和视频时长范围进行匹配,以匹配得到当前视频对应的视频分段分布。通过视频分辨率和视频时长共同确定当前视频的视频分段分布,以提高视频分段分布的准确性。
需要说明的是,视频分段分布中可以是包括至少两个视频分段,不同视频分段分布中可以包括相同数量的视频分段。可选的,视频分段分布中包括三个视频分段。在一些实施例中,视频分段分布中的每个视频分段可以分别对应预设的分段时长范围,例如以视频时长为30分钟为例,视频分段分布可以是将视频划分为0-5分钟、5-15分钟、15-30分钟三个分段;以视频时长范围为30-45分钟为例,对应一视频分段分布,该视频分段分布可以是将视频划分为0-5分钟、5-15分钟、15分钟至视频结束三个分段。在一些实施例中,视频分段分布中每个视频分段可以是分别对应预设的分段比例范围,不同视频分段对应不同的分段比例范围,其中,分段比例为分段点在视频总时长中的时长比例,示例性的,视频分段分布可以是将视频划分为0-10%、10%-50%、50%-100%三个分段。
在当前视频的播放过程中,可以根据当前视频多个播放时刻所对应的视频分段确定不同播放时刻分别对应的缓存判断阈值,通过动态的缓存判断阈值,对不同播放时刻设置不同的下载需求,避免了基于同一缓存判断阈值对不同视频分段的视频中的缓存数据量进行判别所造成的判断不灵活的问题,实现了兼顾视频播放的流畅性和下载资源的高效利用的效果。
在上述实施例的基础上,视频分段分布的确定方法包括:基于视频时长和视频分辨率中的至少一项,确定历史播放视频;在历史播放视频中,基于多个播放时刻的退出率确定视频分段分布。其中,历史播放视频可以是获取到的当前播放器或者其他播放器播放过的在线视频。
本实施例中,可根据视频时长和视频分辨率中的至少一项作为视频分段分布的设置维度,分别设置多个视频分段分布,便于确定播放视频对应的视频分 段分布。若基于视频时长确定历史播放视频,则确定各视频时长或者各视频时长范围分别对应的历史播放视频,例如分别获取视频时长为十秒、一分钟、十分钟、半小时、一小时或者其他不同时长的已播放视频作为历史播放视频。若基于视频分辨率确定历史播放视频,则分别获取不同分辨率的已播放视频作为历史播放视频。若基于视频分辨率和视频时长确定历史播放视频,则确定不同分辨率和各视频时长范围组成的条件组合对应的已播放视频作为历史播放视频。当然,还可以基于其他方式确定历史播放视频,对确定历史播放视频的方式不加以限定。
确定历史播放视频之后,确定历史播放视频在多个播放时刻的退出率,并基于历史播放视频在多个播放时刻的退出率确定视频分段分布。其中,退出率可以理解视频播放的过程中用户退出观看的比例。其中,每一设置条件对应的历史播放视频确定一视频分段分布,示例性的,获取视频时长为十秒(或者十秒以内)的一组历史播放视频,确定视频时长为十秒(或者十秒以内)的视频对应的视频分段分布;示例性的,获取视频分辨率为1080P的一组历史播放视频,确定视频分辨率为1080P的视频对应的视频分段分布;示例性的,获取视频分辨率为1080P、视频时长为半小时至一小时范围内的一组历史播放视频,确定视频分辨率为1080P、视频时长为半小时至一小时范围的视频对应的视频分段分布。
可选的,对于每一组历史播放视频,确定任一播放时刻的退出率的方法可以包括:获取当前视频播放时刻的视频观看比例的增值,以及当前视频播放时刻的观看记录占总观看记录比例增值,并基于视频观看比例的增值与观看记录占总观看记录比例增值的比值确定当前时刻的退出率。
示例性的如图4所示,图4表示视频观看比例的累计分布函数图。其中,图中横坐标表示用户的视频观看比例。示例性的,可以基于用户退出观看时的播放时长和当前播放视频总时长确定用户视频观看比例。图中纵坐标代表当前观看记录占总观看记录比例。示例性的,可以基于当前观看视频的用户数量和 观看视频的总用户数量确定当前观看记录占总观看记录比例。
示例性的,基于第二时刻的视频观看比例数值(X2)和第一时刻的视频观看比例(X1)之间的差值确定视频观看比例的增值,并基于第二观看记录占总观看记录比例(y2)和第一观看记录占总观看记录比例(y1)之间的差值确定观看记录占总观看记录比例增值,并基于视频观看比例的增值与观看记录占总观看记录比例增值的比值确定当前视频段的退出率。继续参考图4,可以看到累计分布函数曲线中退出率在视频播放前期的增长速度较快,说明有较多的用户在视频播放的前期退出视频观看。
可选的,可以预先设置退出率阈值,基于退出率阈值对每组历史播放视频进行视频分段,确定每组历史播放视频的视频段分布。示例性的,根据退出率阈值以及每组历史播放视频在多个视频播放时刻的退出率将视频分成三个视频分段。可选的,退出率阈值包括第一阈值和第二阈值,第一阈值小于第二阈值,相应的,视频分段分布包括视频起始播放点至第一阈值对应的播放点,第一阈值对应的播放点至第二阈值对应的播放点,以及第二阈值对应的播放点至播放结束点,其中,退出率阈值对应的播放点可以是播放时刻,还可以是播放时刻在视频总时长的比例。参见图4,各视频分段包括从开始播放到第一条虚线标出的退出率最高的第一视频分段;第一条虚线和第二条虚线之间的退出率较高的第二视频分段;第二条虚线之后退出率平稳的第三视频分段。
当然,上述介绍的各视频分段分布方式只是作为可选分布方式,本实施例还可以选择其他分布方式,本实施例对比不加以限制,但也不再不一一列举。
在本公开实施例中,在确定当前视频的视频分段分布之后,基于视频分段分布确定当前播放时刻对应的当前视频分段的方法还包括:确定视频分段分布中每一视频分段分别对应的播放时长范围;根据当前播放时刻所属的播放时长范围,确定当前播放时刻对应的当前视频分段。
本公开实施例的技术方案,通过在对当前视频的播放过程中,确定当前视频的视频分段分布;并确定当前播放时刻对应的当前视频分段;获取当前视频 分段对应的缓存判断阈值;基于当前已缓存且未播放的缓存数据量和缓存判断阈值,确定对当前视频的下载策略。上述方案通过预先设置当前播放中视频的视频分段分布情况,并根据视频播放进度以及当前播放时刻所处的视频分段动态地缓存视频数据,在满足节约成本的需求下,尽可能减少对于用户观看体验的影响,从而实现在不影响用户观看体验的情况下减少视频下载数据的浪费。
图5为本公开实施例所提供的又一种视频动态下载方法流程示意图,在上述实施例的基础上,将步骤“获取当前视频分段对应的缓存判断阈值”细化为“获取当前视频分段对应的缓存判断阈值;其中,缓存判断阈值包括危险阈值和安全阈值”;如图5,本实施例的方法还包括:
S310、在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段。
S320、获取当前视频分段对应的缓存判断阈值;其中,缓存判断阈值包括危险阈值和安全阈值。
S330、基于当前已缓存且未播放的缓存数据量和缓存判断阈值,确定对当前视频的下载策略。
在本公开实施例中,为了实现下载资源的高效利用以及兼顾视频播放的流畅性,预先设置缓存判断阈值包括危险阈值和安全阈值,安全阈值大于危险阈值。其中,危险阈值可以理解为已缓存且未播放的缓存数据量不足以支撑下一时刻播放的缓存阈值,即不再下载视频数据会导致视频卡顿的概率较大的缓存阈值;安全阈值可以理解为已缓存且未播放的缓存数据量还可以支撑当前播放器播放一段时间,即不下载视频数据也不会立即导致视频卡顿的缓存阈值。当然,上述对危险阈值和安全阈值的划分只是可选实施例,还可以根据实际情况进行其他形式的划分,对此不加以限制。
需要说明的是,本实施例中危险阈值和安全阈值可以基于视频时长和视频分辨率进行预先设置,也可以基于实际情况进行设置,当然,还可以在播放过 程中根据当前播放时刻所对应的视频分段确定相同或者不同的危险阈值和安全阈值,本实施例对危险阈值和安全阈值的设置不加以限制。
本实施例中,在确定缓存判断阈值中的危险阈值和安全阈值之后,确定对当前视频的下载策略的方法还包括:在当前已缓存且未播放的缓存数据量小于危险阈值的情况下,触发对当前视频的下载;在当前已缓存且未播放的缓存数据量大于安全阈值的情况下,停止对未下载视频的下载,并继续实时获取当前已缓存且未播放的缓存数据量(即播放器播放已缓存数据量)。
在一些实施例中,可以基于预设时间间隔获取当前视频在播放过程中已缓存且未播放的缓存数据量,即播放器的数据缓存区存储的当前播放缓存进度。分别将当前播放缓存进度与缓存判断阈值中的危险阈值和安全阈值进行比对,并基于比对结果确定下载策略。示例性的,将该播放缓存进度分别与危险阈值和安全阈值进行比对,若当前播放缓存进度低于危险阈值,则触发对当前视频的当前次下载操作。在当前次的视频数据下载结束后,继续获取播放器的数据缓存区存储的播放缓存进度并继续与危险阈值和安全阈值进行比对。若该播放缓存进度高于安全阈值,则数据下载模块停止对未下载视频的下载,并播放已缓存数据量。若该播放缓存进度高于危险阈值,且低于安全阈值,则保持当前状态,并持续更新当前播放缓存进度,并将更新的当前播放缓存进度与分别与危险阈值和安全阈值进行比对。
在当前视频的播放过程中,可以根据当前视频所对应的视频分段分布确定当前视频所对应的危险阈值和安全阈值。示例性的,继续参照图4。根据用户的在视频播放中的退出率,将当前视频划分为不同的视频分段。图4中包括三个视频分段,每一视频分段分别对应一组危险阈值和安全阈值,以便于在不同视频分段自适应的基于不同的危险阈值和安全阈值,动态的确定下载策略,从而可以实现成本节约的最大化。
对于第一视频分段:用户退出的概率较大,设置较小的危险阈值和安全阈值,使得已缓存且未播放的缓存数据量尽可能的小,从而减少数据量的浪费。 对于第二视频分段:用户退出概率变小,相比于第一视频分段,将危险阈值和安全阈值的阈值范围进行上调,使得当前播放器可以缓存合适的视频数据量,以保证当前视频的流畅播放。对于第三阶段:用户退出率最为平缓,说明用户有较大的概率将视频观看完成,因此设置较大的危险阈值和安全阈值,既能保证用户的观看体验也控制了数据浪费量较少。
值得注意的是,在原来的视频下载逻辑下,只有当全部视频下载完成后数据下载模块才会停止下载。在此情况下,若用户退出观看,则缓冲区和数据下载模块中没有被读取的数据都会被浪费。本实施例的技术方案通过预先设置安全阈值和危险阈值,在到达危险阈值时数据下载模块开始下载,在满足安全阈值时数据下载模块停止下载,可以有效的控制视频下载的进度,减少下载的数据量,降低数据的浪费,从而可以实现成本节约的最大化。
可选的,在上述实施例的基础上,触发对当前视频的下载的方法可以包括:生成下一视频块的下载请求,将下载请求发送至服务器,以下载下一视频块。其中,视频块可以理解为预设数据量的视频数据。其中,生成的下载请求可以是包括预设数据量的视频数据下载请求。
示例性的,将该视频数据读取请求发送至服务器,以使数据下载模块获取预设数据量的视频数据,并进行数据缓存。示例性的,生成预设数据量的视频数据下载请求可以包括根据下一视频块的时长和当前码率,确定下载数据量,基于下载数据量生成下载请求。
示例性的,获取下一视频块中视频数据的视频时长以及确定当前下载数据的网络速率,即根据视频时长和网络速率确定下一视频块的下载数据量,基于该下载数据量生成下载请求。上述技术方案通过对下载请求中请求的视频数据进行了块拆分,每次请求固定时长的视频块,可以避免数据下载模块对资源进行持续缓存,减少数据下载模块内部的缓存数据。
本公开实施例的技术方案,本实施例的技术方案通过预先设置安全阈值和危险阈值,在到达危险阈值时数据下载模块开始下载,在满足安全阈值时数据 下载模块停止下载,并且每次下载请求固定时长的视频块,可以有效的控制视频下载的进度,减少下载的数据量,降低数据的浪费,从而可以实现成本节约的最大化。
图6是本公开实施例所提供的一种视频动态下载装置的结构示意图。如图6所示,所述装置包括:视频分段确定模块410、缓存判断阈值获取模块420和下载策略确定模块430;其中,
视频分段确定模块410,设置为在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
缓存判断阈值获取模块420,设置为获取所述当前视频分段对应的缓存判断阈值;
下载策略确定模块430,设置为基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
本公开实施例的技术方案,通过在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;获取所述当前视频分段对应的缓存判断阈值;基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。上述方案通过根据视频播放进度动态地缓存视频数据,在满足节约成本的需求下,实现播放器链路需要对缓存进行精确控制,从而实现在不影响用户观看体验的情况下减少视频下载数据的浪费。
可选的,在上述实施例的基础上,视频分段确定模块410,包括:
播放时长范围确定单元,设置为确定视频分段分布中每一视频分段分别对应的播放时长范围;
当前视频分段确定单元,设置为根据所述当前播放时刻所属的播放时长范围,确定当前播放时刻对应的当前视频分段。
可选的,在上述实施例的基础上,该装置还包括:
第一视频分段分布的确定模块,设置为基于所述当前视频的视频时长,确 定所述当前视频对应的视频分段分布。
可选的,在上述实施例的基础上,该装置还包括:
第二视频分段分布的确定模块,设置为根据所述当前视频的视频分辨率,确定所述当前视频对应的视频分段分布。
可选的,在上述实施例的基础上,该装置还包括:
历史播放视频确定模块,设置为基于视频时长和视频分辨率中的至少一项,确定历史播放视频;
第三视频分段分布的确定模块,设置为在历史播放视频中,基于多个播放时刻的退出率确定视频分段分布。
可选的,在上述实施例的基础上,不同视频分段对应不同的缓存判断阈值,其中,所述缓存判断阈值与视频分段的播放时长正相关。
可选的,在上述实施例的基础上,所述缓存判断阈值包括危险阈值和安全阈值;
下载策略确定模块430,包括:
第一下载策略确定子模块,设置为在所述当前已缓存且未播放的缓存数据量小于所述危险阈值的情况下,触发对所述当前视频的下载;
第二下载策略确定子模块,设置为在所述当前已缓存且未播放的缓存数据量大于所述安全阈值的情况下,停止对未下载视频的下载,并继续实时获取所述当前已缓存且未播放的缓存数据量。
可选的,在上述实施例的基础上,第一下载策略确定子模块,包括:
第一视频块下载单元,设置为生成下一视频块的下载请求,将所述下载请求发送至服务器,以下载下一视频块。
可选的,在上述实施例的基础上,第一视频块下载单元,包括:
下载请求生成子单元,设置为根据下一视频块的时长和当前码率,确定下载数据量,基于所述下载数据量生成下载请求。
本公开实施例所提供的装置可执行本公开任意实施例所提供的方法,具备 执行方法相应的功能模块。
值得注意的是,上述装置所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。
下面参考图7,其示出了适于用来实现本公开实施例的电子设备(例如图7中的终端设备或服务器)400的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,PDA)、PAD(平板电脑)、便携式多媒体播放器(Portable Media Player,PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字电视(Television,TV)、台式计算机等等的固定终端。图7示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图7所示,电子设备400可以包括处理装置(例如中央处理器、图形处理器等)401,其可以根据存储在只读存储器(Read-Only Memory,ROM)402中的程序或者从存储装置408加载到随机访问存储器(Random Access Memory,RAM)403中的程序而执行各种适当的动作和处理。在RAM403中,还存储有电子设备400操作所需的各种程序和数据。处理装置401、ROM 402以及RAM 403通过总线404彼此相连。输入/输出(Input/Output,I/O)接口405也连接至总线404。
通常,以下装置可以连接至I/O接口405:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置406;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置407;包括例如磁带、硬盘等的存储装置408;以及通信装置409。通信装置409可以允许电子设备400与其他设备进行无线或有线通信以交换数据。虽然图7示出了具 有各种装置的电子设备400,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置409从网络上被下载和安装,或者从存储装置408被安装,或者从ROM402被安装。在该计算机程序被处理装置401执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施例提供的电子设备与上述实施例提供的视频动态下载方法属于同一发明构思,未在本实施例中详尽描述的技术细节可参见上述实施例。
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的视频动态下载方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器((Erasable Programmable Read-Only Memory,EPROM)或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代 码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有至少一个程序,当上述至少一个程序被该电子设备执行时,使得该电子设备:
在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
获取所述当前视频分段对应的缓存判断阈值;
基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算 机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元/模块的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Parts,ASSP)、片上系统(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或 半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的至少一个实施例,【示例一】提供了一种视频动态下载方法,该方法包括:
在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
获取所述当前视频分段对应的缓存判断阈值;
基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
根据本公开的至少一个实施例,【示例二】提供了一种视频动态下载方法,还包括:
所述确定当前播放时刻对应的当前视频分段,包括:
确定视频分段分布中每一视频分段分别对应的播放时长范围;
根据所述当前播放时刻所属的播放时长范围,确定当前播放时刻对应的当前视频分段。
根据本公开的至少一个实施例,【示例三】提供了一种视频动态下载方法,还包括:
所述视频分段分布的确定方式,包括:
基于所述当前视频的视频时长,确定所述当前视频对应的视频分段分布。
根据本公开的至少一个实施例,【示例四】提供了一种视频动态下载方法,还包括:
所述视频分段分布的确定方式,包括:
根据所述当前视频的视频分辨率,确定所述当前视频对应的视频分段分布。
根据本公开的至少一个实施例,【示例五】提供了一种视频动态下载方法, 还包括:
所述视频分段分布的确定方式,包括:
基于视频时长和视频分辨率中的至少一项,确定历史播放视频;
在历史播放视频中,基于多个播放时刻的退出率确定视频分段分布。
根据本公开的至少一个实施例,【示例六】提供了一种视频动态下载方法,还包括:
不同视频分段对应不同的缓存判断阈值,其中,所述缓存判断阈值与视频分段的播放时长正相关。
根据本公开的至少一个实施例,【示例七】提供了一种视频动态下载方法,还包括:
所述缓存判断阈值包括危险阈值和安全阈值;
所述基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略,包括:
在所述当前已缓存且未播放的缓存数据量小于所述危险阈值的情况下,触发对所述当前视频的下载;
在所述当前已缓存且未播放的缓存数据量大于所述安全阈值的情况下,停止对未下载视频的下载,并继续实时获取所述当前已缓存且未播放的缓存数据量。
根据本公开的至少一个实施例,【示例八】提供了一种视频动态下载方法,还包括:
所述触发对所述当前视频的下载,包括:
生成下一视频块的下载请求,将所述下载请求发送至服务器,以下载下一视频块。
根据本公开的至少一个实施例,【示例九】提供了一种视频动态下载方法,包括:
所述生成下一视频块的下载请求,包括:
根据下一视频块的时长和当前码率,确定下载数据量,基于所述下载数据量生成下载请求。
根据本公开的至少一个实施例,【示例十】提供了一种视频动态下载装置,该装置包括:
视频分段确定模块,设置为在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
缓存判断阈值获取模块,设置为获取所述当前视频分段对应的缓存判断阈值;
下载策略确定模块,设置为基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。

Claims (12)

  1. 一种视频动态下载方法,包括:
    在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
    获取所述当前视频分段对应的缓存判断阈值;
    基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
  2. 根据权利要求1所述的方法,其中,所述确定当前播放时刻对应的当前视频分段,包括:
    确定视频分段分布中每一视频分段分别对应的播放时长范围;
    根据所述当前播放时刻所属的播放时长范围,确定当前播放时刻对应的当前视频分段。
  3. 根据权利要求2所述的方法,其中,所述视频分段分布的确定方式,包括:
    基于所述当前视频的视频时长,确定所述当前视频对应的视频分段分布。
  4. 根据权利要求2所述的方法,其中,所述视频分段分布的确定方式,包括:
    根据所述当前视频的视频分辨率,确定所述当前视频对应的视频分段分布。
  5. 根据权利要求3或4所述的方法,其中,所述视频分段分布的确定方式,包括:
    基于视频时长和视频分辨率中的至少一项,确定历史播放视频;
    在历史播放视频中,基于多个播放时刻的退出率确定视频分段分布。
  6. 根据权利要求1所述的方法,其中,不同视频分段对应不同的缓存判断阈值,所述缓存判断阈值与视频分段的播放时长正相关。
  7. 根据权利要求1所述的方法,其中,所述缓存判断阈值包括危险阈值和安全阈值;
    所述基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略,包括:
    响应于所述当前已缓存且未播放的缓存数据量小于所述危险阈值,触发对所述当前视频的下载;
    响应于所述当前已缓存且未播放的缓存数据量大于所述安全阈值,停止对未下载视频的下载,并继续实时获取所述当前已缓存且未播放的缓存数据量。
  8. 根据权利要求7所述的方法,其中,所述触发对所述当前视频的下载,包括:
    生成下一视频块的下载请求,将所述下载请求发送至服务器,以下载下一视频块。
  9. 根据权利要求8所述的方法,其中,所述生成下一视频块的下载请求,包括:
    根据下一视频块的时长和当前码率,确定下载数据量,基于所述下载数据量生成下载请求。
  10. 一种视频动态下载装置,包括:
    视频分段确定模块,设置为在对当前视频的播放过程中,确定当前播放时刻对应的当前视频分段;
    缓存判断阈值获取模块,设置为获取所述当前视频分段对应的缓存判断阈值;
    下载策略确定模块,设置为基于当前已缓存且未播放的缓存数据量和所述缓存判断阈值,确定对所述当前视频的下载策略。
  11. 一种电子设备,包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序,
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-9中任一所述的视频动态下载方法。
  12. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-9中任一所述的视频动态下载方法。
PCT/CN2023/078822 2022-03-08 2023-02-28 一种视频动态下载方法、装置、电子设备及存储介质 Ceased WO2023169262A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/844,777 US20250310597A1 (en) 2022-03-08 2023-02-28 Method and apparatus for dynamically downloading a video, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210220649.9A CN114584826B (zh) 2022-03-08 2022-03-08 一种视频动态下载方法、装置、电子设备及存储介质
CN202210220649.9 2022-03-08

Publications (1)

Publication Number Publication Date
WO2023169262A1 true WO2023169262A1 (zh) 2023-09-14

Family

ID=81778535

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/078822 Ceased WO2023169262A1 (zh) 2022-03-08 2023-02-28 一种视频动态下载方法、装置、电子设备及存储介质

Country Status (3)

Country Link
US (1) US20250310597A1 (zh)
CN (1) CN114584826B (zh)
WO (1) WO2023169262A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118870106A (zh) * 2024-07-04 2024-10-29 福建天晴在线互动科技有限公司 一种设置动态缓存水位的优化方法及终端
US20250324123A1 (en) * 2022-06-14 2025-10-16 Peking University Video transmission quality evaluation and optimization method and system based on user behavior

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584826B (zh) * 2022-03-08 2024-04-12 抖音视界有限公司 一种视频动态下载方法、装置、电子设备及存储介质
CN116248766B (zh) * 2023-01-29 2025-09-30 北京达佳互联信息技术有限公司 缓存控制方法、装置、电子设备及存储介质
CN116208787B (zh) * 2023-02-20 2025-01-10 抖音视界有限公司 一种视频下载控制方法、装置、设备和存储介质
CN116800732A (zh) * 2023-08-09 2023-09-22 平安银行股份有限公司 数据的下载方法、系统、电子设备和计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463508B1 (en) * 1999-07-19 2002-10-08 International Business Machines Corporation Method and apparatus for caching a media stream
CN102790925A (zh) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 一种在线流媒体播放的方法及点播终端
CN104995923A (zh) * 2013-12-18 2015-10-21 华为技术有限公司 视频加速方法、客户端及网元
CN108271048A (zh) * 2018-02-09 2018-07-10 北京邮电大学 一种兼顾吞吐量和视频缓冲的码率自适应调整装置和方法
CN114584826A (zh) * 2022-03-08 2022-06-03 北京字节跳动网络技术有限公司 一种视频动态下载方法、装置、电子设备及存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9026671B2 (en) * 2011-04-05 2015-05-05 Qualcomm Incorporated IP broadcast streaming services distribution using file delivery methods
US9632685B2 (en) * 2012-05-31 2017-04-25 Eric Qing Li Method of navigating through a media program displayed on a portable electronic device in a magnified time scale
CN103024446A (zh) * 2012-12-31 2013-04-03 传聚互动(北京)科技有限公司 网络视频的加载缓冲方法和系统
EP2785067A1 (en) * 2013-03-27 2014-10-01 Alcatel Lucent A method and client for requesting, receiving and decoding adaptive streaming video
US20160164788A1 (en) * 2014-12-05 2016-06-09 Qualcomm Incorporated Egress Rate Shaping To Reduce Burstiness In Application Data Delivery
CN109525887B (zh) * 2018-12-27 2021-06-18 长沙理工大学 一种在线视频的自调节播放方法、系统及装置
CN110933482B (zh) * 2019-12-06 2023-03-31 腾讯科技(深圳)有限公司 视频加载方法、装置、计算机可读存储介质和计算机设备
CN113569150B (zh) * 2021-08-10 2024-04-19 北京字节跳动网络技术有限公司 媒体内容预加载方法、模型构建方法及相关设备
CN114040245B (zh) * 2021-11-04 2023-12-29 广州博冠信息科技有限公司 视频播放方法、装置、计算机存储介质和电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463508B1 (en) * 1999-07-19 2002-10-08 International Business Machines Corporation Method and apparatus for caching a media stream
CN102790925A (zh) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 一种在线流媒体播放的方法及点播终端
CN104995923A (zh) * 2013-12-18 2015-10-21 华为技术有限公司 视频加速方法、客户端及网元
CN108271048A (zh) * 2018-02-09 2018-07-10 北京邮电大学 一种兼顾吞吐量和视频缓冲的码率自适应调整装置和方法
CN114584826A (zh) * 2022-03-08 2022-06-03 北京字节跳动网络技术有限公司 一种视频动态下载方法、装置、电子设备及存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20250324123A1 (en) * 2022-06-14 2025-10-16 Peking University Video transmission quality evaluation and optimization method and system based on user behavior
US12537988B2 (en) * 2022-06-14 2026-01-27 Peking University Video transmission quality evaluation and optimization method and system based on user behavior
CN118870106A (zh) * 2024-07-04 2024-10-29 福建天晴在线互动科技有限公司 一种设置动态缓存水位的优化方法及终端

Also Published As

Publication number Publication date
CN114584826A (zh) 2022-06-03
CN114584826B (zh) 2024-04-12
US20250310597A1 (en) 2025-10-02

Similar Documents

Publication Publication Date Title
WO2023169262A1 (zh) 一种视频动态下载方法、装置、电子设备及存储介质
WO2022237744A1 (zh) 视频的展示方法、装置、设备及介质
CN111225209B (zh) 视频数据推流方法、装置、终端及存储介质
CN114786055A (zh) 一种预加载方法、装置、电子设备及介质
CN112954354B (zh) 视频的转码方法、装置、设备和介质
US12537984B2 (en) Method of video downloading, method of video transmission, terminal device, server and storage medium
CN112543487B (zh) 电子设备的控制方法、装置、终端和存储介质
US20250203128A1 (en) Live-streaming starting method, device and program product
CN112578897B (zh) 电子设备的控制方法、装置、终端和存储介质
WO2022183922A1 (zh) 视频的自适应播放方法及设备
WO2023035884A1 (zh) 动态画质视频播放方法、装置、电子设备及存储介质
CN111246228B (zh) 直播间礼物资源更新方法、装置、介质及电子设备
WO2022078159A1 (zh) 直播的开播方法及设备
CN114567812A (zh) 音频播放方法、装置、系统、电子设备及存储介质
CN117156147A (zh) 一种视频转码方法、装置、设备和存储介质
CN115134634A (zh) 一种视频控制方法、装置、电子设备以及存储介质
WO2022188618A1 (zh) 资源预加载方法、装置、设备和存储介质
CN115103210B (zh) 信息处理方法、装置、终端和存储介质
CN116156267A (zh) 虚拟资源获取及发送方法、装置、存储介质、电子设备
CN112636971B (zh) 一种服务降级方法、装置、电子设备及存储介质
WO2023226757A1 (zh) 视频缓存方法、装置、设备及存储介质
CN109951737B (zh) 视频处理方法、装置、电子设备和计算机可读存储介质
CN115695917A (zh) 一种视频播放方法、装置、设备及存储介质
CN115529461A (zh) 一种视频转码方法、装置、电子设备及存储介质
CN112040328A (zh) 数据交互方法、装置和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23765840

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.12.2024)

122 Ep: pct application non-entry in european phase

Ref document number: 23765840

Country of ref document: EP

Kind code of ref document: A1

WWP Wipo information: published in national office

Ref document number: 18844777

Country of ref document: US