CN113727172B - Video cache playing method and device, electronic equipment and storage medium - Google Patents

Video cache playing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113727172B
CN113727172B CN202111020673.XA CN202111020673A CN113727172B CN 113727172 B CN113727172 B CN 113727172B CN 202111020673 A CN202111020673 A CN 202111020673A CN 113727172 B CN113727172 B CN 113727172B
Authority
CN
China
Prior art keywords
video
sliding
sliding operation
caching
determining
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.)
Active
Application number
CN202111020673.XA
Other languages
Chinese (zh)
Other versions
CN113727172A (en
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 Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao 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 Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202111020673.XA priority Critical patent/CN113727172B/en
Publication of CN113727172A publication Critical patent/CN113727172A/en
Priority to PCT/CN2022/108054 priority patent/WO2023029821A1/en
Application granted granted Critical
Publication of CN113727172B publication Critical patent/CN113727172B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Landscapes

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

Abstract

The embodiment of the disclosure provides a video cache playing method, a video cache playing device, an electronic device and a storage medium, in the method provided by the embodiment, a first sliding operation of a user is detected, a sliding direction corresponding to a subsequent second sliding operation is pre-judged, a corresponding video cache direction is determined, and a video in a video resource sequence is cached in the video cache direction, so that a cache video is generated, and when the user performs the second sliding operation, if a playing direction corresponding to the second sliding operation is the same as a playing direction corresponding to the video cache direction, the cache video is directly loaded and played, so that the video loading speed is increased, and the problem of video playing jam is avoided.

Description

Video cache playing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of multimedia, and in particular, to a video cache playing method and device, an electronic device, and a storage medium.
Background
Currently, in video Applications (APPs), switching of videos is often achieved by using a sliding operation or the like. For example, by sliding the screen up and down, the currently played video in the video APP running on the smartphone is switched. In the prior art, video switching operation in a video APP is usually based on a Feed stream scene, and in the scene, a client can cache a subsequent video of a current video in advance based on a Feed stream in a video switching process of a user, so that the subsequent video cached in advance can be smoothly loaded and played when being switched to the current video.
However, in a non-Feed stream scene, when a user switches videos, the APP in the videos cannot cache a subsequent video of a current video in advance based on the Feed stream, and therefore problems of delayed loading, blocked playing and the like of the subsequent video after video switching can be caused.
Disclosure of Invention
The embodiment of the disclosure provides a video cache playing method and device, an electronic device and a storage medium, so as to overcome the problem that in the prior art, a subsequent video cannot be cached in advance in a non-Feed stream scene.
In a first aspect, an embodiment of the present disclosure provides a video cache playing method, including:
playing a first video in the video resource sequence; when a first sliding operation for the first video is detected, determining a video caching direction according to a sliding direction corresponding to the first sliding operation; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence; determining a third video according to the video caching direction, caching the third video, and generating a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video caching direction; responding to a second sliding operation aiming at the second video, and if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video caching direction, playing the cached video.
In a second aspect, an embodiment of the present disclosure provides a video cache playing device, including:
the playing module is used for playing a first video in the video resource sequence;
the determining module is used for determining a video caching direction according to a sliding direction corresponding to a first sliding operation when the first sliding operation aiming at the first video is detected; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence;
the cache module is used for determining a third video according to the video cache direction, caching the third video and generating a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video cache direction;
and the judging module is used for responding to a second sliding operation aiming at the second video, and playing the cache video if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video cache direction.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the video cache playback method as described above in the first aspect and various possible designs of the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the video cache playing method according to the first aspect and various possible designs of the first aspect is implemented.
In a fifth aspect, embodiments of the present disclosure provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the video cache playing method according to the first aspect and various possible designs of the first aspect is implemented.
The video cache playing method, the video cache playing device, the electronic device and the storage medium provided by the embodiment play the first video in the video resource sequence; when a first sliding operation for the first video is detected, determining a video caching direction according to a sliding direction corresponding to the first sliding operation; the first sliding operation is used for switching the first video to a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence; determining a third video according to the video caching direction, caching the third video to generate a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video caching direction; responding to a second sliding operation aiming at the second video, and if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video caching direction, playing the cached video. The method provided by the embodiment pre-judges the sliding direction corresponding to the subsequent second sliding operation by detecting the first sliding operation of the user, determines the corresponding video cache direction, caches the video in the video resource sequence in the video cache direction, and generates the cache video.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can obtain other drawings without inventive labor.
Fig. 1 is an application scene diagram of a video cache playing method according to an embodiment of the present disclosure;
fig. 2 is a first schematic flow chart of a video cache playing method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a position relationship between a second video and a first video according to an embodiment of the disclosure;
fig. 4A is a schematic diagram illustrating a corresponding relationship between a sliding operation and a playing direction according to an embodiment of the present disclosure;
fig. 4B is a schematic diagram illustrating another corresponding relationship between the sliding operation and the playing direction according to an embodiment of the disclosure
Fig. 5 is a schematic flowchart illustrating a second method for playing a video cache according to an embodiment of the present disclosure;
FIG. 6 is a flowchart of one implementation of step S207 in the embodiment shown in FIG. 5;
fig. 7 is a schematic diagram illustrating a correspondence relationship between a confidence value of a sliding direction corresponding to a second sliding operation and a video buffering amount according to an embodiment of the present disclosure;
fig. 8 is a block diagram of a video cache playing device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure
Fig. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without inventive step, are intended to be within the scope of the present disclosure.
The following explains an application scenario of the embodiment of the present disclosure:
fig. 1 is an application scene diagram of a video cache playing method provided in an embodiment of the present disclosure, and the video cache playing method provided in the embodiment of the present disclosure may be applied in a scene of non-Feed stream video resource access of a video application client. An execution subject of the method provided by this embodiment may be a terminal device 11, for example, a smart phone, and more specifically, as shown in fig. 1, the terminal device 11 is connected to a server 12, and a user accesses, through a video class application client (hereinafter, referred to as a client) running in the terminal device 11, video resources in video partitions of specified categories, items, and identifiers, for example, video pages (video partitions) where all video resources (shown as video1 to video6 in fig. 1) published by an X studio are located are accessed, and after clicking any one of the video resources, the video resource is played. And then, based on the sliding operation of the user, the currently played video can be switched to other video resources in the video page for playing.
In the prior art, video switching operation in video APP is usually based on a Feed stream scene, in this scene, a user can cache a subsequent video of a current video in advance based on a Feed stream in a video switching process, so that the subsequent video cached in advance can be smoothly loaded and played when being switched to the current video, however, in a non-Feed stream scene, the APP client cannot cache the subsequent video of the current video in advance based on the Feed stream. For example, when a user enters a video page of a specific user to select a video for playing, the selected video is generally random, and then when the user switches videos through a sliding operation, the sliding direction is also random, which causes switching of the current video to a previous video or a next video, so that it is impossible to determine which direction of video resources on both sides (previous or next) of the current video are cached, and further, problems of subsequent video loading delay, playing jam and the like after video switching are caused. Meanwhile, if the video resources on both sides of the current video are loaded, the buffering time of the video resources is increased due to bandwidth limitation, especially under the condition of mobile network access, which results in waste of user traffic and bandwidth on one hand and still causes the problem of blocking of subsequent video playing on the other hand. The embodiment of the present disclosure provides a video cache playing method to solve the above problem.
Referring to fig. 2, fig. 2 is a first schematic flow chart of a video cache playing method according to an embodiment of the present disclosure. The method of the embodiment can be applied to terminal equipment, and the video cache playing method comprises the following steps:
step S101, playing a first video in the video resource sequence.
Specifically, in a possible implementation manner, the video resource sequence may be a playlist, where the playlist corresponds to video playing addresses in multiple video resource servers, where the playlist includes a video playing address corresponding to a first video, and by accessing the playing address corresponding to the first video in the video resource server, video data corresponding to the first video may be obtained, and the video data corresponding to the first video is downloaded to the local terminal device, and is played after the processes of loading, transcoding, and the like are performed. In another possible implementation manner, the video resource sequence is description information for characterizing a set of one or more videos, and the video resource sequence may be an access address, for example, "www.video.example.com/user _001", where a plurality of video files, for example, "video1", "video2", "video3", and the like, are included. Illustratively, among others, "video2" may be the first video in a sequence of video assets. And adding the file name of the video file after the access address corresponding to the video resource sequence to obtain the corresponding video resource.
Specifically, a client running a video application in a terminal device may determine a video resource sequence and play a first video in a video resource list by connecting the terminal device through video resources displayed on a client interface based on a user operation, the client responds to a click operation of the user, and a process of playing the video is the prior art known by those skilled in the art and is not described herein again.
Step S102, when a first sliding operation aiming at a first video is detected, determining a video caching direction according to a sliding direction corresponding to the first sliding operation; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence.
Illustratively, the terminal device is provided with a touch screen for man-machine interaction, and the terminal device detects the operation behavior of the user on the terminal device through the touch screen. Specifically, in the process that the terminal device plays the first video through the client, when the first sliding operation is detected, the terminal device responds to the sliding operation according to an operation rule preset by the client, and switches the currently played first video into the second video. The first sliding operation refers to an operation of sliding along the transverse direction or the longitudinal direction of the screen in an operable area of the touch screen to switch a currently played video, for example, sliding upwards to switch to a previous video; sliding downwards and switching to the next video; or sliding to the left to switch to the previous video; and sliding to the right to switch to the next video.
The second video is a video in the video resource sequence, and the second video can be a previous video or a next video adjacent to the first video; fig. 3 is a schematic diagram of a position relationship between a second video and a first video provided by an embodiment of the present disclosure, as shown in fig. 3, for example, a video resource sequence includes "video1", "video2", "video3", "video4", and "video5". The first video is "video2", and the second video may be "video3" or "video1" based on the sliding direction corresponding to the first sliding operation. Wherein, "video3" can be regarded as a subsequent video of "video 2"; "video1" can be considered as the previous video of "video 2".
Further, the video caching direction is a direction for caching videos in the video resource sequence determined based on the usage habits of the user. Illustratively, the video buffering direction may include a forward direction and a backward direction, wherein the previous item is a direction from the currently playing video to a previous video of the currently playing video, i.e. a loop direction of "video1", "video2", "video3", "video4", "video5", "video1", "8230; \8230in the video resource sequence in the embodiment shown in fig. 3; the back item is a direction from the currently playing video to a next video of the currently playing video, that is, a circulation direction of "video5", "video4", "video3", "video2", "video1", "video5", "\ 8230 \\ 8230:in the video resource sequence in the embodiment shown in fig. 3.
In a possible implementation manner, determining the video caching direction according to the sliding direction corresponding to the first sliding operation includes: acquiring preset historical sliding information, wherein the historical sliding information is used for representing the sliding direction corresponding to at least one third sliding operation detected before the first sliding operation; and determining the video cache direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation. Specifically, if the sliding directions corresponding to the third sliding operations which are continuously performed for the preset number of times before the first sliding operation are the same as the sliding directions corresponding to the first sliding operation, the sliding direction corresponding to the first sliding operation is determined as the video caching direction. For example, before the user performs the first sliding operation, the user also performs two times of third sliding operations, where the sliding directions of the first sliding operation and the second sliding operation are the same, that is, the user performs the sliding operation switching video to one direction three times continuously (that is, the determination rule); and determining the video playing direction corresponding to the sliding direction as the video caching direction. The historical sliding information is preset in the terminal equipment, and after the sliding operation implemented by the user is detected each time, the historical sliding information is updated according to the sliding direction of the sliding operation.
Illustratively, the video buffering direction further comprises a pending direction; namely, when the video caching direction cannot be forward or backward through the sliding direction corresponding to the first sliding operation and the preset judgment rule, the video caching direction is determined to be the undetermined direction.
And S103, determining a third video according to the video caching direction, caching the third video, and generating a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video caching direction.
Illustratively, when a first sliding operation aiming at the first video is detected, the terminal device plays the second video through the running client. After the video caching direction is determined, the video played subsequently, namely the third video, can be predicted according to the video caching direction. The third video may be a previous video or a subsequent video of the second video.
Further, the third video is cached, and a locally stored cached video is generated, wherein the cached video includes one or more video data, and when the cached video includes a plurality of video data, each video data is used for storing one video segment of the third video. Thereby realizing the caching of all or part of the third video. The third video may include one or more videos, and each video in the third video may correspond to one or more cached videos, where a specific form of the cached video is not specifically limited herein.
And step S104, responding to a second sliding operation aiming at the second video, and playing the cached video if the sliding direction corresponding to the second sliding operation is the video caching direction.
Illustratively, in the process that the terminal device plays the second video through the running client, when the user continues to switch the video, a second sliding operation is performed on the terminal device, where the second sliding operation is used to switch the second video to a video adjacent to the second video in the video resource sequence for playing, similar to the first sliding operation. Fig. 4A is a schematic diagram illustrating a correspondence relationship between a sliding operation and a playing direction according to an embodiment of the present disclosure, and as shown in fig. 4A, after detecting a second sliding operation, a terminal device may respond to the second sliding operation to switch a second video, and based on the sliding direction of the second sliding operation, play a previous video or a subsequent video of the second video. When the screen is slid down based on the second sliding operation (sliding operation a), the previous video (video 1) of the second video (video 2) is played corresponding to a play direction (play direction a). Fig. 4B is a schematic diagram illustrating a correspondence relationship between a sliding operation and a playing direction according to an embodiment of the present disclosure, and as shown in fig. 4B, when a screen is slid upward based on a second sliding operation (sliding operation B), a video (video 3) subsequent to the second video is played, which corresponds to another playing direction (playing direction B). Accordingly, the correspondence between the second sliding operation and the playback direction can be determined.
When the playing direction corresponding to the second sliding operation is consistent with the playing direction corresponding to the video caching direction, the predicted video caching direction is correct, and the cached video is played at the moment. In another possible implementation manner, if the playing direction corresponding to the second sliding operation performed by the user is different from the video caching direction, or the video caching direction is an undetermined direction, the cached video is not played, and the video is downloaded and played in a conventional video loading manner.
In the embodiment, by playing a first video in a video resource sequence; when a first sliding operation aiming at a first video is detected, determining a video caching direction according to a sliding direction corresponding to the first sliding operation; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence; determining a third video according to the video caching direction, caching the third video to generate a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video caching direction; and responding to a second sliding operation aiming at the second video, and if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video caching direction, playing the cached video. The method provided by the embodiment performs prejudgment on the sliding direction corresponding to the subsequent second sliding operation by detecting the first sliding operation of the user, determines the corresponding video cache direction, and caches the video in the video resource sequence in the video cache direction, so as to generate the cached video.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a second method for playing a video cache according to an embodiment of the present disclosure. In this embodiment, steps S102 and S103 are further detailed, and the video cache playing method includes:
step S201, a first video in the video resource sequence is played.
Step S202, when a first sliding operation aiming at a first video is detected, a preset sliding prediction model is obtained, wherein the sliding prediction model is a pre-training model used for predicting a sliding direction corresponding to a second sliding operation after the first sliding operation.
And step S203, determining a confidence value of the sliding direction corresponding to the second sliding operation after the first sliding operation according to the sliding prediction model.
And step S204, if the confidence value is greater than the preset value, determining the playing direction corresponding to the second sliding operation after the first sliding operation output by the sliding prediction model as the video caching direction.
Illustratively, the sliding prediction model is a pre-trained prediction model for predicting the sliding direction of the second sliding operation performed by the user after the first sliding operation is performed. The prediction model can predict the sliding direction of the second sliding operation to be implemented by the user later based on the sliding direction of the first sliding operation of the user and the information such as the content, the duration and the like of the first video and the second video displayed by the terminal equipment. In a possible implementation manner, the sliding prediction model directly outputs the predicted sliding direction, and determines the playing direction of each video in the video resource sequence corresponding to the sliding direction as the video caching direction. In another possible implementation, the sliding prediction model directly outputs a confidence value of the predicted sliding direction. For example, the forward direction is 0.8 and the backward direction is 0.2. Further, according to the confidence value, when the confidence value is greater than a preset value, for example, 0.7, the playing direction corresponding to a second sliding operation after the first sliding operation output by the sliding prediction model is determined as the video buffering direction.
Step S205, according to the video resource sequence, determining video sequencing information, wherein the video sequencing information is used for representing the position sequencing of each video in the video resource sequence.
And step S206, determining the position sequence of the second video in the video resource sequence according to the video sequence information.
Step S207, determining a third video according to the position sequence of the second video in the video resource sequence and the video buffering direction.
The video sequencing information is information for representing position sequencing of each video in the video resource sequence, and when each video in the video resource sequence is played, each video is played according to the playing sequence corresponding to the video sequencing information. The video ordering information may include, for example, an identifier of each video in the video resource sequence for ordering, and according to the video ordering information and the identifier of the second video, a position ordering of the second video in the video resource sequence may be determined. Further, on the basis of determining the position ordering of the second video, based on the video caching direction, an identifier adjacent to the identifier of the second video in the video caching direction is determined, and then a video corresponding to the identifier, that is, a third video, is determined.
Optionally, the third video includes multiple continuous videos in the video resource sequence, as shown in fig. 6, step S207 includes two specific implementation steps S2071 and S2072:
step S2071, obtaining a preset buffer parameter, where the buffer parameter is used to represent the number of videos included in the third video.
Step S2072, according to the buffer parameter, determining a preset number of videos of the second video adjacent to each other along the video buffer direction as a third video.
The caching parameter is information preset in the terminal device, and may be configured in the terminal device through user configuration or during client installation and update. Through the steps in this embodiment, a plurality of videos are determined as the third video and are cached, when the user frequently performs sliding operation to switch videos, it is still ensured that the video data are locally cached in the terminal device, and thus the play pause problem is further avoided.
And step S208, acquiring the video buffer amount, and caching the third video based on the video buffer amount to generate a cached video.
Illustratively, the video buffer amount is information for characterizing the amount of data for buffering the third video, e.g., the video buffer amount may be a percentage value, e.g., 50%; it may also be a specific data size, for example 2048kB (kilobyte). By setting the video buffering amount, when the third video is buffered, only part of stream data in the third video is buffered, so that the preliminary buffering of the third video can be realized, and then when the third video is determined to be played, the rest stream data of the third video is continuously buffered, so that the video blockage is avoided, and the flow waste caused by the buffering of all the third videos is avoided.
In one possible implementation, obtaining the video buffer amount includes:
acquiring content information of a first video, wherein the content information represents a video content category of the first video; and determining the video caching amount according to the content information of the first video and the playing time length of the first video.
Illustratively, the content information is information characterizing a video content category of the first video, such as: a fun video, a movie video, a learning video, etc. The content video may be determined by the description information of the first video, such as the category label, the video name, the video author identification, and the like. The user is interested in different video contents. For videos that are of interest to the user, the user may watch for a long time, while for videos that are not of interest to the user, the user may quickly switch to the next video. Therefore, for the cached third video, if the user is not interested in the third video to be played, it is likely that the user will switch the third video to the next video soon, and thus the user may not be interested in playing the third video. And determining a video buffer amount according to the content information of the first video and the playing time of the first video, and performing a small amount of buffer on the third video according to the video buffer amount, so that the network bandwidth and the flow can be saved.
In another possible implementation, obtaining the video buffer amount includes: and determining the video buffer amount according to the confidence value of the sliding direction corresponding to the second sliding operation after the first sliding operation.
For example, the sliding direction corresponding to the second sliding operation and the playing direction corresponding to the second sliding operation have a fixed mapping relationship, and the greater the confidence value of the sliding direction corresponding to the second sliding operation predicted by the sliding prediction model is, the greater the possibility that the video buffering direction is the same as the playing direction corresponding to the second sliding operation is, and conversely, the less the possibility that the video buffering direction is the same as the playing direction corresponding to the second sliding operation is. Determining a corresponding video buffer amount according to the confidence value of the sliding direction predicted by the sliding prediction model, matching the video buffer amount with the possibility that the video buffer direction is the same as the playing direction corresponding to the second sliding operation, and caching a third video by using the smaller video buffer amount when the possibility that the video buffer direction is the same as the playing direction corresponding to the second sliding operation is smaller; otherwise, the third video is cached by using a larger video caching amount, so that the bandwidth utilization rate is further improved, and the flow is saved. Fig. 7 is a schematic diagram of a correspondence relationship between a confidence value of a sliding direction corresponding to a second sliding operation and a video cache amount according to an embodiment of the present disclosure, and as shown in fig. 7, when the confidence value of the sliding direction corresponding to the second sliding operation predicted by a sliding prediction model is 0.8, a data amount of video caching for a third video is 2048kB, and a cache file with a size of 2048kB is generated; when the confidence value of the sliding direction corresponding to the second sliding operation predicted by the sliding prediction model is 0.9, the data size of video caching for the third video is 4096kB, and a cache file with the size of 4096kB is generated.
In step S209, in response to the second sliding operation for the second video, if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video caching direction, the cached video is played.
In this embodiment, the implementation manners of step S201 and step S209 are the same as the implementation manners of step S101 and step S104 in the embodiment shown in fig. 2 of the present disclosure, and are not described in detail herein.
Fig. 8 is a block diagram of a video cache playing apparatus according to an embodiment of the present disclosure, which corresponds to the video cache playing method according to the foregoing embodiment. For ease of illustration, only portions that are relevant to embodiments of the present disclosure are shown. Referring to fig. 8, the video cache playing apparatus 3 includes:
a playing module 31, configured to play a first video in the video resource sequence;
the determining module 32 is configured to, when a first sliding operation for a first video is detected, determine a video caching direction according to a sliding direction corresponding to the first sliding operation; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence;
the cache module 33 is configured to determine a third video according to the video cache direction, cache the third video, and generate a cached video, where the third video is a video in the video resource sequence that is adjacent to the second video in the video cache direction;
the determining module 34 is configured to respond to a second sliding operation for the second video, and play the cached video if a playing direction corresponding to the second sliding operation is the same as a playing direction corresponding to the video caching direction.
In an embodiment of the present disclosure, when determining the video buffering direction according to the sliding direction corresponding to the first sliding operation, the determining module 32 is specifically configured to: acquiring preset historical sliding information, wherein the historical sliding information is used for representing the sliding direction corresponding to at least one third sliding operation detected before the first sliding operation; and determining the video caching direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation.
In one embodiment of the present disclosure, the historical sliding information includes a sliding direction corresponding to a third sliding operation that is continuously performed for a preset number of times before the first sliding operation; when determining the video caching direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation, the determining module 32 is specifically configured to: and if the sliding directions corresponding to the third sliding operations which are continuously performed for the preset times before the first sliding operation are the same as the sliding directions corresponding to the first sliding operation, determining the sliding direction corresponding to the first sliding operation as the video caching direction.
In an embodiment of the present disclosure, when determining the video buffering direction according to the sliding direction corresponding to the first sliding operation, the determining module 32 is specifically configured to: acquiring a preset sliding prediction model, wherein the sliding prediction model is a pre-training model used for predicting the sliding direction corresponding to the second sliding operation after the first sliding operation; determining a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation according to the sliding prediction model; and if the confidence value is larger than the preset value, determining the playing direction corresponding to the second sliding operation after the first sliding operation output by the sliding prediction model as the video caching direction.
In an embodiment of the present disclosure, after determining, as the video buffering direction, the play direction corresponding to a second sliding operation subsequent to the first sliding operation output by the sliding prediction model, the determination module 32 is further configured to: determining a video buffer amount according to a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation;
in an embodiment of the present disclosure, when the caching module 33 caches the third video, it is specifically configured to: and caching the third video according to the video caching amount.
In an embodiment of the present disclosure, when determining the third video according to the video caching direction, the caching module 33 is specifically configured to: determining video sequencing information according to the video resource sequence, wherein the video sequencing information is used for representing the position sequencing of each video in the video resource sequence; according to the video sequencing information, determining the position sequencing of the second video in the video resource sequence; and determining a third video according to the position sequence of the second video in the video resource sequence and the video buffering direction.
In one embodiment of the present disclosure, the third video comprises a plurality of consecutive videos in the sequence of video assets; when determining the third video according to the position sequence of the second video in the video resource sequence and the video caching direction, the caching module 33 is specifically configured to: acquiring preset cache parameters, wherein the cache parameters are used for representing the number of videos included in the third video; and determining the preset number of videos of the second video adjacent along the video caching direction as a third video according to the caching parameters.
In an embodiment of the present disclosure, the cache module 33 is further configured to: acquiring content information of a first video, wherein the content information represents a video content category of the first video; determining a video cache amount according to the content information of the first video and the playing time length of the first video;
in an embodiment of the present disclosure, when the caching module 33 caches the third video, the caching module is specifically configured to: and caching the third video according to the video caching amount.
The playing module 31, the determining module 32, the buffering module 33 and the judging module 34 are connected in sequence. The video cache playing device 3 provided in this embodiment may execute the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
The device provided in this embodiment may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 9, the electronic device 4 includes at least one processor 41 and a memory 42;
the memory 42 stores computer-executable instructions;
the at least one processor 41 executes computer-executable instructions stored by the memory 42 to cause the at least one processor 41 to perform a video cache play method as in the embodiments shown in fig. 2-7.
The processor 41 and the memory 42 are connected by a bus 43.
The relevant descriptions and effects corresponding to the steps in the embodiments corresponding to fig. 2 to fig. 7 can be understood, and are not described in detail herein.
Referring to fig. 10, a schematic structural diagram of an electronic device 900 suitable for implementing the embodiment of the present disclosure is shown, where the electronic device 900 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car navigation terminal (e.g., a car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 10, the electronic device 900 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are also stored. The processing apparatus 901, the ROM902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
Generally, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic apparatus 900 to perform wireless or wired communication with other apparatuses to exchange data. While fig. 10 illustrates an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing apparatus 901.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language 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. In the latter scenario, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can 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. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In a first aspect, according to one or more embodiments of the present disclosure, there is provided a video cache playing method, including:
playing a first video in the video resource sequence; when a first sliding operation aiming at the first video is detected, determining a video caching direction according to a sliding direction corresponding to the first sliding operation; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence; determining a third video according to the video caching direction, caching the third video, and generating a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video caching direction; responding to a second sliding operation aiming at the second video, and if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video caching direction, playing the cached video.
According to one or more embodiments of the present disclosure, determining a video buffering direction according to a sliding direction corresponding to the first sliding operation includes: acquiring preset historical sliding information, wherein the historical sliding information is used for representing the sliding direction corresponding to at least one third sliding operation detected before the first sliding operation; and determining the video cache direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation.
According to one or more embodiments of the present disclosure, the historical sliding information includes a sliding direction corresponding to a third sliding operation which is continuously performed for a preset number of times before the first sliding operation; determining a video caching direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation, wherein the determining comprises the following steps: and if the sliding directions corresponding to the third sliding operations which are continuously performed for the preset times before the first sliding operation are the same as the sliding directions corresponding to the first sliding operation, determining the sliding direction corresponding to the first sliding operation as the video caching direction.
According to one or more embodiments of the present disclosure, determining a video buffering direction according to a sliding direction corresponding to the first sliding operation includes: acquiring a preset sliding prediction model, wherein the sliding prediction model is a pre-training model used for predicting a sliding direction corresponding to a second sliding operation after a first sliding operation; determining a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation according to the sliding prediction model; and if the confidence value is larger than a preset value, determining the playing direction corresponding to a second sliding operation after the first sliding operation output by the sliding prediction model as a video caching direction.
According to one or more embodiments of the present disclosure, after determining, as a video buffering direction, a play direction corresponding to a second sliding operation subsequent to the first sliding operation output by the sliding prediction model, the method further includes: determining a video buffer amount according to a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation; caching the third video, including: and caching the third video according to the video caching amount.
According to one or more embodiments of the present disclosure, determining a third video according to the video buffering direction includes: determining video sequencing information according to the video resource sequence, wherein the video sequencing information is used for representing the position sequencing of each video in the video resource sequence; determining the position ordering of the second video in the video resource sequence according to the video ordering information; and determining a third video according to the position sequence of the second video in the video resource sequence and the video caching direction.
According to one or more embodiments of the present disclosure, the third video includes a plurality of consecutive videos in the sequence of video assets; determining a third video according to the position ordering of the second video in the video resource sequence and the video caching direction, wherein the determining comprises the following steps: acquiring preset cache parameters, wherein the cache parameters are used for representing the number of videos included in the third video; and determining a preset number of videos adjacent to the second video along the video caching direction as a third video according to the caching parameters.
According to one or more embodiments of the present disclosure, the method further comprises: acquiring content information of the first video, wherein the content information represents a video content category of the first video; determining a video caching amount according to the content information of the first video and the playing time length of the first video; caching the third video, including: and caching the third video according to the video caching amount.
According to one or more embodiments of the present disclosure, determining a video caching amount according to content information of a first video and a playing time length of the first video includes: acquiring content information of the third video; determining a predicted playing time length according to the content information of the third video and the content information of the second video; and determining the video buffer amount according to the predicted playing time.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a video cache playing apparatus including:
the playing module is used for playing a first video in the video resource sequence;
the determining module is used for determining a video caching direction according to a sliding direction corresponding to a first sliding operation when the first sliding operation aiming at the first video is detected; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence;
the cache module is used for determining a third video according to the video cache direction, caching the third video and generating a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video cache direction;
and the judging module is used for responding to a second sliding operation aiming at the second video, and playing the cache video if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video cache direction.
According to one or more embodiments of the present disclosure, when determining the video cache direction according to the sliding direction corresponding to the first sliding operation, the determining module is specifically configured to: acquiring preset historical sliding information, wherein the historical sliding information is used for representing the sliding direction corresponding to at least one third sliding operation detected before the first sliding operation; and determining the video cache direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation.
According to one or more embodiments of the present disclosure, the historical sliding information includes a sliding direction corresponding to a third sliding operation that is continuously performed a preset number of times before the first sliding operation; when determining the video caching direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation, the determining module is specifically configured to: and if the sliding directions corresponding to the third sliding operations which are continuously performed for the preset times before the first sliding operation are the same as the sliding directions corresponding to the first sliding operation, determining the sliding direction corresponding to the first sliding operation as the video caching direction.
According to one or more embodiments of the present disclosure, when determining the video cache direction according to the sliding direction corresponding to the first sliding operation, the determining module is specifically configured to: acquiring a preset sliding prediction model, wherein the sliding prediction model is a pre-training model used for predicting a sliding direction corresponding to a second sliding operation after a first sliding operation; determining a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation according to the sliding prediction model; and if the confidence value is larger than a preset value, determining a playing direction corresponding to a second sliding operation after the first sliding operation output by the sliding prediction model as a video caching direction.
According to one or more embodiments of the present disclosure, after determining, as a video buffering direction, a playing direction corresponding to a second sliding operation subsequent to the first sliding operation output by the sliding prediction model, the determining module is further configured to: determining a video buffer amount according to a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation;
according to one or more embodiments of the present disclosure, when caching the third video, the caching module is specifically configured to: and caching the third video according to the video caching amount.
According to one or more embodiments of the present disclosure, when determining the third video according to the video caching direction, the caching module is specifically configured to: determining video sequencing information according to the video resource sequence, wherein the video sequencing information is used for representing the position sequencing of each video in the video resource sequence; determining the position ordering of the second video in the video resource sequence according to the video ordering information; and determining a third video according to the position sequence of the second video in the video resource sequence and the video caching direction.
According to one or more embodiments of the present disclosure, the third video includes a plurality of consecutive videos in the sequence of video assets; when determining the third video according to the position sequence of the second video in the video resource sequence and the video caching direction, the caching module is specifically configured to: acquiring preset cache parameters, wherein the cache parameters are used for representing the number of videos included in the third video; and determining a preset number of videos adjacent to the second video along the video caching direction as a third video according to the caching parameters.
According to one or more embodiments of the present disclosure, the cache module is further configured to: acquiring content information of the first video, wherein the content information represents a video content category of the first video; determining a video cache amount according to the content information of the first video and the playing time length of the first video;
according to one or more embodiments of the present disclosure, when caching the third video, the caching module is specifically configured to: and caching the third video according to the video caching amount.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, including: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the video cache playback method as described above in the first aspect and various possible designs of the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the video cache playing method according to the first aspect and various possible designs of the first aspect is implemented.
In a fifth aspect, embodiments of the present disclosure provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the video cache playing method according to the first aspect and various possible designs of the first aspect is implemented.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (11)

1. A video cache playing method is characterized by comprising the following steps:
playing a first video in the video resource sequence;
when a first sliding operation for the first video is detected, determining a video caching direction according to a sliding direction corresponding to the first sliding operation; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence;
determining a third video according to the video caching direction, caching the third video to generate a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video caching direction;
responding to a second sliding operation aiming at the second video, and if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video caching direction, playing the cached video;
before caching the third video and generating a cached video, the method further comprises:
and determining a video caching amount according to a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation, wherein the video caching amount is used for caching the third video.
2. The method of claim 1, wherein determining a video buffering direction according to the sliding direction corresponding to the first sliding operation comprises:
acquiring preset historical sliding information, wherein the historical sliding information is used for representing the sliding direction corresponding to at least one third sliding operation detected before the first sliding operation;
and determining a video caching direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation.
3. The method according to claim 2, wherein the historical slide information includes a slide direction corresponding to a third slide operation which is a preset number of times before the first slide operation; determining a video cache direction according to the historical sliding information and the sliding direction corresponding to the first sliding operation, including:
and if the sliding directions corresponding to the third sliding operations which are continuously performed for the preset times before the first sliding operation are the same as the sliding directions corresponding to the first sliding operation, determining the sliding direction corresponding to the first sliding operation as the video caching direction.
4. The method of claim 1, wherein determining a video buffering direction according to the sliding direction corresponding to the first sliding operation comprises:
acquiring a preset sliding prediction model, wherein the sliding prediction model is a pre-training model used for predicting a sliding direction corresponding to a second sliding operation after a first sliding operation;
determining a confidence value of a sliding direction corresponding to a second sliding operation after the first sliding operation according to the sliding prediction model;
and if the confidence value is larger than a preset value, determining the playing direction corresponding to a second sliding operation after the first sliding operation output by the sliding prediction model as a video caching direction.
5. The method of claim 1, wherein determining a third video according to the video buffering direction comprises:
determining video sequencing information according to the video resource sequence, wherein the video sequencing information is used for representing the position sequencing of each video in the video resource sequence;
determining the position ordering of the second video in the video resource sequence according to the video ordering information;
and determining a third video according to the position sequence of the second video in the video resource sequence and the video caching direction.
6. The method of claim 5, wherein the third video comprises a plurality of consecutive videos in the sequence of video assets; determining a third video according to the position ordering of the second video in the video resource sequence and the video buffering direction, wherein the determining comprises:
acquiring preset cache parameters, wherein the cache parameters are used for representing the number of videos included in the third video;
and determining a preset number of videos adjacent to the second video along the video caching direction as a third video according to the caching parameters.
7. The method according to any one of claims 1-6, further comprising:
acquiring content information of the first video, wherein the content information represents a video content category of the first video;
determining a video caching amount according to the content information of the first video and the playing time length of the first video;
caching the third video, including:
and caching the third video according to the video caching amount.
8. The method of claim 7, wherein determining a video buffer amount according to the content information of the first video and the playing time length of the first video comprises:
acquiring content information of the third video;
determining a predicted playing time length according to the content information of the third video and the content information of the second video;
and determining the video caching amount according to the predicted playing time length.
9. A video buffer playback device, comprising:
the playing module is used for playing a first video in the video resource sequence;
the determining module is used for determining a video caching direction according to a sliding direction corresponding to a first sliding operation when the first sliding operation aiming at the first video is detected; the first sliding operation is used for switching the first video into a second video adjacent to the first video in the video resource sequence to be played, and the video cache direction represents the playing direction of the video resource in the video resource sequence;
the cache module is used for determining a third video according to the video cache direction, caching the third video and generating a cached video, wherein the third video is a video adjacent to the second video in the video resource sequence along the video cache direction;
the judging module is used for responding to a second sliding operation aiming at the second video, and if the playing direction corresponding to the second sliding operation is the same as the playing direction corresponding to the video caching direction, the cached video is played;
before caching the third video and generating a cached video, the caching module is further configured to: and determining a video buffer amount according to the confidence value of the sliding direction corresponding to the second sliding operation after the first sliding operation, wherein the video buffer amount is used for buffering the third video.
10. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored by the memory causes the at least one processor to perform the video cache playback method of any of claims 1 to 8.
11. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method for playing a video cache according to any one of claims 1 to 8 is implemented.
CN202111020673.XA 2021-09-01 2021-09-01 Video cache playing method and device, electronic equipment and storage medium Active CN113727172B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111020673.XA CN113727172B (en) 2021-09-01 2021-09-01 Video cache playing method and device, electronic equipment and storage medium
PCT/CN2022/108054 WO2023029821A1 (en) 2021-09-01 2022-07-26 Video buffer playing method and apparatus, and electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111020673.XA CN113727172B (en) 2021-09-01 2021-09-01 Video cache playing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113727172A CN113727172A (en) 2021-11-30
CN113727172B true CN113727172B (en) 2023-02-28

Family

ID=78680550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111020673.XA Active CN113727172B (en) 2021-09-01 2021-09-01 Video cache playing method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113727172B (en)
WO (1) WO2023029821A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113727172B (en) * 2021-09-01 2023-02-28 北京字跳网络技术有限公司 Video cache playing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8776158B1 (en) * 2009-09-30 2014-07-08 Emc Corporation Asynchronous shifting windows caching for forward and backward video streaming
CN107888981A (en) * 2017-11-16 2018-04-06 北京小米移动软件有限公司 Audio frequency and video preload method, apparatus, equipment and storage medium
CN108965907A (en) * 2018-07-11 2018-12-07 北京字节跳动网络技术有限公司 For playing the methods, devices and systems of video
CN110996134A (en) * 2019-12-23 2020-04-10 腾讯科技(深圳)有限公司 Video playing method, device and storage medium
WO2021052085A1 (en) * 2019-09-20 2021-03-25 北京字节跳动网络技术有限公司 Video recommendation method and apparatus, electronic device and computer-readable medium
CN112738633A (en) * 2020-12-25 2021-04-30 广州繁星互娱信息科技有限公司 Video playing method, device, equipment and readable storage medium
CN112887797A (en) * 2019-11-29 2021-06-01 腾讯科技(深圳)有限公司 Method for controlling video playing and related equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140368737A1 (en) * 2013-06-17 2014-12-18 Spotify Ab System and method for playing media during navigation between media streams
US11166080B2 (en) * 2017-12-21 2021-11-02 Facebook, Inc. Systems and methods for presenting content
CN110809168A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Video live broadcast processing method and device, terminal and storage medium
CN110012339B (en) * 2019-04-11 2021-02-12 北京字节跳动网络技术有限公司 Video playing and displaying method, device, equipment and storage medium
CN113727172B (en) * 2021-09-01 2023-02-28 北京字跳网络技术有限公司 Video cache playing method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8776158B1 (en) * 2009-09-30 2014-07-08 Emc Corporation Asynchronous shifting windows caching for forward and backward video streaming
CN107888981A (en) * 2017-11-16 2018-04-06 北京小米移动软件有限公司 Audio frequency and video preload method, apparatus, equipment and storage medium
CN108965907A (en) * 2018-07-11 2018-12-07 北京字节跳动网络技术有限公司 For playing the methods, devices and systems of video
WO2021052085A1 (en) * 2019-09-20 2021-03-25 北京字节跳动网络技术有限公司 Video recommendation method and apparatus, electronic device and computer-readable medium
CN112887797A (en) * 2019-11-29 2021-06-01 腾讯科技(深圳)有限公司 Method for controlling video playing and related equipment
CN110996134A (en) * 2019-12-23 2020-04-10 腾讯科技(深圳)有限公司 Video playing method, device and storage medium
CN112738633A (en) * 2020-12-25 2021-04-30 广州繁星互娱信息科技有限公司 Video playing method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN113727172A (en) 2021-11-30
WO2023029821A1 (en) 2023-03-09

Similar Documents

Publication Publication Date Title
CN111510760B (en) Video information display method and device, storage medium and electronic equipment
CN112261226B (en) Horizontal screen interaction method and device, electronic equipment and storage medium
CN111488185B (en) Page data processing method, device, electronic equipment and readable medium
CN112135169B (en) Media content loading method, device, equipment and medium
CN113038234B (en) Video processing method and device, electronic equipment and storage medium
CN110837333A (en) Method, device, terminal and storage medium for adjusting playing progress of multimedia file
CN111258736A (en) Information processing method and device and electronic equipment
CN114201705A (en) Video processing method and device, electronic equipment and storage medium
CN110633434A (en) Page caching method and device, electronic equipment and storage medium
CN114760515A (en) Method, device, equipment, storage medium and program product for displaying media content
CN113721807A (en) Information display method and device, electronic equipment and storage medium
CN113727172B (en) Video cache playing method and device, electronic equipment and storage medium
CN109639813B (en) Video file transmission processing method and device, electronic equipment and storage medium
CN110825481A (en) Method and device for displaying page information corresponding to page tag and electronic equipment
CN110633433A (en) Page caching method and device, electronic equipment and storage medium
CN114666666B (en) Video skip playing method, device, terminal equipment and storage medium
CN115037986B (en) Video self-adaptive playing method and device
CN111225255B (en) Target video push playing method and device, electronic equipment and storage medium
CN110611847B (en) Video preview method and device, storage medium and electronic equipment
US20230276079A1 (en) Live streaming room page jump method and apparatus, live streaming room page return method and apparatus, and electronic device
WO2022188618A1 (en) Resource preloading method, apparatus and device, and storage medium
CN113163483B (en) Timestamp updating method and device and electronic equipment
CN112636971B (en) Service degradation method and device, electronic equipment and storage medium
CN114518910A (en) Application starting method and device, electronic equipment, storage medium and program product
CN111240758A (en) Material display method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant