Video playback method, device, electronic device and storage medium

By displaying network exception information in the video playback interface and filtering and sorting videos from the terminal's cache space, the target video is determined for playback, which solves the problem of users' video viewing experience without the network, and achieves the effect of reducing waiting time and improving viewing experience.

CN115695908BActive Publication Date: 2025-03-25BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211091360.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-07
Publication Date
2025-03-25
Estimated Expiration
2042-09-07

AI Technical Summary

Technical Problem

In the absence of network connection or poor network quality, there will be a network-free prompt on the video playback interface, the user cannot watch the video normally, and the time to wait for the network connection to recover cannot be predicted, resulting in a poor video viewing experience for the user.

Method used

By obtaining cached videos from the terminal's cache space for playback, fill the gap in time when users wait for network connection to recover. The specific steps include displaying network exception information in the video playback interface, filtering and sorting based on the cached video, and determining the target video for playback.

Benefits of technology

By playing cached videos, users' waiting time is reduced, users' video viewing experience is improved, and video can still be played normally when network abnormalities are not available.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695908B_ABST
    Figure CN115695908B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a video playback method, device, electronic device and storage medium, and belongs to the field of video playback technology. The method includes: displaying network abnormality information in a first video playback interface, the network abnormality information is used to indicate that the terminal's network does not meet the playback conditions; based on the video cached in the cache space of the terminal, the video is played. The present disclosure obtains the cached video from the cache space of the terminal for playback when there is no Internet access or the network quality is poor. Since the cached video does not depend on the network, it can be played normally even when the network is abnormal. Therefore, by playing the cached video, the time gap when the user waits for the network connection to be restored can be filled, thereby reducing the user's waiting time and improving the user's video viewing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of video playback, and in particular to a video playback method, device, electronic device and storage medium. Background Art

[0002] At present, with the development of Internet technology, more and more users like to watch videos on the Internet. However, when there is no Internet connection or the network quality is poor, a no-network prompt will appear on the video playback interface, such as "Unable to connect to the network, please try again later", and users cannot watch the video normally. In related technologies, it is necessary to wait until the network connection is restored before the video playback interface can continue to play the video. However, since the time for the network connection to be restored is unpredictable, users may need to wait for a long time before they can continue to watch the video, and the user's video viewing experience is poor. Summary of the invention

[0003] The present disclosure provides a video playback method, device, electronic device and storage medium, which can fill the time gap when users wait for network connection to be restored by playing cached videos, thereby reducing the user's waiting time and improving the user's video viewing experience. The technical solution of the present disclosure is as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, a video playback method is provided, the method comprising:

[0005] Displaying network abnormality information in the first video playback interface, the network abnormality information is used to indicate that the network of the terminal does not meet the playback conditions;

[0006] The video is played based on the video cached in the cache space of the terminal.

[0007] In the above solution, when there is no network connection or the network quality is poor, the cached video is obtained from the cache space of the terminal for playback. Since the cached video does not depend on the network, it can be played normally even when the network is abnormal. Therefore, by playing the cached video, the time gap when the user waits for the network connection to be restored can be filled, thereby reducing the user's waiting time and improving the user's video viewing experience.

[0008] In a possible implementation, the videos cached in the cache space of the terminal include any of the following: favorite videos of the object logged in on the terminal; similar videos to the favorite videos; and videos cached by the terminal based on the object's cache operation.

[0009] In a possible implementation, the video playback based on the videos cached in the cache space of the terminal includes: screening out at least one candidate video from the cached videos based on a video date condition; sorting the at least one candidate video to determine a target video, and playing the target video.

[0010] In one possible implementation, selecting at least one candidate video from the cached videos based on a video date condition includes: obtaining the time when the last network anomaly occurred; and selecting at least one candidate video whose video date is after the occurrence time from the cached videos based on the occurrence time and the video date of each video.

[0011] In one possible implementation, sorting at least one candidate video to determine a target video includes: sorting at least one candidate video based on at least one sorting condition of a number of play times and a completion rate, and determining the target video based on the sorting result.

[0012] In one possible implementation, playing the target video includes: obtaining cache address information of the target video; updating a video address stream based on the cache address information of the target video, the video address stream including address information of multiple videos to be played; in response to the video playback function of the first video playback interface being triggered, playing the target video based on the updated video address stream.

[0013] In one possible implementation, updating the video address stream based on the cache address information of the target video includes any of the following methods: inserting the cache address information of the target video after the address information of the currently playing video in the video address stream; replacing the address information of the currently playing video in the video address stream with the cache address information of the target video; generating a new video address stream based on the cache address information of the target video to replace the video address stream.

[0014] In one possible implementation, the video playback function of the first video playback interface is triggered including any of the following: a click operation on the video playback control is detected on the first video playback interface; a sliding operation on the first video playback interface is detected on the first video playback interface; the duration during which the terminal's network does not meet the playback conditions reaches the target duration; the countdown on the video playback prompt bar on the first video playback interface ends.

[0015] In one possible implementation, in response to the video playback function of the first video playback interface being triggered, playing the target video based on the updated video address stream includes: in response to the video playback function of the first video playback interface being triggered, jumping from the first video playback interface to the second video playback interface; based on the updated video address stream, playing the target video in the second video playback interface.

[0016] In one possible implementation, in response to the video playback function of the first video playback interface being triggered, playing the target video based on the updated video address stream includes: in response to the video playback function of the first video playback interface being triggered, playing the target video in the first video playback interface based on the updated video address stream.

[0017] In a possible implementation, the method further includes: displaying a video playback prompt bar in the first video playback interface, where the video playback prompt bar is used to prompt that the target video is about to be played.

[0018] In a possible implementation, the video playback prompt bar further includes a playback blocking control, and the playback blocking control is used to determine whether to play the target video.

[0019] In one possible implementation, the method further includes: in response to a click operation on a playback prevention control, not playing the target video.

[0020] In a possible implementation, the method further includes: displaying a playback source prompt bar in the second video playback interface, where the playback source prompt bar is used to prompt that the target video currently being played originates from the cache space.

[0021] In a possible implementation, the method further includes: in response to a click operation on the video playback prompt bar, displaying a list page in the first video playback interface, the list page being used to display the target video.

[0022] In a possible implementation, the method further includes: in response to a click operation on the playback source prompt bar, displaying a list page in the second video playback interface, the list page being used to display the target video.

[0023] In a possible implementation, in the first video playback interface, playing the target video includes: acquiring the target video based on the display order of the target videos on the list page; and playing the target video in the first video playback interface.

[0024] In one possible implementation, in the first video playback interface, playing the target video includes: in response to a selection operation performed on any target video displayed on the list page, obtaining the selected target video; and in the first video playback interface, playing the selected target video.

[0025] In a possible implementation, the method further includes: in response to a sequence switching operation performed on the target videos displayed on the list page, adjusting the play sequence of the target videos displayed on the list page.

[0026] According to a second aspect of an embodiment of the present disclosure, a video playback device is provided, the device comprising:

[0027] A network abnormality information display unit is configured to display network abnormality information in the first video playback interface, where the network abnormality information is used to indicate that the network of the terminal does not meet the playback conditions;

[0028] The video playing unit is configured to play the video based on the video cached in the cache space of the terminal.

[0029] In a possible implementation, the videos cached in the cache space of the terminal include any of the following: favorite videos of the object logged in on the terminal; similar videos to the favorite videos; and videos cached by the terminal based on the object's cache operation.

[0030] In a possible implementation manner, the video playback unit includes:

[0031] A screening subunit is configured to screen out at least one candidate video from the cached videos based on a video date condition;

[0032] The target video determination subunit is configured to sort at least one candidate video to determine a target video and play the target video.

[0033] In a possible implementation, the screening subunit is configured to execute: obtaining the time of occurrence of the last network anomaly; and screening at least one candidate video whose video date is after the occurrence time from the cached videos based on the occurrence time and the video date of each video.

[0034] In a possible implementation manner, the target video determination subunit is further configured to execute: sorting at least one candidate video based on at least one sorting condition of the number of play times and the completion rate, and determining the target video based on the sorting result.

[0035] In a possible implementation manner, the target video determination subunit includes:

[0036] The cache address information acquisition sub-subunit is configured to execute acquisition of the cache address information of the target video;

[0037] The video address stream updating sub-sub-unit is configured to execute, based on the cached address information of the target video, updating the video address stream, the video address stream including the address information of a plurality of videos to be played;

[0038] The target video playback sub-sub-unit is configured to execute, in response to the video playback function of the first video playback interface being triggered, to play the target video based on the updated video address stream.

[0039] In one possible implementation, updating the video address stream based on the cache address information of the target video includes any of the following methods: inserting the cache address information of the target video after the address information of the currently playing video in the video address stream; replacing the address information of the currently playing video in the video address stream with the cache address information of the target video; generating a new video address stream based on the cache address information of the target video to replace the video address stream.

[0040] In one possible implementation, the video playback function of the first video playback interface is triggered including any of the following: a click operation on the video playback control is detected on the first video playback interface; a sliding operation on the first video playback interface is detected on the first video playback interface; the duration during which the terminal's network does not meet the playback conditions reaches a target duration; the countdown on the video playback prompt bar on the first video playback interface ends.

[0041] In one possible implementation, the target video playback sub-subunit is also configured to execute: in response to the video playback function of the first video playback interface being triggered, jump from the first video playback interface to the second video playback interface; based on the updated video address stream, play the target video in the second video playback interface.

[0042] In a possible implementation, the target video playback sub-subunit is further configured to execute: in response to the video playback function of the first video playback interface being triggered, based on the updated video address stream, playing the target video in the first video playback interface.

[0043] In a possible implementation manner, the device is further configured to execute: displaying a video playback prompt bar in the first video playback interface, where the video playback prompt bar is used to prompt that the target video is about to be played.

[0044] In a possible implementation manner, the video playback prompt bar further includes a playback blocking control, and the playback blocking control is used to determine whether to play the target video.

[0045] In one possible implementation, the device is further configured to execute: in response to a click operation on a playback prevention control, not playing the target video.

[0046] In a possible implementation, the device is further configured to execute: in the second video playback interface, display a playback source prompt bar, where the playback source prompt bar is used to prompt that the target video currently being played originates from the cache space.

[0047] In a possible implementation, the device is further configured to execute: in response to a click operation on the video playback prompt bar, display a list page in the first video playback interface, where the list page is used to display the target video.

[0048] In a possible implementation, the device is further configured to execute: in response to a click operation on the playback source prompt bar, display a list page in the second video playback interface, wherein the list page is used to display the target video.

[0049] In a possible implementation manner, the target video playback sub-subunit is further configured to execute: based on the display order of the target videos on the list page, obtaining the target video; and playing the target video in the first video playback interface.

[0050] In a possible implementation, the target video playback sub-subunit is further configured to execute: in response to a selection operation performed on any target video displayed on the list page, obtain the selected target video; and play the selected target video in the first video playback interface.

[0051] In a possible implementation, the device is further configured to execute: in response to a sequence switching operation performed on the target videos displayed on the list page, adjusting the playback sequence of the target videos displayed on the list page.

[0052] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:

[0053] one or more processors;

[0054] A memory for storing program codes executable by the processor;

[0055] The processor is configured to execute the program code to implement the above-mentioned video playback method.

[0056] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, which includes: when the program code in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device is enabled to execute the above-mentioned video playback method.

[0057] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising one or more instructions, wherein the one or more instructions are executed by one or more processors of an electronic device, so that the electronic device can execute the above-mentioned video playback method.

[0058] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0060] Figure 1 is a schematic diagram of an implementation environment of a video playback method provided according to an exemplary embodiment;

[0061] Figure 2 is a flow chart of a video playing method according to an exemplary embodiment;

[0062] Figure 3 is a flow chart of a video playing method provided according to an exemplary embodiment;

[0063] Figure 4 is a schematic diagram of displaying network abnormality information in a first video playback interface according to an exemplary embodiment;

[0064] Figure 5 is an operation diagram of a video playback method provided according to an exemplary embodiment;

[0065] Figure 6 is an operation diagram of a video playback method provided according to an exemplary embodiment;

[0066] Figure 7 is an operation diagram of a video playback method provided according to an exemplary embodiment;

[0067] Figure 8 is an operation diagram of a video playback method provided according to an exemplary embodiment;

[0068] Fig. 9 is a flow chart of a video playing method provided according to an exemplary embodiment;

[0069] Fig.10 is a flow chart of a video playing method provided according to an exemplary embodiment;

[0070] Fig.11 is a block diagram of a video playback device provided according to an exemplary embodiment;

[0071] Fig.12 It is a structural block diagram of a terminal provided according to an exemplary embodiment. DETAILED DESCRIPTION

[0072] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0073] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0074] 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 involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the cache space involved in this application is obtained with full authorization.

[0075] The following introduces an implementation environment of a video playback method provided by an embodiment of the present application. Figure 1 is a schematic diagram of an implementation environment of a video playback method provided by an embodiment of the present disclosure, see Figure 1 , the implementation environment includes: a terminal 101 and a server 102.

[0076] The terminal 101 may be at least one of a smart phone, a smart watch, a desktop computer, a laptop, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop computer. The terminal 101 has a communication function and can access the Internet. The terminal 101 may generally refer to one of a plurality of terminals. This embodiment is only illustrated by the terminal 101. Those skilled in the art may know that the number of the above terminals may be more or less. The terminal 101 may run various types of applications, such as a video playback application. The terminal 101 can play a video based on the running video playback application.

[0077] The server 102 may be an independent physical server, or a server cluster or distributed file system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The server 102 can send the video to the terminal 101 for video playback.

[0078] The server 102 and the terminal 101 can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application. Optionally, the number of the above-mentioned terminals 101 and servers 102 can be more or less, which is not limited in the embodiments of the present application. Of course, the server 102 can also include other functional servers to provide more comprehensive and diversified services.

[0079] The above introduces the implementation environment of a video playback method provided by an embodiment of the present application. The following introduces a video playback method provided by an embodiment of the present application. Figure 2 is a flowchart of a video playing method according to an exemplary embodiment. Figure 2 As shown, the method is executed by the terminal 101, and includes the following steps:

[0080] In step 201, the terminal displays network abnormality information in the first video playback interface, where the network abnormality information is used to indicate that the terminal's network does not meet playback conditions.

[0081] The first video playback interface refers to a video playback interface corresponding to a video that fails to play when there is no network connection or the network quality is poor. The playback condition refers to a normal network connection.

[0082] In step 202, the terminal plays the video based on the video cached in the cache space of the terminal.

[0083] In the embodiment of the present application, since the videos cached in the cache space are stored locally in the terminal, they can be played independently of the network and are not affected by network disconnection or weak network.

