Video playing method and device, terminal and storage medium

By downloading video files and creating a player in advance when specific preload conditions are met, the problem of long wait time for video playback is solved, and the efficiency and fluency of video playback are improved.

CN119946341APending Publication Date: 2025-05-06TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510115739.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art requires waiting for the video to be loaded and played during video playback, resulting in a long wait time, which affects the efficiency and fluency of video playback.

Method used

When specific preload conditions are met, download the video file in advance and create a player. After user interaction, play it directly on the video playback page to reduce waiting time.

Benefits of technology

By preloading video files and players, the waiting time for video playback is reduced, the efficiency and fluency of video playback are improved, and the rapid video playback is achieved while ensuring resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946341A_ABST
    Figure CN119946341A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a video playing method and device, a terminal and a storage medium, and belongs to the technical field of Internet. The method comprises the steps that an information flow page is displayed, the information flow page comprises at least one video content control corresponding to a video, and video information used for introducing the video is displayed on the video content control corresponding to the video; under the condition that the first preloading condition is met currently, a first video is determined in videos corresponding to at least one video content control displayed on the information flow page, and the first video meets a second preloading condition; downloading a video file of the first video, and creating a player of the first video; and in response to an interaction operation on the video content control corresponding to the first video, displaying a video playing page, and playing the first video based on the video file of the first video in the video playing page through a player of the first video. According to the invention, the time for waiting for video loading can be reduced, and the video playing efficiency and fluency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet technology, and in particular to a video playback method, device, terminal and storage medium. Background Art

[0002] With the development of Internet technology, various applications supporting video playback are becoming more and more widespread. In order to facilitate user browsing, video information for introducing the video is usually pushed to the user on a page, and then the user determines whether to jump to a new page to play the corresponding video based on the pushed video information.

[0003] However, after displaying a new page, it is necessary to wait for the video to load and play, which results in a long waiting time, resulting in low efficiency of video playback and affecting the smoothness of video playback. Summary of the invention

[0004] The embodiments of the present application provide a video playback method, device, terminal and storage medium, which can reduce the time of waiting for video loading and improve the efficiency and fluency of video playback. The technical solution is as follows:

[0005] In one aspect, a video playback method is provided, the method comprising:

[0006] Displaying an information flow page, the information flow page including at least one video content control corresponding to a video, the video content control corresponding to the video displaying video information for introducing the video;

[0007] In a case where the first preloading condition is currently met, determining a first video among videos corresponding to at least one video content control displayed on the information stream page, the first video meeting the second preloading condition;

[0008] Download the video file of the first video and create a player for the first video;

[0009] In response to an interactive operation on a video content control corresponding to the first video, a video playback page is displayed, and the first video is played on the video playback page through a player of the first video based on the video file of the first video.

[0010] In another aspect, a video playback device is provided, the device comprising:

[0011] A first display module is used to display an information flow page, wherein the information flow page includes a video content control corresponding to at least one video, and the video content control corresponding to the video displays video information for introducing the video;

[0012] A determination module, configured to determine, when the first preloading condition is currently satisfied, a first video among videos corresponding to at least one video content control displayed on the information stream page, wherein the first video satisfies a second preloading condition;

[0013] A loading module, used for downloading the video file of the first video and creating a player for the first video;

[0014] The second display module is used to display a video playback page in response to an interactive operation on a video content control corresponding to the first video, and to play the first video on the video playback page through a player of the first video based on the video file of the first video.

[0015] Optionally, the information flow page is a scrollable page, and the first preloading condition includes that the time duration for which the information flow page stops scrolling reaches a first preset time duration.

[0016] Optionally, the second preloading condition includes any one of the following:

[0017] Among the multiple video content controls currently displayed on the information stream page, the video content control corresponding to the video is the first video content control, and the multiple video content controls are arranged in sequence;

[0018] Among the videos corresponding to the multiple video content controls currently displayed on the information flow page, the video has the largest number of playback times.

[0019] Optionally, the preprocessing module is used to:

[0020] Determine the number of players created in the player cache pool;

[0021] When the number of created players does not reach a preset number, creating a player for the first video in the player cache pool;

[0022] When the number of created players reaches the preset number, the player that has not been accessed for the longest time in the player cache pool is deleted, and a player for the first video is created in the player cache.

[0023] Optionally, the determination module is further configured to, when the first preloading condition is currently satisfied, determine a second video among the videos corresponding to at least one video content control displayed on the information stream page, the second video not satisfying the second preloading condition;

[0024] The loading module is further used to download the video file of the second video;

[0025] The second display module is further configured to display the video playback page in response to an interactive operation on a video content control corresponding to the second video;

[0026] The loading module is further used to create a player for the second video;

[0027] The second display module is further used to play the second video based on the video file of the second video through the player of the second video in the video playback page after the player of the second video is created.

[0028] Optionally, the loading module is used to download the video file and video cover of the second video;

[0029] The second display module is used to display the video playback page including the video cover in response to an interactive operation on the video content control corresponding to the second video.

[0030] Optionally, the number of the second videos is multiple; and the loading module is used to:

[0031] Determine at least one target video among the plurality of second videos, where the target video refers to a second video whose corresponding video file has not yet been downloaded;

[0032] Removing videos different from the at least one target video in the preloading queue, and adding target videos not recorded in the preloading queue to the preloading queue, the preloading queue being used to record videos of the video files to be downloaded;

[0033] Download the video file of the target video in the preloading queue, and remove the target video of the downloaded video file from the preloading queue.

[0034] Optionally, the device further comprises:

[0035] The first display module is further used to display a video content control corresponding to a third video in the information flow page, and to play the third video based on the video file of the third video through a player of the third video on the video content control corresponding to the third video;

[0036] The second display module is further configured to display the video playback page in response to an interactive operation on a video content control corresponding to the third video;

[0037] A player multiplexing module, used to move the player of the third video from the information stream page to the video playback page;

[0038] The second display module is also used to continue playing the third video through the player of the third video in the video playback page based on the playback progress in the information flow page and the video file of the third video.

[0039] On the other hand, a terminal is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the video playback method described in the above aspects.

[0040] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the video playback method described in the above aspects.

[0041] On the other hand, a computer program product is provided, including a computer program, wherein the computer program is loaded and executed by a processor to implement the operations performed by the video playback method as described in the above aspects.

[0042] The solution provided by the embodiment of the present application is that in the process of displaying the information flow page, when the first preloading condition is met, the video that meets the second preloading condition is preloaded, that is, the corresponding video file is pre-downloaded and the corresponding player is created. Then, when the user interacts with the video content control corresponding to the preloaded video, the user can jump from the information flow page to the video playback page, and directly play the video on the video playback page using the pre-created player and the pre-downloaded video file, thereby reducing the time waiting for the video to load and improving the efficiency and fluency of the video playback. In addition, only the videos that meet the specific preloading conditions are preloaded, avoiding the resource consumption caused by preloading all videos, so that the fast playback of the video can be achieved under the premise of ensuring resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0044] Figure 1 is a schematic diagram of a computer system provided in an embodiment of the present application;

[0045] Figure 2 is a flow chart of a video playback method provided by an embodiment of the present application;

[0046] Figure 3 is a flowchart of another video playback method provided by an embodiment of the present application;

[0047] Figure 4 It is a schematic diagram of an information flow page provided in an embodiment of the present application;

[0048] Figure 5 is a schematic diagram of another information flow page provided in an embodiment of the present application;

[0049] Figure 6 is a schematic diagram of a preloading method provided in an embodiment of the present application;

[0050] Figure 7 is a schematic diagram of another preloading method provided in an embodiment of the present application;

[0051] Figure 8 is a schematic diagram of a video playback method provided in an embodiment of the present application;

[0052] Fig. 9 is a flowchart of another video playback method provided in an embodiment of the present application;

[0053] Fig.10 is a schematic diagram of another video playback method provided in an embodiment of the present application;

[0054] Fig.11 is a schematic diagram of another video playback method provided in an embodiment of the present application;

[0055] Fig.12 is a flowchart of another video playback method provided in an embodiment of the present application;

[0056] Fig.13 is a structural schematic diagram of a video playback device provided in an embodiment of the present application;

[0057] Fig.14 is a structural schematic diagram of another video playback device provided in an embodiment of the present application;

[0058] Fig.15 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0060] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, a first video may be referred to as a second video, and similarly, a second video may be referred to as a first video without departing from the scope of this application.

[0061] Among them, at least one refers to one or more than one, for example, at least one video can be one video, two videos, three videos, or any other integer greater than or equal to one. Multiple refers to two or more than two, for example, multiple videos can be two videos, three videos, or any other integer greater than or equal to two. Each refers to each of at least one, for example, each video refers to each video in the multiple videos. If the multiple videos are 3 videos, each video refers to each video in the 3 videos.

[0062] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) involved in this application are all fully authorized by users or relevant parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0063] For example, the players and video files involved in this application are fully authorized by users or relevant parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0064] The video playback method provided in the embodiment of the present application can be used in a terminal. The embodiment of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.

[0065] Figure 1 is a schematic diagram of a computer system provided in an embodiment of the present application, see Figure 1 , the computer system includes: a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network.

[0066] The terminal 101 is installed and runs a client 111, which may be a video client, a news information client, a social application client, an online payment client, an online shopping client, a game client, a medical service client, an application store client, etc. When the terminal 101 runs the client 111, the user interface of the client 111 is displayed on the screen of the terminal 101. The terminal 101 is a terminal used by the user 121.

[0067] Optionally, terminal 101 may generally refer to one of multiple terminals, including: smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, smart voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, VR (Virtual Reality) devices, AR (Augmented Reality) devices, etc., but are not limited to these.

[0068] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be 6, 8, or more. The embodiment of the present application does not limit the number of terminals and device types.

[0069] Figure 1 Only one terminal is shown, but in different embodiments, there are multiple other terminals 103 that can access the server 102. Optionally, there are one or more terminals 103 corresponding to the developer, and the client development and editing platform is installed on the terminal 103. The developer can edit and update the client on the terminal 103, and transmit the updated client installation package to the server 102 through a wired or wireless network. The terminal 101 can download the client installation package from the server 102 to update the client.

[0070] The terminal 101 and other terminals 103 are connected to the server 102 via a wired network or a wireless network.

[0071] The server 102 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 102 is used to provide background services for the client. Optionally, the server 102 undertakes the main computing work, and the first terminal 101 undertakes the secondary computing work; or, the server 102 undertakes the secondary computing work, and the first terminal 101 undertakes the main computing work; or, the server 102 and the first terminal 101 adopt a distributed computing architecture for collaborative computing.

[0072] In the embodiment of the present application, the server 102 is used to send video information of the video and the video file of the video to the terminal 101, the video information is used to introduce the video, and the video file is used to play the video. The terminal 101 is used to display the video content control corresponding to the video on the information flow page, and the video content control displays the video information. The terminal 101 is also used to play the video based on the video file of the video through the video player on the video playback page.

[0073] The server 102 pushes video information of multiple videos to the terminal 101, so that the terminal 101 displays the video information on the video content control of the information flow page. When a specific preloading condition is met, the terminal 101 can pre-download the video file of the video from the server 102, so that when a video is subsequently requested to be played, the downloaded video file can be directly used, thereby saving the time of waiting for the video file to be downloaded.

[0074] Figure 2 is a flowchart of a video playback method provided in an embodiment of the present application. The embodiment of the present application is executed by a terminal, for example, Figure 1 Executed by terminal 101 in . Figure 2 , the method comprising:

[0075] 201. The terminal displays an information flow page, where the information flow page includes at least one video content control corresponding to a video, and the video content control corresponding to the video displays video information for introducing the video.

[0076] The terminal displays an information flow page, which is used to display the video content control corresponding to the video, and the video content control corresponding to the video is used to display the video information of the video. Among them, the video content control is a triggerable control.

[0077] Exemplarily, the video information of a video includes video cover, video title, video upload time, video upload object, video viewing times and other information.

[0078] 202. When the first preloading condition is currently satisfied, the terminal determines a first video among videos corresponding to at least one video content control displayed on the information flow page, and the first video satisfies the second preloading condition.

[0079] In the process of displaying the information flow page, if the first preloading condition is currently met, then for the video corresponding to each video content control currently displayed on the information flow page, if the video meets the second preloading condition, the video is called the first video.

[0080] The first preloading condition is used to determine the timing of preloading, and the second preloading condition is used to determine the preloaded video. The first preloading condition and the second preloading condition can be pre-set conditions, and the embodiment of the present application does not limit the specific content of the first preloading condition and the second preloading condition.

[0081] 203. The terminal downloads the video file of the first video and creates a player for the first video.

[0082] When the first preloading condition is currently met, for the first video that currently meets the second preloading condition, the terminal pre-downloads the video file of the first video and pre-creates a player for the first video. Pre-downloading the video file and pre-creating the player means that when no playback request for the first video is received, the video file of the first video is downloaded in advance and the player for the first video is created in advance.

[0083] The video file of the first video is a file storing the video data of the first video, the video file is in a non-playable format, and the video data is in a playable format. The video data includes video frames, audio frames, video subtitles, and the like.

[0084] The player of the first video is a component used to play the first video, and the player is used to decode and render the video data stored in the video file of the first video.

[0085] 204. In response to the interactive operation on the video content control corresponding to the first video, the terminal displays a video playback page, and plays the first video on the video playback page through a player of the first video based on the video file of the first video.

[0086] The interactive operation on the video content control corresponding to the first video is used to instruct the first video to play, and the interactive operation may be a click operation or a slide operation on the video content control.

[0087] When the terminal detects an interactive operation on the video content control corresponding to the first video, it jumps from the information flow page to the video playback page. Since the player of the first video has been created in advance and the video file of the first video has been downloaded, after the video playback page is displayed, the first video can be played directly on the video playback page through the player of the first video based on the video file of the first video, thereby saving the time of creating a player and downloading video files.

[0088] The method provided in the embodiment of the present application, in the process of displaying the information flow page, when the first preloading condition is met, the video that meets the second preloading condition is preloaded, that is, the corresponding video file is pre-downloaded and the corresponding player is created. Then, when the user interacts with the video content control corresponding to the preloaded video, the user can jump from the information flow page to the video playback page, and directly play the video on the video playback page using the pre-created player and the pre-downloaded video file, thereby reducing the time waiting for the video to load and improving the efficiency and fluency of the video playback. In addition, only the videos that meet the specific preloading conditions are preloaded, avoiding the resource consumption caused by preloading all videos, so that the fast playback of the video can be achieved under the premise of ensuring resource utilization.

[0089] Figure 3 is a flowchart of another video playback method provided in an embodiment of the present application. The embodiment of the present application is executed by a terminal, for example, Figure 1 Executed by terminal 101 in . Figure 3 , the method comprising:

[0090] 301. The terminal displays an information flow page, where the information flow page includes at least one video content control corresponding to a video, and the video content control corresponding to the video displays video information for introducing the video.

[0091] In a possible implementation, the terminal runs a target client, which may be a video client, a news information client, a social application client, a multimedia application client, etc. The terminal displays an information flow page in the target client, and the information flow page displays a video content control corresponding to at least one video in the target client.

[0092] In one possible implementation, in addition to displaying the video content controls corresponding to the video, the information flow page may also display content controls corresponding to other types of media resources, for example, it may also display graphic content controls corresponding to graphics or audio content controls corresponding to audio.

[0093] In a possible implementation, the information stream page displays video content controls corresponding to multiple different videos, and the multiple video content controls are arranged in sequence.

[0094] In a possible implementation, the video content control displayed in the information flow page can be changed, but is not fixed. Wherein, changing the video content control in the information flow page means that the video content control corresponding to the current video is replaced with the video content control corresponding to other videos.

[0095] Exemplarily, the information stream page is a scrollable page, and in response to a scrolling operation on the information stream page, the video content control displayed on the information stream page is replaced. Exemplarily, the information stream page includes an update control, and in response to a triggering operation on the update control, the video content control displayed on the information stream page is replaced.

[0096] Figure 4 is a schematic diagram of an information flow page provided in an embodiment of the present application, such as Figure 4 As shown, the information flow page displays a video content control 401 corresponding to video 1, a video content control 402 corresponding to video 2, a graphic content control 403 corresponding to graphic 3, and a video content control 404 corresponding to video 4. Taking the video content control 401 corresponding to video 1 as an example, the video content control 401 displays the video title 411 of video 1 and the video cover 421 of video 1.

[0097] 302. When the terminal currently satisfies the first preloading condition, the terminal determines a first video and a second video among videos corresponding to at least one video content control displayed on the information flow page, wherein the first video satisfies the second preloading condition and the second video does not satisfy the second preloading condition.

[0098] In the process of displaying the information flow page, if the first preloading condition is currently met, for each video corresponding to the video content control currently displayed on the information flow page, if the video meets the second preloading condition, the video is called a first video, and if the video does not meet the second preloading condition, the video is called a second video. The number of the first videos can be one or more, and the number of the second videos can be one or more.

[0099] In a possible implementation, the information flow page is a scrollable page, and the first preloading condition includes that the time duration for the information flow page to stop scrolling reaches a first preset time duration. The first preset time duration is a preset time duration, for example, the first preset time duration is 2 seconds or 3 seconds.

[0100] Among them, if the time when the information flow page stops scrolling reaches a first preset time, it means that the user has browsed the content currently displayed on the information flow page for a long time. Therefore, it can be inferred that the user is interested in the video corresponding to the currently displayed video content control, and the user is likely to request to play these videos. Therefore, it is considered that in this case, the preloading time has been reached and the preloading step is started.

[0101] Optionally, the first preloading condition also includes that the terminal currently turns on a Wi-Fi (Wireless Fidelity) network.

[0102] In this implementation, by setting the length of time that the information flow page stops scrolling as the first preloading condition, it is possible to accurately determine whether the user may be interested in the video corresponding to the currently displayed video information, thereby selectively selecting the timing for preloading the video and avoiding invalid preloading.

[0103] In a possible implementation, the second preloading condition includes any one of the following:

[0104] (1) Among the multiple video content controls currently displayed on the information flow page, the video content control corresponding to the video is the first video content control, and the multiple video content controls are arranged in order.

[0105] For each video content control currently displayed on the information flow page, if the video content control is the first video content control currently displayed, the video corresponding to the video content control meets the second preloading condition, and the video is called the first video. That is, the video corresponding to the first video content control displayed on the information flow page is the first video, and the videos corresponding to the remaining video content controls are the second videos.

[0106] In this implementation, the video corresponding to the first video content control displayed on the information flow page is viewed by the user first, and the user is more likely to be interested in the video corresponding to the first video content control. Therefore, the video corresponding to the first video content control is preloaded first, thereby selectively selecting which video is currently being preloaded, thereby avoiding invalid preloading.

