Video preloading method and device, electronic equipment and storage medium

By real-time identification and preloading of the first fragment of the target video during the video list sliding operation, the problem of slow video start-up speed is solved, and the user's viewing experience is significantly improved.

CN119094820AActive Publication Date: 2024-12-06BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 16 Cites 0 Cited by

Patent Information

Application Number
CN202411074061.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-06
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

The slow video start-up speed causes the user to increase the waiting time, affecting the viewing experience.

Method used

By real-time identification of the relevant information of the current video during the video list sliding operation, determining the target video and performing a preload task, the first shard of the target video is obtained so that it can quickly start broadcasting.

Benefits of technology

Reduces the waiting time for playing target videos and improves the user's viewing experience and fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094820A_ABST
    Figure CN119094820A_ABST
Patent Text Reader

Abstract

The invention provides a video preloading method and device, electronic equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of video playing. According to the specific implementation scheme, the method comprises the steps of identifying related information of one or more current videos in the video list displayed at the current moment under the condition that a sliding operation is started to be executed on the video list and the condition that the sliding operation is not finished on the video list is detected at the current moment; determining a target preloading task of a target video under the condition that the target video exists in the one or more current videos based on the related information of the one or more current videos; and under the condition that the target preloading task of the target video is executed successfully, obtaining a first fragment of the target video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The speed at which videos start playing is one of the key factors that affect the user's viewing experience. When a user slides through the video list in the display area to choose a video to watch, they often have to wait for the video to load before they can start watching. This increases the user's waiting time and directly affects the user's viewing experience. Therefore, how to improve the speed at which videos start playing becomes a problem that needs to be solved. Summary of the invention

[0003] The present disclosure provides a video preloading method, device, electronic device and storage medium.

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

[0005] When a sliding operation is started on the video list and no sliding operation is detected on the end of the video list at the current moment, identifying relevant information of one or more current videos in the video list displayed at the current moment;

[0006] In a case where it is determined that the target video exists in the one or more current videos based on the relevant information of the one or more current videos, determining a target preloading task for the target video;

[0007] When the target preloading task of the target video is successfully executed, the first segment of the target video is obtained.

[0008] According to a second aspect of the present disclosure, a video preloading device is provided, comprising:

[0009] An identification module, used for identifying relevant information of one or more current videos in the video list displayed at the current moment when a sliding operation is started on the video list and the end of the sliding operation on the video list is not detected at the current moment;

[0010] A task determination module, configured to determine a target preloading task for a target video when it is determined that there is a target video in one or more current videos based on relevant information of the one or more current videos;

[0011] The task execution module is used to obtain the first segment of the target video when the target preloading task of the target video is successfully executed.

[0012] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any embodiment of the present disclosure.

[0016] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute a method according to any embodiment of the present disclosure.

[0017] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements the aforementioned method when executed by a processor.

[0018] By adopting the above scheme, in the process of performing a sliding operation on the video list, the relevant information of one or more current videos displayed at the current moment can be identified in real time, and when the target video exists in one or more current videos, the target preloading task of the target video can be determined, and when the target preloading task of the target video is successfully executed, the first segment of the target video can be obtained. In this way, the first segment of the target video can be determined and loaded in real time in combination with the sliding operation on the video list, thereby ensuring that when the target video needs to be played later, the first segment of the target video can be quickly started, reducing the waiting time for playing the target video, and greatly improving the user's viewing experience.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0021] Figure 1 is a flow chart of a video preloading method according to an embodiment of the present disclosure;

[0022] Figure 2 is another flowchart of a video preloading method according to an embodiment of the present disclosure;

[0023] Figure 3 is a schematic diagram of a composition structure of a video preloading device according to an embodiment of the present disclosure;

[0024] Figure 4It is a block diagram of an electronic device used to implement the video preloading method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0026] The first aspect of the present disclosure provides a video preloading method, such as Figure 1 As shown, including:

[0027] S101: When a sliding operation starts to be performed on a video list and the end of the sliding operation on the video list is not detected at the current moment, identifying relevant information of one or more current videos in the video list displayed at the current moment;

[0028] S102: When it is determined based on the relevant information of the one or more current videos that a target video exists in the one or more current videos, determining a target preloading task for the target video;

[0029] S103: When the target preloading task of the target video is successfully executed, the first segment of the target video is obtained.

[0030] The video preloading method provided in this embodiment can be applied to an electronic device, which can be a terminal. For example, the terminal can have at least one of a playback capability, a networking capability, and a processing capability, for example, the terminal can be any one of a laptop, a smart phone, a personal computer, a smart TV, etc., and all possible types of terminals are not limited or enumerated here.