[0084] In the technical solution provided by the embodiment of the present disclosure, when there is no network connection or the network quality is poor, the cached video is obtained from the cache space of the terminal for playback. Since the cached video does not depend on the network, it can be played normally even when the network is abnormal. Therefore, by playing the cached video, the time gap when the user waits for the network connection to be restored can be filled, thereby reducing the user's waiting time and improving the user's video viewing experience.

[0085] Above Figure 2The above-mentioned is only the basic process of the present disclosure. The video playback process in the above step 202 can update the video address stream based on the cache address information of the video cached in the cache space, thereby realizing continuous video playback. Among them, the cache address information refers to the address of the cached video in the cache space of the terminal; the video address stream includes the address information of multiple videos to be played, and the terminal obtains the video from the corresponding address based on the address information in the video address stream, and plays it in the video playback interface. The terminal updates the video address stream in the following ways: inserting stream, replacing video and cutting stream, among which, inserting stream refers to inserting the cache address information of the target video into the address information of the currently playing video in the current video address stream; replacing video refers to replacing the address information of the currently playing video in the current video address stream with the cache address information of the target video; cutting stream refers to generating a new video address stream based on the cache address information of the target video, and replacing the current video address stream with the newly generated video address stream.

[0086] The following takes updating the video address stream by inserting a stream as an example to introduce an embodiment of a video playback method provided by the present application. Figure 3 As shown, Figure 3 1 is a flowchart of a video playback method provided in an embodiment of the present application. The method is executed by the above-mentioned terminal 101 and includes the following steps:

[0087] In step 301, the terminal displays network abnormality information in the first video playback interface, where the network abnormality information is used to indicate that the terminal's network does not meet playback conditions.

[0088] In an embodiment of the present application, the terminal plays the video by connecting to the Internet. If the network does not meet the playback conditions, the video playback will fail. Accordingly, the terminal can periodically detect the network, such as whether it is connected to the Internet, or the network speed. If it is not connected to the Internet or the network speed does not reach the target network speed, it means that the terminal's network does not meet the playback conditions, and the terminal displays network abnormality information in the first video playback interface. In the above embodiment, the network speed is used as an example to introduce the situation where the network does not meet the playback conditions. In some embodiments, other indicators for evaluating network quality such as packet loss rate and network delay can be used to determine whether the network meets the playback conditions. The embodiment of the present application does not limit this.

[0089] like Figure 4 As shown, Figure 4 4 is a schematic diagram of displaying network abnormality information in a first video playback interface proposed in an embodiment of the present application. The first video playback interface 401 displays network abnormality information 402, and the network abnormality information 402 is "Unable to connect to the network, please try again later". The embodiment of the present application does not limit the specific content of the network abnormality information 402.

[0090] In step 302, the terminal selects at least one candidate video from the videos cached in the cache space based on the video date condition.

[0091] The videos cached in the cache space may include any of the following videos:

[0092] The first type: favorite videos of the logged-in object on the terminal. Favorite videos refer to videos that are added to favorites in response to the favorite operation performed by the logged-in object on the video, and the favorites include at least one favorite video. In some embodiments, when a favorite video is added to the favorites, the terminal caches the favorite video; in other embodiments, the terminal detects the number of favorite videos added to the favorites, and when the number of favorite videos added to the favorites reaches a preset threshold, the terminal caches the multiple favorite videos added; in yet other embodiments, the terminal periodically caches the favorite videos added to the favorites, such as caching the favorite videos added to the favorites every other week. The embodiments of the present application do not limit the timing of caching favorite videos.

[0093] The second type: similar videos to favorite videos. Among them, similar videos to favorite videos refer to videos that have at least one attribute in common with the favorite video, and the attribute can be the location attribute of the video or the category attribute of the video. Among them, the videos have the same location attribute, such as some videos released in the same city have the same location attribute; the same category attribute of the videos means that the content of the videos belongs to the same category, such as some pet videos belong to the same category. The process of the terminal obtaining similar videos to the favorite video includes: the terminal obtains the location attribute and the category attribute of the favorite video; based on at least one filtering condition in the location attribute and the category attribute, the video to be played is filtered to obtain at least one similar video. In some embodiments, for each new favorite video added to the favorites, the terminal obtains at least one similar video of the favorite video and caches the at least one similar video; in other embodiments, the terminal periodically obtains similar videos to the favorite video and caches them.

[0094] The third type: videos cached by the terminal based on the object cache operation, that is, videos cached by the user himself.

[0095] In some embodiments, for the above three types of videos, the user most wants to watch the videos cached by himself, followed by the favorite videos, and finally the similar videos of the favorite videos. Since the cache space of the terminal is limited, when the terminal caches the above three types of videos, it will automatically cache the favorite videos on the basis of reserving a certain space to meet the storage requirements of the user's possible cache operations, and finally cache the similar videos of the favorite videos. In some embodiments, the terminal detects the occupancy rate of the cache space. When the occupancy rate of the cache space is lower than the preset value, the terminal first caches the favorite videos until the occupancy rate of the cache space reaches the preset value; if the occupancy rate of the cache space is still lower than the preset value after the favorite videos are cached, the terminal caches the similar videos of the cached favorite videos until the occupancy rate of the cache space reaches the preset value; when the occupancy rate of the cache space is higher than the preset threshold, the terminal screens out similar videos that have not been played within the preset time period from the cache space according to the playback time of the video, and removes the screened similar videos from the cache space. Through the solution in the above embodiment, the terminal dynamically updates the videos in the cache space, and can cache more videos while ensuring that the cache space is sufficient, and make the newly cached videos more in line with the user's viewing preferences.

[0096] The video date condition refers to that the video date is within the target time period. The target time period may be a historical time period with the current system time as the end point, that is, a recently cached video may be obtained. The video date refers to the cache date of the video.

[0097] In some embodiments, the target time period is the time period from the last occurrence of the network anomaly to the current system time. Accordingly, the terminal filters out at least one candidate video from the cached video, including: obtaining the last occurrence time of the terminal's network anomaly, and based on the occurrence time and the video date of each video, filtering out videos whose video dates are after the occurrence time from the cached videos, and the filtered videos are the candidate videos. The at least one candidate video filtered out based on the above method does not include videos that may have been played when the last network anomaly occurred, thereby improving the accuracy of cached video playback, avoiding repeated playback of cached videos, and thus avoiding the switching operation required due to repeated playback, reducing the user's operating costs, and improving the user's video viewing experience.

[0098] The above step 302 is an implementation method of selecting at least one candidate video from the cached videos based on the video date condition. In some embodiments, this step can also be performed based on other implementation methods, which is not limited in the embodiments of the present application.

[0099] In step 303, the terminal sorts at least one candidate video based on at least one sorting condition of the number of play times and the completion rate, and determines the target video based on the sorting result.

[0100] Among them, the number of plays refers to the number of clicks on the candidate video by the logged-in object, and the completion rate refers to the ratio of the viewing time of the candidate video to the total viewing time of the candidate video by the logged-in object. The number of plays and the completion rate are used to indicate the degree of liking of the candidate video by the logged-in object. When the sorting condition is the number of plays, the process of the terminal sorting at least one candidate video is as follows: the terminal obtains the number of plays of each candidate video; the terminal arranges the number of plays of each candidate video in descending order, and determines the candidate video with the first order as the target video. When the sorting condition is the completion rate, the process of the terminal sorting at least one candidate video is as follows: the terminal obtains the viewing time and total time of each candidate video; the terminal calculates the completion rate of each candidate video respectively; the terminal arranges the completion rate of each candidate video in descending order, and determines the candidate video with the first order as the target video. Of course, the above-mentioned number of clicks and completion rate can also be the number of clicks and completion rate of multiple objects on the platform, so as to screen the candidate videos by their popularity on the platform, and the embodiment of the present application does not limit this.