[0107] (2) Among the videos corresponding to the multiple video content controls currently displayed on the information flow page, the video has the largest number of playback times.

[0108] For a video corresponding to each video content control currently displayed on the information flow page, if the video has the largest number of plays among the videos corresponding to the multiple video content controls currently displayed, the video meets the second preloading condition and is referred to as the first video. That is, among the videos corresponding to the multiple video content controls currently displayed on the information flow page, the video with the largest number of plays is the first video, and the remaining videos are the second videos.

[0109] In this implementation, the video with the most plays is more popular, and users are more likely to be interested in the video with the most plays. Therefore, the video with the most plays is preloaded first, so that the currently displayed video is preloaded in a targeted manner, avoiding invalid preloading.

[0110] Figure 5 is a schematic diagram of another information flow page provided in an embodiment of the present application, such as Figure 5 As shown, video content control 401 is the first video content control displayed on the information flow page, so the video corresponding to video content control 401 is taken as the first video, and a player is pre-created and a video file is downloaded for the first video in step 303. Video content control 402 and video content control 404 are non-first video content controls displayed on the information flow page, so the video corresponding to video content control 402 and the video corresponding to video content control 404 are taken as the second video, and a video file is pre-downloaded for the second video in step 304.

[0111] In a possible implementation, the first video and the second video in the embodiment of the present application are not automatically played on the information flow page, so the first video and the second video are not loaded. Not loaded means that the corresponding player is not created and the corresponding video file is not downloaded. Then if you request to play the first video or the second video, you need to wait for the first video and the second video to be loaded. In order to reduce the waiting time, the embodiment of the present application performs the loading process in advance in the following steps 303 and 304.

[0112] 303. The terminal downloads the video file of the first video and creates a player for the first video.

[0113] For the first video that meets the second preloading condition, the terminal not only pre-downloads the video file of the first video, but also pre-creates a player for the first video. When the first video is subsequently requested to be played, the first video can be played directly through the created player based on the downloaded video file, thus avoiding the time overhead of waiting for the creation of the player.

[0114] In one possible implementation, the player of the first video is stored in the memory, which requires additional memory resources.

[0115] In a possible implementation, the terminal creates a player for the first video, including: determining the number of players that have been created in a player cache pool; if the number of players that have been created does not reach a preset number, creating a player for the first video in the player cache pool; if the number of players that have been created has reached a preset number, deleting the player that has not been accessed for the longest time in the player cache pool, and creating a player for the first video in the player cache. Exemplarily, the preset number is 3.

[0116] The player cache pool is used to store the created players. The embodiment of the present application limits the number of players in the player cache pool. If the number of players in the player cache pool has not reached the preset number, the player of the first video can be directly created. If the number of players in the player cache pool has reached the preset number, it is necessary to first delete the player that has not been accessed for the longest time, and then create the player of the first video to ensure that the number of players in the player cache pool does not exceed the preset number.

[0117] The access operations to the player include creating a player, using a player, and querying a player.

[0118] Optionally, the players in the player cache pool are arranged in order. Whenever a new player is created, the newly created player is ranked first among the multiple players. Whenever a video is played through an already created player, the player is moved to the first place among the multiple players. If a player for a certain video needs to be created currently, but a player for the video has already been created in the player cache pool, the player for the video is moved to the first place among the multiple players. Furthermore, the last player in the player cache pool is the player that has not been accessed for the longest time, so when the number of created players has reached a preset number, the last player in the player cache pool can be deleted.

[0119] In this implementation, by limiting the number of players created in the player cache pool, it is avoided that too many players are created to occupy memory resources, thereby effectively utilizing memory and computing resources, improving resource utilization, and avoiding resource waste.

[0120] In a possible implementation, after downloading the video file of the first video and creating a player for the first video, the terminal decodes the video file of the first video through the player of the first video to obtain video data of the first video, which is in a playable format. By performing the decoding operation in advance, when the first video is subsequently requested to be played, the decoded video data can be directly played through the created player, thereby reducing the waiting time required for decoding the video file.

[0121] In a possible implementation, the terminal downloads a portion of the video file of the first video. Exemplarily, the terminal downloads the video file from the start playback time point to the preset playback time point of the first video. For example, the duration from the start playback time point to the preset playback time point is 5 seconds, and the preset playback time point is the 5th second of the first video.

[0122] In a possible implementation manner, the terminal downloads the video file of the first video, including: downloading the video file of the first video and the video cover of the first video.

[0123] In a possible implementation, the terminal downloads the video file of the first video, including: if the video file of the first video is not found in the local disk, downloading the video file of the first video to the local disk. Storing the video file in the local disk does not occupy memory resources, so there is no need to limit the number of downloaded video files.

[0124] 304. The terminal downloads the video file of the second video.

[0125] For the second video that does not meet the second preloading condition, the terminal only pre-downloads the video file of the second video, and no longer pre-creates a player for the first video. By pre-downloading the video file, when the second video is subsequently requested to be played, the downloaded video file can be directly obtained, thereby avoiding the time overhead of waiting to download the video file. Since the player occupies memory resources, the player is no longer pre-created for the second video that does not meet the second preloading condition, thereby saving memory resources.

[0126] In a possible implementation, the terminal downloads a portion of the video file of the second video. Exemplarily, the terminal downloads the video file of the second video from the start playback time point to the preset playback time point. For example, the duration from the start playback time point to the preset playback time point is 5 seconds, and the preset playback time point is the 5th second of the second video.

[0127] In a possible implementation, the number of the second videos is multiple. The terminal downloads the video file of the second video, including: determining at least one target video among the multiple second videos, the target video refers to the second video whose corresponding video file has not been downloaded yet; removing videos different from the at least one target video in the preloading queue, adding the target video not recorded in the preloading queue to the preloading queue, the preloading queue is used to record the video of the video file to be downloaded; downloading the video file of the target video in the preloading queue, and removing the target video of the downloaded video file from the preloading queue.

[0128] Optionally, the terminal stores a video cache queue, which is used to store downloaded video files. For each second video, the terminal queries whether there is a video file of the second video in the video cache queue. If there is no video file of the second video, the second video is determined as the target video. Then, for each video in the preloading queue, the terminal determines whether the video is the target video. If not, the video is removed from the preloading queue. If so, the video is retained in the preloading queue. After the traversal is completed, the terminal adds the target video that has not been recorded in the preloading queue to the preloading queue, thereby ensuring that the preloading queue only includes the video currently required to be preloaded, and then downloads the video file of the target video in the preloading queue.