[0031] By adopting the above scheme, in the process of performing a sliding operation on the video list, the relevant information of one or more current videos displayed at the current moment can be identified in real time, and when the target video exists in one or more current videos, the target preloading task of the target video can be determined, and when the target preloading task of the target video is successfully executed, the first segment of the target video can be obtained. In this way, the first segment of the target video can be determined and loaded in real time in combination with the sliding operation on the video list, thereby ensuring that when the target video needs to be played later, the first segment of the target video can be quickly started, reducing the waiting time for playing the target video, and greatly improving the user's viewing experience.

[0032] In some embodiments, in a case where a sliding operation is started on a video list and no sliding operation is detected for the end of the video list at the current moment, identifying relevant information of one or more current videos in the video list displayed at the current moment may refer to: starting from the first moment when the sliding operation is detected for the start of the video list, determining in real time whether a sliding operation is detected for the end of the video list at the current moment; and in a case where it is determined that no sliding operation is detected for the end of the video list at the current moment, identifying relevant information of one or more current videos in the video list displayed at the current moment.

[0033] The method for determining whether to start a sliding operation on the video list may be: determining whether the video list is displayed in the display area; if the video list is displayed in the display area, detecting in real time whether a first event is monitored; if the first event is monitored, determining to start a sliding operation on the video list.

[0034] The first event may refer to calling a first statement or a first method, and the first statement or the first method may be configured according to actual conditions. For example, the first statement may be a "WillBeginDragging (start dragging)" method or statement, and the first event may refer to monitoring the call to "WillBeginDragging", and "WillBeginDragging" may be called when the user starts dragging the "UIScrollView (scrolling view)", so whether to start the sliding operation on the video list can be determined by monitoring whether there is a first event that calls the first statement.

[0035] The display area may refer to an area within the terminal screen used for display, that is, an area where a user can directly observe or see multimedia information through the terminal screen. The types of multimedia information may include: text, image, video, etc., which are not limited here.

[0036] In addition, the method may further include: if the video list is not displayed in the display area, or the first event is not monitored, determining that the sliding operation on the video list has not started.

[0037] Starting from the first moment when the sliding operation on the video list is detected, determining in real time whether the end of the sliding operation on the video list is detected at the current moment may mean: starting from the first moment when the sliding operation on the video list is detected, determining in real time whether a second event is monitored at the current moment; if the second event is not monitored, determining that the end of the sliding operation on the video list is not detected at the current moment.

[0038] The current moment is different from the first moment, and the current moment is later than the first moment.

[0039] The second event may refer to calling a second statement or a second method, which may be configured according to actual conditions. For example, the second statement or the second method may include at least one of the following: WillEndDragging (drag is about to end), DidEndDragging (drag ends), DidEndDecelerating (deceleration ends).

[0040] In addition, the method may further include: if a second event is monitored, determining that the sliding operation on the video list is finished at the current moment, and ending the processing.

[0041] Identifying the relevant information of one or more current videos in the video list displayed at the current moment may include: identifying the relevant information of each current video in the one or more current videos in the video list displayed in the display area at the current moment.

[0042] It should be understood that the video list may include relevant information of each video in multiple videos, but at the current moment, the display area may only display relevant information of some videos in all the videos included in the video list. Therefore, it is necessary to identify the relevant information of each current video in one or more current videos displayed in the display area at the current moment.

[0043] The relevant information of any video in the video list may include at least one of the name of the video, the title of the video, the thumbnail of the video, the introduction of the video, the unique identifier of the video, etc. It should be understood that this is only an exemplary description of the relevant information of the video. In actual processing, the relevant information of the video may include other content, but this embodiment does not limit or exhaustively list it.

[0044] In this way, by detecting in real time whether a sliding operation is performed on the start of the video list and detecting in real time whether a sliding operation is performed on the end of the video list, the timing of prefetching the target video and loading the first segment of the target video can be controlled during the execution of the sliding operation, thereby avoiding the problems of occupying storage resources and processing resources caused by too frequent video preloading, and can also ensure that the final loaded video is more in line with user requirements, thereby improving the hit rate of video preloading.

[0045] In one embodiment, when it is determined that there is a target video in the one or more current videos based on the relevant information of the one or more current videos, determining the target preloading task of the target video includes: when it is determined that there is a candidate video in the one or more current videos that is different from the one or more historical videos based on the relevant information of one or more historical videos in the video list displayed at the previous moment and the relevant information of the one or more current videos, determining the candidate video as the target video, and determining the target preloading task of the target video in the preloading task queue.

[0046] The previous moment may be the first moment, or the previous moment may be later than the first moment. The time interval between two adjacent moments may be configured according to actual conditions, for example, the time interval may be 10ms, 100ms, 200ms, or longer or shorter, and all possible values ​​of the time interval are not limited here.

[0047] The relevant information of the one or more historical videos in the video list displayed at the last moment may be: relevant information of each historical video in the one or more historical videos in the video list displayed at the last moment in the display area.

