WO2023226757A1 - 视频缓存方法、装置、设备及存储介质 - Google Patents

视频缓存方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023226757A1
WO2023226757A1 PCT/CN2023/093158 CN2023093158W WO2023226757A1 WO 2023226757 A1 WO2023226757 A1 WO 2023226757A1 CN 2023093158 W CN2023093158 W CN 2023093158W WO 2023226757 A1 WO2023226757 A1 WO 2023226757A1
Authority
WO
WIPO (PCT)
Prior art keywords
amount
video
cache
threshold
target download
Prior art date
Application number
PCT/CN2023/093158
Other languages
English (en)
French (fr)
Inventor
张傲阳
何伟
黄清
于天泽
钟振东
马茜
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023226757A1 publication Critical patent/WO2023226757A1/zh

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/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

Definitions

  • the embodiments of the present disclosure relate to the field of communication technology, for example, to a video caching method, device, equipment and storage medium.
  • the client will continue to request video data from the server and place the downloaded data in the video buffer.
  • the function of the buffer is to solve the problem of lagging during playback caused by bandwidth jitter, and some data will be downloaded in advance relative to the playback progress.
  • the downloading process will continue.
  • the above method will cause a lot of data to be downloaded to the client. If the user does not watch all the downloaded data, there will be a huge difference between the playback completion rate and the download completion rate, which not only causes a waste of data, but also increases the cost of data transmission. .
  • Embodiments of the present disclosure provide a video caching method, device, equipment and storage medium to control video data caching, which can reduce data waste rate and save transmission costs.
  • Embodiments of the present disclosure provide a video caching method, including:
  • An embodiment of the present disclosure also provides a video caching device, including:
  • the acquisition module is configured to obtain the actual cache amount of video data and set the cache threshold during the video playback process
  • the target download amount determination module is configured to determine the target download amount based on the actual cache amount and the set cache threshold;
  • the caching module is configured to request video data of the target download amount from the server for caching.
  • An embodiment of the present disclosure also provides an electronic device, where the electronic device includes:
  • processors one or more processors
  • a storage device configured to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the video caching method as described in 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 the video caching method as described in embodiments of the present disclosure.
  • Figure 1 is a schematic flowchart of a video caching method provided by an embodiment of the present disclosure
  • Figure 2 is a schematic structural diagram of a video caching device provided by an embodiment of the present disclosure
  • FIG. 3 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.
  • a prompt message is sent to the user to clearly remind the user that the operation requested will require the acquisition and use of the user's personal information. Therefore, users can autonomously choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that perform the operations of the technical solution of the present disclosure based on the prompt information.
  • the method of sending prompt information to the user may be, for example, a pop-up window, and the prompt information may be presented in the form of text in the pop-up window.
  • the pop-up window can also contain a selection control for the user to choose "agree” or "disagree” to provide personal information to the electronic device.
  • Figure 1 is a schematic flowchart of a video caching method provided by an embodiment of the present disclosure.
  • the embodiment of the present disclosure is suitable for controlling the caching of video data.
  • the method can be executed by a video caching device, and the device can be implemented through software. And/or implemented in the form of hardware, optionally, implemented through electronic equipment.
  • the electronic equipment can be a mobile terminal, a personal computer (Personal Computer, PC) or a server, etc.
  • Video playback requires the cooperation of two modules: the first part is the player, and the second part is the data download module.
  • the data download module is responsible for downloading video data from the server, and the player reads the data from the data download module and displays the video to the user after decoding and rendering the data.
  • the data download module stores the data downloaded from the server into the buffer area of the data download module.
  • the player continuously reads data from the data download module and then stores the read data in the player buffer area.
  • the data cached by the player is the data that the player has read from the data download module but has not yet been played.
  • the data cached by the data download module is the data that the data download module has downloaded from the server but has not yet been read by the player.
  • the playback request process in the related art is: the user starts watching the video -> the player initiates a data download request to the data download module -> the data download module continuously requests data from the server.
  • the download process continues as long as the user continues to watch the video and the video file has not completed downloading.
  • the above download mode will cause a lot of data to be downloaded to the client.
  • the cached data is not viewed by the user, there will be a huge difference between the playback completion rate and the download completion rate, making the part that is downloaded but not viewed Data is wasted.
  • this embodiment controls the amount of data downloaded during playback.
  • the method includes:
  • the actual cache amount may be the amount of video data cached by the current client that has not yet been played.
  • the actual cache amount is obtained by adding the cache amount in the player to the cache amount in the data download module. Setting the cache threshold can be set by the user and can be a hyperparameter.
  • the actual cache amount and the set cache threshold can be represented by the amount of data (such as Kb, Mb, or Gb, etc.), or by the video duration. Assuming that it is represented by the video duration, the actual cache amount is the actual cache video duration, and the set cache threshold is the set cache duration threshold.
  • S120 Determine the target download amount based on the actual cache amount and the set cache threshold.
  • the target download volume can be understood as the amount of video data requested from the server.
  • the method of determining the target download amount based on the actual cache amount and the set cache threshold may be: when the actual cache amount is greater than or equal to the set cache threshold, the target download amount is the set value; when the actual cache amount is less than When the cache threshold is set, a set optimization algorithm is used to process the actual cache volume and the set cache threshold to obtain the target download volume.
  • the setting value can be 0, that is, when the actual cache amount is greater than or equal to the set cache threshold, requesting video data from the server is paused.
  • the set optimization algorithm can be Lyapunov optimization algorithm. For example, if the actual cache amount is less than the set cache threshold, the process of using the set optimization algorithm to process the actual cache amount and the set cache threshold may be: based on the set optimization algorithm, construct the actual cache amount and the set cache threshold.
  • the optimization function is an optimization function, and the constraints of the independent variables in the optimization function are set. Based on the constraints, the optimization function is optimized and iterated until the optimal target corresponding to the independent variable is determined. The independent variable value corresponding to the optimal target is the target. Downloads.
  • use a set optimization algorithm to process the actual cache amount and set cache threshold may be: obtain multiple candidate download amounts; for each candidate download amount, use a set optimization algorithm to The actual cache amount, the set cache threshold and each candidate download amount are processed to obtain the processing result corresponding to each candidate download amount; the candidate download amount corresponding to the maximum processing result among the processing results corresponding to all candidate download amounts is determined as the target Downloads.
  • the candidate download amount can be represented by the data amount (such as Kb, Mb or Gb, etc.) or the video duration. If the candidate download amount is represented by the video duration, the candidate download amount is the candidate download video duration.
  • multiple candidate download amounts may be randomly selected from the above constraints. For example, assume that the constraints are Any value between 1-10 seconds, then multiple values between 1-10 are randomly selected as candidate downloads.
  • multiple candidate download amounts may be preset by the user, that is, download amounts of different levels available for selection. For example, the candidate download amounts set by the user may be: [2, 4, 6, 8]. If If it is 6, it means that 6 seconds of video data will be downloaded.
  • the process of using the set optimization algorithm to process the actual cache amount, the set cache threshold, and the candidate download amount may be: based on the set optimization algorithm, a process consisting of the actual cache amount, the set cache amount, and the candidate download amount is constructed.
  • An optimization function is constructed by setting the cache threshold and the candidate download volume. Input multiple candidate download volumes into the optimization function in turn, obtain the target value corresponding to each candidate download volume value, and determine the target download volume based on the multiple target values.
  • the following steps are also included: obtaining network speed and/or video freeze information; video freeze information includes whether freeze occurs or no freeze occurs; Adjust target download size based on network speed and/or video stuttering information.
  • Network speed can be understood as the speed at which video data is downloaded, and video freeze information can include whether or not freezes occur.
  • the method of obtaining the network speed may be: determining the network speed based on the download volume of the previous video data and the request duration of the previous video data.
  • the download volume of the previous video data can be understood as the data volume of the video data requested from the server last time
  • the request duration can be understood as the request time, that is, the time required to completely download the video data to the client.
  • the method of determining the network speed based on the download volume of the previous video data and the request duration of the previous video data may be: dividing the data volume of the last video data requested from the server by the request duration of the previous video data to obtain the network speed.
  • the method of adjusting the target download amount according to the network speed and/or video freezing information may be: when the network speed is less than the first threshold, increase the target download amount; when the network speed is greater than the second threshold, adjust the target download amount. Target small downloads.
  • the first threshold is less than the second threshold.
  • Increasing the target download volume can be understood as increasing the target download volume by a set value. For example: assuming the target download time is 4 seconds, increase the target download time by 1 second to become 5 seconds. Decreasing the target download volume can be understood as reducing the target download volume by a set value. For example: Suppose the target download time is 4 seconds, then reduce the target download time by 1 second to 3 seconds.
  • the network speed is less than the first threshold, it indicates that the network speed is low, and the target download amount is increased to ensure playback quality. If the network speed is greater than the second threshold, it indicates that the network speed is high, and the target download amount is lowered to reduce data download and thereby reduce transmission costs.
  • the method of obtaining the video freeze information may be: obtaining the video freeze information during the current video playback process; or obtaining the video freeze information within a historical period.
  • the historical period can be a period within 10-15 minutes from the current time. If the user is watching a short video, it can be determined whether the user is stuck while watching the current short video. If the user is watching a long video (such as a movie, documentary, TV series, etc.), it is determined whether the user is stuck while watching the video of the historical period.
  • the method of adjusting the target download volume based on the network speed and/or video lagging information may be to increase the target download volume in the event of lagging.
  • S130 Request the video data of the target download amount from the server for caching.
  • the client after determining the target download volume, the client requests the server for the video data of the target download volume for caching, which can reduce lagging and ensure the stability of the cache volume.
  • the technical solution of the embodiment of the present disclosure is to obtain the actual cache amount of video data and set the cache threshold during the video playback process; determine the target download amount based on the actual cache amount and the set cache threshold; and request the video data of the target download amount from the server.
  • Caching The video caching method provided by the embodiment of the present disclosure requests video data with a determined target download volume from the server for caching, so as to control the video data caching, which can reduce the waste rate of data and save transmission costs.
  • Figure 2 is a schematic structural diagram of a video caching device provided by an embodiment of the present disclosure.
  • the device includes: an acquisition module 210, which is configured to obtain the actual cache amount and amount of video data during video playback. Set a cache threshold; the target download amount determination module 220 is configured to determine the target download amount based on the actual cache amount and the set cache threshold; the cache module 230 is configured to request video data of the target download amount from the server for caching.
  • the target download volume determination module 220 is configured to: when the actual cache volume is greater than or equal to the set cache threshold, the target download volume is the set value; when the actual cache volume is less than the set cache threshold, Use a set optimization algorithm to process the actual cache volume and the set cache threshold to obtain the target download volume.
  • the target download amount determination module 220 is configured to use a set optimization algorithm to process the actual cache amount and the set cache threshold in the following manner to obtain the target download amount: obtain multiple candidate download amounts; for each candidate download The set optimization algorithm is used to process the actual cache amount, set cache threshold and each candidate download amount, and obtain the processing results corresponding to each candidate download amount; all candidate download amounts are processed The candidate download volume corresponding to the largest processing result among the processing results corresponding to the selected download volume is determined as the target download volume.
  • a target download volume adjustment module which is set to: obtain network speed and/or video freeze information; video freeze information includes whether freeze occurs or does not occur; based on network speed and/or video freeze Information to adjust the target download volume.
  • the target download volume adjustment module is set to obtain the network speed in the following way: determine the network speed based on the download volume of the previous video data and its request duration.
  • the target download volume adjustment module is configured to adjust the target download volume according to the network speed and/or video freezing information in the following ways: when the network speed is less than the first threshold, increase the target download volume; when the network speed is greater than the first threshold In the case of two thresholds, the target download amount is reduced; where the first threshold is smaller than the second threshold.
  • the target download volume adjustment module is configured to obtain video freezing information in the following ways: obtain video freezing information during current video playback; or obtain video freezing information within a historical period.
  • the target download volume adjustment module is configured to adjust the target download volume based on network speed and/or video freeze information in the following manner: in the event of a freeze, increase the target download volume.
  • the video caching device provided by the embodiments of the present disclosure can execute the video caching method provided by any embodiment of the present disclosure, and has functional modules and effects corresponding to the execution method.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 3 shows a schematic structural diagram of an electronic device (such as the terminal device or server in FIG. 3 ) 500 suitable for implementing embodiments of the present disclosure.
  • 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), tablet computers (PAD), 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
  • 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. 3 is only an example and should not impose any limitations on the functions and scope of use
  • the electronic device 500 may include a processing device (such as a central processing unit, a graphics processor, etc.) 501 , and the electronic device 500 may be configured according to a program stored in a read-only memory (Read-Only Memory, ROM) 502 or from a program.
  • Storage device 508 is loaded into random access memory (Random Access Memory).
  • RAM Random Access Memory
  • RAM random access Memory
  • various programs and data required for the operation of the electronic device 500 are also stored.
  • the processing device 501, the ROM 502 and the RAM 503 are connected to each other via a bus 504.
  • An input/output (I/O) interface 505 is also connected to bus 504.
  • input devices 506 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 507 such as a speaker, a vibrator, etc.; a storage device 508 including a magnetic tape, a hard disk, etc.; and a communication device 509.
  • Communication device 509 may allow electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG. 3 illustrates electronic device 500 with various means, it should be understood that implementation or availability of all illustrated means is 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 509, or from storage device 508, or from ROM 502.
  • the processing device 501 When the computer program is executed by the processing device 501, 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 caching 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, and this embodiment has the same features as the above embodiments. Effect.
  • Embodiments of the present disclosure provide a computer storage medium.
  • a computer program is stored on the computer storage medium.
  • the program is executed by a processor, the video caching 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: electrical connections with one or more wires, portable computer disks, hard drives, RAM, ROM, Electrically 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 any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that may For use by or in conjunction with an instruction execution system, device, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, and the computer-readable signal medium carries computer-readable program codes. 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 HyperText Transfer Protocol (HTTP), and can communicate with digital data in any form or medium.
  • HTTP HyperText Transfer Protocol
  • 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, or may exist separately without being assembled into the electronic device.
  • the computer-readable medium carries one or more programs.
  • the electronic device When the one or more programs are executed by the electronic device, the electronic device: during the video playback process, obtains the actual cache amount of video data and sets the cache threshold. ; Determine the target download amount based on the actual cache amount and the set cache threshold; request the video data of the target download amount from the server for caching.
  • Computer program code for performing 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 conventional Procedural programming language—such as "C" or a similar programming language.
  • 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.
  • the remote computer may be connected to the user computer through any kind of network, including a LAN or WAN, or may be connected to an external computer (eg, through the Internet using an Internet service provider).
  • 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.
  • the name of the unit does not constitute a limitation on the unit itself.
  • the first acquisition unit can also be described as "the unit that acquires at least two Internet Protocol addresses.”
  • 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 Product (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 devices, or any suitable combination of the foregoing.
  • the machine-readable storage medium may include an electrical connection based on one or more wires, a portable computer disk, a hard drive, RAM, ROM, EPROM or flash memory, optical fiber, CD-ROM, optical storage device, magnetic storage device, or any of the above any suitable combination.
  • a video caching method including: during video playback, obtaining the actual cache amount of video data and setting a cache threshold; based on the actual cache amount and the setting The cache threshold is set to determine the target download amount; the video data of the target download amount is requested from the server for caching.
  • determining the target download amount based on the actual cache amount and the set cache threshold includes: when the actual cache amount is greater than or equal to the set cache threshold, the target download amount is the set value ; When the actual cache amount is less than the set cache threshold, use a set optimization algorithm to process the actual cache amount and the set cache threshold to obtain the target download amount.
  • a set optimization algorithm is used to process the actual cache amount and the set cache threshold to obtain the target download amount, including: obtaining multiple candidate download amount values; using the set optimization algorithm.
  • the method processes the actual cache amount, the set cache threshold and the plurality of candidate download amount values to obtain multiple processing results; and determines the candidate download amount value corresponding to the maximum processing result among the multiple processing results as Target downloads.
  • the target download amount after determining the target download amount based on the actual cache amount and the set cache threshold, it also includes: obtaining network speed and/or video freeze information; the video freeze information includes whether freeze occurs or no freeze occurs. stutter; adjust the target download amount according to the network speed and/or video stutter information.
  • obtain the network speed including: determining the network speed based on the download volume and request duration of the previous video data.
  • Adjusting the target download amount according to the network speed and/or video freezing information includes: when the network speed is less than a first threshold, increasing the target download amount; when the network speed is greater than In the case of a second threshold, reduce the target download amount; wherein the first threshold is smaller than the second threshold.
  • obtain video freeze information including: obtain video freeze information during current video playback; or obtain video freeze information within a historical period.
  • adjusting the target download amount according to the network speed and/or video freezing information includes: increasing the target download amount in the event of freezing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本公开实施例提供了一种视频缓存方法、装置、设备及存储介质。在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;基于所述实际缓存量及所述设定缓存阈值确定目标下载量;向服务器请求所述目标下载量的视频数据进行缓存。

Description

视频缓存方法、装置、设备及存储介质
本申请要求在2022年05月23日提交中国专利局、申请号为202210564572.7的中国专利申请的优先权,以上申请的全部内容通过引用结合在本申请中。
技术领域
本公开实施例涉及通信技术领域,例如涉及一种视频缓存方法、装置、设备及存储介质。
背景技术
在线视频的播放过程中,客户端会持续向服务器请求视频数据并且将下载的数据放在视频缓冲区。缓冲区的作用是为了解决带宽抖动导致播放过程中的卡顿,相对播放进度会提前下载部分数据。
相关技术中,只要视频还在播放且该视频未完成下载,那么下载过程会持续进行。上述方式会导致很多数据被下载到了客户端,若用户未观看下载的全部数据,则播放完成率和下载完成率之间形成极大的差异,不仅造成了数据的浪费,而且增加了数据传输成本。
发明内容
本公开实施例提供一种视频缓存方法、装置、设备及存储介质,以实现对视频数据缓存的控制,可以降低数据的浪费率,且可以节约传输成本。
本公开实施例提供了一种视频缓存方法,包括:
在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;
基于所述实际缓存量及所述设定缓存阈值确定目标下载量;
向服务器请求所述目标下载量的视频数据进行缓存。
本公开实施例还提供了一种视频缓存装置,包括:
获取模块,设置为在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;
目标下载量确定模块,设置为基于所述实际缓存量及所述设定缓存阈值确定目标下载量;
缓存模块,设置为向服务器请求所述目标下载量的视频数据进行缓存。
本公开实施例还提供了一种电子设备,所述电子设备包括:
一个或多个处理器;
存储装置,设置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行时,所述一个或多个处理器实现如本公开实施例所述的视频缓存方法。
本公开实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如本公开实施例所述的视频缓存方法。
附图说明
所有附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1是本公开实施例所提供的一种视频缓存方法的流程示意图;
图2是本公开实施例所提供的一种视频缓存装置的结构示意图;
图3是本公开实施例所提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图描述本公开的实施例。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的多个步骤可以按照不同的顺序执行,和/或并行执行。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
可以理解的是,在使用本公开多个实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。
图1为本公开实施例所提供的一种视频缓存方法的流程示意图,本公开实施例适用于对视频数据的缓存进行控制的情形,该方法可以由视频缓存装置来执行,该装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、个人计算机(Personal Computer,PC)端或服务器等。
视频播放需要两个模块的配合:第一部分是播放器,第二部分是数据下载模块。数据下载模块负责从服务器下载视频数据,播放器则从数据下载模块读取数据,并通过对数据进行解码渲染后将视频展示给用户。数据下载模块将从服务器下载的数据存储至数据下载模块的缓存区,播放器持续不断的从数据下载模块读取数据,然后将读取的数据存储在播放器缓冲区。播放器缓存的数据是播放器已经从数据下载模块读取但是还未被播放的数据。数据下载模块缓存的数据是数据下载模块已经从服务器下载,但是播放器还没有读取的数据。
相关技术中的播放请求流程为:用户开始观看视频->播放器向数据下载模块发起数据下载请求->数据下载模块连续的从服务器请求数据。只要用户还在继续观看视频并且该视频文件没有完成下载,则下载过程会持续进行。上述下载模式会导致有很多数据被下载到了客户端,但是如果缓存的数据没有被用户观看,播放完成率和下载完成率之间形成极大的差异,使得下载但未被观看的这部分 数据是被浪费掉。为了降低浪费率,节约传输成本,本实施例实现对播放中的数据下载量进行控制。
如图1所示,所述方法包括:
S110,在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值。
实际缓存量可以是当前客户端缓存的还未被播放的视频数据量,实际缓存量由播放器中的缓存量累加数据下载模块中的缓存量获得的。设定缓存阈值可以是由用户设置的,可以是一个超参数。
本实施例中,实际缓存量及设定缓存阈值可以由数据量(如Kb、Mb或者Gb等)表示,或者由视频时长表示。假设由视频时长表示,则实际缓存量为实际缓存视频时长,设定缓存阈值为设定缓存时长阈值。
S120,基于实际缓存量及设定缓存阈值确定目标下载量。
目标下载量可以理解为向服务器请求的视频数据量。
可选的,基于实际缓存量及设定缓存阈值确定目标下载量的方式可以是:在实际缓存量大于或者等于设定缓存阈值的情况下,目标下载量为设定值;在实际缓存量小于设定缓存阈值的情况下,采用设定优化算法对实际缓存量及设定缓存阈值进行处理,获得目标下载量。
设定值可以是0,即当实际缓存量大于或者等于设定缓存阈值时,暂停向服务器请求视频数据。
设定优化算法可以是李雅普诺夫优化算法。示例性的,若实际缓存量小于设定缓存阈值,则采用设定优化算法对实际缓存量及设定缓存阈值处理的过程可以是:基于设定优化算法构建由实际缓存量及设定缓存阈值的优化函数,并设定该优化函数中自变量的约束条件,基于该约束条件对优化函数进行优化迭代,直到确定出自变量对应的最优目标,该最优目标对应的自变量值即为目标下载量。
可选的,采用设定优化算法对实际缓存量及设定缓存阈值进行处理,获得目标下载量的过程可以是:获取多个候选下载量;对于每个候选下载量,采用设定优化算法对实际缓存量、设定缓存阈值及每个候选下载量进行处理,获得每个候选下载量对应的处理结果;将全部候选下载量对应的处理结果中的最大处理结果对应的候选下载量确定为目标下载量。
候选下载量可以由数据量(如Kb、Mb或者Gb等)或者视频时长表示。若候选下载量由视频时长表示,则候选下载量为候选下载视频时长。本实施例中,多个候选下载量可以是从上述约束条件中随机选择的,例如:假设约束条件为 1-10秒之间的任意值,则从1-10之间随机选择多个值作为候选下载量。或者,多个候选下载量可以是用户预先设置的,即可供选择的不同档位的下载量,例如,用户设置的候选下载量可以是:[2,4,6,8],若选择的是6,则表示要下载6秒的视频数据。
本实施例中,采用所述设定优化算法对所述实际缓存量、所述设定缓存阈值及所述候选下载量进行处理的过程可以是:基于设定优化算法构建由实际缓存量、设定缓存阈值及候选下载量构建的优化函数,将多个候选下载量依次输入该优化函数,获得每个候选下载量数值对应的目标值,基于多个目标值确定出目标下载量。
基于设定优化算法构建由实际缓存量、设定缓存阈值及候选下载量构成的优化函数可以表示为:target=-abs(buffer-B+P)/P,其中,buffer为实际缓存量,B为设定缓存阈值,P为候选下载量。将每个候选下载量代入上述优化函数,获得每个候选下载量对应的目标值(即处理结果),将最大目标值对应的候选下载量确定为目标下载量。
可选的,在基于实际缓存量及设定缓存阈值确定目标下载量之后,还包括如下步骤:获取网络速度和/或视频卡顿信息;视频卡顿信息包括发生卡顿或者未发生卡顿;根据网络速度和/或视频卡顿信息对目标下载量进行调整。
网络速度可以理解为下载视频数据的速度,视频卡顿信息可以包含发生卡顿或者未发生卡顿。
可选的,获取网络速度的方式可以是:根据上一个视频数据的下载量及上一个视频数据的请求时长确定网络速度。
上一个视频数据的下载量可以理解为上一次向服务器请求的视频数据的数据量,请求时长可以理解为请求耗时,即将视频数据完全下载到客户端所需的时间。根据上一个视频数据的下载量及上一个视频数据的请求时长确定网络速度的方式可以是:将上一次向服务器请求的视频数据的数据量除以上一个视频数据的请求时长得到网络速度。
根据网络速度和/或视频卡顿信息对目标下载量进行调整的方式可以是:在网络速度小于第一阈值的情况下,调大目标下载量;在网络速度大于第二阈值的情况下,调小目标下载量。
第一阈值小于所述第二阈值。调大目标下载量可以理解为将目标下载量增加一设定值。例如:假设目标下载量为4秒,则将目标下载量增加1秒,成为5秒。调小目标下载量可以理解为将目标下载量减少一设定值。例如:假设目标下载量为4秒,则将目标下载量减少1秒,成为3秒。
本实施例中,如果网络速度小于第一阈值,则表明网速较低,调大目标下载量以保证播放质量。如果网络速度大于第二阈值,表明网速较高,调低目标下载量以减少数据下载从而降低传输成本。
本实施例中,获取视频卡顿信息的方式可以是:获取当前视频播放过程中的视频卡顿信息;或者,获取历史时段内的视频卡顿信息。
历史时段可以是距离当前时刻10-15分钟内的时段。若用户是在观看短视频的场景下,则可以确定用户在观看当前短视频过程中是否发生卡顿。若用户是在观看长视频(如电影、纪录片、电视剧等)的场景下,则确定用户在观看历史时段的视频时是否发生卡顿。
根据网络速度和/或视频卡顿信息对目标下载量进行调整的方式可以是:在发生卡顿的情况下,调大目标下载量。
为了避免再次发送卡顿,调大目标下载量,从而保证播放质量。
S130,向服务器请求目标下载量的视频数据进行缓存。
示例性的,在确定了目标下载量后,客户端向服务器请求该目标下载量的视频数据进行缓存,既可以减少卡顿,又保证缓存量的稳定。
本公开实施例的技术方案,在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;基于实际缓存量及设定缓存阈值确定目标下载量;向服务器请求目标下载量的视频数据进行缓存。本公开实施例提供的视频缓存方法,向服务器请求确定的目标下载量的视频数据进行缓存,以实现对视频数据缓存的控制,可以降低数据的浪费率,且可以节约传输成本。
图2为本公开实施例所提供的一种视频缓存装置的结构示意图,如图2所示,所述装置包括:获取模块210,设置为在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;目标下载量确定模块220,设置为基于实际缓存量及设定缓存阈值确定目标下载量;缓存模块230,设置为向服务器请求目标下载量的视频数据进行缓存。
可选的,目标下载量确定模块220是设置为:在实际缓存量大于或者等于设定缓存阈值的情况下,目标下载量为设定值;在实际缓存量小于设定缓存阈值的情况下,采用设定优化算法对实际缓存量及设定缓存阈值进行处理,获得目标下载量。
可选的,目标下载量确定模块220是设置为通过如下方式采用设定优化算法对实际缓存量及设定缓存阈值进行处理,获得目标下载量:获取多个候选下载量;对于每个候选下载量,采用设定优化算法对实际缓存量、设定缓存阈值及每个候选下载量进行处理,获得每个候选下载量对应的处理结果;将全部候 选下载量对应的处理结果中的最大处理结果对应的候选下载量确定为目标下载量。
可选的,还包括:目标下载量调整模块,设置为:获取网络速度和/或视频卡顿信息;视频卡顿信息包括发生卡顿或者未发生卡顿;根据网络速度和/或视频卡顿信息对目标下载量进行调整。
可选的,目标下载量调整模块是设置为通过如下方式获取网络速度:根据上一个视频数据的下载量及其请求时长确定网络速度。
目标下载量调整模块是设置为通过如下方式根据网络速度和/或视频卡顿信息对目标下载量进行调整:在网络速度小于第一阈值的情况下,调大目标下载量;在网络速度大于第二阈值的情况下,调小目标下载量;其中,第一阈值小于第二阈值。
可选的,目标下载量调整模块是设置为通过如下方式获取视频卡顿信息:获取当前视频播放过程中的视频卡顿信息;或者,获取历史时段内的视频卡顿信息。
可选的,目标下载量调整模块是设置为通过如下方式根据网络速度和/或视频卡顿信息对目标下载量进行调整:在发生卡顿的情况下,调大目标下载量。
本公开实施例所提供的视频缓存装置可执行本公开任意实施例所提供的视频缓存方法,具备执行方法相应的功能模块和效果。
值得注意的是,上述装置所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,每个功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。
图3为本公开实施例所提供的一种电子设备的结构示意图。下面参考图3,图3示出了适于用来实现本公开实施例的电子设备(例如图3中的终端设备或服务器)500的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,PDA)、平板电脑(PAD)、便携式多媒体播放器(Portable Media Player,PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字电视(Television,TV)、台式计算机等等的固定终端。图3示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图3所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,电子设备500可以根据存储在只读存储器(Read-Only Memory,ROM)502中的程序或者从存储装置508加载到随机访问存储器(Random Access  Memory,RAM)503中的程序而执行多种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的多种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(Input/Output,I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图3示出了具有多种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
本公开实施例提供的电子设备与上述实施例提供的视频缓存方法属于同一发明构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的效果。
本公开实施例提供了一种计算机存储介质,计算机存储介质上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的视频缓存方法。
本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、ROM、可擦式可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EPROM)或闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可 以被指令执行***、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,计算机可读信号介质中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如超文本传输协议(HyperText Transfer Protocol,HTTP)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(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 Product,ASSP)、片上***(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,机器可读介质可以包含或存储以供指令执行***、装置或设备使用或与指令执行***、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体***、装置或设备,或者上述内容的任何合适组合。机器可读存储介质可以包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、RAM、ROM、EPROM或快闪存储器、光纤、CD-ROM、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,提供了一种视频缓存方法,包括:在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;基于所述实际缓存量及所述设定缓存阈值确定目标下载量;向服务器请求所述目标下载量的视频数据进行缓存。
可选的,基于所述实际缓存量及所述设定缓存阈值确定目标下载量,包括:在所述实际缓存量大于或者等于所述设定缓存阈值的情况下,目标下载量为设定值;在所述实际缓存量小于所述设定缓存阈值的情况下,采用设定优化算法对所述实际缓存量及所述设定缓存阈值进行处理,获得目标下载量。
可选的,采用设定优化算法对所述实际缓存量及所述设定缓存阈值进行处理,获得目标下载量,包括:获取多个候选下载量数值;采用所述设定优化算 法对所述实际缓存量、所述设定缓存阈值及所述多个候选下载量数值进行处理,获得多个处理结果;将多个处理结果中的最大处理结果对应的候选下载量数值确定为目标下载量。
可选的,在基于所述实际缓存量及所述设定缓存阈值确定目标下载量之后,还包括:获取网络速度和/或视频卡顿信息;视频卡顿信息包括发生卡顿或者未发生卡顿;根据所述网络速度和/或视频卡顿信息对所述目标下载量进行调整。
可选的,获取网络速度,包括:根据上一个视频数据的下载量及请求时长确定网络速度。
根据所述网络速度和/或视频卡顿信息对所述目标下载量进行调整,包括:在所述网络速度小于第一阈值的情况下,调大所述目标下载量;在所述网络速度大于第二阈值的情况下,调小所述目标下载量;其中,所述第一阈值小于所述第二阈值。
可选的,获取视频卡顿信息,包括:获取当前视频播放过程中的视频卡顿信息;或者,获取历史时段内的视频卡顿信息。
可选的,根据所述网络速度和/或视频卡顿信息对所述目标下载量进行调整,包括:在发生卡顿的情况下,调大所述目标下载量。

Claims (10)

  1. 一种视频缓存方法,包括:
    在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;
    基于所述实际缓存量及所述设定缓存阈值量确定目标下载量;
    向服务器请求所述目标下载量的视频数据进行缓存。
  2. 根据权利要求1所述的方法,其中,基于所述实际缓存量及所述设定缓存阈值确定目标下载量,包括:
    在所述实际缓存量大于或者等于所述设定缓存阈值的情况下,目标下载量为设定值;
    在所述实际缓存量小于所述设定缓存阈值的情况下,采用设定优化算法对所述实际缓存量及所述设定缓存阈值进行处理,获得目标下载量。
  3. 根据权利要求2所述的方法,其中,所述采用设定优化算法对所述实际缓存量及所述设定缓存阈值进行处理,获得目标下载量,包括:
    获取多个候选下载量;
    采用所述设定优化算法对所述实际缓存量、所述设定缓存阈值及每个候选下载量进行处理,获得所述每个候选下载量对应的处理结果;
    将全部候选下载量对应的处理结果中的最大处理结果对应的候选下载量确定为目标下载量。
  4. 根据权利要求1所述的方法,在所述基于所述实际缓存量及所述设定缓存阈值确定目标下载量之后,还包括:
    获取网络速度和视频卡顿信息中的至少一种;所述视频卡顿信息包括发生卡顿或者未发生卡顿;
    根据所述网络速度和所述视频卡顿信息中的所述至少一种对所述目标下载量进行调整。
  5. 根据权利要求4所述的方法,其中,所述获取网络速度,包括:
    根据上一个视频数据的下载量及所述上一个视频数据的请求时长确定网络速度;
    所述根据所述网络速度和所述视频卡顿信息中的所述至少一种对所述目标下载量进行调整,包括:
    在所述网络速度小于第一阈值的情况下,调大所述目标下载量;
    在所述网络速度大于第二阈值的情况下,调小所述目标下载量;其中,所 述第一阈值小于所述第二阈值。
  6. 根据权利要求4所述的方法,其中,所述获取视频卡顿信息,包括:
    获取当前视频播放过程中的视频卡顿信息;或者,
    获取历史时段内的视频卡顿信息。
  7. 根据权利要求6所述的方法,其中,所述根据所述网络速度和所述视频卡顿信息中的所述至少一种对所述目标下载量进行调整,包括:
    在发生卡顿的情况下,调大所述目标下载量。
  8. 一种视频缓存装置,包括:
    获取模块,设置为在视频播放过程中,获取视频数据的实际缓存量及设定缓存阈值;
    目标下载量确定模块,设置为基于所述实际缓存量及所述设定缓存阈值确定目标下载量;
    缓存模块,设置为向服务器请求所述目标下载量的视频数据进行缓存。
  9. 一种电子设备,包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序;
    当所述至少一个程序被所述至少一个处理器执行时,所述至少一个处理器实现如权利要求1-7中任一所述的视频缓存方法。
  10. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-7中任一所述的视频缓存方法。
PCT/CN2023/093158 2022-05-23 2023-05-10 视频缓存方法、装置、设备及存储介质 WO2023226757A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210564572.7 2022-05-23
CN202210564572.7A CN114979768A (zh) 2022-05-23 2022-05-23 视频缓存方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023226757A1 true WO2023226757A1 (zh) 2023-11-30

Family

ID=82985551

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/093158 WO2023226757A1 (zh) 2022-05-23 2023-05-10 视频缓存方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN114979768A (zh)
WO (1) WO2023226757A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979768A (zh) * 2022-05-23 2022-08-30 北京字节跳动网络技术有限公司 视频缓存方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665751B1 (en) * 1999-04-17 2003-12-16 International Business Machines Corporation Streaming media player varying a play speed from an original to a maximum allowable slowdown proportionally in accordance with a buffer state
CN102790925A (zh) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 一种在线流媒体播放的方法及点播终端
WO2015089772A1 (zh) * 2013-12-18 2015-06-25 华为技术有限公司 视频加速方法、客户端及网元
CN109982159A (zh) * 2017-12-27 2019-07-05 华为技术有限公司 在线播放流媒体的方法和终端
CN113691859A (zh) * 2021-09-16 2021-11-23 百果园技术(新加坡)有限公司 一种视频缓存方法、装置、设备及介质
CN114040245A (zh) * 2021-11-04 2022-02-11 广州博冠信息科技有限公司 视频播放方法、装置、计算机存储介质和电子设备
CN114979768A (zh) * 2022-05-23 2022-08-30 北京字节跳动网络技术有限公司 视频缓存方法、装置、设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102892041B (zh) * 2012-10-18 2014-12-17 中山大学 一种应用于移动设备的视频流缓冲优化方法及***
CN105430475A (zh) * 2015-11-04 2016-03-23 北京奇虎科技有限公司 视频数据的缓冲方法及装置
CN106231412A (zh) * 2016-07-27 2016-12-14 宇龙计算机通信科技(深圳)有限公司 视频缓冲智能控制方法及***
CN111654873B (zh) * 2019-09-27 2022-08-16 西北大学 一种基于全局效用缓存策略移动cdn链路选择能耗优化方法
CN113810773B (zh) * 2021-09-17 2024-03-01 北京百度网讯科技有限公司 视频下载方法及装置、电子设备和存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665751B1 (en) * 1999-04-17 2003-12-16 International Business Machines Corporation Streaming media player varying a play speed from an original to a maximum allowable slowdown proportionally in accordance with a buffer state
CN102790925A (zh) * 2011-05-20 2012-11-21 深圳市快播科技有限公司 一种在线流媒体播放的方法及点播终端
WO2015089772A1 (zh) * 2013-12-18 2015-06-25 华为技术有限公司 视频加速方法、客户端及网元
CN109982159A (zh) * 2017-12-27 2019-07-05 华为技术有限公司 在线播放流媒体的方法和终端
CN113691859A (zh) * 2021-09-16 2021-11-23 百果园技术(新加坡)有限公司 一种视频缓存方法、装置、设备及介质
CN114040245A (zh) * 2021-11-04 2022-02-11 广州博冠信息科技有限公司 视频播放方法、装置、计算机存储介质和电子设备
CN114979768A (zh) * 2022-05-23 2022-08-30 北京字节跳动网络技术有限公司 视频缓存方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN114979768A (zh) 2022-08-30

Similar Documents

Publication Publication Date Title
CN110166791B (zh) 连接的建立方法、装置、设备及存储介质
CN111225209B (zh) 视频数据推流方法、装置、终端及存储介质
WO2023226757A1 (zh) 视频缓存方法、装置、设备及存储介质
CN110535661B (zh) 基于区块链的业务处理方法、装置、电子设备和存储介质
CN111246228B (zh) 直播间礼物资源更新方法、装置、介质及电子设备
CN112954354B (zh) 视频的转码方法、装置、设备和介质
WO2022257425A1 (zh) 传输速率控制方法、装置、电子设备和可读存储介质
WO2023197810A1 (zh) 预加载方法、装置、电子设备及介质
CN112135169A (zh) 一种媒体内容加载方法、装置、设备和介质
CN110781150A (zh) 数据传输方法、装置和电子设备
CN109582274B (zh) 音量调节方法、装置、电子设备及计算机可读存储介质
WO2023193574A1 (zh) 投屏方法、***、设备及存储介质
CN109639813B (zh) 视频文件传输处理方法及装置、电子设备和存储介质
WO2023169262A1 (zh) 一种视频动态下载方法、装置、电子设备及存储介质
WO2023179404A1 (zh) 直播启播方法、设备及程序产品
CN111478916B (zh) 基于视频流的数据传输方法、设备和存储介质
WO2020186927A1 (zh) 数据分享方法、装置、设备及介质
WO2023179575A1 (zh) 一种数据处理方法及装置
CN109951737B (zh) 视频处理方法、装置、电子设备和计算机可读存储介质
WO2022237427A1 (zh) 视频处理方法、装置、设备及存储介质
WO2022188618A1 (zh) 资源预加载方法、装置、设备和存储介质
CN112636971B (zh) 一种服务降级方法、装置、电子设备及存储介质
CN114095907A (zh) 蓝牙连接的控制方法、装置及设备
KR20200018493A (ko) 데이터를 스트리밍하기 위한 방법들 및 장치들
WO2023197811A1 (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: 23810830

Country of ref document: EP

Kind code of ref document: A1