[0129] It should be noted that the above-mentioned adding the target video to the preloading queue refers to adding the video identifier of the target video to the preloading queue, rather than adding the video file or video data of the target video to the preloading queue. What is recorded in the preloading queue is the video identifier of the video, rather than the video file or video data of the video.

[0130] In this implementation, videos whose corresponding video files have not been downloaded are added to the preloading queue, and videos whose corresponding video files no longer need to be downloaded are removed, which can ensure that storage resources and computing resources are used for videos that currently need to pre-download video files, thereby avoiding waste of resources.

[0131] Figure 6 is a schematic diagram of a preloading method provided in an embodiment of the present application, such as Figure 6 As shown, video 1, video 3 and video 4 are preloaded, video 1 meets the second preloading condition, so the player and video file are preloaded, video 3 and video 4 do not meet the second preloading condition, so only the video file is preloaded.

[0132] like Figure 6 As shown, for the video that currently needs to be preloaded, first determine whether it meets the second preloading condition. If the video that currently needs to be preloaded meets the second preloading condition, turn on preloading switch 1 to determine whether there is a player for the video in the player cache pool. If not, create a player for the video in the player cache pool and download the video file of the video. If the video that currently needs to be preloaded does not meet the second preloading condition, turn on preloading switch 2 to determine whether there is a video file for the video in the video cache queue. If not, compare the preloading queue with the target video to be preloaded, remove videos in the preloading queue that are different from the target video, add the target video to the preloading queue, download the video file of the video in the preloading queue, and add the downloaded video file to the video cache queue.

[0133] In a possible implementation, step 304 includes: downloading the video file and video cover of the second video. That is, not only the video file of the second video is pre-downloaded, but also the video cover of the second video is pre-downloaded. Optionally, the video cover can be the first video frame of the second video.

[0134] Among them, since the player of the second video is not created in advance, after requesting to play the second video, it is necessary to wait for the player of the second video to be created, and the second video cannot be played in time, so there will be a short black screen time. In order to avoid the black screen, the embodiment of the present application also pre-downloads the video cover of the second video. After the second video is requested to be played, the video cover of the second video can be displayed first while waiting for the player of the second video to be created, thereby avoiding the display of a black screen.

[0135] Figure 7 is a schematic diagram of another preloading method provided in an embodiment of the present application, such as Figure 7 As shown, for video 1 that meets the second preloading condition, and video 3 and video 4 that do not meet the second preloading condition, the corresponding video covers can be pre-downloaded.

[0136] In the embodiment of the present application, after executing step 303 and step 304, the following step 305 or step 306 may be executed. The first video is played by executing the following step 305, and the second video is played by executing the following step 306.

[0137] 305. In response to the interactive operation on the video content control corresponding to the first video, the terminal displays a video playback page, and plays the first video on the video playback page through a player of the first video based on the video file of the first video.

[0138] The interactive operation on the video content control corresponding to the first video is used to instruct the playing of the first video.

[0139] When the terminal detects an interactive operation on the video content control corresponding to the first video, it jumps from the information flow page to the video playback page. Since the player of the first video has been created in advance and the video file of the first video has been downloaded, after the video playback page is displayed, the first video can be played directly on the video playback page through the player of the first video based on the video file of the first video, thereby saving the time of creating a player and downloading video files.

[0140] In a possible implementation, in response to an interactive operation on a video content control corresponding to the first video, the terminal displays a video playback page, decodes the video file of the first video through a player of the first video on the video playback page to obtain video data of the first video, and plays the decoded video data through the player of the first video. The video file is in a non-playable format, and the video data is in a playable format.

[0141] In a possible implementation, in the above step 303, after downloading the video file of the first video and creating the player of the first video, the video file of the first video is decoded in advance by the player of the first video to obtain the video data of the first video. Then in this step 305, the decoded video data can be directly obtained, and the decoded video data can be played directly in the video playback page by the player of the first video, thereby reducing the waiting time required for decoding the video file.

[0142] 306. In response to the interactive operation on the video content control corresponding to the second video, the terminal displays a video playback page and creates a player for the second video. After the player for the second video is created, the second video is played based on the video file of the second video through the player for the second video in the video playback page.

[0143] The interactive operation on the video content control corresponding to the second video is used to instruct the playing of the second video.

[0144] When the terminal detects an interactive operation on the video content control corresponding to the second video, it jumps from the information flow page to the video playback page. Since only the video file of the first video is pre-downloaded, it is only necessary to wait for the creation of the player of the second video. After the player of the second video is created, the second video can be played based on the video file of the second video through the player of the second video in the video playback page.

[0145] In one possible implementation, the terminal displays a video playback page in response to an interactive operation on a video content control corresponding to a first video, creates a player for a second video, and after the player for the second video is created, decodes the video file of the second video through the player for the second video on the video playback page to obtain video data of the second video, and plays the decoded video data through the player for the second video.

[0146] In a possible implementation, in the above step 304, not only the video file of the second video is pre-downloaded, but also the video cover of the second video is pre-downloaded. Then the step 306 can be replaced by: in response to the interactive operation of the video content control corresponding to the second video, displaying a video playback page including the video cover, creating a player for the second video, and after the player for the second video is created, playing the second video based on the video file of the second video through the player of the second video in the video playback page.

[0147] That is, while waiting for the creation of the player for the second video, the video cover of the second video can be displayed on the video playback page first, thereby avoiding a black screen. Furthermore, when the video cover of the second video is the first video frame of the second video, the first video frame of the second video is displayed first. After the creation of the player for the second video is completed, seamless playback can be performed starting from the first video frame of the second video, thereby improving the smoothness of video playback.

[0148] In this implementation, for the second video for which a player is not pre-created, the video file and video cover of the second video can be downloaded in advance. Then, after the user interacts with the video content control corresponding to the second video and waits for the player to be created for the second video, the video cover of the second video can be displayed on the video playback page first, thereby avoiding displaying a black screen and enabling the user to immediately see the relevant visual content after the interaction, thereby reducing the perceived waiting time and improving the user experience.

[0149] Figure 8 Schematic diagram of a video playback method provided by an embodiment of the present application, the process of creating a player and the process of preloading a video file are as follows Figure 8 shown.