[0101] In the above embodiment, the candidate videos are sorted based on only one of the sorting conditions, namely, the number of plays and the completion rate. In other embodiments, the candidate videos are sorted based on both the number of plays and the completion rate, and then the target video is determined. The determination process is as follows: the number of plays, viewing time and total viewing time of each candidate video are obtained; the completion rate of each candidate video is calculated based on the viewing time and total viewing time of each candidate video; the terminal obtains the weights of the two indicators, namely, the number of plays and the completion rate; based on the weights, the number of plays and the completion rate of each candidate video are weighted and summed to obtain the playback score of each candidate video; the playback scores of each candidate video are arranged in descending order, and the candidate video with the first order is determined as the target video. Based on the above method, the target video is determined, and by calculating the playback scores of each candidate video, a video with the highest user preference is selected from multiple candidate videos as the target video, so that users can watch videos during the period of waiting for the network connection to be restored, and the played videos are more attractive to users, thereby improving the user's viewing experience.

[0102] It should be noted that in the above embodiment, when calculating the playback score of each candidate video, only the number of playbacks and the completion rate are used. In some embodiments, other indicators such as the number of collections and the number of likes of the candidate video can also be used to calculate the playback score of the candidate video. The embodiments of the present application are not limited to this.

[0103] In the above embodiment, only the candidate video ranked first in the sorting result is determined as the target video, that is, the number of the determined target video is one. In other embodiments, the number of target videos can be set to determine multiple target videos based on the sorting result. The embodiment of the present application does not limit the number of target videos.

[0104] The above step 303 is an implementation method of sorting at least one candidate video to determine the target video. In some embodiments, this step can also be performed based on other implementation methods, which is not limited in the embodiments of the present application.

[0105] The above steps 302 and 303 are one implementation of determining the target video from the videos cached in the cache space. In some embodiments, this step can also be performed based on other implementations, which are not limited in the embodiments of the present application.

[0106] The above steps 301 to 303 are introduced by taking the example that the terminal determines the target video after the first video playback interface displays the network abnormality information. In other embodiments, the terminal periodically determines the target video from the videos cached in the cache space. After the first video playback interface displays the network abnormality information, the terminal directly updates the video address stream based on the cache address information of the predetermined target video, and does not need to start determining the target video after the network abnormality occurs, thus saving the response time from displaying the network abnormality information to playing the cached video. The embodiment of the present application does not limit the timing of displaying the network abnormality information and determining the target video.

[0107] In step 304, the terminal obtains cache address information of the target video.

[0108] The cache address information refers to the address of the target video in the cache space, that is, the access path of the target video. The cache address information may include the offset value and length of the target video in the cache space, or the starting position and ending position of the target video in the cache space, which is not limited in the embodiment of the present application.

[0109] In step 305, the terminal inserts the cache address information of the target video after the address information of the currently playing video in the video address stream.

[0110] The video address stream includes address information of multiple videos to be played. The process after the terminal inserts the cache address information of the target video into the address information of the currently played video in the video address stream includes: the terminal obtains the video address stream; the terminal locates the position of the address information of the currently played video in the video address stream; the terminal inserts the cache address information of the target video into the position to update the video address stream.

[0111] It should be noted that when updating the video address stream, the cache address information of only one target video may be inserted at a time, or the cache address information of multiple target videos may be inserted at a time, which is not limited in the embodiments of the present application.

[0112] The above step 305 is an implementation method of updating the video address stream based on the cache address information of the target video. In some embodiments, this step can also be performed based on other implementation methods, which is not limited in the embodiments of the present application.

[0113] In step 306, in response to the video play function of the first video play interface being triggered, the terminal jumps from the first video play interface to the second video play interface.

[0114] The triggering of the video playback function of the first video playback interface means that the terminal detects that the login object has performed a video playback operation on the first video playback interface or that the first video playback interface meets the preset video playback timing. The video playback operation may be a click operation on the video playback control or a slide operation on the first video playback interface. The preset video playback timing may be when the duration of the terminal's network not meeting the playback conditions reaches the target duration or when the countdown on the video playback prompt bar on the first video playback interface ends.

[0115] The following takes the example that the terminal detects that a sliding operation is performed on the first video playback interface on the first video playback interface to introduce step 306. Figure 5 As shown, Figure 5 FIG. 1 is an operation diagram of a video playback method provided according to an exemplary embodiment. Figure 5 As shown in the middle left picture, Figure 5 The middle left figure includes a first video playback interface 501, and the first video playback interface 501 includes network abnormality information 502. The login object performs a sliding operation on the first video playback interface 501; the terminal detects the sliding operation; the terminal jumps from the first video playback interface 501 to the second video playback interface 503, such as Figure 5 As shown in the middle right picture, Figure 5 The middle right picture includes a second video playback interface 503 , in which a target video 504 is played.

[0116] In step 307, the terminal plays the target video in the second video playback interface based on the updated video address stream.

[0117] The video address stream includes address information of multiple videos to be played. When the network meets the playback conditions, the process of the terminal playing the video based on the video address stream is as follows: the terminal obtains an address information in the video address stream; the terminal obtains the video to be played based on the address information; the terminal plays the video to be played in the video playback interface. Each time the logged-in object performs a sliding operation, the terminal obtains a video to be played based on the address information in the video address stream according to the above steps. When the network does not meet the playback conditions, taking the example of updating the video address stream by inserting one target video at a time, the process of playing the target video in the second video playback interface based on the updated video address stream for the terminal includes: the terminal inserts the cache address information of a target video after the address information of the current video; after the video playback function of the first video playback interface is triggered, the terminal obtains the target video from the cache space based on the cache address information of the target video in the video address stream; the terminal decodes the obtained target video, and plays the decoded target video frame by frame in the second video playback interface; after the target video is played, the terminal detects whether the network meets the playable conditions, and if so, stops inserting the cache address information of the next target video into the video address stream; if not, continues to insert the next target video into the video address stream for playback until all target videos are played or the network meets the playable conditions.

[0118] The above embodiment is explained by taking the insertion of a cache address information pair of a target video at a time as an example. In some embodiments, the terminal inserts multiple target videos to be played in the video address stream at one time, and only detects the network after the inserted multiple target videos are played. The embodiments of the present application are not limited to this.

[0119] Wherein, when the address information of the target video is the offset value and length of the target video in the cache space, the process of the terminal obtaining the target video includes: the terminal offsets the offset value based on the starting address of the cache space, and the terminal calculates the starting address of the target video in the cache space; the terminal queries the starting address; the terminal starts from the starting address and reads the data of the length to obtain the target video. When the address information of the target video is the starting address and the end address of the target video in the cache space, the process of the terminal obtaining the target video includes: the terminal queries the starting address; the terminal starts to read the data from the starting address and reads to the end address to obtain the target video.

[0120] The above steps 306 to 307 are a way of implementing the target video based on the updated video address stream in response to the video playback function of the first video playback interface being triggered. In some embodiments, this step can also be performed based on other implementations, which are not limited in the present application.

[0121] It should be noted that the above steps 301 to 307 are a process of introducing a video playback method provided in an embodiment of the present application, in which after the first video playback interface displays network abnormality information, the terminal first determines the target video from the cache space, and after the video playback function in the first video playback interface is triggered, the terminal plays the target video. In other embodiments, the video playback process is: the first video playback interface displays network abnormality information, and after the video playback function in the first video playback interface is triggered, the terminal determines the target video from the cache space, and then the terminal plays the target video.