[0048] Based on the relevant information of one or more historical videos in the video list displayed at the last moment and the relevant information of the one or more current videos, a method for judging whether there is a candidate video different from the one or more historical videos in the one or more current videos may include: judging whether the relevant information of the i-th current video is the same as the relevant information of each historical video in the one or more historical videos in the video list displayed at the last moment; if the relevant information of the i-th current video is the same as the relevant information of any one of the one or more historical videos in the video list displayed at the last moment, then it is determined that the i-th current video is not a candidate video; if the relevant information of the i-th current video is different from the relevant information of each of the one or more historical videos in the video list displayed at the last moment, then it is determined that the i-th current video is a candidate video different from the one or more historical videos, wherein i is an integer greater than or equal to 1, and the i-th current video is any one of the one or more current videos. Since the processing of each current video in the one or more current videos is the same as the i-th current video, it will not be described one by one.

[0049] It should be understood that when the time interval between two adjacent moments is small enough, there may be and only one candidate video that is different from the one or more historical videos in the one or more current videos, so the one candidate video can be directly determined as the target video, and the target preloading task of the target video can be determined in the preloading task queue. The target video determined after such processing specifically refers to the target video at the current moment, that is, the video (or video file) that appears most recently in the user's field of view at the current moment.

[0050] For example, assuming that the relevant information of the three current videos in the video list displayed at the current moment are the name of video A, the name of video B and the name of video C; the relevant information of the three historical videos in the video list displayed at the previous moment are the name of video B, the name of video C and the name of video D; by comparing the relevant information of one or more historical videos in the video list displayed at the previous moment with the relevant information of the one or more current videos, it can be determined that video A is different from the three historical videos. At this time, video A can be determined as a candidate video, and then video A is determined as the target video at the current moment, that is, the video that has most recently appeared in the user's field of view.

[0051] In some other possible examples, when the time interval between two adjacent moments is not small enough, there may be multiple candidate videos in the one or more current videos that are different from the one or more historical videos. In this case, the multiple candidate videos can be used as multiple target videos at the current moment. Further, the subsequent processing of each target video at the current moment should be similar to the subsequent processing of one target video at the current moment. Therefore, the following mainly describes the subsequent related processing of determining a target video at the current moment, and no longer elaborates on the subsequent related processing of each target video in the multiple target videos at the current moment.

[0052] In this way, by comparing the relevant information of the current video with the historical video, the video different from the historical video can be accurately identified. This ensures that the preloading task is for the video that is most recently displayed in the display area based on the sliding operation, thereby improving the accuracy and effectiveness of video preloading.

[0053] In one embodiment, determining a target preloading task for a target video in a preloading task queue includes: creating a target preloading task for the target video if the preloading task queue does not contain the target preloading task for the target video, adding the target preloading task for the target video in the preloading task queue, and setting the target preloading task for the target video to the highest priority in the preloading task queue.

[0054] The maximum queue length of the preload task queue can be set according to actual conditions. The maximum queue length is an integer greater than or equal to 1, such as 4, 10, or larger or smaller. All possible values ​​of the maximum queue length are not limited or enumerated here.

[0055] The number of preloading tasks for preloading videos included in the preloading task queue may be less than or equal to the maximum queue length of the preloading task queue.

[0056] In this embodiment, the target video refers to the target video at the current moment.

[0057] Specifically, the preloading task queue may include the preloading task of each preloading video in one or more preloading videos and the priority of the preloading task of each preloading video. In addition, each preloading video in the preloading task queue may be identified by the unique identifier of the preloading video, for example, the unique identifier of each preloading video in the preloading task queue has a corresponding relationship or association relationship with the preloading task of the preloading video, and / or the unique identifier of each preloading video has a corresponding relationship or association relationship with the priority of the preloading task of the preloading video.

[0058] The method for determining whether the preloading task queue contains the target preloading task of the target video may include: determining whether the unique identifier of each preloading video contained in the preloading task queue is the same as the unique identifier of the target video; if the unique identifier of each preloading video contained in the preloading task queue is different from the unique identifier of the target video, determining that the preloading task queue does not contain the target preloading task of the target video; if there is any preloading video in the preloading task queue whose unique identifier is the same as the unique identifier of the target video, determining that the preloading task queue contains the target preloading task of the target video.

[0059] Adding the target preloading task of the target video in the preloading task queue and setting the target preloading task of the target video as the highest priority in the preloading task queue may include: judging whether the number of preloading tasks contained in the preloading task queue reaches the maximum queue length of the preloading task queue; if the maximum queue length of the preloading task queue is not reached, adding the target preloading task of the target video in the preloading task queue, setting the target preloading task of the target video as the highest priority in the preloading task queue, and reducing the priority of the preloading tasks of the preloading videos other than the target preloading task of the target video in the preloading task queue; if the maximum queue length of the preloading task queue is reached, adding the target preloading task of the target video in the preloading task queue, setting the target preloading task of the target video as the highest priority in the preloading task queue, removing a preloading task with the lowest priority in the preloading task queue, and reducing the priority of the preloading tasks of the remaining preloading videos other than the target preloading task of the target video in the preloading task queue. Here, priority reduction may refer to reducing the priority by one or more levels, which is not limited in this embodiment.