[0150] In the process of creating a player, a CGI (Common Gateway Interface) request is generated. The CGI request is used to obtain the download address of the video file according to the video identifier. First, check whether the download address corresponding to the CGI request is cached. If there is no cache, send a CGI request to the server to request the download address. After the request is successful, the download address is added to the cache. If there is a cache, there is no need to request the download address from the server. After obtaining the download address, call the download component to download the video file. After creating the player, the video file is decoded by the player to obtain the video data, and the first video frame in the video data is rendered. If the current process is a preloading process, pause the playback. When requesting to play the video, the decoded video data is played through the player. If the current process is a normal playback process, the decoded video data is played directly through the player.

[0151] In the process of preloading video files, a CGI (Common Gateway Interface) request is generated. First, it is checked whether the download address corresponding to the CGI request is cached. If there is no cache, a CGI request is sent to the server to request the download address. After the request is successful, the download address is added to the cache. If there is a cache, there is no need to request the download address from the server. After obtaining the download address, the download component is called to download the video file, completing the preloading process of the video file.

[0152] The method provided in the embodiment of the present application, in the process of displaying the information flow page, when the first preloading condition is met, the video that meets the second preloading condition is preloaded, that is, the corresponding video file is pre-downloaded and the corresponding player is created. Then, when the user interacts with the video content control corresponding to the preloaded video, the user can jump from the information flow page to the video playback page, and directly play the video on the video playback page using the pre-created player and the pre-downloaded video file, thereby reducing the time waiting for the video to load and improving the efficiency and fluency of the video playback. In addition, only the videos that meet the specific preloading conditions are preloaded, avoiding the resource consumption caused by preloading all videos, so that the fast playback of the video can be achieved under the premise of ensuring resource utilization.

[0153] Furthermore, when the first preloading condition is met, even if the second video corresponding to the currently displayed video content control does not meet the second preloading condition, although the player of the second video is no longer pre-created, the video file of the second video can still be pre-downloaded, so after the user interacts with the video content control corresponding to the second video, the time of downloading the video file of the second video can be saved, thereby reducing the waiting time. Furthermore, since only the player of the first video that meets the second preloading condition is pre-created, and the player of the second video that does not meet the second preloading condition is not pre-created, memory resources and computing resources can be saved to a certain extent.

[0154] Fig. 9 is a flowchart of another video playback method provided in an embodiment of the present application. The embodiment of the present application is executed by a terminal, for example, Figure 1 Executed by terminal 101 in . Fig. 9 , the method comprising:

[0155] 901. The terminal displays an information flow page, where the information flow page includes at least one video content control corresponding to a video, and the video content control corresponding to the video displays video information for introducing the video.

[0156] The process of step 901 is the same as that of step 301 above, and will not be repeated here.

[0157] 902. The terminal displays a video content control corresponding to the third video in the information flow page, and plays the third video based on the video file of the third video through a player of the third video on the video content control corresponding to the third video.

[0158] In an embodiment of the present application, the information flow page displays a video content control corresponding to the third video, and the video content control is playing the third video based on the video file of the third video through the player of the third video.

[0159] In a possible implementation, the third video is a video that is automatically played in the information flow page. Since the third video is automatically played, rather than requested by the user, after the video content control corresponding to the third video is displayed on the information flow page, the terminal automatically downloads the video file of the third video, creates a player for the third video, and then plays the third video based on the video file of the third video through the player of the third video. Since the user does not actively request to play the video, the user will not feel the time waiting for the video to play.

[0160] In one possible implementation, a video file of the third video is decoded through a player of the third video on a video content control corresponding to the third video to obtain video data of the third video, and the video data is played through the player of the third video.

[0161] 903. In response to the interactive operation on the video content control corresponding to the third video, the terminal displays a video playback page and moves the player of the third video from the information stream page to the video playback page.

[0162] Among them, the interactive operation on the video content control corresponding to the third video is used to instruct to play the third video in the video playback page.

[0163] When the terminal detects an interactive operation on the video content control corresponding to the third video, it jumps from the information flow page to the video playback page. Since the third video has been played in the information flow page, that is, the player for the third video has been created, the player for the third video is directly removed from the information flow page and added to the video playback page, thereby realizing cross-page reuse of the player and reducing the time waiting for creating the player.

[0164] 904. The terminal continues to play the third video through the player of the third video in the video playback page based on the playback progress in the information flow page and the video file of the third video.

[0165] Since the third video has been played in the information flow page, that is, the video file of the third video has been downloaded, the third video can be continued to be played through the third video player in the video playback page based on the playback progress and the video file of the third video, thereby reducing the time waiting for downloading the video file.

[0166] In a possible implementation, in step 902, the terminal plays the decoded video data of the third video through the player of the third video on the information stream page. Then in step 904, after adding the player of the third video to the video playback page, the video data can be directly played through the player of the third video, thereby achieving seamless video playback across pages and improving the smoothness of video playback across pages.

[0167] like Fig.10 As shown, in the related art, since the information stream page 1001 and the video playback page 1002 are two independent pages, the video is played through player A in the information stream page 1001. When switching from the information stream page 1001 to the video playback page 1002, it is necessary to close the player A in the information stream page 1001, create a new player B in the video playback page 1002, and determine the playback progress, so as to continue to play the video according to the playback progress. However, since it is time-consuming to rebuild the player and there is a certain error in the determined playback progress, the smoothness of cross-page video playback is poor.

[0168] In the embodiment of the present application, Fig.11As shown, in the information flow page 1001, a video is played through player A. When switching from the information flow page 1001 to the video playback page 1002, player A is removed from the information flow page 1001 and added to the video playback page 1002. Then, the video playback progress can be seamlessly connected in the video playback page 1002 without rebuilding the player, which improves the smoothness of cross-page video playback. In addition, since the player and video files are reused, the clarity of the video in the information flow page 1001 is consistent with the clarity in the video playback page 1002, which further improves the smoothness of video playback.

[0169] The method provided in the embodiment of the present application, when the video file of the third video is played through the player of the third video on the information stream page, if the page jumps from the information stream page to the video playback page, the player is moved from the information stream page to the video playback page, and there is no need to recreate the player of the third video, thus realizing cross-page multiplexing of the player. Therefore, in the process of playing the video, there is no need to reload when switching pages, thus realizing seamless playback of videos across pages and improving the efficiency of video playback.