[0122] In the above steps 301 to 307, in response to the video playback function of the first video playback interface being triggered, the terminal directly jumps from the first video playback interface to the second video playback interface. In some embodiments, after step 305, in order to remind the user that the video being played is the target video, a video playback prompt bar is also displayed in the first video playback interface, such as the following steps: the terminal displays a video playback prompt bar in the first video playback interface, and the video playback prompt bar is used to prompt that the target video is about to be played, and the video playback prompt bar includes a control to prevent playback.

[0123] In some embodiments, the video playback prompt bar also displays the network status and the playback countdown of the target video. The blocking playback control is a click control for blocking the playback of the target video. The blocking playback control can be located anywhere on the video playback prompt bar, and the embodiments of the present application do not limit this.

[0124] In some embodiments, once the terminal detects that the network does not meet the playback conditions, the video playback prompt bar is displayed in the first video playback interface, that is, the terminal displays the network abnormality information and the video playback prompt bar on the first video playback interface at the same time; in other embodiments, the terminal displays the video playback prompt bar only after the network abnormality information is displayed for a certain period of time. The embodiments of the present application do not limit the timing of displaying the video playback prompt bar.

[0125] Since the user can choose whether to play the cached video, in some embodiments, after executing the above step of displaying the video playback prompt bar in the first video playback interface, steps 306 and 307 are not executed, but the following steps are executed: in response to a click operation on a control that blocks playback, the terminal does not play the target video.

[0126] Among them, the terminal does not play the target video including: the terminal does not jump from the first video playback interface to the second video playback interface; the terminal stops the playback countdown of the target video on the video playback prompt bar; the terminal does not continue to display the video playback prompt bar; the terminal keeps displaying the first video playback interface.

[0127] like Figure 6 As shown, Figure 6 FIG. 1 is an operation diagram of a video playback method provided according to an exemplary embodiment. Figure 6 As shown in the middle left picture, Figure 6 The middle left figure includes a first video playback interface 601, which includes network abnormality information 602 and a video playback prompt bar 603. The video playback prompt bar 603 includes a stop playback control 604. The video playback prompt bar 603 prompts that the terminal network is not good and the next video will be automatically played after 3 seconds. Figure 6 As shown in the middle right figure, in response to the end of the countdown of the target video playback on the video playback prompt bar 603, the terminal jumps from the first video playback interface 601 to the second video playback interface 605, and plays the target video 605 in the second video playback interface 605. In response to the click operation on the playback prevention control 604, the terminal does not play the target video and keeps displaying the first video playback interface.

[0128] In the above steps 305 to 307, the video in the cache space is played by detecting that a sliding operation has been performed on the first video playback interface. In the above step of displaying the video playback prompt bar, the video in the cache space is played by the countdown on the video playback prompt bar on the first video playback interface ending. In some embodiments, the video in the cache space is played by detecting that a click operation has been performed on the video playback control on the first video playback interface, such as Figure 7 As shown, Figure 7 FIG. 1 is an operation diagram of a video playback method provided according to an exemplary embodiment. Figure 7 As shown in the middle left picture, Figure 7 The middle left figure includes a first video playback interface 701, which includes network abnormality information 702 and a video switching control 703. Figure 7 As shown in the middle right figure, in response to a click operation on the video switching control 703 , the terminal jumps from the first video playback interface 701 to the second video playback interface 704 , and plays the target video 705 in the second video playback interface 704 .

[0129] It should be noted that the embodiments corresponding to the above three triggering methods all only use any one of the three triggering methods, namely, detecting that a sliding operation has been performed on the first video playback interface, the countdown on the video playback prompt bar on the first video playback interface has ended, and detecting that a click operation has been performed on the video playback control on the first video playback interface, to trigger. In some embodiments, the triggering method includes two or more of the above three triggering methods. In other embodiments, other triggering methods besides the above triggering methods are also used, such as when the duration of the terminal network not meeting the playback conditions reaches the target duration. The embodiments of the present application do not limit this.

[0130] The above-mentioned step of displaying the video playback prompt bar in the first video playback interface only displays the video playback prompt bar in the first video playback interface. In other embodiments, a playback source prompt bar is also displayed in the second video playback interface to prompt the user that the currently playing video is the target video, such as the following steps: the terminal displays a playback source prompt bar in the second video playback interface, and the playback source prompt bar is used to prompt that the currently playing target video comes from the cache space.

[0131] In some embodiments, the playback source prompt bar is displayed at the bottom of the second video playback interface to prevent interference with the playback of the target video on the second video playback interface. The location of the playback source prompt bar can be determined based on the user's operating habits and does not interfere with the playback of the target video, and this embodiment of the application does not limit this. Figure 6 As shown, Figure 6 The middle right picture includes a second video playback interface 605 , and a playback source prompt bar 607 is located at the bottom of the second video playback interface 605 .

[0132] In the above steps, the video played in the second video playback interface is determined by the terminal according to the video address stream. In order to provide the user with the function of actively selecting the target video, in some embodiments, after executing the above step of displaying the playback source prompt bar, the following steps 1 to 4 are also included:

[0133] Step 1: In response to a click operation on the playback source prompt bar, the terminal displays a list page in the second video playback interface, and the list page is used to display the target video.

[0134] Among them, the list page is a page that is suspended with the second video playback interface, and the target videos on the list page are arranged in columns, that is, each row displays a target video, and the number of rows is equal to the number of displayed target videos. In some embodiments, the target videos on the list page are arranged in the form of a matrix, and the embodiment of the present application does not limit the arrangement of the target videos on the list page. In addition, the list page can display all the target videos, or only part of the target videos, and can also display other videos in the cache space except the target video, which is not limited by the embodiment of the present application. In addition, the embodiment of the present application does not limit the size of the list page, and the position of the list page on the first video playback interface. Figure 8 As shown, Figure 8 It is an operation diagram of a video playing method provided according to an exemplary embodiment. Figure 8 The middle left figure includes a second video playback interface 801, which includes a currently playing target video 802 and a playback source prompt bar 803. Figure 8 As shown in the middle right figure, in response to a click operation on the playback source prompt bar 803, a list page 804 is displayed at the bottom of the second video playback interface 801. In the list page 804, four target videos are displayed in a column form, including a currently playing target video 802 and three target videos 805-807 to be played.

[0135] Step 2: Based on the display order of the target videos on the list page, the terminal plays the videos.

[0136] The display order of the target videos on the list page is the arrangement order of the cache address information of the target videos in the video address stream. The terminal plays the video based on the display order, that is, plays the video based on the updated video address stream. The process of the terminal playing the video based on the updated video address stream is the same as step 307 and will not be described in detail.

[0137] In the above step 2, the terminal determines the target video to be played according to the display order. In some embodiments, the user can manually switch the display order of the list page to switch the play order of the target video, and can also select the video to be played by himself, as shown in steps 3 and 4.

[0138] Step 3: In response to the sequence switching operation performed on the target videos displayed on the list page, the terminal adjusts the play sequence of the target videos displayed on the list page.

[0139] The sequential switching operation implemented on the multiple target videos displayed on the list page refers to swapping the arrangement positions of the multiple target videos on the list page. The terminal rearranges the cache address information of the target videos in the video address stream based on the swapped arrangement order, so that the terminal adjusts the playback order of the target videos displayed on the list page.

[0140] Step 4: In response to a selection operation performed on any target video displayed on the list page, the terminal plays the selected target video in the second video playback interface.