[0060] Wherein, adding the target preloading task of the target video in the preloading task queue may include: adding the target preloading task of the target video in the preloading task queue, and associating the target preloading task of the target video with the unique identifier of the target video in the preloading task queue. It should be understood that after the target preloading task of the target video is added to the preloading task queue, the target video may also be referred to as or used as a preloading video in the preloading task queue.

[0061] The priority of the preloading task of any preloading video in the preloading task queue determines the order in which the preloading tasks are executed; setting the target preloading task of the target video to the highest priority in the preloading task queue means that the execution order of the target preloading task of the target video in the preloading task queue is the first or is superior to other unexecuted preloading videos in the preloading task queue. Furthermore, setting the target preloading task of the target video to the highest priority in the preloading task queue means that one or more preloading tasks set to the highest priority will be arranged at the front of the preloading task queue. If there is a preloading task currently being executed, the preloading task with the highest priority in the preloading task queue (i.e., the unexecuted preloading task with the highest priority) will be executed immediately after the execution of the preloading task being executed.

[0062] For example, by comparing the unique identifier of the historical video with the unique identifier of the current video, video A is determined to be the target video in the current video, and the unique identifier of video A is compared with the unique identifier of the video corresponding to each preloading task in one or more preloading tasks in the preloading task queue, and it is identified that video A is different from the video corresponding to each preloading task in one or more preloading tasks in the preloading task queue, that is, there is no target preloading task for video A in the preloading task queue. At this time, a target preloading task for video A is created, the target preloading task of video A is added to the preloading task queue, the unique identifier of video A is associated with the target preloading task of video A, and the priority of the target preloading task of video A is set to the highest priority.

[0063] By adopting the above scheme, when the preloading task queue does not contain the preloading task of the target video, the target preloading task of the target video can be created in time and added to the preloading task queue, and the priority of the target preloading task of the target video can be set to the highest priority, thereby ensuring that the videos that have newly appeared in the display area but have not been preloaded are loaded first, thereby improving the response speed of subsequent playback requests for the target video, reducing the waiting time of users before watching the target video, and improving the viewing fluency and experience.

[0064] In one embodiment, the aforementioned determining the target preloading task of the target video in the preloading task queue includes: when the preloading task queue includes the target preloading task of the target video and the priority of the target preloading task of the target video is not the highest priority, adjusting the priority of the target preloading task of the target video in the preloading task queue to the highest priority.

[0065] In this embodiment, the target video also refers to the target video at the current moment. Specifically, the process of determining the target preloading task of the target video in the preloading task queue may include: judging whether the target preloading task of the target video is contained in the preloading task queue; if the target preloading task of the target video is not contained in the preloading task queue, creating the target preloading task of the target video, adding the target preloading task of the target video in the preloading task queue, and setting the target preloading task of the target video to the highest priority in the preloading task queue; if the target preloading task of the target video is contained in the preloading task queue, judging whether the priority of the target preloading task of the target video in the preloading task queue is the highest priority; if the priority of the target preloading task of the target video is not the highest priority, setting the target preloading task of the target video to the highest priority in the preloading task queue.

[0066] In addition, it may also include: when the priority of the target preloading task of the target video is the highest priority, no processing is performed; and / or, when the target preloading task of the target video has entered the download process or is being loaded, keep downloading or loading the target preloading task of the target video.

[0067] The relevant description about the preloading task queue and the method of judging whether the preloading task queue contains the target preloading task of the target video are the same as those in the above-mentioned embodiment and will not be repeated.

[0068] In this embodiment, setting the target preloading task of the target video as the highest priority in the preloading task queue may include: determining one or more preloading tasks to be adjusted in the preloading task queue whose initial priority is higher than the priority of the target preloading task of the target video, setting the priority of the target preloading task of the target video as the highest priority in the preloading task queue, and lowering the priority of the one or more preloading tasks to be adjusted in the preloading task queue.

[0069] For example, by comparing the unique identifier of the historical video with the unique identifier of the current video, video A is determined to be the target video in the current video, and the unique identifier of video A is compared with the unique identifier of the video corresponding to each preloading task in one or more preloading tasks in the preloading task queue, and it is identified that the video corresponding to one of the one or more preloading tasks in the preloading task queue is the same as video A, that is, the preloading task queue contains a target preloading task for video A. At this time, if the priority of the target preloading task of video A is not the highest priority, the priority of the target preloading task of video A in the preloading task queue is adjusted to the highest priority.