[0170] In various clients that support video playback, it is often necessary to switch between different pages during the video playback process. However, in the related art, when switching across pages, due to the re-creation of the player and the reloading of the video file, short interruptions, black screens, and loading delays in video playback often occur, seriously affecting the user experience. For example, when the information stream page automatically plays the video, if you switch to the video playback page, you need to recreate the player and load the video file, resulting in a significant delay in the switching process. For another example, when the information stream page does not automatically play the video, if you request to switch to the video playback page to play the video, a black screen and loading process will also occur due to the need to create a player and load video files, affecting the user's viewing experience.

[0171] In the embodiment of the present application, a solution for seamlessly playing videos across pages is proposed to solve the problems of switching delay and black screen in the above-mentioned cross-page video playback. The detailed process is as follows: Fig.12 As shown, the following steps are included.

[0172] 1. When requesting to play a video from the information flow page, jump to the video playback page.

[0173] 2. Determine whether the terminal has wireless fidelity enabled. If the wireless fidelity is not enabled, display the video cover of the video on the video playback page, create a player for the video, and download the video file for playback. If the wireless fidelity is enabled, perform the following step 3.

[0174] 3. Determine whether to reuse the player of the video. If yes, reuse the player directly on the video playback page for seamless playback. If no, execute the following step 4. The condition for reusing the player of the video is that the video has been played by the player of the video on the information flow page.

[0175] 4. Determine whether the player of the video is preloaded. If yes, seamlessly play the video directly on the video playback page through the preloaded player. If no, execute the following step 5.

[0176] 5. Determine whether the video file of the video is preloaded. If yes, display the video cover on the video playback page, create a video player, and use the player to quickly start playing the downloaded video file. If no, display the video cover on the video playback page, create a video player, and download the video file of the video for playback.

[0177] The embodiments of the present application avoid switching delays and black screen problems caused by playing videos across pages in multiple different scenarios through a combination of methods such as multiplexing players, preloading players, preloading video files, and displaying video covers, thereby achieving seamless connection of videos between multiple pages and greatly improving the user viewing experience.

[0178] Fig.13 is a structural diagram of a video playback device provided in an embodiment of the present application. Fig.13 , the device comprises:

[0179] The first display module 1301 is used to display an information flow page, where the information flow page includes a video content control corresponding to at least one video, and the video content control corresponding to the video displays video information for introducing the video;

[0180] The determination module 1302 is used to determine a first video among videos corresponding to at least one video content control displayed on the information flow page when the first preloading condition is currently met, and the first video meets the second preloading condition;

[0181] The loading module 1303 is used to download the video file of the first video and create a player for the first video;

[0182] The second display module 1304 is used to display a video playback page in response to an interactive operation on a video content control corresponding to the first video, and to play the first video based on the video file of the first video through a player of the first video in the video playback page.

[0183] The video playback device provided in the embodiment of the present application, in the process of displaying the information flow page, when the first preloading condition is met, preloads the video that meets the second preloading condition, that is, pre-downloads the corresponding video file and creates the corresponding player, so when the user interacts with the video content control corresponding to the preloaded video, it can jump from the information flow page to the video playback page, and directly play the video on the video playback page using the pre-created player and the pre-downloaded video file, which reduces the time waiting for the video to load and improves the efficiency and fluency of the video playback. In addition, only the videos that meet the specific preloading conditions are preloaded, avoiding the resource consumption caused by preloading all videos, so that the fast playback of the video can be achieved under the premise of ensuring resource utilization.

[0184] Optionally, the information flow page is a scrollable page, and the first preloading condition includes that the time duration for which the information flow page stops scrolling reaches a first preset time duration.

[0185] Optionally, the second preloading condition includes any one of the following:

[0186] Among the multiple video content controls currently displayed on the information flow page, the video content control corresponding to the video is the first video content control, and the multiple video content controls are arranged in order;

[0187] Among the videos corresponding to multiple video content controls currently displayed on the information flow page, the video has the largest number of views.

[0188] Optionally, the preprocessing module 1303 is used to:

[0189] Determine the number of players created in the player cache pool;

[0190] When the number of created players does not reach a preset number, creating a player for the first video in the player cache pool;

[0191] When the number of created players reaches a preset number, the player that has not been accessed for the longest time in the player cache pool is deleted, and a player for the first video is created in the player cache.

[0192] Optionally, the determination module 1302 is further configured to determine, in a case where the first preloading condition is currently satisfied, a second video among videos corresponding to at least one video content control displayed on the information stream page, the second video not satisfying the second preloading condition;

[0193] The loading module 1303 is also used to download the video file of the second video;

[0194] The second display module 1304 is further configured to display a video playback page in response to an interactive operation on a video content control corresponding to the second video;

[0195] The loading module 1303 is also used to create a player for the second video;

[0196] The second display module 1304 is further used to play the second video based on the video file of the second video through the player of the second video in the video playback page after the player of the second video is created.

[0197] Optionally, a loading module 1303 is used to download a video file and a video cover of a second video;

[0198] The second display module 1304 is used to display a video playback page including a video cover in response to an interactive operation on a video content control corresponding to the second video.

[0199] Optionally, there are multiple second videos; the loading module 1303 is used to:

[0200] Determine at least one target video among the multiple second videos, where the target video refers to a second video whose corresponding video file has not yet been downloaded;

[0201] Removing videos different from at least one target video in the preloading queue, and adding the target video not recorded in the preloading queue to the preloading queue, the preloading queue is used to record the video of the video file to be downloaded;

[0202] Download the video file of the target video in the preloading queue, and remove the target video of the downloaded video file from the preloading queue.

[0203] Alternatively, see Fig.14 , the device further comprises:

[0204] The first display module 1301 is further used to display the video content control corresponding to the third video in the information flow page, and play the third video based on the video file of the third video through the player of the third video on the video content control corresponding to the third video;

[0205] The second display module 1304 is further configured to display a video playback page in response to an interactive operation on a video content control corresponding to the third video;

[0206] The player multiplexing module, 1305, is used to move the player of the third video from the information stream page to the video playback page;

[0207] The second display module 1304 is also used to continue playing the third video through the player of the third video in the video playback page based on the playback progress in the information flow page and the video file of the third video.