[0141] Among them, the process of playing the selected target video in the first video playback interface of the terminal includes: the terminal detects the selection operation implemented on any one of multiple target videos; the terminal obtains the cache address information of the selected target video; the terminal replaces the cache address information of the currently playing target video in the video address stream with the cache address information of the selected target video; the terminal obtains the selected target video; the terminal plays the selected target video on the second video playback interface.

[0142] In the above embodiment, a video playback method provided by an embodiment of the present application is introduced by taking updating the video address stream by inserting a stream as an example. The following is an introduction to a video playback method provided by an embodiment of the present application by taking updating the video address stream by replacing a video as an example. Fig. 9 As shown, Fig. 9 is a flowchart of a video playback method provided according to an exemplary embodiment, the method is executed by the terminal 101, and includes the following steps:

[0143] In step 901, the terminal displays network abnormality information in the first video playback interface, where the network abnormality information is used to indicate that the terminal's network does not meet playback conditions.

[0144] In step 902, the terminal selects at least one candidate video from the videos cached in the cache space based on the video date condition.

[0145] In step 903, based on at least one of the ranking conditions of the number of play times and the completion rate, the terminal ranks at least one candidate video, and determines a target video based on the ranking result.

[0146] In step 904, the terminal obtains cache address information of the target video.

[0147] The above steps 901 to 904 are similar to steps 301 to 304 and are not described in detail.

[0148] In step 905, the terminal replaces the address information of the currently played video in the current video address stream with the cache address information of the target video.

[0149] Among them, the process of the terminal replacing the address information of the currently playing video in the current video address stream with the cached address information of the target video includes: the terminal obtains the video address stream; the terminal locates the position of the address information of the currently playing video in the video address stream; the terminal replaces the address information of the currently playing video at that position with the cached address information of the target video.

[0150] It should be noted that when updating the video address stream, the cache address information of only one target video can be used at a time to replace the address information of the currently playing video, or the cache address information of multiple target videos can be used at a time to replace it. This embodiment of the present application is not limited to this.

[0151] The above step 905 is an implementation method of updating the video address stream based on the cache address information of the target video. In some embodiments, this step can also be performed based on other implementation methods, which is not limited in the embodiments of the present application.

[0152] In step 906, the terminal displays a video play prompt bar in the first video play interface, where the video play prompt bar is used to prompt that the cached video is about to be played.

[0153] The above step 906 is similar to the step of displaying a video playback prompt bar in the first video playback interface in the above embodiment of updating the video address stream by inserting a stream, and will not be described in detail.

[0154] In step 907, in response to a click operation on the video playback prompt bar, the terminal displays a list page in the first video playback interface, where the list page is used to display the target video.

[0155] The above step 907 is executed in the same manner as step one in the above embodiment of updating the video address stream by inserting streams, with the difference being that: the triggering condition for displaying the list page in step one is that a click operation is performed on the playback source prompt bar in the second video playback interface, while the triggering condition for displaying the list page in step 907 is that a click operation is performed on the video playback prompt bar in the first video playback interface; the display list page in step one is displayed in the second video playback interface, while the display list page in step 907 is displayed in the first video playback interface.

[0156] In step 908, the terminal plays the videos based on the display order of the target videos on the list page.

[0157] In step 909, in response to the sequence switching operation performed on the target videos displayed on the list page, the terminal adjusts the play sequence of the target videos displayed on the list page.

[0158] In step 910, in response to a selection operation performed on any target video displayed on the list page, the terminal plays the selected target video in the first video playback interface.

[0159] The execution process of the above steps 908 to 910 is the same as the execution process of steps 1 to 4 in the above embodiment of updating the video address stream by inserting the stream, and will not be repeated here.

[0160] In the above scheme, by replacing the address information of the currently playing video with the cache address information of the video cached in the cache space, the cached video is played in the first video playback interface without jumping to the video playback interface, thereby saving the trigger time for playing the cached video and reducing the time the user waits for the video playback interface to jump, which can improve the user's viewing experience.

[0161] In the above embodiment, a video playback method provided by an embodiment of the present application is introduced by taking the method of updating the video address stream by replacing the video as an example. The following is an example of updating the video address stream by switching the stream to introduce a video playback method provided by an embodiment of the present application. Fig.10 As shown, Fig.10 is a flowchart of a video playback method provided according to an exemplary embodiment, the method is executed by the terminal 101, and includes the following steps:

[0162] In step 1001, the terminal displays network abnormality information in the first video playback interface, where the network abnormality information is used to indicate that the terminal's network does not meet playback conditions.

[0163] In step 1002, the terminal selects at least one candidate video from the multiple videos cached in the cache space based on the video date condition.

[0164] In step 1003, based on at least one of the ranking conditions of the number of play times and the completion rate, the terminal ranks at least one candidate video, and determines a target video based on the ranking result.

[0165] In step 1004, the terminal obtains cache address information of the target video.

[0166] The above steps 1001 to 1004 are similar to steps 301 to 304 and are not described in detail.

[0167] In step 1005, based on the cache address information of the target video, the terminal generates a new video address stream to replace the current video address stream.

[0168] Among them, the terminal generates a new video address stream based on the cache address information of the target video, and the process of replacing the current video address stream includes: the terminal obtains the cache address information of all target videos; the terminal generates a new video address stream based on the cache address information of all target videos; the terminal replaces the current video address stream with the generated new video address stream.

[0169] The above embodiment takes the generation of a new video address stream based on the cache address information of all target videos as an example to introduce the process of generating a new video address stream. In some embodiments, the cache address information of some target videos is used to generate a new video address stream. In other embodiments, in addition to using the cache address information of the target video, the cache address information of other videos in the cache space is also used to generate a new video address stream. The embodiments of the present application are not limited to this.

[0170] In step 1006, in response to the video playback function of the first video playback interface being triggered, the terminal jumps from the first video playback interface to the second video playback interface.

[0171] The above step 1006 is the same as step 306 and will not be described in detail.

[0172] In step 1007, based on the updated video address stream, the terminal displays a playback source prompt bar in the second video playback interface and plays the target video.

[0173] The above step 1007 is similar to the step of displaying the playback source prompt bar in the second video playback interface in the above embodiment of updating the video address stream by inserting the stream, and will not be repeated here.

[0174] In the above scheme, the entire video address stream is directly replaced with the cache address information of the video cached in the cache space, so that the video cached in the cache space can be played continuously, saving the time of updating the video address stream each time, thereby reducing the time users wait for video playback and improving the user's viewing experience.

[0175] Fig.11 is a block diagram of a video playback device provided according to an exemplary embodiment. Fig.11 The device includes: a network abnormal information display unit 1101 and a video playing unit 1102.

[0176] The network abnormality information display unit 1101 is configured to display network abnormality information in the first video playback interface, where the network abnormality information is used to indicate that the terminal network does not meet the playback conditions;

[0177] The video playing unit 1102 is configured to play the video based on the video cached in the cache space of the terminal.

[0178] In a possible implementation, the videos cached in the cache space of the terminal include any of the following: favorite videos of the object logged in on the terminal; similar videos to the favorite videos; and videos cached by the terminal based on the object's cache operation.

[0179] In a possible implementation, the video playback unit 1102 includes:

[0180] A screening subunit is configured to screen out at least one candidate video from the cached videos based on a video date condition;

[0181] The target video determination subunit is configured to sort at least one candidate video to determine a target video and play the target video.

[0182] In a possible implementation, the screening subunit is configured to execute: obtaining the time of occurrence of the last network anomaly; and screening at least one candidate video whose video date is after the occurrence time from the cached videos based on the occurrence time and the video date of each video.