[0070] The target preloading task queue contains a target video, which means that the target video is repeatedly displayed in the display area based on the sliding operation, so it can be predicted that the target video may be a video that the user is interested in. If the priority of the target preloading task of the target video is not the highest priority, the priority of the target preloading task of the target video in the preloading task queue is adjusted to the highest priority, which can ensure that the video that the user is interested in is loaded first, so that the execution of the preloading task in the preloading task queue meets the actual playback needs of the user.

[0071] Furthermore, by using a priority queue (a preloading task queue with task priority set) to manage each preloading task, the priority of the prefetch task (target preloading task) of the video file that has recently appeared in the user's field of view, i.e., the target video at the current moment, can be set as the highest priority download, and the highest priority prefetch task can be adjusted in real time and dynamically as the user slides through the list, that is, in the preloading task queue, the target preloading task of the target video at the current moment always has the highest priority during the user's sliding operation. In this way, the download of the video data in the user's field of view can be guaranteed to the greatest extent, and the video preloading hit rate can be improved.

[0072] In addition, in the above scheme, an elimination strategy is also set. By setting the maximum queue length of the preloading task queue, it is ensured that when the number of preloading tasks entering the preloading task queue is greater than the maximum limit of the maximum queue length, the preloading task with the lowest priority will be eliminated and the target preloading task of the latest target video at the current moment will be added.

[0073] Moreover, the direction of the user's sliding operation is uncontrollable. During a sliding operation, the user may determine the target video at each moment in multiple moments, thereby triggering the execution logic of the target preloading task of the target video at each moment multiple times. In this way, the same preloading task for the same video may exist at different moments. By judging whether the preloading task queue contains the target preloading task for the target video at the current moment, a filtering mechanism can be added to prevent the phenomenon of adding the same preloading task for the same video multiple times in the preloading task queue, thereby improving data prefetching efficiency.

[0074] After determining the target preloading task of the target video in the preloading task queue, the method further includes: executing the target preloading task of the target video when the priority of the target preloading task of the target video in the preloading task queue is the highest priority and no other preloading task is being executed.

[0075] Since after the sliding operation starts to be performed on the video list, it is continuously judged at the current moment whether the sliding operation on the video list is detected to be finished, and based on the relevant information of the one or more current videos, it is judged whether there is a target video in the one or more current videos, and so on, until the sliding operation on the video list is detected to be finished, therefore, there will be corresponding target videos in multiple current moments, and at each current moment where there is a target video, the target preloading task of the target video at the current moment will be determined in the preloading task queue, and the target preloading task of the target video at the current moment will be set to the highest priority. It should be understood that there is a relative order between different current moments. Assuming that the target video A is determined at moment A, the target preloading task A of the target video A at moment A is determined in the preloading task queue, and the target preloading task A is set to the highest priority; and at moment B later than moment A, a new target video B is determined. At this time, the target preloading task B of the target video B at moment B will be determined in the preloading task queue, and the target preloading task B will be set to the highest priority, and the priority of the target preloading task A will be reduced, and so on.

[0076] In this embodiment, the target preloading task of the target video in the preloading task queue is the highest priority, which may refer to: the target preloading task of the target video at the current moment in the preloading task queue is the highest priority. Specifically, when the priority of the target preloading task of the target video in the preloading task queue is the highest priority and no other preloading tasks are being executed, the target preloading task of the target video is executed, which may be: judging whether there are other preloading tasks being executed at the current moment, and when no other preloading tasks are being executed at the current moment, extracting the preloading task with the highest priority at the current moment from the preloading task queue, and executing the preloading task with the highest priority at the current moment, wherein the preloading task with the highest priority at the current moment is the target preloading task of the target video at the current moment.

[0077] For example, by comparing the unique identifier of the historical video with the unique identifier of the current video, video A is determined in the current video, and the unique identifier of video A is compared with the unique identifier of the video corresponding to each of the one or more preloading tasks in the preloading task queue, and it is recognized that video A is different from the video corresponding to each of the one or more preloading tasks in the preloading task queue, that is, there is no target preloading task of video A in the preloading task queue. At this time, a target preloading task of video A is created in the preloading queue, and the priority of the target preloading task of video A is set to the highest priority. When no other preloading tasks are being executed in the preloading task queue, the target preloading task of video A with the highest priority is executed.

[0078] In addition, after determining the target preloading task of the target video in the preloading task queue, it also includes: when other preloading tasks are being executed at the current moment, detecting whether other preloading tasks are completed; at a second moment when determining whether the execution of other preloading tasks is successful or failed, extracting the preloading task with the highest priority at the second moment from the preloading task queue, and executing the preloading task with the highest priority at the second moment.

