Video page switching method, device, medium and equipment
By preloading playback resources of adjacent pages, the hysteresis problem of users switching video pages during streaming media playback is solved, and the user experience and switching efficiency are improved.
Patent Information
- Application Number
- CN202311642729.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2043-12-01
AI Technical Summary
In streaming media playback, when users switch between different video pages, the data volume is large, resulting in high processing capacity and bandwidth usage, and buffering time occurs, affecting the user experience.
By predicting the prediction result of the user's sliding operation, if it is determined that it is switched to an adjacent page, the playback resources of the adjacent page are loaded in advance, so that the sliding operation can be played directly when it is finished, reducing the hysteresis during switching.
It effectively reduces the hysteresis of users when switching video pages, improves the user experience, and avoids lag problems caused by waiting for the video to load.
Smart Images

Figure CN117750108B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic communication technology, and in particular to the field of video page switching technology, and in particular to a video page switching method, device, medium and equipment. Background Art
[0002] When streaming media is played, such as when watching live broadcasts, users often require high resolution, high real-time performance, and high frame rate of the playback screen, which places high demands on the processing power and communication bandwidth of the mobile terminal. Currently, when users watch streaming media such as live broadcasts on mobile terminals, they can switch between different video pages by sliding the screen. However, as mentioned above, the streaming media playback data is large, and the requirements for processing power and bandwidth occupancy are very high. When users switch between different video pages, they need to wait for the video to load and play when entering a new video page, which will cause a buffering time, seriously affecting the user experience. Summary of the invention
[0003] The embodiments of the present application provide a video page switching method, apparatus, medium and device. The video page switching method provided in the embodiments of the present application is used to reduce or avoid the lag feeling caused by the user when switching video pages such as live broadcast pages.
[0004] On the one hand, an embodiment of the present application provides a video page switching method, the video page switching method comprising:
[0005] In response to triggering a sliding operation on a current page, determining a motion parameter corresponding to the sliding operation;
[0006] Based on the motion parameter, predicting a predicted operation result of the sliding operation;
[0007] In response to the predicted operation result being to switch the current page to an adjacent page, pre-loading a playback resource of the adjacent page;
[0008] In response to the end of the sliding operation, the multimedia content of the adjacent page is played according to the playback resource, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0009] In the video page switching method described in the embodiment of the present application, predicting the predicted operation result of the sliding operation based on the motion parameter includes:
[0010] Obtaining motion parameters corresponding to the current page during the process from the start to the end of the sliding operation;
[0011] A predicted operation result of the sliding operation is determined based on the motion parameter, where the predicted operation result includes switching to an adjacent page or staying on the current page.
[0012] In the video page switching method described in the embodiment of the present application, obtaining the motion parameters corresponding to the current page during the process from the start to the end of the sliding operation includes:
[0013] At the start or end of the sliding operation, an acquisition function for acquiring page motion parameters is called, and the motion parameters corresponding to the current page in the process from the start to the end of the sliding operation are acquired through the acquisition function. The motion parameters include one or more of a starting speed corresponding to the current page at the start of the sliding operation, an ending speed corresponding to the current page at the end of the sliding operation, a first acceleration corresponding to the current page from the start to the end of the sliding operation, and a second acceleration corresponding to the rebound process of the current page at the end of the sliding operation.
[0014] In the video page switching method described in the embodiment of the present application, the step of determining the predicted operation result of the sliding operation based on the motion parameter includes:
[0015] Calculating a first displacement of the current page from the start to the end of the trigger operation according to the starting speed and the first acceleration;
[0016] If the first displacement exceeds a first preset threshold, determining that the predicted operation result corresponding to the sliding operation is switching to an adjacent page;
[0017] If the first displacement does not exceed a first preset threshold, it is determined that the predicted operation result corresponding to the sliding operation is to stay on the current page.
[0018] In the video page switching method described in the embodiment of the present application, the step of determining the predicted operation result of the sliding operation based on the motion parameter includes:
[0019] Calculating, by using the termination speed and the second acceleration, a second displacement corresponding to when the current page rebounds to a speed of 0 after the trigger operation ends;
[0020] If the second displacement exceeds a second preset threshold, determining that the predicted operation result corresponding to the sliding operation is switching to an adjacent page;
[0021] If the second displacement does not exceed a second preset threshold, it is determined that the predicted operation result corresponding to the sliding operation is to stay on the current page.
[0022] In the video page switching method described in the embodiment of the present application, the step of determining the predicted operation result of the sliding operation based on the motion parameter includes:
[0023] Determining whether the first acceleration or the second acceleration exceeds a third preset threshold;
[0024] If the first acceleration or the second acceleration exceeds the third preset threshold, determining that the predicted operation result corresponding to the sliding operation is switching to an adjacent page;
[0025] If the first acceleration or the second acceleration does not exceed a third preset threshold, it is determined that the predicted operation result corresponding to the sliding operation is to stay on the current page.
[0026] In the video page switching method described in the embodiment of the present application, before preloading the playback resource of the adjacent page, the method further includes:
[0027] A player for the adjacent page is created, where the player is used to play the playback resource on the adjacent page.
[0028] In the video page switching method described in the embodiment of the present application, playing the multimedia content of the adjacent page according to the playback resource includes:
[0029] The player decodes the playback resource to obtain the data to be rendered, and renders the data to be rendered on the adjacent page. After the current page and the adjacent page are switched, the multimedia content of the adjacent page begins to be played.
[0030] In the video page switching method described in the embodiment of the present application, before preloading the playback resource of the adjacent page, the method further includes:
[0031] Determine whether the switching frequency of switching the current page to the adjacent page exceeds the preset frequency, and if it does not exceed the preset frequency, perform the operation of preloading the playback resource of the adjacent page
[0032] In the video page switching method described in the embodiment of the present application, before preloading the playback resource of the adjacent page, the method further includes:
[0033] If it is determined that the switching frequency of switching the current page to an adjacent page exceeds the preset frequency, the page viewing mode is switched from detail viewing to thumbnail viewing, and the thumbnail is used to display the cover and / or title of the corresponding page.
[0034] In the video page switching method described in the embodiment of the present application, after predicting the predicted operation result of the sliding operation based on the motion parameter, the method further includes:
[0035] If the predicted operation result is to control the current page to switch to an adjacent page, and the switching frequency exceeds the preset frequency, then when the current page switches to an adjacent page, the playback resource of the next page of the adjacent page is preloaded.
[0036] Correspondingly, another aspect of the embodiment of the present application further provides a video page switching device, the video page switching device comprising:
[0037] A determination module, configured to determine, in response to a triggering of a sliding operation on a current page, a motion parameter corresponding to the sliding operation;
[0038] A prediction module, used for predicting a predicted operation result of the sliding operation based on the motion parameter;
[0039] A loading module, configured to preload playback resources of an adjacent page in response to the predicted operation result being to switch the current page to an adjacent page;
[0040] The playing module is used to play the multimedia content of the adjacent page according to the playing resource in response to the end of the sliding operation, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0041] Correspondingly, another aspect of the embodiment of the present application further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the video page switching method as described above.
[0042] Correspondingly, on the other hand, an embodiment of the present application further provides a terminal device, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the video page switching method as described above.
[0043] The embodiment of the present application provides a video page switching method, device, medium and equipment, which determines the motion parameters corresponding to the sliding operation in response to the triggering of the sliding operation on the current page; predicts the predicted operation result of the sliding operation based on the motion parameters; in response to the predicted operation result of switching the current page to the adjacent page, pre-loads the playback resources of the adjacent page; in response to the end of the sliding operation, plays the multimedia content of the adjacent page according to the playback resources, wherein the current page and the adjacent page complete the switching after a preset time after the end of the sliding operation. Using the video page switching method provided by the embodiment of the present application, by predicting the predicted operation result corresponding to the user's sliding operation on the current page, it is analyzed whether the user wants to switch to the adjacent page or stay on the current page. If the predicted operation result is to control the current page to switch to the adjacent page, the playback resources of the adjacent page are pre-loaded, so that when the sliding operation ends, the playback resources of the adjacent page can be directly pulled up for playback, avoiding the problem of jamming when the user switches pages. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0045] Figure 1 A flowchart of a video page switching method provided in an embodiment of the present application.
[0046] Figure 2 Another flowchart of the video page switching method provided in an embodiment of the present application.
[0047] Figure 3 Another flowchart of the video page switching method provided in an embodiment of the present application.
[0048] Figure 4 A schematic diagram of the structure of a video page switching device provided in an embodiment of the present application.
[0049] Figure 5 Another structural schematic diagram of the video page switching device provided in an embodiment of the present application.
[0050] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0052] It should be noted that this solution is mainly developed around the technical problem of "how to reduce or avoid the lag caused by users when switching video pages such as live broadcast pages to provide a good user experience." It is understandable that when playing streaming media such as watching live broadcasts, users often require high resolution, high real-time degree and high frame rate of the playback screen, which places high demands on the processing power and communication bandwidth of the mobile terminal. When users currently watch streaming media such as live broadcasts on mobile terminals, they can switch between different video pages by sliding the screen. However, as mentioned above, the streaming media playback data is large, and the requirements for processing power and bandwidth occupancy are very high. When users switch between different video pages, they need to wait for the video to load and play when entering a new video page. There will be a buffering time, which seriously affects the user experience.
[0053] In order to solve the above technical problems, the embodiment of the present application provides a video page switching method. Using the video page switching method provided by the embodiment of the present application, by predicting the predicted operation result corresponding to the user's sliding operation on the current page, it is analyzed whether the user wants to switch to an adjacent page or stay on the current page. If the predicted operation result is to control the current page to switch to an adjacent page, the playback resources of the adjacent page are pre-loaded, so that when the sliding operation ends, the playback resources of the adjacent page can be directly pulled up for playback, avoiding the problem of freeze when the user switches pages.
[0054] The term "and / or" in this application can be a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0055] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to the steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0056] The video page switching method involved in the embodiment of the present application is mainly applied to terminal devices, such as smart phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances, vehicle terminals and servers, etc., which are not limited here. Optionally, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, which are not limited here.
[0057] See also Figure 1-Figure 3 , Figure 1 A flowchart of a video page switching method provided in an embodiment of the present application. Figure 2 Another flowchart of the video page switching method provided in an embodiment of the present application. Figure 3 Another flowchart of the video page switching method provided by the embodiment of the present application is shown in FIG.
[0058] In one embodiment, the method may include the following steps:
[0059] Step 101: In response to triggering a sliding operation on a current page, determining a motion parameter corresponding to the sliding operation.
[0060] First of all, it needs to be explained that the sliding operation refers to the page switching operation of controlling the current page between adjacent pages. The page switching operation includes two situations: successfully switching to the adjacent page and temporarily canceling the switching action to stay on the current page. In some embodiments, the sliding operation is a type of switching operation. In an embodiment of the present invention, for example, the sliding operation data directly obtained from the operating system, that is, the motion parameters generated by the page during the switching process may include the directly obtained sliding operation type, such as sliding or gesture. Accordingly, the motion parameters directly obtained from the operating system may also include the coordinates of the corresponding sliding or gesture.
[0061] In some embodiments, the motion parameters also include touch time characteristics, such as sliding start time, sliding duration and / or sliding end time. In an embodiment of the present invention, the motion parameters can be data directly obtained by an application (APP) running the video page from an operating system layer interface of the terminal device.
[0062] For example, in a terminal device under the iOS operating system platform, the user logs in to the live broadcast APP in the iOS system, and can first see a double-column or single-column content display list on the display interface of the live broadcast APP. The content display list includes multiple different video thumbnails (including video introductions). When the user clicks on one of the video thumbnails, the system will create a corresponding player and enter the video details interface to play the content of the current video. During the browsing process, the user can switch the current page to the next page or the previous page according to their needs. The video APP obtains motion parameters through the UIKit framework of the touch layer of iOS, that is, calls the returned motion parameters. Under the iOS operating system, especially under the UIKit framework, a variety of instructions can be used to obtain touch event data. For example, in some embodiments, commands can be used to obtain motion parameters in the form of gestures. For example, the class UIGestureRecognizer under UIKit and its subclass UISwipeGestureRecognizer (slide) can be used. For example, in other embodiments, commands can be used to obtain the above-mentioned touch-form motion parameters. For example, the properties UITouch and its sub-properties UITouchPhaseBegan (touch start), UITouchPhaseMoved (touch point moves), UITouchPhaseStationary (touch point does not move), UITouchPhaseEnded (touch ends), UITouchPhaseCancelled (touch cancels), tapCount (number of times the screen is tapped), and timeStamp (touch start time) under UIKit can be used. In some specific embodiments, the sliding operation and its related data can be obtained by calling the UIScrollView component of the UIKit framework in the iOS system.
[0063] In some embodiments, for example, in a terminal device under the Android operating system platform, an application program (APP) can obtain motion parameters through the view system (ViewsSystem) framework in the Android framework layer. In some specific embodiments, the sliding operation and its related data can be obtained by calling the viewpager2 component of the view system (ViewsSystem) framework in the Android system.
[0064] Those skilled in the art will understand that this solution is also applicable to web terminals, and other commands can be used to extract touch event data in iOS, Android or other operating systems. It is not limited to live broadcast scenarios, but can also be used in short videos or other scenarios, which are not limited here.
[0065] In some embodiments, the page switching operation may be a user sliding on the current page with a finger or a stylus, or a user clicking on the current page with a finger or a stylus to trigger the current page to switch, or a voice command to indirectly control the current page to switch through a voice control device. The switching operation may be selected according to the settings of the terminal device and is not limited here.
[0066] Step 102: predicting a predicted operation result of the sliding operation based on the motion parameter.
[0067] In this embodiment, the predicted operation result mainly refers to whether the user wants to switch the current page to an adjacent page or stay on the current page, that is, cancel the page switch.
[0068] This solution focuses on explaining sliding as a switching operation. In order to determine the predicted operation result corresponding to the sliding operation, the motion parameters corresponding to the current page during the sliding operation from the beginning to the end can be obtained, and then the predicted operation result of the sliding operation can be determined based on the motion parameters. It can be understood that in the process of switching between adjacent pages by sliding the page, the page will go through two stages, one is sliding from a static starting position to an ending position; the second is rebounding from the ending position to a speed of 0 after the sliding ends, and finally automatically returning to the starting position to remain stationary. At the same time, in these two stages, the page has corresponding motion parameters, and the motion parameters include one or more of the starting speed corresponding to the current page when the sliding starts, the ending speed corresponding to the current page when the sliding ends, the first acceleration corresponding to the current page from the beginning of the sliding to the end of the sliding, and the second acceleration corresponding to the rebound process of the current page when the sliding ends.
[0069] Specifically, the acquisition function for obtaining the page motion parameters can be called at the start or end of the sliding operation, and the motion parameters corresponding to the current page in the process from the start to the end of the sliding operation can be obtained through the acquisition function. Exemplarily, the acquisition function can adopt the crollViewWillEndDragging:withVelocity:targetContentOffset of the iOS system or the viewpager2 of the Android system. The data corresponding to the sliding operation and the derived values of the data (such as coordinates, direction, distance, speed or acceleration, etc.) can be obtained by calling the return value of crollViewWillEndDragging:withVelocity:targetContentOffset or viewpager2. Taking the iOS system as an example, crollViewWillEndDragging:withVelocity:targetContentOffset is a function provided by UIScrollViewDelegate, which can be called when the user starts or stops sliding the video page, that is, at the start or end of the sliding operation, and then obtains the motion parameters corresponding to the current page in the process from the start to the end of the sliding operation.
[0070] To facilitate understanding of this solution, in this embodiment, the motion parameter is set to one or more of the starting speed corresponding to the current page at the beginning of the sliding operation, the ending speed corresponding to the current page at the end of the sliding operation, the first acceleration corresponding to the current page from the beginning to the end of the sliding operation, and the second acceleration corresponding to the rebound process of the current page at the end of the sliding operation. According to different motion parameters, a variety of prediction operation result judgment methods can be formed, as follows:
[0071] As an implementation method, the first displacement corresponding to the current page from the start to the end of the trigger operation can be calculated by using the starting speed and the first acceleration; if the first displacement exceeds the first preset threshold, the predicted operation result corresponding to the sliding operation is judged to be switching to an adjacent page; if the first displacement does not exceed the first preset threshold, the predicted operation result corresponding to the sliding operation is judged to be staying on the current page. The calculation formula of the first displacement can be: first displacement = starting speed / (2*first acceleration).
[0072] Specifically, if the first displacement exceeds the first preset threshold, it can be predicted that the area of the adjacent page exposed after the user finishes the sliding operation on the current page is relatively large, and it can be inferred that the user's intention to switch the current page to the adjacent page is relatively obvious at this time, and the predicted operation result corresponding to the current sliding operation can be determined as switching to the adjacent page. If the first displacement does not exceed the first preset threshold, it can be predicted that the area of the adjacent page exposed after the user finishes the sliding operation on the current page is relatively small, and it can be inferred that the user's intention to switch the current page to the adjacent page is not obvious at this time, and the predicted operation result corresponding to the current sliding operation can be determined as staying on the current page.
[0073] As another possible implementation method, the second displacement corresponding to the current page rebounding to a speed of 0 after the trigger operation is completed can be calculated by using the termination speed and the second acceleration; if the second displacement exceeds the second preset threshold, the predicted operation result corresponding to the sliding operation is judged to be switching to an adjacent page; if the second displacement does not exceed the second preset threshold, the predicted operation result corresponding to the sliding operation is judged to be staying on the current page. The calculation formula for the second displacement can be: second displacement = termination speed^2 / (2*second acceleration).
[0074] Specifically, if the second displacement exceeds the second preset threshold, it can be predicted that the current page is closer to the starting position of the current page when it rebounds from the end position to the time when the speed drops to 0 after the sliding operation ends. It can be further predicted that the user is sliding the current page at a faster speed, and it can be inferred that the user's intention to switch the current page to an adjacent page is more obvious at this time, and the predicted operation result corresponding to the current sliding operation can be determined as switching to an adjacent page. If the second displacement does not exceed the second preset threshold, it can be predicted that the current page is farther from the starting position of the current page when it rebounds from the end position to the time when the speed drops to 0 after the sliding operation ends. It can be further predicted that the user is sliding the current page at a slower speed, and it can be inferred that the user's intention to switch the current page to an adjacent page is not obvious at this time, and the predicted operation result corresponding to the current sliding operation can be determined as staying on the current page.
[0075] As another possible implementation method, it can be determined by judging whether the first acceleration or the second acceleration exceeds a third preset threshold; if the first acceleration or the second acceleration exceeds the third preset threshold, then judging that the predicted operation result corresponding to the sliding operation is switching to an adjacent page; if the first acceleration or the second acceleration does not exceed the third preset threshold, then judging that the predicted operation result corresponding to the sliding operation is staying on the current page.
[0076] Specifically, if the first acceleration or the second acceleration exceeds the first preset threshold, it can be predicted that the user's sliding speed on the current page tends to increase significantly, and it can be inferred that the user's intention to switch the current page to the adjacent page is more obvious at this time, and the predicted operation result corresponding to the current sliding operation can be determined as switching to the adjacent page. If the first displacement does not exceed the first preset threshold, it can be predicted that the area of the adjacent page exposed after the user ends the sliding operation on the current page is small, and it can be inferred that the user's intention to switch the current page to the adjacent page is not obvious at this time, and the predicted operation result corresponding to the current sliding operation can be determined as staying on the current page.
[0077] In some embodiments, the switching operation can be the action of the user clicking on the current page with a finger or a stylus. Correspondingly, in order to determine the predicted operation result corresponding to the switching operation, the magnitude of the click force can be detected for judgment. For example, when the click force is detected to be greater than a certain value, the predicted operation result is judged to be switching to an adjacent page. If the click force does not exceed a certain value, the predicted operation result is judged to be staying on the current page.
[0078] In some embodiments, the switching operation may be a voice command that indirectly controls the current page to switch through a voice control device. Correspondingly, in order to determine the predicted operation result corresponding to the switching operation, the sound volume of the voice command can be detected for judgment. For example, when the sound of the voice command is detected to be greater than a certain value, the predicted operation result is judged to be switching to an adjacent page. If the sound of the voice command does not exceed a certain value, the predicted operation result is judged to be staying on the current page.
[0079] Step 103 : In response to the predicted operation result of switching the current page to an adjacent page, pre-load the playback resources of the adjacent page.
[0080] In this embodiment, when the predicted operation result corresponding to the sliding operation is inferred in advance to control the current page to switch to the adjacent page, and the switching frequency is kept at a constant speed, in order to reduce or avoid the hysteresis caused by the user when switching pages such as live broadcast pages to provide a good user experience, the playback resources of the adjacent pages of the current page can be pre-loaded, so that there is no need to wait for the adjacent page to complete the switch before loading the corresponding playback resources, thereby solving the jamming problem. And this solution can reasonably infer the user's predicted operation results, instead of deciding whether to start playing by judging the exposed area of the adjacent page like the prior art, such as switching the current page to the next page. The exposure area exceeds 1 / 2 or 2 / 3 of the display area of the current terminal, then start playing. Since this method cannot accurately predict the user's sliding behavior, for example, when the user switches to the adjacent page and the exposure area exceeds 1 / 2, he wants to cancel the switch and stay on the current page. In this process, the user usually hesitates and the sliding speed is slow. At this time, if the next page is played at the same time, it will cause resource occupation and affect the playback fluency of the current page.
[0081] It should be noted that a player needs to be created before the playback resource is loaded and run, and the creation of the player itself takes a certain amount of time. In order to enable the playback video to respond in time when the adjacent page switch is completed, in this solution, the player creation action is placed at the beginning of the sliding operation, that is, the player of the adjacent page is automatically created when the sliding operation starts.
[0082] In some embodiments, if the predicted operation result is to control the current page to switch to an adjacent page, and the switching frequency exceeds the preset frequency (set to a uniform speed), it means that the user is sliding the pages continuously and quickly at this time. It may be that the user is not interested in the current content, or the user may be browsing the video at a fast speed. In either case, in order to improve the user experience, it is necessary to prevent or reduce the problem of lag when the user sees the adjacent pages. However, considering that creating playback resources is a time-consuming operation, it may cause thread blocking and cause the sliding page to lag. At the same time, if the time from the end of the sliding operation to the completion of the switch to the adjacent page is too short, the playback resources have not been requested back or the decoding and rendering have not been completed, which will also cause the video playback to lag after the page switch is completed. Therefore, on this basis, the operation of creating playback resources is advanced, such as Figure 3 As shown, when it is detected that the current page switches to an adjacent page, the playback resources of the next page of the adjacent page are preloaded, so that the user can preload the playback resources of the next page in time when switching pages continuously and quickly, avoiding the lag when playing the video.
[0083] In some embodiments, if it is determined that the switching frequency of switching the current page to the adjacent page exceeds the preset frequency, it may indicate that the user is not interested in the current content and wants to skip the current page of no interest or wants to jump to the location where he wants to stay. At this time, if the current page browsing method is continued, the efficiency will be very low. In order to solve the user experience problem, the page viewing method can be switched from detail viewing to thumbnail viewing when it is detected that the switching frequency exceeds the preset frequency. The thumbnail is used to display the cover and / or title of the corresponding page. In this process, the multimedia content in the page is no longer played, and the user switches back to the original page browsing method only when he clicks on a thumbnail again.
[0084] Step 104, in response to the end of the sliding operation, playing the multimedia content of the adjacent page according to the playback resource, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0085] In this embodiment, if Figure 2 As shown, when the sliding operation is detected to be over, the player decodes the playback resource to obtain the data to be rendered, and renders the data to be rendered on the adjacent page, and starts playing the multimedia content of the adjacent page after the current page and the adjacent page are switched. There will be no delay or freeze. It is also possible that the video of the adjacent page starts playing before the switch is completely completed, which is not limited here.
[0086] It should be noted that after a preset time (eg, 0.2 s) after the sliding operation ends, the current page and the adjacent page are switched, and this time can be considered as a specific time to play the multimedia content of the adjacent page.
[0087] In some embodiments, considering that there are not only multiple different pages to switch and browse in the video playback APP, but also image sets can be nested in a single page, so that users can switch and browse image sets in the same page. However, since the switching methods of different pages and different images are basically the same, taking sliding to achieve switching as an example, this will cause the user to mistakenly trigger an operation that is not intended by the user when switching pages or images. For example, the user's intention is to switch pages but it is recognized as image switching, thereby affecting the user experience.
[0088] To solve the above problem, different switching methods can be used to correspond to page switching and image switching respectively, but this will make the application processing logic complicated and not conducive to maintenance. Therefore, this solution provides the following methods:
[0089] By obtaining the corresponding pressing force value when the user slides the current page, it is determined whether the pressing force value exceeds the third preset threshold value to obtain a judgment result; the user's predicted operation result is determined according to the judgment result; if the judgment result is that the pressing force value exceeds the third preset threshold value, it is determined that the user's predicted operation result is to switch between different pages; if the judgment result is that the pressing force value does not exceed the third preset threshold value, it is determined that the user's predicted operation result is to switch between different images in the current page. By distinguishing the pressing force value during sliding, and then distinguishing the user's predicted operation results, there is no need to set different switching methods.
[0090] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0091] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.
[0092] As can be seen from the above, the video page switching method provided in the embodiment of the present application receives a test request for the interface to be tested, obtains the interface image of the interface to be tested according to the test request; performs a positioning operation on the target element in the interface image to obtain the target position information of the target element in the interface image; determines the operation position of the target element in the test case to be generated according to the target position information, and generates the corresponding test case. Utilizing the video page switching method provided in the embodiment of the present application, by predicting the predicted operation result corresponding to the user's sliding operation on the current page, it is analyzed whether the user wants to switch to the adjacent page or stay on the current page. If the predicted operation result is to control the current page to switch to the adjacent page, the playback resources of the adjacent page are preloaded, so that when the sliding operation ends, the playback resources of the adjacent page can be directly pulled up for playback, avoiding the problem of freeze when the user switches pages.
[0093] The embodiment of the present application also provides a video page switching device, which can be integrated in a terminal device.
[0094] See also Figure 4 , Figure 4 A schematic diagram of the structure of a video page switching device provided in an embodiment of the present application. The video page switching device 30 may include:
[0095] A determination module 31, configured to determine, in response to a triggering of a sliding operation on a current page, a motion parameter corresponding to the sliding operation;
[0096] A prediction module 32, configured to predict a predicted operation result of the sliding operation based on the motion parameter;
[0097] A loading module 33, configured to preload the playback resources of the adjacent page in response to the predicted operation result being to switch the current page to the adjacent page;
[0098] The playing module 34 is used to play the multimedia content of the adjacent page according to the playing resource in response to the end of the sliding operation, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0099] In some embodiments, the determination module 31 is used to obtain the motion parameters corresponding to the current page during the process from the start to the end of the sliding operation; based on the motion parameters, the predicted operation result of the sliding operation is judged, and the predicted operation result includes switching to an adjacent page or staying on the current page.
[0100] In some embodiments, the determination module 31 is used to call an acquisition function for acquiring page motion parameters at the start or end of the sliding operation, and obtain the motion parameters corresponding to the current page in the process from the start to the end of the sliding operation through the acquisition function. The motion parameters include one or more of the starting speed corresponding to the current page at the start of the sliding operation, the ending speed corresponding to the current page at the end of the sliding operation, the first acceleration corresponding to the current page from the start to the end of the sliding operation, and the second acceleration corresponding to the rebound process of the current page at the end of the sliding operation.
[0101] In some embodiments, the determination module 31 is used to calculate the first displacement corresponding to the current page from the beginning to the end of the trigger operation through the starting speed and the first acceleration; if the first displacement exceeds the first preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is switching to an adjacent page; if the first displacement does not exceed the first preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is staying on the current page.
[0102] In some embodiments, the determination module 31 is used to calculate the second displacement corresponding to the current page when the speed rebounds to 0 after the trigger operation ends through the termination speed and the second acceleration; if the second displacement exceeds the second preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is switching to an adjacent page; if the second displacement does not exceed the second preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is staying on the current page.
[0103] In some embodiments, the determination module 31 is used to determine whether the first acceleration or the second acceleration exceeds a third preset threshold; if the first acceleration or the second acceleration exceeds the third preset threshold, then the predicted operation result corresponding to the sliding operation is determined to be switching to an adjacent page; if the first acceleration or the second acceleration does not exceed the third preset threshold, then the predicted operation result corresponding to the sliding operation is determined to be staying on the current page.
[0104] In some embodiments, the device further includes a creation module, configured to create a player for the adjacent page, wherein the player is configured to play the playback resource on the adjacent page.
[0105] In some embodiments, the creation module is used to perform a playback resource decoding operation on the playback resource through the player to obtain the data to be rendered, and to render the data to be rendered on the screen on the adjacent page, and start playing the multimedia content of the adjacent page after the current page and the adjacent page are switched.
[0106] In some embodiments, the device further includes a first judgment module for judging whether a switching frequency of switching the current page to an adjacent page exceeds a preset frequency; if not, preloading the playback resource of the adjacent page is performed.
[0107] In some embodiments, the device also includes a switching module for switching the page viewing mode from detail viewing to thumbnail viewing if it is determined that the switching frequency of switching the current page to an adjacent page exceeds the preset frequency, and the thumbnail is used to display the cover and / or title of the corresponding page.
[0108] In some embodiments, the device also includes a second judgment module, which is used to pre-load the playback resources of the next page of the adjacent page when the current page is switched to the adjacent page if the predicted operation result is to control the current page to switch to an adjacent page and the switching frequency exceeds the preset frequency.
[0109] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same entity or several entities.
[0110] As can be seen from the above, the video page switching device 30 provided in the embodiment of the present application, wherein the determination module 31 is used to determine the motion parameters corresponding to the sliding operation in response to the triggering of the sliding operation on the current page; the prediction module 32 is used to predict the predicted operation result of the sliding operation based on the motion parameters; the loading module 33 is used to pre-load the playback resources of the adjacent page in response to the predicted operation result of switching the current page to the adjacent page; the playback module 34 is used to play the multimedia content of the adjacent page according to the playback resources in response to the end of the sliding operation, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0111] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same entity or several entities.
[0112] See also Figure 5 , Figure 5 Another structural diagram of the video page switching device provided in the embodiment of the present application, the video page switching device 30 includes a memory 120, one or more processors 180, and one or more applications, wherein the one or more applications are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a determination module 31, a prediction module 32, a loading module 33, and a playback module 34. For example, the structure and connection relationship of the above components may be as follows:
[0113] The memory 120 can be used to store applications and data. The applications stored in the memory 120 include executable codes. The applications can be composed of various functional modules. The processor 180 executes various functional applications and data processing by running the applications stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.
[0114] The processor 180 is the control center of the device, and uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the device and processes data by running or executing applications stored in the memory 120, and calling data stored in the memory 120, so as to monitor the device as a whole. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs.
[0115] Specifically in this embodiment, the processor 180 will load the executable code corresponding to the process of one or more applications into the memory 120 according to the following instructions, and the processor 180 will run the application stored in the memory 120 to implement various functions:
[0116] A determination instruction, for determining, in response to a triggering of a sliding operation on a current page, a motion parameter corresponding to the sliding operation;
[0117] A prediction instruction, used to predict a predicted operation result of the sliding operation based on the motion parameter;
[0118] A loading instruction, used for pre-loading the playback resource of the adjacent page in response to the predicted operation result being to switch the current page to the adjacent page;
[0119] A loading instruction is used to play the multimedia content of the adjacent page according to the playback resource in response to the end of the sliding operation, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0120] In some embodiments, the determination instruction is used to obtain the motion parameters corresponding to the current page during the process of the sliding operation from the start to the end; based on the motion parameters, the predicted operation result of the sliding operation is judged, and the predicted operation result includes switching to an adjacent page or staying on the current page.
[0121] In some embodiments, the determination instruction is used to call an acquisition function for acquiring page motion parameters at the start or end of the sliding operation, and obtain the motion parameters corresponding to the current page in the process from the start to the end of the sliding operation through the acquisition function. The motion parameters include one or more of the starting speed corresponding to the current page at the start of the sliding operation, the ending speed corresponding to the current page at the end of the sliding operation, the first acceleration corresponding to the current page from the start to the end of the sliding operation, and the second acceleration corresponding to the rebound process of the current page at the end of the sliding operation.
[0122] In some embodiments, the determination instruction is used to calculate the first displacement corresponding to the current page from the beginning to the end of the trigger operation through the starting speed and the first acceleration; if the first displacement exceeds the first preset threshold, the predicted operation result corresponding to the sliding operation is judged to be switching to an adjacent page; if the first displacement does not exceed the first preset threshold, the predicted operation result corresponding to the sliding operation is judged to be staying on the current page.
[0123] In some embodiments, the determination instruction is used to calculate, through the termination speed and the second acceleration, a second displacement corresponding to the current page rebounding to a speed of 0 after the trigger operation ends; if the second displacement exceeds a second preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is switching to an adjacent page; if the second displacement does not exceed the second preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is staying on the current page.
[0124] In some embodiments, the determination instruction is used to determine whether the first acceleration or the second acceleration exceeds a third preset threshold; if the first acceleration or the second acceleration exceeds the third preset threshold, then the predicted operation result corresponding to the sliding operation is determined to be switching to an adjacent page; if the first acceleration or the second acceleration does not exceed the third preset threshold, then the predicted operation result corresponding to the sliding operation is determined to be staying on the current page.
[0125] In some embodiments, the program further includes a creation instruction for creating a player for the adjacent page, and the player is used to play the playback resource on the adjacent page.
[0126] In some embodiments, the creation instruction is used to obtain the data to be rendered by performing a playback resource decoding operation on the playback resource through the player, and to render the data to be rendered on the screen on the adjacent page, and start playing the multimedia content of the adjacent page after the current page and the adjacent page are switched.
[0127] In some embodiments, the program also includes a first judgment instruction for judging whether the switching frequency of switching the current page to the adjacent page exceeds a preset frequency. If it does not exceed the preset frequency, the operation of preloading the playback resources of the adjacent page is executed.
[0128] In some embodiments, the program also includes a switching instruction for switching the page viewing mode from detail viewing to thumbnail viewing if it is determined that the switching frequency of switching the current page to an adjacent page exceeds the preset frequency, and the thumbnail is used to display the cover and / or title of the corresponding page.
[0129] In some embodiments, the program also includes a second judgment instruction, which is used to pre-load the playback resources of the next page of the adjacent page when the current page is switched to the adjacent page if the predicted operation result is to control the current page to switch to an adjacent page and the switching frequency exceeds the preset frequency.
[0130] The embodiment of the present application also provides a terminal device, which can be a server, a smart phone, a computer, a tablet computer, or other device.
[0131] See also Figure 6 , Figure 6 The schematic diagram of the structure of the terminal device provided in the embodiment of the present application is shown, and the terminal device can be used to implement the video page switching method provided in the above embodiment. The terminal device 1200 can be a TV, a smart phone, or a tablet computer.
[0132] like Figure 6 As shown, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. Those skilled in the art will understand that Figure 6 The structure of the terminal device 1200 shown in the figure does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0133] The RF circuit 110 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a user identity module (SIM) card, a memory, etc. The RF circuit 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network.
[0134] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the video page switching method in the above embodiment. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120. The vibration reminder mode can be automatically selected to switch the video page according to the current scene of the terminal device, which can not only ensure that scenes such as meetings are not disturbed, but also ensure that users can perceive incoming calls, thereby improving the intelligence of the terminal device. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 120 may further include a memory remotely arranged relative to the processor 180, and these remote memories may be connected to the terminal device 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0135] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface 131 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, the other input devices 132 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0136] The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal device 1200. These graphical user interfaces can be composed of graphics, fields, icons, videos and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 may cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 6 In the embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize the input and output functions.
[0137] The terminal device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 141 and / or the backlight when the terminal device 1200 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the terminal device 1200, they will not be repeated here.
[0138] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal device 1200. The audio circuit 160 can transmit the received audio data to the speaker 161 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is output to the processor 180 for processing, and then sent to another terminal through the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earplug jack to provide communication between an external headset and the terminal device 1200.
[0139] The terminal device 1200 can help users send and receive emails, browse web pages, and access streaming media through the transmission module 170 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Figure 6 The transmission module 170 is shown, but it is understandable that it is not a necessary component of the terminal device 1200 and can be omitted as needed without changing the essence of the invention.
[0140] The processor 180 is the control center of the terminal device 1200. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the terminal device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.
[0141] The terminal device 1200 also includes a power supply 190 for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, so that the power management system can realize functions such as managing discharge and power consumption. The power supply 190 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0142] Although not shown, the terminal device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, and the terminal device 1200 also includes a memory 120, and one or more programs, wherein one or more programs are stored in the memory 120, and are configured to be executed by one or more processors 180. One or more programs include instructions for performing the following operations:
[0143] A determination instruction, for determining, in response to a triggering of a sliding operation on a current page, a motion parameter corresponding to the sliding operation;
[0144] A prediction instruction, used to predict a predicted operation result of the sliding operation based on the motion parameter;
[0145] A loading instruction, used for pre-loading the playback resource of the adjacent page in response to the predicted operation result being to switch the current page to the adjacent page;
[0146] The play instruction is used to play the multimedia content of the adjacent page according to the play resource in response to the end of the sliding operation, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0147] In some embodiments, the determination instruction is used to obtain the motion parameters corresponding to the current page during the process of the sliding operation from the start to the end; based on the motion parameters, the predicted operation result of the sliding operation is judged, and the predicted operation result includes switching to an adjacent page or staying on the current page.
[0148] In some embodiments, the determination instruction is used to call an acquisition function for acquiring page motion parameters at the start or end of the sliding operation, and obtain the motion parameters corresponding to the current page in the process from the start to the end of the sliding operation through the acquisition function. The motion parameters include one or more of the starting speed corresponding to the current page at the start of the sliding operation, the ending speed corresponding to the current page at the end of the sliding operation, the first acceleration corresponding to the current page from the start to the end of the sliding operation, and the second acceleration corresponding to the rebound process of the current page at the end of the sliding operation.
[0149] In some embodiments, the determination instruction is used to calculate the first displacement corresponding to the current page from the beginning to the end of the trigger operation through the starting speed and the first acceleration; if the first displacement exceeds the first preset threshold, the predicted operation result corresponding to the sliding operation is judged to be switching to an adjacent page; if the first displacement does not exceed the first preset threshold, the predicted operation result corresponding to the sliding operation is judged to be staying on the current page.
[0150] In some embodiments, the determination instruction is used to calculate, through the termination speed and the second acceleration, a second displacement corresponding to the current page rebounding to a speed of 0 after the trigger operation ends; if the second displacement exceeds a second preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is switching to an adjacent page; if the second displacement does not exceed the second preset threshold, it is judged that the predicted operation result corresponding to the sliding operation is staying on the current page.
[0151] In some embodiments, the determination instruction is used to determine whether the first acceleration or the second acceleration exceeds a third preset threshold; if the first acceleration or the second acceleration exceeds the third preset threshold, then the predicted operation result corresponding to the sliding operation is determined to be switching to an adjacent page; if the first acceleration or the second acceleration does not exceed the third preset threshold, then the predicted operation result corresponding to the sliding operation is determined to be staying on the current page.
[0152] In some embodiments, the program further includes a creation instruction for creating a player for the adjacent page, and the player is used to play the playback resource on the adjacent page.
[0153] In some embodiments, the creation instruction is used to obtain the data to be rendered by performing a playback resource decoding operation on the playback resource through the player, and to render the data to be rendered on the screen on the adjacent page, and start playing the multimedia content of the adjacent page after the current page and the adjacent page are switched.
[0154] In some embodiments, the program also includes a first judgment instruction for judging whether the switching frequency of switching the current page to the adjacent page exceeds a preset frequency. If it does not exceed the preset frequency, the operation of preloading the playback resources of the adjacent page is executed.
[0155] In some embodiments, the program also includes a switching instruction for switching the page viewing mode from detail viewing to thumbnail viewing if it is determined that the switching frequency of switching the current page to an adjacent page exceeds the preset frequency, and the thumbnail is used to display the cover and / or title of the corresponding page.
[0156] In some embodiments, the program also includes a second judgment instruction, which is used to pre-load the playback resources of the next page of the adjacent page when the current page is switched to the adjacent page if the predicted operation result is to control the current page to switch to an adjacent page and the switching frequency exceeds the preset frequency.
[0157] The embodiment of the present application also provides a terminal device, which can be a smart phone, a computer, or other device.
[0158] As can be seen from the above, the embodiment of the present application provides a terminal device 1200, and the terminal device 1200 performs the following steps:
[0159] In response to triggering a sliding operation on a current page, determining a motion parameter corresponding to the sliding operation;
[0160] Based on the motion parameter, predicting a predicted operation result of the sliding operation;
[0161] In response to the predicted operation result being to switch the current page to an adjacent page, pre-loading a playback resource of the adjacent page;
[0162] In response to the end of the sliding operation, the multimedia content of the adjacent page is played according to the playback resource, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
[0163] An embodiment of the present application further provides a storage medium, wherein a computer program is stored in the storage medium. When the computer program is executed on a computer, the computer executes the video page switching method described in any of the above embodiments.
[0164] It should be noted that, for the video page switching method described in the present application, ordinary testers in the field can understand that all or part of the process of implementing the video page switching method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as stored in the memory of a terminal device, and executed by at least one processor in the terminal device, and the execution process may include the process of the embodiment of the video page switching method. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
[0165] For the video page switching device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.
[0166] The above is a detailed introduction to the video page switching method, device, medium and equipment provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application; at the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A video page switching method, characterized in that: include: In response to triggering a sliding operation on a current page, determining a motion parameter corresponding to the sliding operation; Acquire motion parameters corresponding to the current page during the process from the start to the end of the sliding operation, the motion parameters including a starting speed corresponding to the current page at the start of the sliding operation, a first acceleration corresponding to the current page during the process from the start to the end of the sliding operation, and a touch time feature, the touch time feature being used to indicate a start time and an end time of the sliding operation on the touch layer; Calculating a first displacement of the current page from the beginning to the end of the sliding operation according to the starting speed and the first acceleration; If the first displacement exceeds a first preset threshold, determining that the predicted operation result corresponding to the sliding operation is switching to an adjacent page; In response to the predicted operation result being to switch the current page to an adjacent page, determining whether a switching frequency of switching the current page to the adjacent page exceeds a preset frequency, and if it does not exceed the preset frequency, preloading a playback resource of the adjacent page; If the predicted operation result is to control the current page to switch to an adjacent page, and the switching frequency exceeds the preset frequency, then when the current page switches to the adjacent page, the playback resource of the next page of the adjacent page is preloaded; In response to the end of the sliding operation, playing the multimedia content of the adjacent page according to the playback resource, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation; If the first displacement does not exceed a first preset threshold, it is determined that the predicted operation result corresponding to the sliding operation is to stay on the current page.
2. The video page switching method according to claim 1, characterized in that: The obtaining of the motion parameters corresponding to the current page during the process from the beginning to the end of the sliding operation includes: At the start or end of the sliding operation, an acquisition function for acquiring page motion parameters is called, and the motion parameters corresponding to the current page in the process from the start to the end of the sliding operation are acquired through the acquisition function. The motion parameters include one or more of a starting speed corresponding to the current page at the start of the sliding operation, an ending speed corresponding to the current page at the end of the sliding operation, a first acceleration corresponding to the current page from the start to the end of the sliding operation, and a second acceleration corresponding to the rebound process of the current page at the end of the sliding operation.
3. The video page switching method according to claim 1, characterized in that: Before preloading the playback resource of the adjacent page, the method further includes: A player for the adjacent page is created, where the player is used to play the playback resource on the adjacent page.
4. The video page switching method according to claim 3, characterized in that: The playing of the multimedia content of the adjacent page according to the playing resource includes: The player decodes the playback resource to obtain the data to be rendered, and renders the data to be rendered on the adjacent page. After the current page and the adjacent page are switched, the multimedia content of the adjacent page begins to be played.
5. The video page switching method according to claim 1, characterized in that: Before preloading the playback resource of the adjacent page, the method further includes: If it is determined that the switching frequency of switching the current page to an adjacent page exceeds the preset frequency, the page viewing mode is switched from detail viewing to thumbnail viewing, and the thumbnail is used to display the cover and / or title of the corresponding page.
6. A video page switching device, characterized in that: include: A determination module, configured to determine, in response to a triggering of a sliding operation on a current page, a motion parameter corresponding to the sliding operation; a prediction module, used to obtain motion parameters corresponding to the current page during the process from the start to the end of the sliding operation, wherein the motion parameters include a starting speed corresponding to the current page when the sliding operation starts, a first acceleration corresponding to the current page during the process from the start to the end of the sliding operation, and the motion parameters also include a touch time feature, wherein the touch time feature is used to indicate a start time and an end time of the sliding operation on the touch layer; Calculating a first displacement of the current page from the beginning to the end of the sliding operation according to the starting speed and the first acceleration; a loading module, configured to determine that the predicted operation result corresponding to the sliding operation is switching to an adjacent page if the first displacement exceeds a first preset threshold; A first judgment module is used for judging whether the switching frequency of switching the current page to the adjacent page exceeds a preset frequency in response to the predicted operation result that the current page is switched to the adjacent page, and if it does not exceed the preset frequency, preloading the playback resource of the adjacent page; A second judgment module is used for pre-loading the playback resource of the next page of the adjacent page when the current page is switched to the adjacent page if the predicted operation result is to control the current page to switch to the adjacent page and the switching frequency exceeds the preset frequency; The playing module is used to play the multimedia content of the adjacent page according to the playing resource in response to the end of the sliding operation, wherein the current page and the adjacent page are switched after a preset time after the end of the sliding operation.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the video page switching method according to any one of claims 1-5.
8. A terminal device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the video page switching method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Live broadcast page switching method, video page switching method, electronic equipment and storage medium
CN113535063A