[0183] In a possible implementation manner, the target video determination subunit is further configured to execute: sorting at least one candidate video based on at least one sorting condition of the number of play times and the completion rate, and determining the target video based on the sorting result.

[0184] In a possible implementation manner, the target video determination subunit includes:

[0185] The cache address information acquisition sub-subunit is configured to execute acquisition of the cache address information of the target video;

[0186] The video address stream updating sub-sub-unit is configured to execute, based on the cached address information of the target video, updating the video address stream, the video address stream including the address information of a plurality of videos to be played;

[0187] The target video playback sub-sub-unit is configured to execute, in response to the video playback function of the first video playback interface being triggered, to play the target video based on the updated video address stream.

[0188] In one possible implementation, updating the video address stream based on the cache address information of the target video includes any of the following methods: inserting the cache address information of the target video after the address information of the currently playing video in the video address stream; replacing the address information of the currently playing video in the video address stream with the cache address information of the target video; generating a new video address stream based on the cache address information of the target video to replace the video address stream.

[0189] In one possible implementation, the video playback function of the first video playback interface is triggered including any of the following: a click operation on the video playback control is detected on the first video playback interface; a sliding operation on the first video playback interface is detected on the first video playback interface; the duration during which the terminal's network does not meet the playback conditions reaches a target duration; the countdown on the video playback prompt bar on the first video playback interface ends.

[0190] In one possible implementation, the target video playback sub-subunit is also configured to execute: in response to the video playback function of the first video playback interface being triggered, jump from the first video playback interface to the second video playback interface; based on the updated video address stream, play the target video in the second video playback interface.

[0191] In a possible implementation, the target video playback sub-subunit is further configured to execute: in response to the video playback function of the first video playback interface being triggered, based on the updated video address stream, playing the target video in the first video playback interface.

[0192] In a possible implementation manner, the device is further configured to execute: displaying a video playback prompt bar in the first video playback interface, where the video playback prompt bar is used to prompt that the target video is about to be played.

[0193] In a possible implementation manner, the video playback prompt bar further includes a playback blocking control, and the playback blocking control is used to determine whether to play the target video.

[0194] In one possible implementation, the device is further configured to execute: in response to a click operation on a playback prevention control, not playing the target video.

[0195] In a possible implementation, the device is further configured to execute: in the second video playback interface, display a playback source prompt bar, where the playback source prompt bar is used to prompt that the target video currently being played originates from the cache space.

[0196] In a possible implementation, the device is further configured to execute: in response to a click operation on the video playback prompt bar, display a list page in the first video playback interface, where the list page is used to display the target video.

[0197] In a possible implementation, the device is further configured to execute: in response to a click operation on the playback source prompt bar, display a list page in the second video playback interface, wherein the list page is used to display the target video.

[0198] In a possible implementation manner, the target video playback sub-subunit is further configured to execute: based on the display order of the target videos on the list page, obtaining the target video; and playing the target video in the first video playback interface.

[0199] In a possible implementation, the target video playback sub-subunit is further configured to execute: in response to a selection operation performed on any target video displayed on the list page, obtain the selected target video; and play the selected target video in the first video playback interface.

[0200] In a possible implementation, the device is further configured to execute: in response to a sequence switching operation performed on the target videos displayed on the list page, adjusting the playback sequence of the target videos displayed on the list page.

[0201] It should be noted that: when the video playback device provided in the above embodiment performs the corresponding steps, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device 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.

[0202] In an embodiment of the present disclosure, an electronic device is also provided. The electronic device includes a processor and a memory. The memory is used to store at least one computer program. The at least one computer program is loaded and executed by the processor to implement the above-mentioned video playback method.

[0203] Taking electronic devices as terminals as an example, Fig.12 is a structural block diagram of a terminal provided according to an exemplary embodiment, see Fig.12 The terminal 1200 may be a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. The terminal 1200 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.

[0204] Typically, the terminal 1200 includes: a processor 1201 and a memory 1202 .

[0205] The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 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 1201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1201 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 1201 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0206] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 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 1202 is used to store at least one program code, which is used to be executed by the processor 1201 to implement the process executed by the terminal in the video playback method provided in the method embodiment of the present disclosure.

[0207] In some embodiments, the terminal 1200 may also optionally include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202 and the peripheral device interface 1203 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1203 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1204, a display screen 1205, a camera assembly 1206, an audio circuit 12012 and a power supply 1208.

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

[0209] The radio frequency circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1204 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 1204 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 1204 can communicate with other terminals 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 WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1204 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.

[0210] The display screen 1205 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to collect touch signals on the surface or above the surface of the display screen 1205. The touch signal can be input to the processor 1201 as a control signal for processing. At this time, the display screen 1205 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 1205 can be one, set on the front panel of the terminal 1200; in other embodiments, the display screen 1205 can be at least two, respectively set on different surfaces of the terminal 1200 or in a folding design; in other embodiments, the display screen 1205 can be a flexible display screen, set on the curved surface or folding surface of the terminal 1200. Even, the display screen 1205 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1205 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0211] The camera assembly 1206 is used to capture images or videos. In some embodiments, the camera assembly 1206 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. 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 1206 may also include a flash. The flash may be a monochrome temperature flash or a dual-color temperature flash. A 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.

[0212] The audio circuit 12012 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 1201 for processing, or input them into the radio frequency circuit 1204 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 1200. 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 1201 or the radio frequency circuit 1204 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 1207 may also include a headphone jack.

[0213] The power supply 1208 is used to power various components in the terminal 1200. The power supply 1208 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1208 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.

[0214] In some embodiments, the terminal 1200 further includes one or more sensors 1209 . The one or more sensors 1209 include, but are not limited to: an acceleration sensor 1210 , a gyroscope sensor 1211 , a pressure sensor 1212 , an optical sensor 1213 , and a proximity sensor 1214 .

[0215] The acceleration sensor 1210 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1200. For example, the acceleration sensor 1210 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1201 can control the display screen 1205 to display the user page in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1210. The acceleration sensor 1210 can also be used for collecting game or user motion data.

[0216] The gyro sensor 1211 can detect the body direction and rotation angle of the terminal 1200, and the gyro sensor 1211 can cooperate with the acceleration sensor 1210 to collect the user's 3D actions on the terminal 1200. The processor 1201 can implement the following functions based on the data collected by the gyro sensor 1211: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0217] The pressure sensor 1212 can be set on the side frame of the terminal 1200 and / or the lower layer of the display screen 1205. When the pressure sensor 1212 is set on the side frame of the terminal 1200, it can detect the user's holding signal of the terminal 1200, and the processor 1201 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1212. When the pressure sensor 1212 is set on the lower layer of the display screen 1205, the processor 1201 controls the operability controls on the UI page according to the user's pressure operation on the display screen 1205. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0218] The optical sensor 1213 is used to collect the ambient light intensity. In one embodiment, the processor 1201 can control the display brightness of the display screen 1205 according to the ambient light intensity collected by the optical sensor 1213. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1205 is increased; when the ambient light intensity is low, the display brightness of the display screen 1205 is reduced. In another embodiment, the processor 1201 can also dynamically adjust the shooting parameters of the camera assembly 1206 according to the ambient light intensity collected by the optical sensor 1213.