[0079] By adopting the above solution, the target preloading task with the highest priority is executed preferentially in the preloading task queue, which can ensure that the newly added videos in the display area that are not preloaded are downloaded preferentially, and the videos that the user may watch in the current display area can be loaded in advance more effectively, thereby achieving a quick response to the user's potential playback needs, making the preloading of the video more in line with the user's actual needs.

[0080] In one embodiment, the method may also include one of the following: when the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video has not reached a maximum number of times, lowering the priority of the target preloading task of the target video in the preloading task queue; when the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video reaches a maximum number of times, removing the target preloading task of the target video from the preloading task queue.

[0081] The above target preloading task execution failure (or pre-fetch failure) may be caused by reasons other than the non-existence of data, such as network, and this embodiment does not limit the specific reasons.

[0082] The maximum number of times may be pre-configured according to actual conditions or actual requirements. For example, the maximum number of times may be 1 time, or 2 times, or larger or smaller, and all possible values ​​of the maximum number of times are not limited or exhaustive.

[0083] Among them, when the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video has not reached the maximum number of times, the priority of the target preloading task of the target video is lowered in the preloading task queue. It can be: when the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video has not reached the maximum number of times, based on the demotion rule, the priority of the target preloading task of the target video is lowered in the preloading task queue, and the number of executions of the target preloading task is recorded.

[0084] The demotion rule may be preconfigured, and the demotion rule may include: reducing the priority of the failed preloading task to the lowest level and placing it at the end of the preloading task queue; or, degrading the failed preloading task according to a fixed level. For example, if the original target preloading task is the highest priority (level 1), when the target preloading task fails to execute and the number of executions of the target preloading task does not reach the maximum number of executions, the priority of the target preloading task may be reduced to level 2, or level 3, or to the lowest level.

[0085] For example, the maximum number of times can be preconfigured to 3, and the downgrade rule can be preconfigured to reduce the priority of the target preloading task that failed to execute to the lowest level. If the target preloading task fails to execute, the number of times the target preloading task failed to execute is recorded, and it is determined whether the number of times the target preloading task failed to execute is equal to 3. If the number of times the target preloading task failed to execute is less than 3, the priority of the target preloading task is reduced to the lowest level, but it is retained in the queue for subsequent reloading. At this time, the next highest priority preloading task in the preloading task queue is executed; if the number of times the target preloading task failed to execute reaches 3 times, the target preloading task is completely removed from the preloading task queue to release related resources.

[0086] It should be noted that the processing of failure to execute other preloading tasks in the preloading task queue is the same as the processing of failure to execute the target preloading task, which will not be described in detail here.

[0087] In this way, by timely adjusting the priority of the target preloading task that failed to execute, the target preloading task can be retained while reducing its occupation of system resources, making way for other preloading tasks in the preloading task queue. By removing the target preloading task that has reached the maximum number of execution times in the preloading task queue, resources can be prevented from being continuously occupied by invalid or inefficient target preloading tasks, thereby improving the resource utilization efficiency of the overall system.

[0088] In some embodiments, when the target preloading task of the target video is successfully executed, the first segment of the target video is obtained, which may include: when the target preloading task of the target video is successfully executed, the first segment of the target video is obtained, and the first segment of the target video is saved at the target cache location.

[0089] The target cache location can be configured according to actual conditions, and preferably, the target cache location can be a related cache directory used by a playback SDK (Software Development Kit), that is, the location of the first segment of the cached target video and the related cache directory reused by the playback SDK used to play the target video.

[0090] Here, the playback SDK used to play the target video refers to the playback SDK used by the video application or video software. The video application or video software is a video application or video software running or installed on the terminal side, and further, the video application or video software can be a video application or video software that displays a video list for the user.

[0091] In addition, saving the first segment of the target video at the target cache location can be as follows: saving the first segment of the target video at the target cache location, and establishing a mapping relationship between the first segment of the target video and the relevant information of the target video. In addition to being used to identify the first segment of the target video, the relevant information of the target video can also establish a mapping relationship between the first segment of the target video and the online target video, so that when the user selects or clicks to play the target video through the video application or video software on the terminal side, the first segment of the target video can be directly played when the first segment of the target video is already saved locally through the relevant information of the target video, and the remaining content of the target video can be downloaded online at the same time, so that the target video can be opened in seconds.

[0092] In this way, by placing the first segment of the target video in the same relevant cache directory of the playback SDK used by the video application or video software, the problem of reduced acquisition efficiency caused by the video application or video software repeatedly pulling the first segment of the target video through the playback SDK when playing the target video can be avoided; further, this can also establish a mapping relationship between the first segment of the locally pre-acquired video and the online video.

[0093] Combine the following Figure 2 The solution provided in this embodiment is exemplified as follows:

