Episode rolling playing method and device, equipment and medium
By listening to user scrolling events and optimizing resource management, the fluency and resource management of short drama playback functions in cross-platform development are solved, achieving more efficient resource utilization and stable user experience.
Patent Information
- Application Number
- CN202410859982.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-11-08
AI Technical Summary
In cross-platform development, the implementation of the up and down playback function of short dramas has fluency and resource management problems. The existing technology cannot fully utilize the operating system optimization characteristics, resulting in excessive resource consumption and memory leakage, affecting the user experience.
Determine the target episode view by listening to user scroll events, stop and recycle the singleton player, optimize resource management, and intelligently maintain the views for smooth episode scrolling.
It improves the interaction efficiency and system stability of the user interface, reduces resource waste and memory usage, provides a smoother and consistent playback experience, and enhances the performance and user experience of cross-platform applications.
Smart Images

Figure CN118921527A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to video information processing technology, and more particularly to a method for scrolling through episodes and its device, equipment, and medium. Background Art
[0002] Watching video content on terminal devices such as mobile devices has become a part of modern life. In particular, the short drama format has quickly won the favor of users due to its compact narrative structure and convenient viewing method. The short drama format has also broadened the display form of live video data for online live broadcast technology. The relevant technology is still in the stage of continuous exploration and optimization in the industry.
[0003] Currently, most short drama playback apps use native code to implement the up and down scrolling function, taking advantage of the optimization features of specific platforms in order to achieve the best playback effect. However, with the popularity of cross-platform development frameworks such as React Native, developers are beginning to seek solutions that can be applied to different operating systems such as iOS and Android applications at the same time to reduce development costs and improve development efficiency.
[0004] Although the cross-platform framework provides the advantages of code reuse and rapid development, it also faces some challenges when implementing the up and down swiping playback function of short dramas.
[0005] First, the cross-platform framework cannot fully utilize the optimization features of a specific platform. The program objects it provides, such as the view playback component, can only support limited functions and cannot perfectly integrate with the characteristics of the operating system. As a result, applications that rely on such cross-platform framework components perform worse than native applications in terms of playback smoothness.
[0006] Secondly, the development technology adopted by the native application is followed, and a multi-instance player is used in the cross-platform framework to play the video data of each episode in the short drama, which leads to excessive resource consumption and affects the fluency and stability of the application.
[0007] In addition, with regard to the operational experience of the up-and-down sliding playback function of the short drama, the view management strategy of the existing technology is not smart enough and is prone to memory leaks and unnecessary resource occupation.
[0008] It can be seen that the short drama playback technology currently implemented based on the cross-platform framework still has a lot of room for improvement and needs continuous optimization. Summary of the invention
[0009] The purpose of the present application is to solve the above-mentioned problem and to provide a method for scrolling playback of dramas and its corresponding devices, equipment, non-volatile readable storage medium, and computer program product.
[0010] According to one aspect of the present application, a method for rolling playback of episodes is provided, comprising:
[0011] Listening to the scrolling operation data generated after the current episode view triggers a user scrolling event, and determining the target episode index of the target episode view in the corresponding scrolling direction according to the scrolling operation data, wherein the target episode view is sequentially adjacent to the current episode view;
[0012] Stopping the singleton player in the current episode view from playing corresponding episode data, and removing the singleton player from the current episode view to achieve temporary recycling;
[0013] Setting the target episode view as a new current episode view, adding the singleton player to the new current episode view, and having the singleton player play the episode data corresponding to the target episode index;
[0014] In response to a setting event corresponding to setting the target episode view as a new current episode view, the new current episode view and the episode views immediately following the current episode view are maintained, and other episode views are destroyed.
[0015] According to another aspect of the present application, a device for scrolling and playing episodes is provided, comprising:
[0016] An episode positioning module, configured to listen to scrolling operation data generated after the current episode view triggers a user scrolling event, and determine a target episode index of a target episode view in a corresponding scrolling direction according to the scrolling operation data, wherein the target episode view is sequentially adjacent to the current episode view;
[0017] An exit processing module, configured to stop the singleton player in the current episode view from playing the corresponding episode data, and remove the singleton player from the current episode view to achieve temporary recycling;
[0018] An entry processing module, configured to set the target episode view as a new current episode view, add the singleton player to the new current episode view, and have the singleton player play the episode data corresponding to the target episode index;
[0019] The view maintenance module is configured to respond to a setting event corresponding to setting the target episode view as a new current episode view, maintain the new current episode view and the episode views immediately following it, and destroy other episode views.
[0020] According to another aspect of the present application, there is provided a device for scrolling playback of dramas, comprising a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the method for scrolling playback of dramas described in the present application.
[0021] According to another aspect of the present application, a non-volatile readable storage medium is provided, which stores a computer program implemented according to the described method for scrolling episode playback in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the method are executed.
[0022] According to another aspect of the present application, a computer program product is provided, including a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the steps of the method described in any one of the embodiments of the present application are implemented.
[0023] Compared with the prior art, this application has many technical advantages, including but not limited to:
[0024] First, this application obtains scrolling operation data by listening to user scrolling events, and determines the target episode index of the target episode view based on this, thereby achieving instant response to user operations. This mechanism ensures that when the user scrolls to select an episode, the system can quickly identify the scrolling direction and locate the previous or subsequent episode view immediately adjacent to the current episode view as the target episode view, thereby providing a smooth and seamless viewing experience. This coherent operation processing not only reduces user waiting time, but also improves the interaction efficiency of the user interface.
[0025] Secondly, when the application needs to implement view switching, it first stops the singleton player in the current episode view to implement temporary recycling. After switching the target episode view to the new current episode view, the temporarily recycled singleton player is added to the new current episode view, thereby optimizing resource usage. This resource management strategy avoids the waste of resources caused by frequent creation and destruction of player instances, while reducing system load and improving application stability and responsiveness. The use of a singleton player, combined with an intelligent view maintenance mechanism, ensures that system resources are reasonably allocated and efficiently utilized when users scroll to switch episodes.
[0026] Furthermore, this application maintains the new current episode view and its immediately subsequent episode views while destroying other episode views, so that after determining the target episode index, an episode view that matches the scrolling direction is called according to the scrolling direction determined by listening as the target episode view, that is, the new current episode view, while avoiding other episode views from continuing to consume memory resources in the background, further optimizing memory usage. This strategy not only reduces unnecessary memory usage, but also prevents performance issues caused by memory leaks. By intelligently maintaining views, the system can maintain lightweight operation and provide a stable playback experience even when device resources are limited.
[0027] Finally, this application, through the organic combination of the above mechanisms, the joint effect of technical means such as instant response scrolling listening, the application of single-instance player, efficient resource management and intelligent view maintenance, not only solves the common performance problems in cross-platform development, but also makes the applications developed by cross-platform development frameworks such as React Natvie have a better control experience, and also provides users with a more consistent and reliable playback experience. The interaction of these technical means reflects the systematic innovation of this application in improving playback fluency, optimizing resource management, and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 A schematic diagram of a network structure used in an exemplary application scenario of the present application;
[0030] Figure 2 A flowchart of an embodiment of a method for rolling play of episodes of the present application;
[0031] Figure 3 This is a principle block diagram of the drama scrolling playback device of this application;
[0032] Figure 4 This is a schematic diagram of the structure of a series scrolling playback device used in this application. DETAILED DESCRIPTION
[0033] Figure 1 An example is given of a comprehensive network architecture for implementing the short play playback scenario corresponding to the technical solution of the present application. The architecture is composed of multiple key components, including a terminal device 80, a data server 83, and a media server 81. In one embodiment, to meet the need of deploying the technical solution of the present application in a live broadcast scenario, it is also possible to Figure 1 Shown is a live broadcast server 82. Figure 1 The exemplary architecture is designed to achieve efficient implementation of the episode scrolling playback method and ensure that users can enjoy a seamless viewing experience.
[0034] The terminal device 80 is the core device for users to access the play of the drama. In the context of the present application, the terminal device 80 runs a computer program product implemented according to the method of the present application. The program product is a plug-in for an independent application, which enables the terminal device 80 to realize online play of the drama by interacting with the server. The terminal device 80 can be either a mobile device or a desktop device. Generally, the terminal device 80 has the function of supporting users to realize sliding control of its graphical user interface in various ways, including finger control, mouse control, eye control, voice control, and any other methods.
[0035] The media server 81 plays a key role in video data processing in this architecture. It is responsible for responding to requests from the terminal device 80 and processing video data related to episode playback and / or live broadcast, including transcoding and compression, to ensure that the video content is transmitted to the user in an appropriate format and quality, and to ensure smooth playback.
[0036] The data server 83 acts as a storage and management center, responsible for storing all video content, i.e., episode data. After the live broadcast in the exemplary live broadcast scenario ends, the video data is stored in the corresponding distributed storage network by the data server 83 for users to watch on demand or review, ensuring the security and convenience of the data.
[0037] The live broadcast server 82 is a core component in the live broadcast scene, responsible for processing the business logic of the live broadcast room, including the creation of the live broadcast room, the maintenance of the live broadcast process, and user interaction, etc. It enables users to directly broadcast live on the terminal device 80 and quickly convey real-time content to the audience.
[0038] As mentioned above, in scenarios not involving live broadcast, the architecture may not include the live broadcast server 82. In this case, the terminal device 80 will directly interact with the media server 81 and the data server 83 to obtain the stored video content for playback. In this case, the method of the present application can still achieve efficient video content management and playback, but its function is more focused on on-demand services.
[0039] In an exemplary live broadcast scenario, the integrated network architecture achieves efficient execution of live broadcast and episodic playback of video data through the collaborative work of key components, as described in detail below:
[0040] The live broadcast process starts with a live broadcast request from a user via a terminal device 80. The request is processed by a live broadcast server 82, which is not only responsible for the creation and maintenance of the live broadcast room, but also ensures the real-time transmission of live broadcast content and smooth user interaction. After being captured by the anchor's terminal device 80, the live broadcast video data is immediately sent to the media server 81, where necessary transcoding and compression processing are performed to adapt to the network environment and playback devices of different users.
[0041] At the same time, a copy of the live video data is synchronized to the data server 83, which serves as a storage and management center for video content, constructs the live video data into orderly episodes, and stores them in a distributed storage network. This not only provides the possibility of on-demand viewing for live content, but also facilitates the management and retrieval of video content.
[0042] When a user wants to watch a live broadcast or on-demand episode of a live broadcast, the terminal device 80 will send a search request to the data server 83 according to the user's operation. The data server 83 provides the corresponding episode data according to the request, which is then transmitted back to the terminal device 80 and played using the episode rolling playback method of the present application, ensuring that the user can get a smooth and coherent viewing experience whether in live broadcast or on-demand.
[0043] In addition, the interaction between users and live content is also enhanced through this architecture. The user's interactive behavior, such as sending bullet screens or gifts, is transmitted to the anchor in real time through the live broadcast server 82, and the anchor's feedback is also quickly transmitted back to the audience, greatly enhancing the interactivity and viewing quality of the live broadcast.
[0044] It can be seen that this application combines the network architecture of the elements of the live broadcast scene, cleverly integrating the real-time nature of the live broadcast and the orderliness of the episodes, and provides users with a comprehensive video playback solution that allows them to enjoy real-time interaction and conveniently review the wonderful content. Whether it is live broadcast or on-demand, this architecture can provide an excellent user experience, demonstrating the innovation and practicality of the technical solution of this application.
[0045] See also Figure 2 According to a method for rolling play of an episode provided by the present application, the method is implemented as a computer program product and installed in a terminal device to run an application. In one embodiment, the method comprises the following steps:
[0046] Step S1100, listening to the scrolling operation data generated after the current episode view triggers a user scrolling event, and determining the target episode index of the target episode view in the corresponding scrolling direction according to the scrolling operation data, wherein the target episode view is sequentially adjacent to the current episode view;
[0047] In a specific embodiment of the present application, the terminal device provides a series of smooth and intuitive user interaction operations by running a computer program for implementing scrolling playback of episodes. During the development stage, the computer program product can use the view playback component provided by the cross-platform development framework to maintain and display a structured episode playlist, which contains one or more repertoires, wherein each repertoire and the multiple episodes it contains are presented sequentially in the form of a vertical list.
[0048] When the user scrolls on the playlist of the series, the view playback component in the terminal device captures the scrolling operation data, and the terminal device listens to and processes the scrolling operation data outside the view playback component. The scrolling operation data includes the original offset value before scrolling and the dynamic offset value after scrolling, which are key information for identifying the user's scrolling direction and calculating the target series. By comparing these two offset values, the terminal device can determine whether the user scrolls up or down, and calculate the corresponding target series index accordingly.
[0049] During the calculation process, the terminal device records the offset value when the scroll view stops scrolling as the in-situ offset value, and updates the offset value in real time during the scrolling process to obtain the dynamic offset value. Based on the scrolling direction and the dynamic offset value, the terminal device can further determine the scrolling offset interval, and further determine the drama index and episode index of the target episode view based on this scrolling offset interval. For example, when the user scrolls up, the terminal device counts how many dramas are in front, calculates the height of each drama, and then accumulates these heights to obtain the total offset value. By comparing the total offset value and the new offset value, the terminal device can determine which drama the user is currently scrolling to, and calculate which episode it is, thereby determining the corresponding target drama index and target episode index, thereby forming a target episode index for locating the target episode view to be switched to. Since the user switches views one by one, the target episode view is the next episode view in the forward direction of the scrolling direction in the episode playlist provided by the view playback component, and this target episode view is sequentially connected to the current episode view.
[0050] In the above manner, the terminal device can intelligently identify the user's scrolling intention and quickly locate the target episode that the user wants to watch, so as to determine the target episode index and the target episode view for playing the target episode. Naturally, once the target episode index and its target episode view are determined, the corresponding episode data is also determined. The episode data is the video data used to play the corresponding episode.
[0051] It can be seen that the above method not only improves the interaction efficiency of the user interface, but also provides technical support for smooth episode switching, thereby significantly improving the user's viewing experience.
[0052] Step S1200: Stop the singleton player in the current episode view from playing corresponding episode data, and remove the singleton player from the current episode view to achieve temporary recycling;
[0053] When the user scrolls to a new viewing content in the episode playlist, the target episode index is determined, which actually determines the target episode view. At this time, the terminal device needs to process the current playback view accordingly to ensure the smoothness of the playback experience and the rational use of resources.
[0054] Specifically, when the user scrolls to the target episode view, the view playback component in the terminal device triggers an event indicating that the user has left the current episode view. At this point, the terminal device will execute the operation of stopping the singleton player in the current episode view. This operation is responsible for stopping the player from playing the episode data corresponding to the current episode view and removing the player instance from the current episode view. This temporary recycling mechanism can release resources related to the current episode view playback and prepare for loading new episode data.
[0055] The singleton player is designed to use only one player instance for the entire playlist. This can be achieved by implementing a single player instance in the background, keeping this player instance always available for playing the episode data of each current episode view, and not being used to play the episode data of other non-current episode views at the same time, and keeping only this player instance in memory. When the user switches from one episode to another, the terminal device does not need to create a new player instance, but reuses the existing singleton player. Doing so can significantly reduce memory usage and CPU resource consumption, thereby avoiding performance issues caused by frequent creation and destruction of player instances.
[0056] For example, when the user scrolls from episode 1 to episode 2, the terminal device stops playing the singleton player in episode 1 and removes the player from the view of episode 1. The terminal device then adds the singleton player to the view of episode 2 and starts playing the episode data of episode 2. This seamless switching ensures that the user's viewing experience is not interrupted during the scrolling process.
[0057] In one embodiment, the terminal device can monitor the running status of the single instance player in time. When the single instance player is abnormal, the terminal device can create a new player instance in time, call the play status information of the abnormal player instance before the abnormality and apply it to the newly created player instance, so as to realize the function of breakpoint resumption by the new player instance. The abnormal player instance can be cleaned up and destroyed.
[0058] In this way, the terminal device not only achieves the rapid stop and resource recovery of the current episode, but also prepares for the playback of the next target episode. This not only improves the playback efficiency, but also optimizes the user's viewing experience, allowing users to enjoy a smoother and more coherent playback effect when browsing episodes.
[0059] Step S1300: setting the target episode view as a new current episode view, adding the singleton player to the new current episode view, and having the singleton player play the episode data corresponding to the target episode index;
[0060] When the user scrolls to the target episode view, that view will be set as the new current episode view. During this process, the transition between different views of the singleton player needs to be coordinated to ensure the continuity of playback and efficient use of resources.
[0061] Specifically, when the user leaves the current episode view and reaches a new target episode view by scrolling, the terminal device will perform the following operations: First, the target episode view will be officially set as the new current episode view. Then, the terminal device will re-add the singleton player that was previously removed from the current episode view to the target episode view, so that when the target episode view becomes the new current episode view, the singleton player is ready to play the episode data corresponding to the new current episode view. This ensures the reuse of player instances and avoids frequent creation and destruction of player instances, thereby optimizing the use of memory and CPU resources.
[0062] Next, the singleton player will load the episode data corresponding to the target episode index from the cache according to the new target episode index and start playing. This process is automated, ensuring that users can seamlessly switch episodes during scrolling without having to reload the player or wait for episode data to load, greatly improving the smoothness of the user experience.
[0063] Generally speaking, the cache mechanism can be used to preload the drama data corresponding to each drama view, and the corresponding drama data provided by the data server can be pre-stored in the local cache area and stored in association with the corresponding drama index. When it is needed, the corresponding drama data can be called using the corresponding target drama index to the singleton player for playback. In some cases, if the corresponding drama data does not exist in the cache area, the singleton player can also directly pull the corresponding drama data from the data server according to the target drama index for playback.
[0064] In this way, the terminal device not only achieves fast episode switching, but also ensures the stability and efficiency of playback, allowing users to enjoy an uninterrupted viewing experience. This intelligent resource management and playback control strategy demonstrates the innovation and practicality of this application in improving user interaction efficiency and playback fluency.
[0065] Step S1400: In response to a setting event corresponding to setting the target episode view as a new current episode view, the new current episode view and the episode views immediately following the current episode view are maintained, and other episode views are destroyed.
[0066] When the user selects a new target episode view through scrolling and the terminal device completes the playback preparation, in order to ensure the consistency of user experience and efficient operation of the system, the terminal device needs to further implement relevant view management and resource optimization operations.
[0067] Specifically, the terminal device responds to a setting event, which corresponds to setting the target episode view to the new current episode view. During this process, the terminal device maintains the new current episode view and its immediately subsequent episode views, that is, one episode view before and one episode view after the new current episode view in the episode playlist, to ensure that they are available so that the user can continue watching or rewind seamlessly. At the same time, in order to optimize the use of memory and CPU resources, the terminal device destroys those episode views that are no longer needed, that is, those episode views that are not adjacent to the current viewing sequence. It can be seen that the current viewing sequence is maintained in the background by the terminal device to keep it alive, including three episode views, namely the current episode view and the previous episode view and the subsequent episode view of the current episode view. This current viewing sequence changes dynamically as the user scrolls and switches.
[0068] This intelligent view management strategy not only reduces unnecessary resource usage, but also prevents performance issues caused by memory leaks. By retaining only views related to the current and adjacent episodes, the terminal device can remain lightweight and provide a stable playback experience even when device resources are limited.
[0069] For example, if a user is watching a short drama with multiple episodes and scrolls from episode 2 to episode 3, the terminal device will retain the views of episodes 4 and 2 as the previous and subsequent episode views of the new current episode view. At the same time, it will destroy other episode views that are beyond this sequence, such as the view of episode 1. In this way, when the user decides to scroll back to episode 2 or forward to episode 4, the corresponding episode view can be quickly loaded and played without having to re-obtain data from the data server or re-initialize the player.
[0070] Through this strategy, the terminal device not only achieves fast episode switching and playback, but also optimizes memory usage, improving the system's response speed and stability. This intelligent view maintenance mechanism, combined with the use of a single instance player, provides users with a smooth, seamless, and efficient episode scrolling playback experience.
[0071] According to the above embodiments, compared with the prior art, the present application has many technical advantages, including but not limited to:
[0072] First, this application obtains scrolling operation data by listening to user scrolling events, and determines the target episode index of the target episode view based on this, thereby achieving instant response to user operations. This mechanism ensures that when the user scrolls to select an episode, the system can quickly identify the scrolling direction and locate the previous or subsequent episode view immediately adjacent to the current episode view as the target episode view, thereby providing a smooth and seamless viewing experience. This coherent operation processing not only reduces user waiting time, but also improves the interaction efficiency of the user interface.
[0073] Secondly, when the application needs to implement view switching, it first stops the singleton player in the current episode view to implement temporary recycling. After switching the target episode view to the new current episode view, the temporarily recycled singleton player is added to the new current episode view, thereby optimizing resource usage. This resource management strategy avoids the waste of resources caused by frequent creation and destruction of player instances, while reducing system load and improving application stability and responsiveness. The use of a singleton player, combined with an intelligent view maintenance mechanism, ensures that system resources are reasonably allocated and efficiently utilized when users scroll to switch episodes.
[0074] Furthermore, this application maintains the new current episode view and its immediately subsequent episode views while destroying other episode views, so that after determining the target episode index, an episode view that matches the scrolling direction is called according to the scrolling direction determined by listening as the target episode view, that is, the new current episode view, while avoiding other episode views from continuing to consume memory resources in the background, further optimizing memory usage. This strategy not only reduces unnecessary memory usage, but also prevents performance issues caused by memory leaks. By intelligently maintaining views, the system can maintain lightweight operation and provide a stable playback experience even when device resources are limited.
[0075] Finally, this application, through the organic combination of the above mechanisms, the joint effect of technical means such as instant response scrolling listening, the application of single-instance player, efficient resource management and intelligent view maintenance, not only solves the common performance problems in cross-platform development, but also makes the applications developed by cross-platform development frameworks such as React Natvie have a better control experience, and also provides users with a more consistent and reliable playback experience. The interaction of these technical means reflects the systematic innovation of this application in improving playback fluency, optimizing resource management, and enhancing user experience.
[0076] Based on any embodiment of the method of the present application, the scrolling operation data generated after the current episode view triggers a user scrolling event is listened to, and the target episode index of the target episode view in the corresponding scrolling direction is determined according to the scrolling operation data, including:
[0077] Step S2100: responding to a user scrolling event triggered by the current episode view in the view playing component through a listener preset on the view playing component, capturing scrolling operation data corresponding to the user scrolling event, wherein the scrolling operation data includes an original offset value of the view playing component before the user operation occurs, and a dynamic offset value reached by the view playing component due to the user operation;
[0078] Taking a cross-platform development framework such as React Native as an example, to implement the scrolling playback function of episodes, you can use the view playback component in the cross-platform development framework to handle user scrolling events. View playback components, such as SectionList or FlatList in React Native, provide an efficient way to display and scroll long lists of data.
[0079] The onScroll event listener is integrated into the view playback component. When the user scrolls the playlist, the listener can capture the underlying data of the interface scrolling behavior and generate scrolling operation data accordingly. The scrolling operation data includes the view offset value before and after the user scrolling behavior occurs, namely the original offset value (stopOffsetY) and the dynamic offset value (newOffsetY).
[0080] When the user scrolls on the episode playlist, the onScroll event listener captures the scrolling operation data and passes it to the terminal device. The scrolling operation data mainly includes the original offset value and the dynamic offset value. The original offset value refers to the vertical offset of the list before the user starts scrolling, that is, the current position of the episode list when the user touches the screen. The dynamic offset value is the real-time vertical offset of the list during and after the user scrolls, reflecting the view displacement changes caused by the user's scrolling behavior.
[0081] Step S2200: identifying the scrolling direction corresponding to the user operation behavior according to the original offset value and the dynamic offset value;
[0082] After receiving the scroll operation data, the terminal device will perform external listening and subsequent processing outside the view playback component. By comparing the original offset value and the dynamic offset value, the terminal device can determine the user's scrolling direction, whether it is sliding up or down. For example, if the dynamic offset value is greater than the original offset value, the user is scrolling up, otherwise it is scrolling down.
[0083] Step S2300: Determine a target drama number index and a target episode number index corresponding to a target drama view scrolled to in the scrolling direction based on the dynamic offset value to form a target drama index;
[0084] Based on the scrolling direction and dynamic offset value, the terminal device can calculate the target drama number index and target episode number index reached by sliding according to the deviation of the dynamic offset value from the current drama offset value (totalOffsetY) and the view height corresponding to a single view in the view playback component. The target drama number index and the target episode number index constitute the target episode index, which is the feature identifier corresponding to the target episode view.
[0085] Since the view playback component is used to sequentially arrange multiple episodes of each of multiple repertoires in the form of an episode playlist, the target episode number index is used to indicate the specific repertoire loaded by the view playback component, and the target episode number index is used to indicate the specific episode in the specific repertoire. Therefore, the target episode index can be used to refer to the target episode view and the corresponding target episode in the episode playlist of the view playback component.
[0086] This embodiment demonstrates significant technical effects by adapting to the characteristics of the view playback component in the cross-platform development framework. Specifically, by using the built-in listener of the view playback component, such as the onScroll event listener in React Native, this embodiment can accurately capture and respond to user scrolling events and obtain scrolling operation data in real time. These data include in-situ offset values and dynamic offset values, which are the key to determining the user's scrolling direction and target episode index. By listening and processing outside the view playback component, this embodiment not only improves the flexibility and response speed of data processing, but also ensures the accuracy of the scrolling operation and the accuracy of the target episode index. In addition, this embodiment constructs an accurate target episode index by dynamically calculating the target drama number index and the target episode number index, thereby achieving instant response to the user's scrolling intention and smooth episode switching. This technical solution makes full use of the advantages of the cross-platform view playback component and provides an efficient, accurate and user-friendly episode scrolling playback experience.
[0087] On the basis of any embodiment of the method of the present application, based on the dynamic offset value, determining a target drama number index and a target episode number index corresponding to the target drama view scrolled to in the scrolling direction to form a target drama index includes:
[0088] Step S2310: determining a scroll offset interval defined by a current play offset value and a next play offset value in the view playback component;
[0089] Defining the scroll offset interval determines the target episode view that the user scrolls to. The scroll offset interval is determined based on the current episode offset value (totalOffsetY) and the next episode offset value (totaloffetY+currentSectionHeight) in the view playback component. The "view playback component" mentioned here usually refers to components such as SectionList or FlatList in ReactNative that can display long lists of data and support scrolling. In these components, each section and the episodes (videos) it contains are arranged in order.
[0090] Specifically, the starting point of the scroll offset interval is the current show offset value (totalOffsetY), which is a static reference point that indicates the position of the current show in the view playback component before scrolling begins. The end point of the scroll offset interval is the offset value of the next show, which is also a static value that indicates the position of the show immediately following the current show in the view playback component. It is not difficult to understand that the next show offset value is actually determined by the current show offset value plus the entire show view height (currentSectionHeight) occupied by the next show, while the current show offset value (totalOffsetY) is obtained by accumulating the entire show view height (currentSectionHeight) of each previously ordered show, including the current show in the episode playlist.
[0091] Once the size of the window after the computer program of the present application is run is determined, the corresponding view height is also determined. Taking the full-screen display of the window as an example, its view height depends on the screen height of the graphical user interface displayed by the terminal device. Generally speaking, the screen height of the graphical user interface is determined, so the view height (screenHeight) of each view is also determined. In this embodiment, the view height can be set by default to be equal to the screen height, so the whole show view height (currentSectionHeight) of each show is actually the number of episodes (num) of the whole show multiplied by the view height (screenHeight). For the convenience of intuitive understanding, if totalOffsetY is used to represent the current show offset value, and currentSectionHeight is used to represent the whole show view height of the next show, then the starting point and end point of the scrolling offset interval can be expressed by the following formulas respectively:
[0092] Current play offset value = totalOffsetY
[0093] Next play offset value = totalOffsetY + currentSectionHeight
[0094] Further,
[0095] The currentSectionHeight can be calculated based on the number of episodes in the play and the view height screenHeight:
[0096] currentSectionHeight=num*screenHeight
[0097] Therefore, the rolling offset interval can be further expressed as:
[0098] Scroll offset interval = [totalOffsetY, totalOffsetY + num * screenHeight]
[0099] This formula reflects the dynamic calculation process of the scroll offset interval, where totalOffsetY is a dynamic value that changes with the user's scrolling behavior, while num and screenHeight are static values, representing the number of episodes of the current show and the screen height occupied by a single episode, respectively. Through this formula, technicians can accurately calculate the scroll offset interval and then determine the target episode view that the user scrolls to.
[0100] Step S2320: Determine a target drama number index corresponding to the target drama view according to a numerical comparison relationship between the dynamic offset value and the scrolling offset interval;
[0101] Once the scroll offset interval is determined, the target play number index sectionIndex can be determined using the position of the dynamic offset value relative to the interval. This process requires accurate identification of the index position of the play to which the user scrolls.
[0102] The scroll offset range is defined by two static values, the current episode offset value (totalOffsetY) and the next episode offset value (totalOffsetY+currentSectionHeight). The dynamic offset value (newOffsetY) is a value that changes in real time when the user scrolls. It is directly related to the screen height (screenHeight) and the number of episodes (num). When the user scrolls, the dynamic offset value is updated to reflect the user's scroll position.
[0103] The key to determining the target play number index is to compare the dynamic offset value with the boundary of the scroll offset interval. If the dynamic offset value is between the current play offset value and the next play offset value, the user is still scrolling in the current play (section), and the target play number index remains unchanged. If the dynamic offset value is greater than the next play offset value, the user has scrolled to the next play, and the target play number index needs to be increased by 1. On the contrary, if the dynamic offset value is less than the current play offset value, it means that the user has scrolled to the previous play, and the target play number index needs to be reduced by 1.
[0104] For example, suppose the user scrolls from the first play to the second play. Initially, totalOffsetY is 0 and currentSectionHeight is the total height of the first play. As the user scrolls down, the value of newOffsetY gradually increases. Once newOffsetY exceeds totalOffsetY+currentSectionHeight, the terminal device recognizes that the user has scrolled to the second play, and the target play number index is updated to 1 accordingly.
[0105] In the specific implementation, the continuity and real-time nature of scrolling also need to be considered. The terminal device needs to continuously monitor the scrolling events and update the dynamic offset value in real time. In this way, it can ensure that no matter how fast the user scrolls, the system can accurately track and determine the target drama index.
[0106] In addition, special situations need to be considered, such as when the user quickly scrolls to the bottom or top of the list. In these cases, the terminal device can perform additional checks and adjustments to ensure the correctness of the target drama index and the smoothness of the user interface.
[0107] Through the above method, technicians can accurately implement the function of determining the target drama index based on the scroll offset interval without additional creative work. This process is clear and can adapt to different scrolling behaviors and speeds, ensuring the accuracy and smoothness of users when scrolling to select dramas.
[0108] Step S2330: If the target play number index indicates the current play, determine the current play offset value of the play indicated by the target play number index in the view playback component, and calculate the offset value increment of the dynamic offset value relative to the current play offset value;
[0109] Once it is determined that the target episode index sectionIndex points to the current episode, the offset value increment (sectionOffsetY) of the dynamic offset value (newOffsetY) relative to the current episode offset value (totalOffsetY) can be calculated based on the target episode index so as to further determine the target episode index videoIndex in the current episode.
[0110] First, the terminal device obtains the current play offset value, that is, totalOffsetY, which is also the position of the play in the view playback component before scrolling begins. Then, the terminal device updates the dynamic offset value newOffsetY in real time to reflect the real-time position of the user when scrolling. The calculation formula for the offset value increment sectionOffsetY is:
[0111] sectionOffsetY=|newOffsetY-totalOffsetY|
[0112] This delta value actually represents the distance the user has moved from the beginning of the episode as they scroll. For example, if the user scrolls from episode 1 to episode 2, the delta offset value will be the distance from the top of episode 1 to the point where the user stopped scrolling.
[0113] Step S2340: determine a corresponding rounding method according to different scrolling directions, round the ratio between the offset value increment and the view height of the view playback component, and use the rounding result as the target episode number index corresponding to the target episode view.
[0114] Next, the terminal device rounds the ratio between the offset value increment (sectionOffsetY) and the view height (screenHeight) of the view playback component according to the scrolling direction. The rounding method depends on the user's scrolling direction: if the user scrolls up, it rounds up (Math.ceil); if the user scrolls down, it rounds down (Math.floor). The rounded result will be used as the target episode number index corresponding to the target episode view.
[0115] For example, if the user scrolls down and each episode occupies the screen height screenHeight, the terminal device will calculate the target episode index videoIndex:
[0116] videoIndex=Math.floor(sectionOffsetY / screenHeight)
[0117] If the user scrolls up, the target episode index videoIndex is determined by rounding up:
[0118] videoIndex=Math.ceil(sectionOffsetY / screenHeight)
[0119] Through the above calculations, the terminal device can accurately determine the target episode view that the user has scrolled to, thereby achieving fast and seamless episode switching and optimizing the user's viewing experience. The implementation of this process does not require additional creative work, but is based on clear calculation rules and logic, ensuring the feasibility and efficiency of the technology.
[0120] The reason why scrolling in different directions needs to be rounded up (Math.ceil) and rounded down (Math.floor) respectively is to ensure that the interface can respond to the user's scrolling intention immediately and accurately when the user scrolls through the episodes. When the user scrolls up, rounding up ensures that the interface switches to the previous episode view as soon as the scrolling action starts, because scrolling up means that the user wants to view earlier content. Conversely, when the user scrolls down, rounding down ensures that the interface switches to the next episode view only when the user stops scrolling, because scrolling down usually means that the user wants to continue viewing subsequent content. This rounding method makes the playback experience felt by the user during the scrolling operation smoother and more intuitive, while avoiding frequent switching of episode views during the scrolling process, reducing misoperations or interface flickering caused by too fast scrolling speed, and enhancing the accuracy and predictability of user interaction with the episode playlist.
[0121] The beneficial effect achieved by this embodiment is that it optimizes the specific structure of the view playback component in the cross-platform framework and realizes lightweight computing, so as to efficiently and accurately determine the target episode index. By real-time monitoring of scrolling events and quickly calculating the scrolling offset interval, it can immediately respond to the user's scrolling behavior, whether the user is operating on the iOS or Android platform. Accurate dynamic offset value calculation and intelligent rounding strategy ensure that when the user scrolls, the target episode view can be immediately identified and located without complex data processing. This lightweight computing not only reduces the computing burden of the terminal device, but also improves the response speed, making the user interface smoother, while ensuring a consistent user experience on different platforms and devices. Through this technical advantage, this embodiment significantly improves the performance of cross-platform applications in processing long list scrolling and view switching, especially in achieving continuous and seamless episode browsing and playback, showing its systematic innovation and practicality.
[0122] Based on any embodiment of the method of the present application, adding the singleton player to the new current episode view, and playing the episode data corresponding to the target episode index by the singleton player, includes:
[0123] Step S3100: query the cache status table according to the target episode index to determine whether the target episode view has saved playback status information, wherein the playback status information includes the playback progress corresponding to the last time the episode data corresponding to the target episode index was stopped;
[0124] The cache status table is a data structure used in the terminal device to record the status information of the user when playing the episode. It is created when the episode scrolling function is enabled and is dynamically updated while the user is watching the episode. When a user watches an episode and reaches a certain progress, the terminal device automatically captures this playback progress and stores it as a data record together with the corresponding episode index in the cache status table. In this way, every time the user pauses or leaves the current episode view, its playback status has been recorded, so that the user can continue watching from the same progress when he returns later.
[0125] In one embodiment, the maintenance of the cache status table includes several key steps: first, an empty status table is initialized when the function is started; then, when the user watches the episode and pauses or stops, the status table is updated to reflect the latest playback progress; in addition, when the user selects a new episode view, the terminal device queries the status table to retrieve whether there is any saved playback status information; if there is a record in the status table, the terminal device will use this information to control the player to continue playing from the progress where it stopped last time; finally, the status table is continuously maintained to ensure that the user's playback progress can be accurately recorded each time.
[0126] In terms of data structure, the cache status table can be stored as a key-value pair, with the target episode index of each show as the key and the corresponding playback status information as the value. The key is the concatenation of the target episode number index and the target episode number index in the target episode index. In this way, when a query needs to be performed, the corresponding playback status information can be determined according to the target episode index in the same way.
[0127] It is not difficult to understand that the target episode index in the cache status table indicates that the corresponding target episode is a historically played episode. If the corresponding playback status information cannot be queried in the cache status table according to a given target episode index, it means that the corresponding target episode has not been played.
[0128] Step S3200: When the playback status information exists, control the single-instance player to start from the playback progress in the playback status information, load the episode data corresponding to the target episode index from the cache, and make the single-instance player continue to play the corresponding episode from the playback progress;
[0129] If the corresponding playback status information exists in the cache status table, it means that the user has watched the episode at some point in the past and stopped playing at a certain progress. At this time, the terminal device will use this information to control the singleton player to continue playing from the last stopped playback progress. The singleton player is a design pattern that ensures that only one player instance is created and managed in the entire application or system, thereby optimizing resource usage and playback control.
[0130] For example, if the user stopped at the 58th second when watching a certain episode last time, when the user selects the episode again, the terminal device finds the last playback progress by querying the cache status table and controls the singleton player to start playing from the 58th minute instead of from the beginning, thus providing the user with a seamless viewing experience.
[0131] Through this mechanism, the terminal device can not only restore the user's playback status, but also effectively use cached data, reduce dependence on network resources, speed up playback loading, and reduce data transmission costs. In addition, this process is based on clear query and control logic, ensuring the feasibility and efficiency of the technology.
[0132] Step S3300: When the playback status information does not exist, control the singleton player to load and play the drama data corresponding to the target drama index from the cache area, where the drama data has been downloaded from an external data source to the cache area in advance.
[0133] In the terminal device, when the playback status information corresponding to the target episode index is not found in the cache status table, it means that the user has not watched it before or the playback status has not been recorded, so the episode data needs to be loaded from the cache to initialize the playback. The cache is a storage area that pre-stores the downloaded content from the external data source. It allows the terminal device to quickly access the episode data without real-time downloading, thereby improving playback efficiency and reducing waiting time.
[0134] During this process, the terminal device first checks whether the episode data corresponding to the target episode index already exists in the cache area. If the data has been pre-downloaded and stored in the cache area, the terminal device will read the data directly from that area. This loading operation utilizes the terminal device's storage system to quickly locate and extract episode data through file paths or database queries.
[0135] Next, the terminal device will control the singleton player to load this data. As a global access point, the singleton player is responsible for playback operations, ensuring unified management and resource optimization of player instances throughout the application. Since there is no saved playback progress information at this time, the singleton player will play the episode data from the beginning.
[0136] For example, if a user is watching a new series for the first time or has no previous playback status record, the terminal device will automatically extract the series data from the cache when the user selects the series and immediately start the singleton player to play it. This mechanism ensures that even without historical playback information, users can quickly obtain content and enjoy a smooth viewing experience.
[0137] In addition, the way of loading episode data from the cache also reflects the consideration of terminal devices in terms of resource management and user experience. By reducing the dependence on network bandwidth, terminal devices can provide stable playback services even when network conditions are poor, while reducing data transmission costs and improving playback response speed.
[0138] In short, when the playback status information is missing in the cache status table, the terminal device loads the episode data from the cache and plays it using a singleton player, achieving fast access and efficient playback while optimizing user experience and system performance. This process is automatic, does not require user intervention, and is based on clear operating logic, ensuring the feasibility and efficiency of the technology.
[0139] This embodiment shows significant technical advantages in breakpoint resume and cache utilization, especially in combination with a single-instance player. Through intelligent query of the cache status table, this embodiment can quickly detect and restore the user's previous playback progress, realize the breakpoint resume function, and greatly improve the consistency of the user experience. When the saved playback status information is detected, the single-instance player can seamlessly continue to play from the point where it last stopped, without the user manually searching or waiting for rebuffering, thereby significantly improving playback efficiency and convenience. In addition, this embodiment reduces the reliance on real-time network downloads by effectively utilizing the cache area to store pre-downloaded episode data, which not only speeds up the loading speed during initial playback and switching episodes, but also ensures the smoothness and stability of playback in environments with unstable networks or limited bandwidth. The introduction of a single-instance player ensures efficient management and optimized use of resources, and avoids the memory usage and processing power waste that may be caused by multi-instance players. Combining these advantages, this embodiment provides users with a smoother, more efficient and personalized viewing experience, while reducing the operating cost of the application and improving the stability and response speed of the system.
[0140] Based on any embodiment of the method of the present application, maintaining the new current episode view and the episode views immediately following the current episode view, and destroying other episode views, includes:
[0141] Step S4100: In response to a setting event corresponding to setting the target episode view as a new current episode view, calling the pre-created target episode view and switching it to a top-level view in the graphical user interface;
[0142] When the previously created target episode view is set as the new current episode view, the temporarily recycled singleton player can then be added to the view and prepared to play the corresponding episode data. This process starts by responding to the set event, which corresponds to the target episode view being set as the new current episode view. After starting the response, the terminal device calls the pre-created target episode view and switches it to the top-level view in the graphical user interface, ensuring smooth transition and immediate usability of the user interface.
[0143] Step S4200: based on the view index number of the new current episode view, retain or create a new preceding episode view and a succeeding episode view of the current episode view, wherein the preceding episode view and the succeeding episode view are respectively used as target episode views corresponding to sliding the new current episode view along different scrolling directions;
[0144] The terminal device will perform view maintenance operations based on the view index number of the new current episode view. This includes retaining or recreating the previous and next episode views of the new current episode view. The previous and next episode views are used to support the direct adjacent episode views of the target episode view when the user slides in different scroll directions. For example, if the user slides up or down while scrolling through the episode list, the previous and next episode views will serve as adjacent episode views that can be quickly accessed, providing a continuous viewing experience.
[0145] To clarify the concepts, the previous episode view referred to in this article can be understood as the previous episode view of the current episode view, and the subsequent episode view can be understood as the subsequent episode view of the current episode view. To achieve this function, the terminal device will increase or decrease the view index number of the current episode view accordingly to determine the specific locations of the previous and subsequent episode views. The terminal device will then load or update these views to ensure that they contain the correct episode data and are ready to be accessed by the user at any time.
[0146] Any current episode view and its previous episode view and subsequent episode view can be regarded as the current viewing sequence. Each view in the current viewing sequence will be maintained in memory, while other episode views can be destroyed and created when needed.
[0147] Step S4300: Delete other episode views before the preceding episode view and after the succeeding episode view.
[0148] The core task of this step is to remove those episode views that are outside the current viewing sequence, that is, those episode views that users are unlikely to access immediately during scrolling.
[0149] Specifically, after the new current episode view and its adjacent previous and next episode views are determined and maintained, the terminal device will perform a cleanup operation. This operation includes deleting the episode view before the previous episode view and the episode view after the next episode view. This design is based on an observation: when users scroll through episodes, they usually only pay attention to the episode they are currently watching and the episodes immediately before and after. Therefore, retaining episode views other than these views is not only unnecessary, but also takes up valuable memory and processing resources, which may cause system performance to degrade.
[0150] In this embodiment, the terminal device determines which episode views belong to the previous and next order by tracking the index number of the current episode view. Once these views are confirmed, the device will traverse all loaded episode views, identify those that are out of the current viewing sequence, and clear them from memory. This not only releases the resources associated with these views, but also helps prevent memory leaks and maintain the responsiveness and smoothness of the application.
[0151] For example, if the user has scrolled to episode 10, whose predecessor and successor correspond to episodes 9 and 11 respectively, the terminal device will retain the views corresponding to episodes 9 to 11, and delete all episode views before and after episode 8 and episode 12. In this way, only the episode views that the user is most likely to interact with are retained in memory, while other views are cleared in a timely manner, ensuring the effective use of system resources.
[0152] In other embodiments, it is also possible to further consider retaining a predetermined number of more episode views, such as retaining 2 or 3 episode views each for the preceding and succeeding sequences, the number of which can be preset by a person skilled in the art in combination with the performance of the terminal device.
[0153] At the process level after the program is running, the episode view is actually implemented by creating view containers in memory. Each view container will occupy corresponding running resources. Therefore, appropriately destroying some view containers to reduce the residence of corresponding episode views will help ensure the smoothness of program operation.
[0154] Through this intelligent view management strategy, the terminal device not only maintains the smoothness and intuitiveness of the interface, but also improves the performance and stability of the entire application by reducing unnecessary resource usage. This strategy reflects the dual focus on user experience and system efficiency, and is an important part of the technical solution of this application. In this way, the terminal device not only ensures the smoothness and intuitiveness of the user interface, but also improves the efficiency of memory and processing resources by intelligently maintaining the view. This strategy reduces unnecessary resource usage and prevents performance issues caused by memory leaks, ensuring a stable playback experience even when device resources are limited. Ultimately, this technical implementation provides users with a smooth, seamless, and efficient episode scrolling playback experience.
[0155] This embodiment is particularly effective in the React Native environment because it provides a solution to the natural deficiencies of view playback components (such as SectionList or FlatList) in React Native. In React Native, although view playback components provide the ability to scroll long lists, they do not automatically manage the cache and memory usage of views, which may cause performance issues when scrolling large amounts of data. This embodiment significantly improves memory usage efficiency and scrolling performance by intelligently maintaining the episode view in the current viewing sequence while promptly destroying the view outside the sequence.
[0156] In addition, when dealing with cross-platform compatibility, React Native applications often need to sacrifice some performance to achieve a consistent user experience. This embodiment reduces rendering inconsistencies caused by platform differences by optimizing the loading and destruction of views, thereby providing a unified smooth scrolling experience on different operating systems. In this way, this embodiment not only improves the responsiveness of the application and the smoothness of the user interface, but also reduces the CPU usage caused by frequent view updates, thereby extending the battery life of the device.
[0157] It can be seen that the technical advantage of this embodiment is that it can provide an efficient view management strategy for the limitations of React Native, optimize the use of memory and CPU resources, and improve the performance and user experience of the application. This enables cross-platform applications to achieve fluency and efficiency comparable to native applications when processing complex and dynamic content lists.
[0158] Based on any embodiment of the method of the present application, after creating a new previous episode view and a subsequent episode view of the current episode view, the method includes:
[0159] Step S5100: when the preceding episode view or the succeeding episode view corresponds to an empty play, obtaining the special play information of the live broadcast room from the data server, wherein the special play information includes a plurality of sub-episodes, each of which includes a plurality of episodes, and the sub-episodes correspond to the live broadcast video data generated by a single live broadcast held by the live broadcast room in association with the same activity theme, and each episode corresponds to the episode data of a single wonderful video clip in the live broadcast video data of the sub-episode to which it belongs;
[0160] When the technical solution of the present application is combined with the exemplary live broadcast application scenario of the present application, the technical solution of the present application can be used to serve the special repertoire. Specifically, the live broadcast users in the live broadcast room hold multiple live broadcasts for the same activity theme, forming live videos corresponding to the multiple live broadcasts, which are stored in the data server. In this embodiment, the data server regards the live video data corresponding to each live broadcast as an independent repertoire (sub-drama), and according to the content of each live video data, the data server automatically extracts multiple wonderful video clips therein. These wonderful video clips are then defined by the data server as individual episodes (episodes) in the corresponding repertoire. The relationship data between the sub-drama and the episode corresponding to each activity theme, as well as the corresponding relationship between each episode and its corresponding episode data, are stored by the data server as special repertoire information, which serves as a short drama index table for subsequent calls. Specifically, it can be downloaded by the terminal device and directly added to the episode playlist formed by its view playback component.
[0161] Accordingly, after completing the creation of the previous episode view and the subsequent episode view, if the repertoire corresponding to the previous episode view or the repertoire corresponding to the subsequent episode view is an empty repertoire, that is, in the episode playlist provided by the view playback component, the corresponding repertoire of the previous episode view or the subsequent episode view has not been associated with the corresponding repertoire, in this case, the special repertoire information of the live broadcast room can be obtained on demand.
[0162] The composition of thematic repertoire information is multi-dimensional. It corresponds to each event theme setting, including multiple sub-plays, and each sub-play is further subdivided into multiple episodes. Each sub-play represents the live video data generated by a single live broadcast related to the same event theme. For example, if the event theme is a music festival, then each performance can be a sub-play, and the performances of different artists in each performance can be episodes under the sub-play. Each episode corresponds to a single wonderful video clip in the live video data, such as the entire singing of a song. These clips are defined as episodes in the episode.
[0163] In order to obtain thematic repertoire information, the terminal device initiates a request to the data server to obtain the required thematic repertoire information. The acquisition of this information is achieved through the pre-established index and database query on the data server, ensuring the efficiency and accuracy of information retrieval. The acquired information can then be used to build or update the episode playlist of the view playback component, and add the episodes (sub-episodes) of the new repertoire (sub-episode) to the episode playlist.
[0164] Step S5200: Determine the target episode data corresponding to the preceding episode view and / or the succeeding episode view according to the special episode information;
[0165] After the terminal device successfully obtains the special drama information of the live broadcast room, it can determine the target drama data corresponding to the previous drama view and / or the subsequent drama view based on this information. This step is a key link in achieving accurate content presentation, ensuring that users can smoothly access the desired drama data when scrolling and selecting.
[0166] Specifically, the special program information provides the terminal device with a detailed catalog of programs and episodes, each of which corresponds to specific episode data, that is, the highlights of the live broadcast. Using this information, the terminal device can identify and determine the specific content of the previous or next episode view selected by the user through the scrolling operation. This process is determined by querying the special program information to ensure that the selected view corresponds to the correct highlights.
[0167] For example, if a user scrolls and selects a subsequent episode view while watching a live broadcast of a music festival theme, the terminal device can search for the corresponding sub-episode and episode in the special program information based on the direct or indirect indication relationship of the index number of the view. Once a matching episode is found, the terminal device will determine the wonderful video clips in the episode as the target episode data.
[0168] In the data matching process, the terminal device can use a variety of technical means, such as index search, keyword matching or timestamp comparison, to achieve fast and accurate data positioning. In addition, the terminal device can also intelligently recommend or prioritize specific episodes based on the user's viewing history and preferences, thereby providing a personalized viewing experience.
[0169] Step S5300: initiate a stream pull request to a data server and download the target drama data, and store the target drama data in a cache area in association with its corresponding drama index.
[0170] After the terminal device determines the target episode data corresponding to the preceding episode view and / or the succeeding episode view, the next operation is to initiate a stream pull request to the data server and download the target episode data. By pre-downloading and caching, it is ensured that the user can watch the selected episode seamlessly.
[0171] A pull stream request is a network communication mechanism that allows media data to be dynamically obtained from a data server. In this embodiment, once the terminal device determines the target episode data, it will construct a pull stream request, specifying the required episode index and related parameters. After receiving the request, the data server will retrieve the corresponding video clip from the stored special episode information according to the content of the request and stream it to the terminal device.
[0172] During the download process, the terminal device will temporarily store the received video data in the cache. The cache is a storage area on the terminal device that is used to temporarily store the data of the episode that is being played or about to be played. The advantage of this is that even in poor network conditions, users can continue to watch the episode because some of the data has been cached and stored locally.
[0173] In addition, the data stored in the cache area will be associated with the corresponding episode index. Combined with the description of the target episode index in the previous text of this application, it can be seen that the episode index is a key data structure that records the metadata of each episode, including but not limited to the episode number and episode number of the episode, and can also further include the sequence, title, duration, etc. as needed. By associating the episode data with the episode index, the terminal device can more efficiently manage and index the media content in the cache, which is convenient for users to quickly access and play.
[0174] For example, if a user selects a subsequent episode view of a music festival theme, the terminal device will initiate a stream pull request to the data server based on the determined target episode data. After the data server responds to the request, it streams the corresponding artist performance video clip to the terminal device, which receives the data and stores it in the cache, while updating the episode index to ensure that the user can seamlessly transition from the currently watched episode to the next highlight clip.
[0175] After the episode data is downloaded to the cache area, and the current episode view or subsequent episode view corresponding to the episode data is used as the target episode view and then switched to the new current episode view, the new current episode view can directly call the corresponding episode data from the cache area without waiting for the episode data to be downloaded, thereby achieving seamless switching and smooth transition.
[0176] This embodiment has achieved significant technical advantages in converting various activity themes in live webcasts into short play forms. By automatically extracting highlights from live videos and defining them as independent episodes, this embodiment not only enriches the organizational form of content, but also improves the flexibility and selectivity of user viewing. This conversion enables users to choose to watch highlights under specific themes based on their interests and time, rather than passively watching the entire live broadcast. In addition, by constructing special drama information to play the role of the short drama index table, this embodiment achieves effective management and rapid retrieval of a large amount of live content, greatly improving the user experience. At the same time, through stream pull requests and intelligent caching strategies, this embodiment ensures that users can enjoy a smooth playback experience even in poor network conditions, reducing buffering and interruptions and improving viewing continuity. This technical implementation not only optimizes the reuse of live content, but also provides a new business model and viewing form for live webcasts, enhancing the attractiveness of live content and user stickiness.
[0177] In addition to the application scenario of live broadcast, this application is also applicable to the scenario of video on demand (VOD). Video on demand service allows users to select and watch video content stored on the server according to their own schedule and preferences.
[0178] In video-on-demand services, users can access video libraries through terminal devices such as personal computers, smart TVs, and mobile devices. The video library contains various types of video content, such as movies, TV series, documentaries, educational videos, etc. These contents are organized by category, release time or other criteria. Users can browse the video list and select the video of interest to play.
[0179] In the scenario of video on demand service, this application can be applied to realize dynamic organization and smooth playback of video content. Specifically, when a user scrolls to select a video in the view playback component, the system listens to the scroll event and obtains the corresponding scroll operation data. Based on this data, the system can instantly determine the video content selected by the user and dynamically load the corresponding video data for playback.
[0180] For example, when a user scrolls through a list of TV series, the system determines the specific episode selected by the user based on the scrolling operation data and automatically loads the video file of the episode. If the user leaves the current episode while watching, the system stops playing and temporarily recycles the related resources. When the user returns or selects a new episode, the system responds quickly and loads the new episode data from the cache area to achieve seamless switching and playback.
[0181] In addition, this application can also optimize resource management in video on demand services. By maintaining the episode view and its adjacent episode views in the current viewing sequence and destroying other non-adjacent episode views, the system can reduce unnecessary resource usage and improve memory usage efficiency. This not only improves the responsiveness and stability of the application, but also provides users with a smoother and more personalized viewing experience.
[0182] In the application scenario of video on demand service, the technical solution of this application demonstrates its innovation and practicality in improving the convenience of content access, optimizing resource management, and enhancing user experience. Whether it is live broadcast or video on demand, the technical solution of this application can provide an efficient, smooth, and user-friendly video playback solution.
[0183] See also Figure 3 According to one aspect of the present application, a scrolling playback device for an episode is provided, comprising an episode positioning module 1100, an exit processing module 1200, an entry processing module 1300, and a view maintenance module 1400, wherein the episode positioning module 1100 is configured to listen to the scrolling operation data corresponding to the current episode view triggering the user scrolling event, and determine the target episode index of the target episode view in the corresponding scrolling direction according to the scrolling operation data, and the target episode view is sequentially connected to the current episode view; the exit processing module 1200 is configured to stop the single episode in the current episode view. The instantiated player plays the corresponding episode data and removes the singleton player from the current episode view to achieve temporary recycling; the entry processing module 1300 is configured to set the target episode view as the new current episode view, add the singleton player to the new current episode view, and let the singleton player play the episode data corresponding to the target episode index; the view maintenance module 1400 is configured to respond to a setting event corresponding to setting the target episode view as the new current episode view, maintain the new current episode view and the episode views that are immediately sequentially connected to it, and destroy other episode views.
[0184] Based on any embodiment of the device of the present application, the episode positioning module 1100 includes: a listening processing module, which is configured to respond to a user scrolling event triggered by a current episode view in the view playback component through a listener preset on the view playback component, and capture scrolling operation data corresponding to the user scrolling event, wherein the scrolling operation data includes an in-situ offset value of the view playback component before the user operation behavior occurs, and a dynamic offset value reached by the view playback component due to the user operation behavior; a direction identification module, which is configured to identify a scrolling direction corresponding to the user operation behavior according to the in-situ offset value and the dynamic offset value; an index determination module, which is configured to determine a target drama number index and a target episode number index corresponding to a target drama view reached by scrolling in the scrolling direction based on the dynamic offset value, so as to form a target drama index; wherein the view playback component is a component of a cross-platform framework, which is used to sequentially arrange multiple episodes of each drama in multiple dramas, the target drama number index is used to indicate a specific drama loaded by the view playback component, and the target episode number index is used to indicate a specific drama in the specific drama.
[0185] Based on any embodiment of the device of the present application, the index determination module includes: an interval determination module, which is configured to determine the scrolling offset interval defined by the current drama offset value and the next drama offset value in the view playback component; a drama number determination module, which is configured to determine the target drama number index corresponding to the target episode view based on the numerical comparison relationship between the dynamic offset value and the scrolling offset interval; an increment determination module, which is configured to determine the current drama offset value of the drama indicated by the target drama number index in the view playback component if the target drama number index indicates the current drama, and calculate the offset value increment of the dynamic offset value relative to the current drama offset value; an episode number determination module, which is configured to determine the corresponding rounding method according to different scrolling directions, round the ratio between the offset value increment and the view height of the view playback component, and use the rounding result as the target episode number index corresponding to the target episode view.
[0186] Based on any embodiment of the device of the present application, the collection number determination module includes: a downward rounding module, which is configured to round the ratio by rounding down to obtain the target collection number index when the scrolling direction is sliding downward; and an upward rounding module, which is configured to round the ratio by rounding up to obtain the target collection number index when the scrolling direction is sliding upward.
[0187] Based on any embodiment of the device of the present application, the entry processing module 1300 includes: a status query module, which is configured to query the cache status table according to the target episode index to determine whether the target episode view has saved playback status information, and the playback status information includes the playback progress corresponding to the episode data corresponding to the target episode index when the last playback was stopped; a breakpoint resume module, which is configured to control the singleton player to start from the playback progress in the playback status information when the playback status information exists, and load the episode data corresponding to the target episode index from the cache area, so that the singleton player continues to play the corresponding episode from the playback progress; a start playback module, which is configured to control the singleton player to load and play the episode data corresponding to the target episode index from the cache area when the playback status information does not exist, and the episode data has been downloaded from an external data source to the cache area in advance.
[0188] Based on any embodiment of the device of the present application, the view maintenance module 1400 includes: a response switching module, which is configured to respond to a setting event corresponding to setting the target episode view as a new current episode view, call the pre-created target episode view, and switch it to the top-level view in the graphical user interface; a sequence maintenance module, which is configured to retain or create a previous episode view and a subsequent episode view of the new current episode view based on the view index number of the new current episode view, and the previous episode view and the subsequent episode view are respectively used as the target episode views corresponding to the sliding of the new current episode view along different scrolling directions; a view cleaning module, which is configured to delete other episode views before the previous episode view and after the subsequent episode view.
[0189] On the basis of any embodiment of the device of the present application, after the sequence maintenance module, the device of the present application also includes: a special topic acquisition module, which is configured to obtain the special topic repertoire information of the live broadcast room from the data server when the previous episode view or the subsequent episode view corresponds to an empty repertoire, the special topic repertoire information includes multiple sub-series, each sub-series includes multiple episodes, the sub-series corresponds to the live video data generated by a single live broadcast held in the live broadcast room associated with the same activity theme, and each episode corresponds to the episode data of a single wonderful video clip in the live video data of the sub-series to which it belongs; an episode determination module, which is configured to determine the target episode data corresponding to the previous episode view and / or the subsequent episode view according to the special topic repertoire information; a stream pulling cache module, which is configured to initiate a stream pulling request to the data server and download the target episode data, and store the target episode data in association with its corresponding episode index in the cache area.
[0190] Another embodiment of the present application also provides a device for scrolling and playing episodes. Figure 4As shown, a schematic diagram of the internal structure of a series scrolling playback device. The series scrolling playback device includes a processor, a computer-readable storage medium, a memory, and a network interface connected through a system bus. Among them, the computer-readable non-volatile readable storage medium of the series scrolling playback device stores an operating system, a database, and computer-readable instructions. The database may store an information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a series scrolling playback method.
[0191] The processor of the series scrolling playback device is used to provide computing and control capabilities to support the operation of the entire series scrolling playback device. The memory of the series scrolling playback device may store computer-readable instructions, which, when executed by the processor, may enable the processor to execute the series scrolling playback method of the present application. The network interface of the series scrolling playback device is used to connect and communicate with a terminal.
[0192] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the drama scrolling playback device to which the scheme of the present application is applied. The specific drama scrolling playback device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0193] In this embodiment, the processor is used to execute Figure 3 The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to realize data transmission between user terminals or servers. The non-volatile readable storage medium in this embodiment stores the program code and data required to execute all modules in the episode scrolling playback device of this application, and the server can call the program code and data of the server to execute the functions of all modules.
[0194] The present application also provides a non-volatile readable storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method for scrolling episode playback of any embodiment of the present application.
[0195] The present application also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any embodiment of the present application when executed by one or more processors.
[0196] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0197] In summary, this application not only solves the performance problems in cross-platform development through its technical solutions, provides an excellent control experience compatible with frameworks such as React Native, but also demonstrates systematic innovation and improvement in playback smoothness, resource management, and user experience.
Claims
1. A method for rolling play of an episode, characterized in that: include: Listening to the scrolling operation data generated after the current episode view triggers a user scrolling event, and determining the target episode index of the target episode view in the corresponding scrolling direction according to the scrolling operation data, wherein the target episode view is sequentially adjacent to the current episode view; Stopping the singleton player in the current episode view from playing corresponding episode data, and removing the singleton player from the current episode view to achieve temporary recycling; Setting the target episode view as a new current episode view, adding the singleton player to the new current episode view, and having the singleton player play the episode data corresponding to the target episode index; In response to a setting event corresponding to setting the target episode view as a new current episode view, the new current episode view and the episode views immediately following the current episode view are maintained, and other episode views are destroyed.
2. The method for rolling play of dramas according to claim 1, characterized in that: Listening to the scrolling operation data generated after the current episode view triggers a user scrolling event, and determining the target episode index of the target episode view in the corresponding scrolling direction according to the scrolling operation data, including: By means of a listener preset on the view playback component, in response to a user scrolling event triggered by the current episode view in the view playback component, the scrolling operation data corresponding to the user scrolling event is captured, wherein the scrolling operation data includes an original offset value of the view playback component before the user operation occurs, and a dynamic offset value reached by the view playback component due to the user operation; Identifying a scrolling direction corresponding to a user operation behavior according to the original position offset value and the dynamic offset value; Based on the dynamic offset value, determine a target drama number index and a target episode number index corresponding to a target drama view scrolled to in the scrolling direction to form a target drama index; The view playback component is a component of a cross-platform framework, which is used to sequentially arrange multiple episodes of each of multiple repertoires. The target drama number index is used to indicate the specific drama loaded by the view playback component, and the target episode number index is used to indicate the specific episode in the specific drama.
3. The method for rolling play of dramas according to claim 2, characterized in that: Based on the dynamic offset value, determining a target drama number index and a target episode number index corresponding to a target drama view scrolled to in the scrolling direction to form a target drama index, including: Determine a scroll offset interval defined by a current play offset value and a next play offset value in the view playback component; Determining a target drama number index corresponding to the target drama view according to a numerical comparison relationship between the dynamic offset value and the scrolling offset interval; If the target play number index indicates a current play, determine a current play offset value of the play indicated by the target play number index in the view playback component, and calculate an offset value increment of the dynamic offset value relative to the current play offset value; The corresponding rounding method is determined according to different scrolling directions, the ratio between the offset value increment and the view height of the view playback component is rounded, and the rounding result is used as the target episode number index corresponding to the target episode view.
4. The method for rolling play of dramas according to claim 3, characterized in that: Determining a corresponding rounding method according to different scrolling directions, rounding the ratio between the offset value increment and the view height of the view playback component, and using the rounding result as the target episode number index corresponding to the target episode view, including: When the scrolling direction is sliding downward, the ratio is rounded down to obtain the target set number index; When the scrolling direction is sliding upward, the ratio is rounded up to obtain the target set number index.
5. The method for rolling play of an episode according to any one of claims 1 to 4, characterized in that: Adding the singleton player to the new current episode view, and having the singleton player play the episode data corresponding to the target episode index, comprises: querying a cache status table according to the target episode index to determine whether the target episode view has saved playback status information, wherein the playback status information includes a playback progress corresponding to the last time playback of the episode data corresponding to the target episode index was stopped; When the playback status information exists, the single instance player is controlled to start from the playback progress in the playback status information, load the episode data corresponding to the target episode index from the cache area, and make the single instance player continue to play the corresponding episode from the playback progress; When the playback status information does not exist, the singleton player is controlled to load and play the episode data corresponding to the target episode index from the cache area, and the episode data has been downloaded from an external data source to the cache area in advance.
6. The method for rolling play of an episode according to any one of claims 1 to 4, characterized in that: Maintain the new current episode view and the episode views immediately following it, and destroy other episode views, including: In response to a setting event corresponding to setting the target episode view as a new current episode view, calling the pre-created target episode view and switching it to a top-level view in the graphical user interface; Based on the view index number of the new current episode view, retain or create a new preceding episode view and a succeeding episode view of the current episode view, wherein the preceding episode view and the succeeding episode view are respectively used as target episode views corresponding to sliding the new current episode view along different scrolling directions; Delete other episode views before the preceding episode view and after the succeeding episode view.
7. The method for rolling play of dramas according to claim 6, characterized in that: After creating a new previous and next episode views for the current episode view, include: When the preceding episode view or the succeeding episode view corresponds to an empty play, the special play information of the live broadcast room is obtained from the data server, the special play information includes multiple sub-plays, each sub-play includes multiple episodes, the sub-plays correspond to the live video data generated by a single live broadcast held by the live broadcast room associated with the same activity theme, and each episode corresponds to the episode data of a single wonderful video clip in the live video data of the sub-play to which it belongs; Determine target episode data corresponding to the preceding episode view and / or the succeeding episode view according to the special episode information; A stream pull request is initiated to a data server to download the target drama data, and the target drama data is associated with its corresponding drama index and stored in a cache area.
8. A device for rolling playback of dramas, characterized in that: include: An episode positioning module, configured to listen to scrolling operation data generated after the current episode view triggers a user scrolling event, and determine a target episode index of a target episode view in a corresponding scrolling direction according to the scrolling operation data, wherein the target episode view is sequentially adjacent to the current episode view; An exit processing module, configured to stop the singleton player in the current episode view from playing the corresponding episode data, and remove the singleton player from the current episode view to achieve temporary recycling; An entry processing module, configured to set the target episode view as a new current episode view, add the singleton player to the new current episode view, and have the singleton player play the episode data corresponding to the target episode index; The view maintenance module is configured to respond to a setting event corresponding to setting the target episode view as a new current episode view, maintain the new current episode view and the episode views immediately following it, and destroy other episode views.
9. A device for scrolling and playing episodes, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.
10. A non-volatile readable storage medium, characterized in that: It stores a computer program in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the method according to any one of claims 1 to 7 are executed.