[0219] The proximity sensor 1214, also called a distance sensor, is usually arranged on the front panel of the terminal 1200. The proximity sensor 1214 is used to collect the distance between the user and the front of the terminal 1200. In one embodiment, when the proximity sensor 1214 detects that the distance between the user and the front of the terminal 1200 is gradually decreasing, the processor 1201 controls the display screen 1205 to switch from the screen-on state to the screen-off state; when the proximity sensor 1214 detects that the distance between the user and the front of the terminal 1200 is gradually increasing, the processor 1201 controls the display screen 1205 to switch from the screen-off state to the screen-on state.

[0220] Those skilled in the art will understand that Fig.12 The structure shown in the figure does not constitute a limitation on the terminal 1200, and the terminal 1200 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.

[0221] In an exemplary embodiment, a computer-readable storage medium including a program code is also provided, such as a memory 1202 including the program code, and the program code can be executed by the processor 1201 of the terminal 1200 to complete the video playback method. Optionally, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0222] In an exemplary embodiment, a computer program product is also provided, comprising one or more instructions, wherein the one or more instructions are executed by one or more processors of an electronic device, so that the electronic device can execute the above-mentioned video playback method.

[0223] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.

[0224] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0225] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A video playback method, characterized in that: The method comprises: Displaying network abnormality information in the first video playback interface, wherein the network abnormality information is used to indicate that the network of the terminal does not meet the playback conditions; Playing the video based on the video cached in the cache space of the terminal; the video cached in the cache space of the terminal includes: a favorite video added to a favorites folder in response to a favorite operation performed on the video by the logged-in object on the terminal, a similar video selected from the videos to be played and having at least one attribute identical to the favorite video, and a video cached based on the cache operation of the logged-in object; The method further comprises: The occupancy rate of the cache space is detected. When the occupancy rate of the cache space is lower than a preset value, the favorite videos are cached first until the occupancy rate of the cache space reaches the preset value; if the occupancy rate of the cache space is still lower than the preset value after the favorite videos are cached, the similar videos are cached until the occupancy rate of the cache space reaches the preset value; when the occupancy rate of the cache space is higher than a preset threshold, the similar videos that have not been played within a preset time period are screened out from the cache space according to the playback time of the video, and the screened out similar videos are cleared from the cache space.

2. The video playback method according to claim 1, characterized in that: The video playing based on the video cached in the cache space of the terminal includes: Filtering at least one candidate video from the cached videos based on a video date condition; The at least one candidate video is sorted to determine a target video, and the target video is played.

3. The video playback method according to claim 2, characterized in that: The step of selecting at least one candidate video from the cached videos based on the video date condition comprises: Get the time when the last network exception occurred; Based on the occurrence time and the video date of each of the videos, at least one candidate video whose video date is after the occurrence time is screened out from the cached videos.

4. The video playback method according to claim 2, characterized in that: The sorting of the at least one candidate video to determine the target video comprises: The at least one candidate video is sorted based on at least one sorting condition of the number of play times and the completion rate, and the target video is determined based on the sorting result.

5. The video playback method according to claim 2, characterized in that: Playing the target video includes: Obtaining cache address information of the target video; Based on the cache address information of the target video, updating the video address stream, wherein the video address stream includes address information of multiple videos to be played; In response to the video playback function of the first video playback interface being triggered, the target video is played based on the updated video address stream.

6. The video playback method according to claim 5, characterized in that: The updating of the video address stream based on the cache address information of the target video includes any of the following methods: Inserting the cache address information of the target video after the address information of the currently playing video in the video address stream; Replacing the address information of the currently played video in the video address stream with the cache address information of the target video; Based on the cache address information of the target video, a new video address stream is generated to replace the video address stream.

7. The video playback method according to claim 5, characterized in that: The video playback function of the first video playback interface is triggered by any of the following: Detecting that a click operation is performed on a video playback control on the first video playback interface; Detecting that a sliding operation is performed on the first video playback interface on the first video playback interface; The duration that the network of the terminal does not meet the playback conditions reaches the target duration; The countdown on the video playback prompt bar on the first video playback interface ends.

8. The video playback method according to claim 5, characterized in that: In response to the video playback function of the first video playback interface being triggered, playing the target video based on the updated video address stream includes: In response to the video playback function of the first video playback interface being triggered, jumping from the first video playback interface to the second video playback interface; Based on the updated video address stream, the target video is played in the second video playback interface.

9. The video playback method according to claim 5, characterized in that: In response to the video playback function of the first video playback interface being triggered, playing the target video based on the updated video address stream includes: In response to the video playback function of the first video playback interface being triggered, the target video is played in the first video playback interface based on the updated video address stream.

10. The video playing method according to claim 8 or 9, characterized in that: The method further comprises: A video playback prompt bar is displayed in the first video playback interface, and the video playback prompt bar is used to prompt that the target video is about to be played.

11. The video playback method according to claim 10, characterized in that: The video playback prompt bar also includes a playback blocking control, and the playback blocking control is used to determine whether to play the target video.

12. The video playback method according to claim 11, characterized in that: The method further comprises: In response to a click operation on the playback prevention control, the target video is not played.

13. The video playback method according to claim 8, characterized in that: The method further comprises: In the second video playback interface, a playback source prompt bar is displayed, and the playback source prompt bar is used to prompt that the target video currently being played comes from the cache space.

14. The video playback method according to claim 10, characterized in that: The method further comprises: In response to a click operation on the video playback prompt bar, a list page is displayed in the first video playback interface, and the list page is used to display the target video.

15. The video playing method according to claim 13, characterized in that: The method further comprises: In response to a click operation on the playback source prompt bar, a list page is displayed in the second video playback interface, and the list page is used to display the target video.

16. The video playback method according to claim 14, characterized in that: Playing the target video in the first video playback interface includes: Based on the display order of the target videos on the list page, obtaining the target videos; In the first video playback interface, the target video is played.

17. The video playing method according to claim 14, characterized in that: Playing the target video in the first video playback interface includes: In response to a selection operation performed on any of the target videos displayed on the list page, obtaining the selected target video; In the first video playback interface, the selected target video is played.

18. The video playing method according to claim 14, characterized in that: The method further comprises: In response to a sequence switching operation performed on the target videos displayed on the list page, the play sequence of the target videos displayed on the list page is adjusted.

19. A video playback device, characterized in that: The device comprises: A network abnormality information display unit, configured to display network abnormality information in the first video playback interface, wherein the network abnormality information is used to indicate that the network of the terminal does not meet the playback conditions; The video playing unit is configured to play the video based on the video cached in the cache space of the terminal; the video cached in the cache space of the terminal includes: a favorite video added to a favorites folder in response to a favorite operation performed by a logged-in object on the terminal, a similar video selected from the videos to be played and having at least one attribute identical to the favorite video, and a video cached based on the cache operation of the logged-in object; The apparatus also includes a module configured to perform the following steps: The occupancy rate of the cache space is detected. When the occupancy rate of the cache space is lower than a preset value, the favorite videos are cached first until the occupancy rate of the cache space reaches the preset value; if the occupancy rate of the cache space is still lower than the preset value after the favorite videos are cached, the similar videos are cached until the occupancy rate of the cache space reaches the preset value; when the occupancy rate of the cache space is higher than a preset threshold, the similar videos that have not been played within a preset time period are screened out from the cache space according to the playback time of the video, and the screened out similar videos are cleared from the cache space.

20. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing program code executable by the processor; The processor is configured to execute the program code to implement the video playback method as described in any one of claims 1 to 18.

21. A computer-readable storage medium, characterized in that: When the program code in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device is enabled to execute the video playback method as claimed in any one of claims 1 to 18.

Citation Information

Patent Citations

  • Video playing method, device and terminal device

    CN107707969A

  • Short video playing method and device, equipment and storage medium

    CN114257870A