[0094] S201: When a sliding operation starts to be performed on a video list and the end of the sliding operation on the video list is not detected at the current moment, identifying relevant information of one or more current videos in the video list displayed at the current moment.

[0095] S202: Based on the relevant information of the one or more current videos, determine whether there is a target video in the one or more current videos. If there is a target video, execute S203; if there is no target video, return to execute S201.

[0096] S203: Determine whether the preloading task queue contains the target preloading task of the target video. If the preloading task queue contains the target preloading task of the target video, execute S204; if the preloading task queue does not contain the target preloading task of the target video, execute S205.

[0097] In addition, the method may further include: if the target preloading task of the target video in the preloading task queue has entered the download process, then the target preloading task of downloading the target video is kept executed. In this case, the method may return to execute S201.

[0098] S204: Determine whether the priority of the target preloading task of the target video is the highest priority. If the priority of the target preloading task of the target video is the highest priority, execute S207; if the priority of the target preloading task of the target video is not the highest priority, execute S206.

[0099] S205: Create a target preloading task for the target video in the preloading queue, set the priority of the target preloading task for the target video to the highest priority, and then execute S207.

[0100] Here, the processing of S205 may specifically include: determining whether the number of preloading tasks contained in the preloading task queue reaches the maximum queue length of the preloading task queue; if the maximum queue length of the preloading task queue is not reached, creating a target preloading task for the target video in the preloading queue, setting the priority of the target preloading task for the target video to the highest priority, lowering the priority of the preloading tasks for the preloading videos in the preloading task queue except the target preloading task for the target video, and then executing S207; if the maximum queue length of the preloading task queue is reached, creating a target preloading task for the target video in the preloading queue, setting the priority of the target preloading task for the target video to the highest priority, removing a preloading task with the lowest priority in the preloading task queue, lowering the priority of the preloading tasks for the remaining preloading videos in the preloading task queue except the target preloading task for the target video, and then executing S207.

[0101] S206: Adjust the priority of the target preloading task of the target video to the highest priority.

[0102] The above processing of S201 to S206 is repeatedly executed at each current moment, and will not be repeated here.

[0103] Further, at each current moment, the following processing of S207 to S211 is repeatedly performed for the preload task queue, specifically including:

[0104] S207: Execute the preloading task with the highest priority in the preloading task queue.

[0105] S208: Determine whether the preloading task is executed successfully. If the preloading task is executed successfully, return to execute S207; if the preloading task fails to execute, execute S209.

[0106] S209: Determine whether the execution times of the failed preloading task have reached the maximum times. If so, execute S210; if not, execute S211.

[0107] S210: Remove the preloading task that failed to execute from the preloading task queue, and return to execute S207.

[0108] S211: Downgrade the preloading task that failed to execute, and return to execute S207.

[0109] The present disclosure also provides a video preloading device, such as Figure 3 As shown, including:

[0110] An identification module 301 is used to identify relevant information of one or more current videos in the video list displayed at the current moment when a sliding operation is started on the video list and the end of the sliding operation on the video list is not detected at the current moment;

[0111] A task determination module 302, configured to determine a target preloading task for a target video when it is determined that there is a target video in one or more current videos based on relevant information of the one or more current videos;

[0112] The task execution module 303 is used to obtain the first segment of the target video when the target preloading task of the target video is successfully executed.

[0113] In one embodiment, the task determination module 302 is used to determine that there is a candidate video different from one or more historical videos in one or more current videos based on relevant information of one or more historical videos in a video list displayed at the previous moment and relevant information of one or more current videos, determine the candidate video as the target video, and determine the target preloading task of the target video in the preloading task queue.

[0114] In one embodiment, the task determination module 302 is used to create a target preloading task for the target video when the preloading task queue does not contain the target preloading task for the target video, add the target preloading task for the target video to the preloading task queue, and set the target preloading task for the target video to the highest priority in the preloading task queue.

[0115] In one embodiment, the task determination module 302 is used to set the target preloading task of the target video to the highest priority in the preloading task queue when the preloading task queue contains the target preloading task of the target video and the priority of the target preloading task of the target video is not the highest priority.

[0116] In one implementation, the task execution module 303 is used to execute the target preloading task of the target video when the target preloading task of the target video in the preloading task queue has the highest priority and no other preloading tasks are being executed.

[0117] In one embodiment, the task execution module 303 is also used for one of the following: when the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video has not reached a maximum number of times, lowering the priority of the target preloading task of the target video in the preloading task queue; when the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video has reached a maximum number of times, removing the target preloading task of the target video from the preloading task queue.

[0118] By adopting the above scheme, in the process of performing a sliding operation on the video list, the relevant information of one or more current videos displayed at the current moment can be identified in real time, and when the target video exists in one or more current videos, the target preloading task of the target video can be determined, and when the target preloading task of the target video is successfully executed, the first segment of the target video can be obtained. In this way, the first segment of the target video can be determined and loaded in real time in combination with the sliding operation on the video list, thereby ensuring that when the target video needs to be played later, the first segment of the target video can be quickly started, reducing the waiting time for playing the target video, and greatly improving the user's viewing experience.

