CN115499697B - Video carousel switching method and terminal - Google Patents

Video carousel switching method and terminal Download PDF

Info

Publication number
CN115499697B
CN115499697B CN202110671546.XA CN202110671546A CN115499697B CN 115499697 B CN115499697 B CN 115499697B CN 202110671546 A CN202110671546 A CN 202110671546A CN 115499697 B CN115499697 B CN 115499697B
Authority
CN
China
Prior art keywords
node
video
sliding
nodes
preset number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110671546.XA
Other languages
Chinese (zh)
Other versions
CN115499697A (en
Inventor
刘德建
林琛
陈波
洪曙鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianyi Network Technology Co ltd
Original Assignee
Fujian Tianyi Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Tianyi Network Technology Co ltd filed Critical Fujian Tianyi Network Technology Co ltd
Priority to CN202110671546.XA priority Critical patent/CN115499697B/en
Publication of CN115499697A publication Critical patent/CN115499697A/en
Application granted granted Critical
Publication of CN115499697B publication Critical patent/CN115499697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a video carousel switching method and a terminal, wherein a first preset number of video nodes and a second preset number of node containers are preset, video nodes are sequentially added in the node containers, and node videos corresponding to the video nodes are loaded and sequentially played; by limiting the number of node containers and dynamically replacing the nodes in the node containers, the video content in the node containers can be circularly played through the node containers, node objects do not need to be frequently created and recovered, video playing smoothness is improved, and the video content of the latest historical node can be conveniently and quickly viewed; after the first preset number of video nodes are loaded and played, the next batch of video nodes are obtained according to the first preset number, so that all resources of video to be carousel are not required to be stored in the memory space, the condition that the video carousel is blocked due to the fact that too much memory space is occupied is avoided, and the smoothness of video carousel is improved.

Description

Video carousel switching method and terminal
Technical Field
The present invention relates to the field of information technologies, and in particular, to a video carousel switching method and a terminal.
Background
In current video applications, many video resources often need to be preloaded and smooth scrolling in toggling in order for the video to play continuously or for the user to slide through the video indefinitely. If all the needed resources are loaded at one time, the application may be blocked or flash backed due to large memory occupation. Some applications will then only load the video that is currently needed to be played and remove the last video played when switching to the next video.
This solution has several drawbacks:
first, there is a stuck phenomenon during video switching: for example, each time the user starts playing a video or switches to the next video, the user needs to reload the video object and recreate the instance object, and if the network is not good enough, the situation that the video loading needs a long time may occur; the object needs to be recreated to apply space to the operating system, and frequent application of memory space can influence the fluency of the mobile terminal.
Second, when returning to the previous video, it is impossible to continue watching from the previous point of view: for example, when switching to the current video and removing the previous video object, when the user wants to continue watching the previous video, the user needs to reload the video, and if the network is poor, the user needs to wait more time, which seriously affects the watching experience.
Third, the power consumption of the mobile terminal is large: because objects are frequently created and recycled, the frequency of garbage recycling by the system is increased, so that the situations of large CPU occupation, equipment scalding and large power consumption occur.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the video carousel switching method and the terminal can improve the smoothness of video carousel.
In order to solve the technical problems, the invention adopts the following technical scheme:
a video carousel switching method comprises the following steps:
presetting a first preset number of video nodes and a second preset number of node containers, wherein the second preset number is smaller than the first preset number;
sequentially adding one video node into each node container, loading and sequentially playing node videos corresponding to the video nodes in the node containers;
acquiring the sliding distance of the sliding video node, judging whether the sliding distance is larger than a threshold value, if so, taking the sliding video node as a current node, and if the current node does not exist in the node container, replacing the node video farthest from the current node in the node container with the node video of the current node;
and judging whether the first preset number of video nodes of the batch are loaded and played, if so, acquiring the next batch of the first preset number of video nodes, adding the newly acquired video nodes into the corresponding node containers, and loading and playing.
In order to solve the technical problems, the invention adopts another technical scheme that:
a video carousel switching terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
presetting a first preset number of video nodes and a second preset number of node containers, wherein the second preset number is smaller than the first preset number;
sequentially adding one video node into each node container, loading and sequentially playing node videos corresponding to the video nodes in the node containers;
acquiring the sliding distance of the sliding video node, judging whether the sliding distance is larger than a threshold value, if so, taking the sliding video node as a current node, and if the current node does not exist in the node container, replacing the node video farthest from the current node in the node container with the node video of the current node;
and judging whether the first preset number of video nodes of the batch are loaded and played, if so, acquiring the next batch of the first preset number of video nodes, adding the newly acquired video nodes into the corresponding node containers, and loading and playing.
The invention has the beneficial effects that: presetting a first preset number of video nodes and a second preset number of node containers, sequentially adding the video nodes into the node containers, and loading and sequentially playing node videos corresponding to the video nodes; by limiting the number of node containers and dynamically replacing the nodes in the node containers, the video content in the node containers can be circularly played through the node containers, node objects do not need to be frequently created and recovered, video playing smoothness is improved, and the video content of the latest historical node can be conveniently and quickly viewed; after the first preset number of video nodes are loaded and played, the next batch of video nodes are obtained according to the first preset number, so that all resources of video to be carousel are not required to be stored in the memory space, the condition that the video carousel is blocked due to the fact that too much memory space is occupied is avoided, and the smoothness of video carousel is improved.
Drawings
Fig. 1 is a flowchart of a video carousel switching method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a video carousel switching terminal according to an embodiment of the present invention;
fig. 3 is a cycle switching flowchart of a video carousel switching method according to an embodiment of the present invention;
FIG. 4 is a flow chart of a video carousel switching method according to an embodiment of the present invention;
fig. 5 is a video resource management flowchart of a video carousel switching method according to an embodiment of the present invention.
Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
Referring to fig. 1 and fig. 3 to fig. 5, an embodiment of the present invention provides a video carousel switching method, which includes the steps of:
presetting a first preset number of video nodes and a second preset number of node containers, wherein the second preset number is smaller than the first preset number;
sequentially adding one video node into each node container, loading and sequentially playing node videos corresponding to the video nodes in the node containers;
acquiring the sliding distance of the sliding video node, judging whether the sliding distance is larger than a threshold value, if so, taking the sliding video node as a current node, and if the current node does not exist in the node container, replacing the node video farthest from the current node in the node container with the node video of the current node;
and judging whether the first preset number of video nodes of the batch are loaded and played, if so, acquiring the next batch of the first preset number of video nodes, adding the newly acquired video nodes into the corresponding node containers, and loading and playing.
From the above description, the beneficial effects of the invention are as follows: presetting a first preset number of video nodes and a second preset number of node containers, sequentially adding the video nodes into the node containers, and loading and sequentially playing node videos corresponding to the video nodes; by limiting the number of node containers and dynamically replacing the nodes in the node containers, the video content in the node containers can be circularly played through the node containers, node objects do not need to be frequently created and recovered, video playing smoothness is improved, and the video content of the latest historical node can be conveniently and quickly viewed; after the first preset number of video nodes are loaded and played, the next batch of video nodes are obtained according to the first preset number, so that all resources of video to be carousel are not required to be stored in the memory space, the condition that the video carousel is blocked due to the fact that too much memory space is occupied is avoided, and the smoothness of video carousel is improved.
Further, the obtaining the sliding distance of the video node includes:
the position of the video node is adjusted in real time by sliding the video node;
and at the end of the sliding, calculating the sliding distance according to the initial touch position of the sliding and the end touch position of the sliding.
From the above description, the position of the video node is adjusted in real time in the process of sliding the video node, and the sliding distance is calculated by the initial touch position and the end touch position in the sliding process, so that the video node can slide in real time, and the smoothness of video sliding is ensured.
Further, the determining whether the sliding distance is greater than a threshold value, if so, specifically includes:
setting a sliding animation;
judging whether the sliding distance is larger than a distance threshold value, if so, taking the video node selected after sliding as a current node, increasing the sliding distance until the sliding distance is up to the middle position of the current node, and playing the sliding animation in the sliding process;
if not, reducing the sliding distance until all the video nodes are restored to the position before sliding, and playing the sliding animation in the sliding process.
According to the above description, whether the next video node can be switched is judged according to the sliding distance, and the continuous video switching is realized by changing the sliding distance and playing the sliding animation, so that the user experience is improved.
Further, the loading and sequentially playing the node videos corresponding to the video nodes in the node container includes:
judging whether node videos corresponding to the video nodes exist in a cache, if so, acquiring the node videos from the cache, and if not, downloading the node videos from a network;
if the node video of the current node is cached to a preset percentage, starting to play the node video content, and suspending the node video in the rest node containers.
As can be seen from the above description, the node video content of the current node can be played when the node video of the current node is buffered to a preset percentage, and the node videos in the rest node containers are paused to be buffered, so that the buffering pressure can be reduced, and the smoothness of carousel is ensured.
Further, the method further comprises the following steps:
and judging whether the number of the node videos stored in the cache exceeds a number threshold, if so, deleting the node videos which are not played for the longest time in the cache.
As can be seen from the above description, the most recently and most unused algorithm is used for cache management, so that the node video which is not played for the longest time can be cleaned, and the cache pressure is reduced.
Referring to fig. 2, another embodiment of the present invention provides a video carousel switching terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
presetting a first preset number of video nodes and a second preset number of node containers, wherein the second preset number is smaller than the first preset number;
sequentially adding one video node into each node container, loading and sequentially playing node videos corresponding to the video nodes in the node containers;
acquiring the sliding distance of the sliding video node, judging whether the sliding distance is larger than a threshold value, if so, taking the sliding video node as a current node, and if the current node does not exist in the node container, replacing the node video farthest from the current node in the node container with the node video of the current node;
and judging whether the first preset number of video nodes of the batch are loaded and played, if so, acquiring the next batch of the first preset number of video nodes, adding the newly acquired video nodes into the corresponding node containers, and loading and playing.
As can be seen from the above description, a first preset number of video nodes and a second preset number of node containers are preset, video nodes are sequentially added in the node containers, and node videos corresponding to the video nodes are loaded and sequentially played; by limiting the number of node containers and dynamically replacing the nodes in the node containers, the video content in the node containers can be circularly played through the node containers, node objects do not need to be frequently created and recovered, video playing smoothness is improved, and the video content of the latest historical node can be conveniently and quickly viewed; after the first preset number of video nodes are loaded and played, the next batch of video nodes are obtained according to the first preset number, so that all resources of video to be carousel are not required to be stored in the memory space, the condition that the video carousel is blocked due to the fact that too much memory space is occupied is avoided, and the smoothness of video carousel is improved.
Further, the obtaining the sliding distance of the video node includes:
the position of the video node is adjusted in real time by sliding the video node;
and at the end of the sliding, calculating the sliding distance according to the initial touch position of the sliding and the end touch position of the sliding.
From the above description, the position of the video node is adjusted in real time in the process of sliding the video node, and the sliding distance is calculated by the initial touch position and the end touch position in the sliding process, so that the video node can slide in real time, and the smoothness of video sliding is ensured.
Further, the determining whether the sliding distance is greater than a threshold value, if so, specifically includes:
setting a sliding animation;
judging whether the sliding distance is larger than a distance threshold value, if so, taking the video node selected after sliding as a current node, increasing the sliding distance until the sliding distance is up to the middle position of the current node, and playing the sliding animation in the sliding process;
if not, reducing the sliding distance until all the video nodes are restored to the position before sliding, and playing the sliding animation in the sliding process.
According to the above description, whether the next video node can be switched is judged according to the sliding distance, and the continuous video switching is realized by changing the sliding distance and playing the sliding animation, so that the user experience is improved.
Further, the loading and sequentially playing the node videos corresponding to the video nodes in the node container includes:
judging whether node videos corresponding to the video nodes exist in a cache, if so, acquiring the node videos from the cache, and if not, downloading the node videos from a network;
if the node video of the current node is cached to a preset percentage, starting to play the node video content, and suspending the node video in the rest node containers.
As can be seen from the above description, the node video content of the current node can be played when the node video of the current node is buffered to a preset percentage, and the node videos in the rest node containers are paused to be buffered, so that the buffering pressure can be reduced, and the smoothness of carousel is ensured.
Further, the method further comprises the following steps:
and judging whether the number of the node videos stored in the cache exceeds a number threshold, if so, deleting the node videos which are not played for the longest time in the cache.
As can be seen from the above description, the most recently and most unused algorithm is used for cache management, so that the node video which is not played for the longest time can be cleaned, and the cache pressure is reduced.
The video carousel switching method and the terminal are suitable for all video carousel switching products, and can improve the smoothness of video carousel, and the method and the terminal are described by the following specific embodiments:
example 1
Referring to fig. 1, 3 to 5, a video carousel switching method includes the steps of:
s1, presetting a first preset number of video nodes and a second preset number of node containers, wherein the second preset number is smaller than the first preset number.
Specifically, in this embodiment, 5 video nodes and 3 node containers are preset.
S2, adding one video node in each node container in sequence, loading and playing the node video corresponding to the video node in the node container in sequence.
The loading and sequentially playing the node videos corresponding to the video nodes in the node container comprises the following steps:
judging whether node videos corresponding to the video nodes exist in a cache, if so, acquiring the node videos from the cache, and if not, downloading the node videos from a network;
if the node video of the current node is cached to a preset percentage, starting to play the node video content, and suspending the node video in the rest node containers.
Specifically, when a user starts to view the video, the user enters a playing page, 3 child node containers are preloaded, video contents corresponding to the loaded video nodes are sequentially pre-cached in the containers according to the sequence of the video nodes, and the user starts to play automatically after waiting for the video in the currently displayed node container to be cached to a playable percentage. And preferentially caching the video of the current node, and starting to cache the video of the rest nodes after waiting for the current node to play.
When the video resource is acquired, the video resource is acquired from the local cache through video management, if the video exists in the local cache, the video resource is directly loaded into the memory, otherwise, the video resource is acquired from the network.
S3, acquiring the sliding distance of the video node, judging whether the sliding distance is larger than a threshold value, if so, taking the video node selected after sliding as a current node, and if the current node does not exist in the node container, replacing the node video farthest from the current node in the node container with the node video of the current node.
The step of obtaining the sliding distance of the video node includes:
the position of the video node is adjusted in real time by sliding the video node;
and at the end of the sliding, calculating the sliding distance according to the initial touch position of the sliding and the end touch position of the sliding.
Specifically, referring to fig. 3, node containers are created in the cyclic switching module, wherein each node container can independently display the content of a video, when a user slides up and down a screen, the Y axes of all nodes are actively updated, the sliding distance is calculated according to the initial touch position of the user and the current touch position, the difference value calculation is performed on the Y axes of all nodes under the current video list through the distance, and the sliding phenomenon generated by all current video nodes according to the touch position of the user is shown.
Judging whether the sliding distance is larger than a threshold value or not, if so, taking the video node selected after sliding as the current node specifically comprises:
setting a sliding animation;
judging whether the sliding distance is larger than a distance threshold value, if so, taking the video node selected after sliding as a current node, increasing the sliding distance until the sliding distance is up to the middle position of the current node, and playing the sliding animation in the sliding process;
if not, reducing the sliding distance until all the video nodes are restored to the position before sliding, and playing the sliding animation in the sliding process.
Specifically, referring to fig. 3 and 4, when the user stops sliding, judging whether the display of the next node is switched according to the sliding distance, and if the sliding distance is less than one half of the height of the current node container, restoring all the nodes; the method mainly comprises the steps of mainly controlling mobile animations of all nodes in a video list in a mobile module, updating the positions of the nodes according to the sliding distance of a user by setting the positions of the nodes, showing the sliding phenomenon of the video list, setting 5 nodes in the currently displayed video list, enabling a small number of nodes to be beneficial to quickly updating the positions of all the nodes, avoiding a large number of calculations, replacing videos in the nodes which are not displayed by data processing after the movement is finished, enabling the user to feel smooth sliding experience by playing the animations, switching to the next video when the touch distance of the user is large enough, and setting the sliding animation of 0.25S when switching the next video; when the distance is not enough, the user can restore to the original position, and the sliding animation needs to be played, so that the user can have a continuous experience visually.
And taking the video node selected after sliding as a current node, and if the current node does not exist in the node container, replacing the node video furthest from the current node in the node container with the node video of the current node.
Specifically, if the user slides upwards and takes the video node selected after sliding as the current node, judging whether the current node exists in the node container, if so, not modifying the node in the node container, if not, replacing the node video furthest from the current node in the node container with the node video of the current node, for example, the current node is a third video node, changing the current node into a fourth video node after the upward scrolling is finished, replacing the position of the first video node with the fourth video node after the sliding is finished, and correspondingly replacing the video in the node by data processing; if the user slides downwards, resetting and replacing a fourth video node with the first video node, wherein the processing of video data in the node is the same as the upwards sliding processing; after the setting is completed, video circulation carousel can be realized, and repeated creation and destruction of a large number of nodes are reduced.
S4, judging whether the first preset number of video nodes of the batch are loaded and played, if yes, acquiring the next batch of the first preset number of video nodes, adding the newly acquired video nodes into the corresponding node containers, and loading and playing.
Specifically, only after all videos of the current circulation carousel are loaded and played, loading subsequent videos according to a first preset number is continued, otherwise, no new videos are loaded, if the first preset number is not set, all videos are required to be loaded at one time or only one video is required to be loaded at one time, all videos occupy a high network at one time, and memory bottleneck is easily caused by the fact that the videos occupy memory; only one video is loaded, the video is required to be requested during each playing, the video is easy to be blocked when the network fluctuation is large, and poor user experience can be caused.
Example two
Referring to fig. 5, the difference between the present embodiment and the first embodiment is that how to store the loaded video is further defined, specifically:
and judging whether the number of the node videos stored in the cache exceeds a number threshold, if so, deleting the node videos which are not played for the longest time in the cache.
In this embodiment, the video may be cached to the local while being played during loading. When the number of the videos cached at the same time at present exceeds a threshold value, judging whether the video is the longest in all videos or not according to the time of playing the video last time, if so, cleaning the video from the current memory, and preloading in advance until the next time.
Example III
Referring to fig. 2, a video carousel switching terminal includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps of the video carousel switching method according to the first or second embodiments when executing the computer program.
In summary, according to the video carousel switching method and the terminal provided by the invention, the first preset number of video nodes and the second preset number of node containers are preset, the video nodes are sequentially added in the node containers, and the node videos corresponding to the video nodes are loaded and sequentially played, wherein the rest nodes are cached when the current node is cached to a preset percentage and begins to play, so that the caching pressure is reduced, and the promotion of the flow field degree is facilitated; by limiting the number of node containers and dynamically replacing the nodes in the node containers, the video content in the node containers can be circularly played through the node containers, node objects do not need to be frequently created and recovered, video playing smoothness is improved, and the video content of the latest historical node can be conveniently and quickly viewed; after the sliding is finished, judging whether to switch to the next video node or restore to the node position before the sliding according to the sliding distance, and adding a sliding animation in the moving process to enable the sliding process to be smoothly carried out and improve the experience of a user; after the first preset number of video nodes are loaded and played, the next batch of video nodes are obtained according to the first preset number, so that all resources of video to be carousel are not required to be stored in the memory space, the condition that the video carousel is blocked due to the fact that too much memory space is occupied is avoided, and the smoothness of video carousel is improved.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.

Claims (8)

1. The video carousel switching method is characterized by comprising the following steps:
presetting a first preset number of video nodes and a second preset number of node containers, wherein the second preset number is smaller than the first preset number;
sequentially adding one video node into each node container, loading and sequentially playing node videos corresponding to the video nodes in the node containers;
acquiring the sliding distance of the sliding video node, judging whether the sliding distance is larger than a threshold value, if so, taking the sliding video node as a current node, and if the current node does not exist in the node container, replacing the node video farthest from the current node in the node container with the node video of the current node;
judging whether the first preset number of video nodes of the batch are loaded and played, if yes, acquiring the next batch of the first preset number of video nodes, adding the newly acquired video nodes into the corresponding node containers, and loading and playing;
the loading and sequentially playing the node videos corresponding to the video nodes in the node container comprises the following steps:
judging whether node videos corresponding to the video nodes exist in a cache, if so, acquiring the node videos from the cache, and if not, downloading the node videos from a network;
if the node video of the current node is cached to a preset percentage, starting to play the node video content, and suspending the node video in the rest node containers.
2. The video carousel switching method of claim 1, wherein the obtaining the sliding distance for sliding the video node comprises:
the position of the video node is adjusted in real time by sliding the video node;
and at the end of the sliding, calculating the sliding distance according to the initial touch position of the sliding and the end touch position of the sliding.
3. The video carousel switching method according to claim 1, wherein the determining whether the sliding distance is greater than a threshold value, if so, taking the video node selected after sliding as the current node specifically includes:
setting a sliding animation;
judging whether the sliding distance is larger than a distance threshold value, if so, taking the video node selected after sliding as a current node, increasing the sliding distance until the sliding distance is up to the middle position of the current node, and playing the sliding animation in the sliding process;
if not, reducing the sliding distance until all the video nodes are restored to the position before sliding, and playing the sliding animation in the sliding process.
4. The video carousel switching method of claim 1, further comprising:
and judging whether the number of the node videos stored in the cache exceeds a number threshold, if so, deleting the node videos which are not played for the longest time in the cache.
5. A video carousel switching terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the following steps when executing the computer program:
presetting a first preset number of video nodes and a second preset number of node containers, wherein the second preset number is smaller than the first preset number;
sequentially adding one video node into each node container, loading and sequentially playing node videos corresponding to the video nodes in the node containers;
acquiring the sliding distance of the sliding video node, judging whether the sliding distance is larger than a threshold value, if so, taking the sliding video node as a current node, and if the current node does not exist in the node container, replacing the node video farthest from the current node in the node container with the node video of the current node;
judging whether the first preset number of video nodes in the batch are loaded and played, if yes, acquiring the next batch of the first preset number of video nodes, adding the newly acquired video nodes into the corresponding node containers, and loading and playing;
the loading and sequentially playing the node videos corresponding to the video nodes in the node container comprises the following steps:
judging whether node videos corresponding to the video nodes exist in a cache, if so, acquiring the node videos from the cache, and if not, downloading the node videos from a network;
if the node video of the current node is cached to a preset percentage, starting to play the node video content, and suspending the node video in the rest node containers.
6. The video carousel switching terminal of claim 5, wherein the obtaining the sliding distance for sliding the video node comprises:
the position of the video node is adjusted in real time by sliding the video node;
and at the end of the sliding, calculating the sliding distance according to the initial touch position of the sliding and the end touch position of the sliding.
7. The video carousel switching terminal according to claim 5, wherein the determining whether the sliding distance is greater than a threshold value, if so, specifically includes:
setting a sliding animation;
judging whether the sliding distance is larger than a distance threshold value, if so, taking the video node selected after sliding as a current node, increasing the sliding distance until the sliding distance is up to the middle position of the current node, and playing the sliding animation in the sliding process;
if not, reducing the sliding distance until all the video nodes are restored to the position before sliding, and playing the sliding animation in the sliding process.
8. The video carousel switching terminal of claim 5, further comprising:
and judging whether the number of the node videos stored in the cache exceeds a number threshold, if so, deleting the node videos which are not played for the longest time in the cache.
CN202110671546.XA 2021-06-17 2021-06-17 Video carousel switching method and terminal Active CN115499697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110671546.XA CN115499697B (en) 2021-06-17 2021-06-17 Video carousel switching method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110671546.XA CN115499697B (en) 2021-06-17 2021-06-17 Video carousel switching method and terminal

Publications (2)

Publication Number Publication Date
CN115499697A CN115499697A (en) 2022-12-20
CN115499697B true CN115499697B (en) 2023-07-07

Family

ID=84465474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110671546.XA Active CN115499697B (en) 2021-06-17 2021-06-17 Video carousel switching method and terminal

Country Status (1)

Country Link
CN (1) CN115499697B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898607A (en) * 2015-11-20 2016-08-24 乐视云计算有限公司 Network video playback method, device and system
CN106162324A (en) * 2015-04-09 2016-11-23 腾讯科技(深圳)有限公司 The processing method and processing device of video file
CN106534952A (en) * 2016-09-28 2017-03-22 青岛海信电器股份有限公司 Method for continuingly playing film source after source switching and smart television
CN107547940A (en) * 2017-09-13 2018-01-05 广州酷狗计算机科技有限公司 Video playback processing method, equipment and computer-readable recording medium
CN110809168A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Video live broadcast processing method and device, terminal and storage medium
CN112911389A (en) * 2021-01-18 2021-06-04 浙江大华技术股份有限公司 Video playing switching method, electronic equipment and computer storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769745A (en) * 2018-06-29 2018-11-06 百度在线网络技术(北京)有限公司 Video broadcasting method and device
US11012760B2 (en) * 2018-10-03 2021-05-18 Wanjeru Kingori System and method for branching-plot video content and editing thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162324A (en) * 2015-04-09 2016-11-23 腾讯科技(深圳)有限公司 The processing method and processing device of video file
CN105898607A (en) * 2015-11-20 2016-08-24 乐视云计算有限公司 Network video playback method, device and system
CN106534952A (en) * 2016-09-28 2017-03-22 青岛海信电器股份有限公司 Method for continuingly playing film source after source switching and smart television
CN107547940A (en) * 2017-09-13 2018-01-05 广州酷狗计算机科技有限公司 Video playback processing method, equipment and computer-readable recording medium
CN110809168A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Video live broadcast processing method and device, terminal and storage medium
CN112911389A (en) * 2021-01-18 2021-06-04 浙江大华技术股份有限公司 Video playing switching method, electronic equipment and computer storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
P2P-VOD缓存策略MVC;李汶娟等;《微计算机信息》(第03期);第1-3页 *
P2P流媒体点播系统中的缓存管理方案的研究和实现;陈起等;《计算机应用与软件》;第26卷(第02期);第94-96页 *

Also Published As

Publication number Publication date
CN115499697A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
US8255531B2 (en) Method and apparatus for providing mobile device interoperability
US20110113365A1 (en) Scrolling large data sets
CN106982388B (en) Picture display method and device
CN103246612B (en) A kind of method of data buffer storage and device
CN106791898B (en) Live video loading method and device
CN110221889B (en) Page display method and device, electronic equipment and storage medium
US20160162597A1 (en) Intelligent browser-based display tiling
US11128730B2 (en) Predictive bitrate selection for 360 video streaming
CN114071047B (en) Frame rate control method and related device
US11068404B2 (en) Efficient computer-implemented techniques for managing graphics memory
CN112836086B (en) Video processing method and device and electronic equipment
CN112565898A (en) Method and system for moving focus based on smart television operating system
CN110992112A (en) Method and device for processing advertisement information
CN115499697B (en) Video carousel switching method and terminal
CN109218799B (en) Method, storage medium, device and system for quickly switching high-definition images of android television
CN109388737B (en) Method and device for sending exposure data of content item and storage medium
JP2022006167A (en) Optimizing methods for starting video playback, device, electronic device, computer-readable storage medium, and computer program
CN109800039B (en) User interface display method and device, electronic equipment and storage medium
CN110891190B (en) Bullet screen display method and device and electronic equipment
CN114666627A (en) Method and device for preloading streaming media video, electronic equipment and storage medium
US11080859B2 (en) Image communication based on hit image block conditions
CN110866203B (en) Page jump method, device, equipment and computer readable storage medium
CN109361961B (en) Bullet screen display method and device and electronic equipment
CN110881145B (en) Bullet screen display method and device and electronic equipment
CN110881138B (en) Bullet screen display method and device and electronic equipment

Legal Events

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