[0208] It should be noted that: the video playback device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the video playback device provided in the above embodiment and the video playback method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0209] An embodiment of the present application further provides a terminal, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the video playback method of the above embodiment.

[0210] Fig.15 A schematic diagram of the structure of a terminal 1500 provided by an exemplary embodiment of the present application is shown.

[0211] The terminal 1500 includes a processor 1501 and a memory 1502 .

[0212] The processor 1501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1501 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0213] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1502 is used to store at least one computer program, which is used by the processor 1501 to implement the video playback method provided in the method embodiment of the present application.

[0214] In some embodiments, the terminal 1500 may further optionally include: a peripheral device interface 1503 and at least one peripheral device. The processor 1501, the memory 1502 and the peripheral device interface 1503 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1503 via a bus, a signal line or a circuit board. Optionally, the peripheral device includes: at least one of a radio frequency circuit 1504, a display screen 1505, a camera assembly 1506, an audio circuit 1507 and a power supply 1508.

[0215] The peripheral device interface 1503 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1501 and the memory 1502. In some embodiments, the processor 1501, the memory 1502, and the peripheral device interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1501, the memory 1502, and the peripheral device interface 1503 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0216] The radio frequency circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1504 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1504 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1504 can communicate with other devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a Wi-Fi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1504 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0217] The display screen 1505 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1505 is a touch display screen, the display screen 1505 also has the ability to collect touch signals on the surface or above the surface of the display screen 1505. The touch signal can be input to the processor 1501 as a control signal for processing. At this time, the display screen 1505 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1505 can be one, set on the front panel of the terminal 1500; in other embodiments, the display screen 1505 can be at least two, respectively set on different surfaces of the terminal 1500 or in a folding design; in other embodiments, the display screen 1505 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 1500. Even, the display screen 1505 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1505 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0218] The camera assembly 1506 is used to capture images or videos. Optionally, the camera assembly 1506 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal 1500, and the rear camera is arranged on the back of the terminal 1500. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1506 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0219] The audio circuit 1507 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1501 for processing, or input them into the radio frequency circuit 1504 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1500. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1507 may also include a headphone jack.

[0220] The power supply 1508 is used to power various components in the terminal 1500. The power supply 1508 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1508 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0221] Those skilled in the art will understand that Fig.15 The structure shown in the figure does not constitute a limitation on the terminal 1500, and the terminal 1500 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0222] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the video playback method of the above embodiment.

[0223] The embodiment of the present application also provides a computer program product, including a computer program, wherein the computer program is loaded and executed by a processor to implement the operations performed by the video playback method of the above embodiment.

[0224] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0225] The above description is only an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.

Claims

1. A video playback method, characterized in that: The method comprises: Displaying an information flow page, the information flow page including at least one video content control corresponding to a video, the video content control corresponding to the video displaying video information for introducing the video; In a case where the first preloading condition is currently met, determining a first video among videos corresponding to at least one video content control displayed on the information stream page, the first video meeting the second preloading condition; Creating a player for the first video and downloading the video file of the first video; In response to an interactive operation on a video content control corresponding to the first video, a video playback page is displayed, and the first video is played on the video playback page through a player of the first video based on the video file of the first video.

2. The method according to claim 1, characterized in that The information flow page is a scrollable page, and the first preloading condition includes that the time duration for which the information flow page stops scrolling reaches a first preset time duration.

3. The method according to claim 1, characterized in that The second preloading condition includes any one of the following: Among the multiple video content controls currently displayed on the information stream page, the video content control corresponding to the video is the first video content control, and the multiple video content controls are arranged in sequence; Among the videos corresponding to the multiple video content controls currently displayed on the information flow page, the video has the largest number of playback times.

4. The method according to claim 1, characterized in that: The step of creating a player for the first video includes: Determine the number of players created in the player cache pool; When the number of created players does not reach a preset number, creating a player for the first video in the player cache pool; When the number of created players reaches the preset number, the player that has not been accessed for the longest time in the player cache pool is deleted, and a player for the first video is created in the player cache.

5. The method according to claim 1, characterized in that The method further comprises: In a case where the first preloading condition is currently met, determining a second video among videos corresponding to at least one video content control displayed on the information stream page, the second video not meeting the second preloading condition; Download the video file of the second video; In response to an interactive operation on a video content control corresponding to the second video, the video playback page is displayed and a player for the second video is created; after the player for the second video is created, the second video is played based on the video file of the second video in the video playback page through the player for the second video.

6. The method according to claim 5, characterized in that The downloading of the video file of the second video includes: Download the video file and video cover of the second video; The step of displaying the video playback page in response to an interactive operation on a video content control corresponding to the second video includes: In response to an interactive operation on a video content control corresponding to the second video, the video playback page including the video cover is displayed.

7. The method according to claim 5, characterized in that The number of the second videos is multiple; and the step of downloading the video file of the second video includes: Determine at least one target video among the plurality of second videos, where the target video refers to a second video whose corresponding video file has not yet been downloaded; Removing videos different from the at least one target video in the preloading queue, and adding target videos not recorded in the preloading queue to the preloading queue, the preloading queue being used to record videos of the video files to be downloaded; Download the video file of the target video in the preloading queue, and remove the target video of the downloaded video file from the preloading queue.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Displaying a video content control corresponding to a third video in the information stream page, and playing the third video based on the video file of the third video by using a player of the third video on the video content control corresponding to the third video; In response to an interactive operation on a video content control corresponding to the third video, displaying the video playback page, and moving a player of the third video from the information stream page to the video playback page; In the video playback page, the third video continues to be played through the player of the third video based on the playback progress in the information flow page and the video file of the third video.

9. A video playback device, characterized in that: The device comprises: A first display module is used to display an information flow page, wherein the information flow page includes a video content control corresponding to at least one video, and the video content control corresponding to the video displays video information for introducing the video; A determination module, configured to determine, when the first preloading condition is currently satisfied, a first video among videos corresponding to at least one video content control displayed on the information stream page, wherein the first video satisfies a second preloading condition; A loading module, used for downloading the video file of the first video and creating a player for the first video; The second display module is used to display a video playback page in response to an interactive operation on a video content control corresponding to the first video, and to play the first video on the video playback page through a player of the first video based on the video file of the first video.

10. A terminal, characterized in that: The terminal includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the video playback method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the video playback method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that The computer program is loaded and executed by a processor to implement the operations performed by the video playback method according to any one of claims 1 to 8.