[0119] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0120] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0121] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0122] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0123] like Figure 4 As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0124] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0125] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as the video preloading method. For example, in some embodiments, the video preloading method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the video preloading method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the video preloading method in any other appropriate manner (e.g., by means of firmware).

[0126] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0127] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0128] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0129] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0130] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0131] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0132] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0133] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A video preloading method, comprising: In a case where a sliding operation is started on the video list and the end of the sliding operation on the video list is not detected at the current moment, identifying relevant information of one or more current videos in the video list displayed at the current moment; In a case where it is determined that there is a target video in the one or more current videos based on the relevant information of the one or more current videos, determining a target preloading task for the target video; When the target preloading task of the target video is successfully executed, the first segment of the target video is obtained.

2. The method according to claim 1, wherein: The step of determining a target preloading task for the target video when it is determined based on the relevant information of the one or more current videos that the target video exists in the one or more current videos comprises: When it is determined that there is a candidate video in the one or more current videos that is different from the one or more historical videos based on the relevant information of one or more historical videos in the video list displayed at the previous moment and the relevant information of the one or more current videos, the candidate video is determined to be the target video, and a target preloading task for the target video is determined in the preloading task queue.

3. The method according to claim 2, wherein: The step of determining the target preloading task of the target video in the preloading task queue includes: When the preloading task queue does not contain the target preloading task of the target video, create a target preloading task for the target video, add the target preloading task for the target video to the preloading task queue, and set the target preloading task for the target video to the highest priority in the preloading task queue.

4. The method according to claim 2, wherein: The step of determining the target preloading task of the target video in the preloading task queue includes: When the preloading task queue includes the target preloading task of the target video and the priority of the target preloading task of the target video is not the highest priority, the target preloading task of the target video is set to the highest priority in the preloading task queue.

5. The method according to claim 3 or 4, wherein: After determining the target preloading task of the target video in the preloading task queue, the method further includes: When the target preloading task of the target video in the preloading task queue has the highest priority and no other preloading tasks are being executed, the target preloading task of the target video is executed.

6. The method according to any one of claims 2 to 4, further comprising one of the following: When the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video has not reached a maximum number of times, lowering the priority of the target preloading task of the target video in the preloading task queue; When the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video reaches the maximum number, the target preloading task of the target video is removed from the preloading task queue.

7. A video preloading device, comprising: an identification module, configured to identify relevant information of one or more current videos in the video list displayed at the current moment when a sliding operation starts to be performed on the video list and the end of the sliding operation on the video list is not detected at the current moment; A task determination module, configured to determine a target preloading task for the target video when it is determined that there is a target video in the one or more current videos based on the relevant information of the one or more current videos; The task execution module is used to obtain the first segment of the target video when the target preloading task of the target video is successfully executed.

8. The device according to claim 7, wherein: The task determination module is used to determine that there is a candidate video in the one or more current videos that is different from the one or more historical videos based on the relevant information of one or more historical videos in the video list displayed at the previous moment and the relevant information of the one or more current videos, determine the candidate video as the target video, and determine the target preloading task of the target video in the preloading task queue.

9. The device according to claim 8, wherein: The task determination module is used to create a target preloading task for the target video if the preloading task queue does not contain the target preloading task for the target video, add the target preloading task for the target video to the preloading task queue, and set the target preloading task for the target video to the highest priority in the preloading task queue.

10. The device according to claim 8, wherein: The task determination module is used to set the target preloading task of the target video to the highest priority in the preloading task queue when the preloading task queue contains the target preloading task of the target video and the priority of the target preloading task of the target video is not the highest priority.

11. The device according to claim 9 or 10, wherein: The task execution module is used to execute the target preloading task of the target video when the target preloading task of the target video in the preloading task queue has the highest priority and no other preloading tasks are being executed.

12. The device according to any one of claims 8 to 10, wherein: The task execution module is used to execute one of the following: When the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video has not reached a maximum number of times, lowering the priority of the target preloading task of the target video in the preloading task queue; When the target preloading task of the target video fails to be executed and the number of executions of the target preloading task of the target video reaches the maximum number, the target preloading task of the target video is removed from the preloading task queue.

13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

15. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Storage system condition indicator and method

    CN101095115A

  • Video preloading method and device, video player, and electronic device

    CN107241639A

  • Audio and video preloading method and device, equipment and storage medium

    CN107888981A

  • Streaming media video preloading method and device, electronic equipment and storage medium

    CN114666627A

  • Video playing method and device, computer equipment and storage medium

    CN115174987A