Content recovery method and apparatus, and computer device, medium and program product
By introducing a content collection control into content applications, interrupted content can be automatically saved and restored, solving the problem that users cannot quickly resume previously viewed content and achieving the effects of simplifying operations and improving user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2026-04-02
AI Technical Summary
When users exit and re-enter the content application, they cannot quickly restore the content they were previously viewing, resulting in cumbersome operations and a poor user experience.
Add a content collection control to the content application. The content to be restored is automatically saved by triggering the operation of this control and will be restored when the application is reopened. Whether to restore the displayed content that was interrupted is determined according to the user's needs.
Content restoration can be completed with a single interaction, simplifying the operation process, improving user experience, and increasing user retention rates for content applications.
Smart Images

Figure CN2025113761_02042026_PF_FP_ABST
Abstract
Description
A content recovery method, device, computer equipment, medium and program product
[0001] The present application claims priority to the Chinese patent application No. 202411398060.3, filed on September 30, 2024, and entitled "A content recovery method, device, computer equipment, medium and program product", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present disclosure relates to the technical field of computer, more particularly, to content recovery. BACKGROUND
[0003] With the development of computer technology, the types of applications are increasing. Among them, content applications are used to display a variety of content, such as video applications, novel applications, etc.
[0004] In the related art, after a user exits a content application being used, if the user enters the content application again, the content application will request a server to obtain new content, so as to display the new content to the user.
[0005] However, if the user accidentally exits the content application, and the new content is displayed to the user after the user enters the content application again, the user will not be able to view the content being viewed before exiting. If the user wants to view the previous content, the user needs to find the content being viewed before exiting through historical records, and adjust the viewing progress of the content to view the content being viewed before exiting again. The content recovery method is relatively cumbersome, the number of interactions is relatively large, and thus the user experience is relatively low. SUMMARY
[0006] In order to solve the above technical problems, the present application provides a content method, device, computer equipment, medium and program product, which are used to solve the problem of a large number of interactions and low user experience.
[0007] The embodiments of the present application disclose the following technical solutions:
[0008] In one aspect, the embodiments of the present application provide a content recovery method, which comprises:
[0009] displaying a content collection control in a content application, the content collection control being used to restore and display interrupted content;
[0010] after obtaining a triggering operation for the content collection control, in response to obtaining an exit operation for the content application, saving a content to be recovered, the content to be recovered being content being viewed when the content application is exited;
[0011] In response to obtaining an opening operation for the content application, the display of the content to be resumed is resumed.
[0012] In another aspect, an embodiment of the present application provides a content resuming apparatus, the apparatus comprising a display unit, a saving unit and a resuming unit.
[0013] The display unit is configured to display a content collection control in a content application, the content collection control being configured to resume display of interrupted content.
[0014] The saving unit is configured to, in response to obtaining an exit operation for the content application after obtaining a triggering operation for the content collection control, save content to be resumed, the content to be resumed being content being viewed when the content application is exited.
[0015] The resuming unit is configured to, in response to obtaining an opening operation for the content application, resume display of the content to be resumed.
[0016] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory.
[0017] The memory is configured to store a computer program and transmit the computer program to the processor.
[0018] The processor is configured to execute the method according to the instructions in the computer program.
[0019] In another aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium being configured to store a computer program, the computer program being configured to execute the method according to the above aspect.
[0020] In another aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program comprising computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method according to the above aspect.
[0021] It can be seen from the above technical solution that by setting the content collection control in the content application, if a triggering operation for the content collection control is acquired, it indicates that the user has a demand for content continuation viewing, and the content application starts the automatic recovery function. In the process of starting the automatic recovery function, in response to acquiring an exit operation for the content application, the to-be-recovered content, i.e., the content viewed when the content application is exited, is saved. In response to acquiring an opening operation for the content application, i.e., after entering the content application again, since the automatic recovery function was started before the content application was closed, the to-be-recovered content is displayed. Thus, by adding the content collection control in the content application, the content collection control is used to display the interrupted content, so as to determine whether the user has a demand for content continuation viewing according to whether the content collection control is triggered, and then determine whether to display the interrupted content again after entering the content application. The effect of determining whether to display the to-be-recovered content according to user demand is realized, so that the to-be-recovered content can be displayed again through one interaction with the content collection control, the number of interactions is reduced, the content recovery process is simplified, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS
[0022] FIG. 1 is a schematic diagram of an application scenario of a content recovery method provided by an embodiment of the present application;
[0023] FIG. 2 is a flowchart of a content recovery method provided by an embodiment of the present application;
[0024] FIG. 3 is a schematic diagram of displaying a content collection control on a function setting page according to an embodiment of the present application;
[0025] FIG. 4 is a schematic diagram of displaying a content collection control by triggering a viewing content according to an embodiment of the present application;
[0026] FIG. 5 is a schematic diagram of displaying a content collection control by pausing a viewing content according to an embodiment of the present application;
[0027] FIG. 6 is a schematic diagram of selecting a maintenance time of an automatic recovery function according to an embodiment of the present application;
[0028] FIG. 7 is a schematic diagram of displaying a to-be-recovered content according to an embodiment of the present application;
[0029] FIG. 8 is a schematic diagram of selecting a to-be-recovered content for display according to an embodiment of the present application;
[0030] FIG. 9 is a schematic diagram of storing content data according to an embodiment of the present application;
[0031] FIG. 10 is a content data storage mode according to an embodiment of the present application;
[0032] FIG. 11 is a structural schematic diagram of a content recovery device according to an embodiment of the present application;
[0033] FIG. 12 is a structural schematic diagram of a server according to an embodiment of the present application;
[0034] FIG. 13 is a structural schematic diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] Embodiments of the present application will be described below with reference to the accompanying drawings.
[0036] In the related art, a user requests new content and displays the new content to the user after entering a content application again, which causes the user to be unable to view the content that the user was viewing before accidentally exiting the content application. Based on this, an automatic recovery function can be added to the content application.
[0037] Specifically, if a user exits a content application, the content application saves the content that the user was viewing before exiting for a period of time. During the period of time in which the content is saved, if the user enters the content application again, the content application does not request a server to obtain new content, but obtains the content that the user was viewing before exiting last time and displays the content, so as to realize recovery of display of the content. Taking a video as an example, a user is watching a video A, and accidentally exits a video application. When the user enters the video application again within a short period of time, the video application continues to play the video A, so as to realize recovery of playing of the video A, thereby improving user experience.
[0038] However, if the user actively exits the content application instead of accidentally exiting the content application, automatic recovery of the content before the last time the user exits the content application can cause the user to be dissatisfied. That is, the automatic recovery function not only does not improve user experience, but also reduces user experience, thereby causing a low user retention rate of the content application.
[0039] Based on this, embodiments of the present application provide a content recovery method and related device, by adding a content collection control to the content application, the content collection control is used to recover and display interrupted content, so as to determine whether the user has a demand for content continuation viewing according to whether the content collection control is triggered, and then determine whether to recover and display the interrupted content after the user enters the content application again. Not only the effect of determining whether to recover and display the content to be recovered based on user demand is realized, user experience is improved, and the user retention rate of the content application is increased. Moreover, the content to be recovered can be recovered and displayed through one interaction with the content collection control, the number of interactions is reduced, the content recovery process is simplified, and user experience is improved.
[0040] The content recovery method provided in the present application can be applied to a computer device with content recovery capability, such as a terminal device and a server.
[0041] The terminal device can be a desktop computer, a notebook computer, a smart phone, a tablet computer, an Internet of Things device, and a portable wearable device. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, and the like. The smart vehicle-mounted device can be a vehicle-mounted navigation terminal and a vehicle-mounted computer. The portable wearable device can be a smart watch, a smart bracelet, and a head-mounted device, but is not limited thereto.
[0042] The server can be a standalone physical server, a server cluster composed of multiple physical servers, or a distributed system. The server can also be a cloud server or a server cluster that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal device and the server can be directly or indirectly connected through wired or wireless communication. The present application does not limit this.
[0043] To facilitate understanding of the content recovery method provided by the embodiments of the present application, the application scenario of the content recovery method is exemplarily introduced below taking the server as an execution subject of the content recovery method.
[0044] Referring to FIG. 1, which is a schematic diagram of an application scenario of a content recovery method provided by an embodiment of the present application. As shown in FIG. 1, the application scenario includes a terminal device 110 and a server 120. The terminal device 110 and the server 120 can communicate with each other through a communication network. The communication network uses standard communication technology and / or protocols, and is usually the Internet, but can also be any network, including but not limited to Bluetooth, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), mobile, a private network, or any combination of a virtual private network. In some embodiments, custom or dedicated data communication technology can be used instead of or in addition to the above data communication technology.
[0045] The terminal device 110 has a content application installed therein. The content application provides content display services for users and executes the content recovery method provided by the embodiments of the present application. The server 120 is a server corresponding to the content application, and is configured to provide content data for display and the like for the content application.
[0046] In actual application, when a user opens a content application for the first time through a terminal device 110, the content application will display not only the content obtained from a server, but also a content collection control. Taking a video application as an example in FIG. 1, the video application pulls a video stream from the server 120 based on a request for obtaining the video, and continuously displays the video corresponding to the video stream. When the video A being watched is paused, not only the start watching control 112 is displayed, but also the content collection control 111 is displayed. It should be noted that the first time opening the content application referred to in the embodiments of the present application is relative to the second time opening the content application.
[0047] After obtaining the triggering operation for the content collection control 111, the content collection control 111 is used to restore the display of the interrupted content, that is, the content application starts the automatic recovery function. In the process of starting the automatic recovery function, in response to obtaining the exit operation for the content application, the video A being watched when the content application is exited is taken as the content to be recovered, and the content to be recovered is saved.
[0048] In response to obtaining the opening operation for the content application, that is, entering the content application again, since the content application starts the automatic recovery function before being closed, the content to be recovered is restored and displayed, as shown in FIG. 1. After entering the video application again, the video A displayed before the video application is exited is continuously displayed.
[0049] Therefore, by adding the content collection control in the content application, the content collection control is used to restore the display of the interrupted content, so that whether the user has the demand for content continuation viewing is determined according to whether the content collection control is triggered, and then whether the content to be recovered, that is, the interrupted content, is restored and displayed after entering the content application again is determined. The effect of determining whether the content to be recovered is restored and displayed based on the user demand is achieved, and the user experience is improved.
[0050] The content recovery method provided in the embodiments of the present application can be executed by a terminal device. However, in other embodiments of the present application, a server can also have similar functions as the terminal device, so as to execute the content recovery method provided in the embodiments of the present application, or the content recovery method provided in the embodiments of the present application is executed by the terminal device and the server together, which is not limited in the embodiments.
[0051] The content recovery method provided in the embodiments of the present application is described in detail below through method embodiments.
[0052] Referring to FIG. 2, which is a flowchart of a content recovery method provided in the embodiments of the present application. In order to facilitate description, the following embodiments are still described taking the terminal device as an example of the execution subject of the content recovery method. As shown in FIG. 2, the content recovery method includes S201-S203.
[0053] S201: display a content collection control in the content application.
[0054] The content application is used to display content, which can be video content, text content, picture content, etc. The present application does not make specific limitations on this. The content application can be an application program, such as a video application, a novel application, etc. The content application can also be a function in an application program, such as a video number function in a social chat software, etc. The present application does not make specific limitations on this.
[0055] The content collection control is used to restore the display of interrupted content. The interrupted content refers to the content being viewed when the application is exited. For example, the interrupted content refers to the content that has not been viewed when the application is exited. For example, the video being played is interrupted when the video application is exited. The video being played is the interrupted content.
[0056] The present application does not specifically limit the display position of the content collection control. The following is illustrated by three ways.
[0057] Way one, displayed on the function setting page.
[0058] Referring to FIG. 3, which is a schematic diagram of displaying a content collection control on a function setting page according to an embodiment of the present application. The page displayed in FIG. 3 is the function setting page, which refers to a page for adjusting multiple functions in an application program. The function setting page includes a content collection control 301.
[0059] Therefore, the function setting page generally includes multiple functions for the content application. If the user wants to find the content collection control, he or she will naturally look for it in the function page, which is convenient and fast. Thus, the user can find the content collection control in the function setting page to restore the display of interrupted content through the content collection control.
[0060] Way two, displayed after triggering an operation.
[0061] In response to obtaining a triggering operation for viewing content, a content collection control is displayed in a display page of the viewing content. The viewing content is the content being viewed in the content application. The display page of the viewing content is a page in the content application for displaying the viewing content.
[0062] Among them, in response to, to indicate the condition or state on which the operation is performed, when the dependent condition or state is met, the operation performed can be real-time or have a set delay: in the absence of special instructions, there is no restriction on the execution order of multiple operations performed.
[0063] Referring to FIG. 4, which is a schematic diagram of displaying a content collection control by triggering a content in viewing according to an embodiment of the present application. In FIG. 4, taking a video as the content, the content application is a video application. The page shown in FIG. 4 is a display page 401, which is a page for displaying a playing video, and the video A being played in the display page 401 is the content in viewing. When a user performs a triggering operation such as clicking on any position of the display page 401, in response to obtaining the triggering operation on the content in viewing, the content collection control 403 is displayed in the display page 401.
[0064] In addition, the triggering effect 402 of the triggering operation can also be displayed in the display page 401, and after the triggering operation is performed on the display page 401, the content collection control 403 and the pause control 404 are displayed in the display page 401. When it is detected that no triggering operation is obtained within a period of time, the content collection control 403 and the pause control 404 are no longer displayed, i.e., the state before the triggering operation is performed is restored.
[0065] Therefore, by displaying the content collection control after the triggering operation is performed on the content in viewing, not only the interactivity between the user and the content application can be increased, but also the influence on the content in viewing can be reduced by hiding the content collection control, the content in viewing can be displayed as much as possible in the limited display space, and the user can focus more on the content in viewing. Moreover, by displaying the content collection control after the triggering operation, the operation habit of the user on the computer device such as a mobile device is met. Compared with displaying the content collection control in real time, the content collection control does not need to be hidden, which can reduce the occupation of system resources.
[0066] Method three, display after a pause operation.
[0067] If the content is a video, and the content application is a video application, in response to obtaining the pause operation on the content in viewing, the content collection control is displayed in the pause page of the content in viewing.
[0068] Referring to FIG. 5, which is a schematic diagram of displaying a content collection control by pausing a content in viewing according to an embodiment of the present application. In FIG. 5, the page is a display page 501, and the video A being played in the display page 501 is the content in viewing, and the display page 501 also displays a pause control 502. When a user performs a triggering operation such as clicking on the pause control 502, in response to obtaining the pause operation on the content in viewing, the pause page 505 of the content in viewing is entered, and the content collection control 503 is displayed in the pause page 505 of the content in viewing. In addition, the pause page 505 of the content in viewing can also display a play control 504.
[0069] As a possible implementation manner, the content collection control is displayed in the pause page of the viewed content, and the size of the content collection control is greater than the size threshold. Thus, the content collection control can be displayed in the pause page of the viewed content with a larger size, the content collection control is displayed in a more prominent form without affecting the user's viewing of the video content, so that the user can actively learn the newly added function of the content application.
[0070] Thus, in the process of displaying the video content, the content collection control is displayed only after the video content is paused, so that the content collection control can be displayed in the pause page with a larger display area without affecting the user's viewing of the video content, so that the user can actively learn the newly added function of the content application (i.e., the content based on the content collection control is restored to display the interrupted content), so that the user can subsequently select whether to enable the function as needed, thereby improving the user experience.
[0071] S202: After obtaining the triggering operation for the content collection control, in response to obtaining the exit operation of the content application, save the content to be restored.
[0072] The content to be restored is the content viewed through the content application when the content application is exited. The content to be restored can be the content being viewed when the content application is exited, or the content being viewed a period of time before the user exits the content. For example, when the user is viewing a certain content, the content application is exited, so that the content is interrupted, and the interrupted content can be the content to be restored. For another example, the user views video A through the content application, and then views video B, and in the process of viewing video B, the content application is exited, so that video B can be the content to be restored, and the automatic restoration effect of video B as the content to be restored is good.
[0073] It can be understood that if the content to be restored is the content being viewed a period of time before the user exits the content, the period of time referred to herein is less than the time threshold, that is, the difference between the saving time of the content to be restored and the exit time of the exit operation is as small as possible, so as to improve the automatic restoration effect and thus ensure the user experience.
[0074] The application does not specifically limit the triggering operation, which can be a click operation, a sliding operation, a double-click operation, etc.
[0075] The application does not specifically limit the exit operation of the content application, which can be actively performed by the user or passively exited due to an abnormality of the terminal device.
[0076] After obtaining the triggering operation for the content collection control, the automatic recovery function is started. The automatic recovery function is used to recover and display the interrupted content, that is, to automatically recover and display the to-be-recovered content. During the starting of the automatic recovery function, if the user exits the content application, the to-be-recovered content is saved in response to obtaining the exit operation of the content application, so that the to-be-recovered content can be recovered and displayed based on the saved to-be-recovered content in the future.
[0077] The application embodiment does not specifically limit the holding time after the automatic recovery function is started, and the following three ways are taken as examples for illustration.
[0078] In the first way, if most users like the function based on statistics, the automatic recovery function can be kept started until the user actively closes it after being started once. Thus, the user experience is improved while meeting the preferences of most users, and the operation frequency of the user is reduced.
[0079] In the second way, if only a small number of users like the function based on statistics, the automatic recovery function can be kept only until the next start of the content application after being started once, or in other words, the automatic recovery function is automatically closed after the to-be-recovered content is recovered and displayed once after being started once. Thus, the automatic recovery function is started for users in need, the flexibility of the automatic recovery function is improved, the content recovery needs of the user are met every time, and the user experience is improved.
[0080] In the third way, whether the automatic recovery function is started once or kept started all the time can be determined based on user preferences. For example, in response to the triggering operation of the content collection control, a plurality of function holding time controls are displayed, each function holding time control is used to indicate the holding time of the function corresponding to a content collection control, so that the user can select based on the needs. After selecting the target holding time control from the plurality of function holding time controls, the opening operation of the content application is obtained within the holding time corresponding to the target holding time control, and the to-be-recovered content is recovered and displayed.
[0081] Referring to FIG. 6, which is a schematic diagram of selecting the holding time of the automatic recovery function provided by the application embodiment. In FIG. 6, when the triggering operation is performed on the content collection control 601, a subpage in the form of a pop-up window is displayed, and the function holding time control 602 and the function holding time control 603 are displayed based on the subpage. The function holding time control 602 indicates that the holding time of the automatic recovery function is the time corresponding to being started once, and the function holding time control 603 indicates that the holding time of the automatic recovery function is kept started until the user actively closes it. Thus, the user can select the required holding time according to his own needs, such as selecting the function holding time control 603, so as to always use the automatic recovery function.
[0082] Therefore, after obtaining the triggering operation for the content collection control, a plurality of function keeping duration controls are displayed, each of which corresponds to a keeping duration of the automatic recovery function, so that the user can select a required keeping duration from the plurality of keeping durations through the function keeping duration control, thereby realizing personalized adjustment of the keeping duration of the automatic recovery function and improving the user experience.
[0083] S203: In response to obtaining the opening operation for the content application, the to-be-resumed content is resumed to be displayed.
[0084] The opening operation is an operation for opening the content application, such as a single-click operation, a double-click operation, or the like. If the user starts the automatic recovery function before exiting the content application, the to-be-resumed content will be resumed to be displayed after the user enters the content application again, so as to realize that, in the process of starting the automatic recovery function, the to-be-resumed content, i.e., the content being viewed when the content application is exited, will be resumed to be displayed after the user enters the content application again.
[0085] Referring to FIG. 7, which is a schematic diagram of resuming to display the to-be-resumed content according to an embodiment of the present application. In FIG. 7, when a triggering operation is obtained for the content collection control 701, the content application starts the automatic recovery function, and a prompt 706 that the automatic recovery function is started is displayed, as shown in FIG. 7. When the content application is exited, the content application returns to an interface 702 displaying a plurality of applications, as shown in FIG. 7. When a triggering operation for the content application 703 in the interface 702 is obtained, i.e., the content application is entered again after being exited, the to-be-resumed content 705 is resumed to be displayed, and the video continues to be played from the progress when the content application is exited, as shown in FIG. 7.
[0086] As known from the foregoing, in the related art, it can only be ensured that the to-be-resumed content is resumed to be displayed after entering the content application again within a short time. If the time interval exceeds a certain duration, the content previously saved by the user for display may be deleted, and the content application is requested to display new content again after being entered again. That is, if the time interval exceeds a certain duration, the automatic recovery function cannot be realized after the content application is entered again. The content being viewed before being exited can only be viewed again through a history record or the like, which is relatively cumbersome and requires a large number of interactions.
[0087] Therefore, in the embodiments of the present application, the time interval is not limited, i.e., the time interval between the exit time corresponding to the exit operation and the opening time of the opening operation is greater than a time threshold, so that even if the time interval between the exit of the content application and the entry of the content application again is relatively long, the automatic recovery function can be realized according to the user demand, and the user experience is improved.
[0088] The embodiments of the present application do not specifically limit the manner of removing the time interval, and the following will be described by taking saving the to-be-resumed content through a persistent storage medium as an example.
[0089] In the related art, a content application can be built in an application program, such as a video watching function in a social application, which can be equivalent to a content application. If the application program is exited during the process of viewing content through the content application, the content application is equivalent to being exited. During the exiting process, if the process of the application program is not killed in the background, after entering the application program again, the content application can still display the content being viewed before the exiting.
[0090] However, this method is an automatic recovery at the system level, and does not give the user the option of whether to enable the automatic recovery function. If the process of the application program is killed in the background, the user cannot view the content to be recovered after entering the application program again, that is, the automatic recovery at the system level is unstable, resulting in a poor user experience for users who need automatic recovery.
[0091] Therefore, after obtaining the triggering operation for the content collection control, in response to obtaining the triggering operation for the content application, the content to be recovered is saved in a persistent storage medium.
[0092] The persistent storage medium refers to a physical carrier that can store data or information for a long time and is stable, and the data is not easily lost or damaged without human intervention or extreme environmental conditions. The content saved in the persistent storage medium has a long time, and the persistent storage medium can be built in a server or locally, such as a local file system or a database system, etc., which is not limited in the embodiments of the present application. Thus, the content to be recovered can be saved for a long time, such as permanently.
[0093] Therefore, even when the time interval between the exiting time and the opening time is greater than the time threshold, that is, the time interval between exiting the content application and entering the content application again is longer, the content to be recovered can be displayed, rather than being unable to be displayed due to the inability to obtain the content to be recovered.
[0094] The exiting time is the exiting time corresponding to the exiting operation for the content application, and the opening time is the opening time corresponding to the opening operation for the content application after exiting the application program.
[0095] Thus, by saving the to-be-resumed content in the persistent storage medium, when the content application is entered again after a long time interval from when the content application was exited, the to-be-resumed content can be obtained from the persistent storage medium regardless of the time difference between when the content application is entered again and when the content application was last exited, thereby realizing the display of the to-be-resumed content, and improving the stability of the display of the to-be-resumed content. Not only does the content collection control give the user the right to choose whether to enable the automatic recovery function, but also the to-be-resumed content is saved in the persistent storage medium to realize stable display of the to-be-resumed content, thereby providing the user with the function of displaying the to-be-resumed content when the user has a demand, and improving the user experience.
[0096] As a possible implementation, when the to-be-resumed content is saved, not only the to-be-resumed content is saved, but also additional data of the to-be-resumed content is saved. The additional data includes one or a combination of progress information, viewing setting information, user operation information, and historical content.
[0097] The progress information is used to describe the viewing progress of the to-be-resumed content before the content application is exited, such as a video being played to 70%. The viewing setting information is a setting parameter of the to-be-resumed content during viewing of the to-be-resumed content, such as a video playback speed, a way of automatically sliding to play the next video, a volume of playing a video, and the like. The user operation information is an operation parameter of the to-be-resumed content, such as a comment state and comment content of the to-be-resumed content. The historical content is content viewed before the to-be-resumed content, such as several videos played before the to-be-resumed content during viewing of a video stream, so as to trace back for the user. As a possible implementation, the historical content can be content before and after the to-be-resumed content during viewing of the to-be-resumed content, such as several videos played before and after the to-be-resumed content during viewing of a video stream.
[0098] Thus, by saving the to-be-resumed content, additional data is also saved, thereby displaying the additional data when the to-be-resumed content is resumed, that is, by saving a variety of data related to the to-be-resumed content, the saved data is more abundant, and the degree of restoration is higher when the to-be-resumed content is displayed, thereby improving the user experience.
[0099] It can be seen from the above technical solution that by setting the content collection control in the content application, if a trigger operation for the content collection control is acquired, it indicates that the user has a demand for content continuation viewing, and the content application starts the automatic recovery function. In the process of starting the automatic recovery function, in response to acquiring an exit operation for the content application, the to-be-recovered content, i.e., the content viewed when the content application is exited, is saved. In response to acquiring an opening operation for the content application, i.e., after entering the content application again, since the automatic recovery function was started before the content application was closed, the to-be-recovered content is displayed. In this way, by adding the content collection control in the content application, the content collection control is used to display the interrupted content, so as to determine whether the user has a demand for content continuation viewing according to whether the content collection control is triggered, and then determine whether to display the to-be-recovered content, i.e., the interrupted content, after entering the content application again. The effect of determining whether to display the to-be-recovered content based on user demand is achieved, and user experience is improved.
[0100] It should be noted that since the user can start the automatic recovery function multiple times, or the automatic recovery function is always started, the to-be-recovered content corresponding to each time the content application is exited will be stored, so that multiple to-be-recovered contents will be stored. Based on this, the embodiments of the present application provide a way to not specifically limit the display of the to-be-recovered content, which will be described below with two ways of displaying the to-be-recovered content as examples.
[0101] Method one: display the recently saved to-be-recovered content.
[0102] In response to acquiring an opening operation for the content application, the recently to-be-recovered content is acquired, which is the to-be-recovered content with the smallest difference between the saving time and the opening time. The saving time is the time when the to-be-recovered content is saved, and the opening time is the time corresponding to the opening operation, so that the recently to-be-recovered content is the to-be-recovered content closest to the opening time among the multiple to-be-recovered contents that have been saved. Finally, the recently to-be-recovered content is displayed.
[0103] In this way, the recently to-be-recovered content is the content interrupted during the last time the user exited the content application, and the content is the to-be-recovered content that the user most wants to continue to view when entering the content application again. The possibility of selecting one to-be-recovered content closest to the time when the content application is entered again, i.e., the recently to-be-recovered content, from multiple to-be-recovered contents is greater, so that the possibility of meeting the user's demand for viewing the to-be-recovered content is the greatest, thereby improving user experience.
[0104] Method two: display the required to-be-recovered content.
[0105] The plurality of to-be-resumed contents saved by the content application can be found through the collection control, that is, the collection control is used to display the to-be-resumed contents saved by the content application. In response to an acquisition of a triggering operation on the collection control, a plurality of to-be-resumed contents that have been saved are displayed, each to-be-resumed content being a content saved when the content application is exited once, so that different to-be-resumed contents are contents saved when the content application is exited different times. In response to a selection operation on a first target content in the plurality of to-be-resumed contents, the first target content is resumed and displayed. The first target content is one to-be-resumed content in the plurality of to-be-resumed contents. The selection operation is a single-click operation, a double-click operation, a circle selection operation, etc., which are not limited in the present application.
[0106] The present embodiment does not limit the display position of the collection control, for example, the collection control is displayed at the position of the bottom navigation bar. For another example, the collection control is displayed in a function setting page.
[0107] Referring to FIG. 8, which is a schematic diagram of selecting a to-be-resumed content for resuming and displaying according to an embodiment of the present application. In FIG. 8, the content collection control 801 is displayed at the position of the bottom navigation bar. In response to a triggering operation on the content collection control 801, to-be-resumed content 1 and to-be-resumed content 2 are displayed. The to-be-resumed content 1 is a to-be-resumed content saved when the content application is exited on January 1, 3000, and the to-be-resumed content 2 is a to-be-resumed content saved when the content application is exited on January 2, 3000. In response to a selection operation on the to-be-resumed content 2, the to-be-resumed content 2 is the first target content, and the to-be-resumed content 2 is resumed and displayed.
[0108] Therefore, based on the collection control, a plurality of to-be-resumed contents that have been saved can be displayed, so that a user can select a first target content that the user wants to resume and display from the plurality of to-be-resumed contents, meet the user's demand, and improve the user experience. Moreover, to-be-resumed contents saved when the content application is exited multiple times are all displayed to the user, instead of only to-be-resumed contents saved when the content application is exited last time, so that the user can trace back to-be-resumed contents that are much earlier, the application scenarios are more, and the user experience is improved.
[0109] As a possible implementation, since the user's attention only covers a certain number of to-be-resumed contents, even if storage space for storing more to-be-resumed contents is provided, the user can not fully pay attention to, resulting in waste of storage space. Based on this, the present embodiment provides two ways of deleting to-be-resumed contents from the plurality of to-be-resumed contents that have been saved. The following will be specifically explained.
[0110] In a first mode, in response to obtaining a deletion operation for a second target content from the saved plurality of to-be-resumed contents, the second target content is deleted from the plurality of to-be-resumed contents. The second target content is one of the plurality of to-be-resumed contents, and the deletion operation is an operation for deleting the to-be-resumed content. That is, by actively deleting, by the user, the to-be-resumed content that no longer needs to be resumed, the storage space occupation is reduced while the user's demand for resuming display is ensured.
[0111] In a second mode, the latest trigger time of each saved to-be-resumed content is determined. The latest trigger time is the time when the to-be-resumed content is last resumed and displayed. Compared with the saved time corresponding to the to-be-resumed content, the latest trigger time better reflects the degree of the to-be-resumed content's demand for resuming display by the user. From the plurality of to-be-resumed contents, the to-be-resumed contents corresponding to the N latest trigger times farthest from the current time are deleted, that is, N to-be-resumed contents that have not been operated for a long time are deleted, and N is a positive integer.
[0112] Thus, based on the latest trigger time, N to-be-resumed contents with a lower degree of demand for resuming display by the user are determined and deleted, thereby actively deleting the to-be-resumed contents with a lower degree of demand, reducing the storage space occupation while ensuring the user's demand for resuming display. Moreover, compared with the saved time, the latest trigger time better reflects the degree of the to-be-resumed content's demand for resuming display by the user, thereby improving the user experience.
[0113] As described above, the to-be-resumed content can be saved in the persistent storage medium. The persistent storage medium can be built-in in the server or locally, such as a local file system or a database system, and the following description is based on the persistent storage medium being built-in in the server.
[0114] The local device (such as a terminal device, a server, or the like) generates a storage request according to the to-be-resumed content and an account identifier for logging into the content application, and sends the storage request to the server. Based on the storage request, the server stores the to-be-resumed content in the persistent storage medium in the server, and the to-be-resumed content corresponds to the account identifier for logging into the content application. The account identifier can be an account or the like for identifying a user.
[0115] In order to resume and display the to-be-resumed content, the local device can send a resuming display request to the server, and the resuming display request includes the account identifier for logging into the content application. Thus, based on the account identifier in the resuming display request, the server obtains the to-be-resumed content saved based on the account identifier, and selects one to-be-resumed content to send to the local device. Thus, the local device obtains the to-be-resumed content corresponding to the account identifier from the server based on the account identifier for logging into the content application, and resumes and displays the to-be-resumed content.
[0116] Therefore, compared with storing the content to be recovered in the local, storing the content to be recovered in the persistent storage medium in the server based on the account identifier, and acquiring and displaying the content to be recovered from the persistent storage medium in the server when needed, not only can reduce the occupation of the local storage space, but also can realize the display of the content to be recovered in different local devices based on the account identifier, expand the scene application, increase the convenience of the user, and improve the user experience.
[0117] Due to insufficient running memory in the local device, system recycling of the content application process, or the like, the content application may be crashed during running, so that the content being viewed when the content application is exited may not be saved in time in response to an exit operation for the content application, and thus after entering the content application again, the display of the content to be recovered cannot be realized. That is, if only waiting for the content application to be exited, the content being viewed when the content application is exited is saved, the content may not be saved in time, so that only one saving operation for the content viewed through the content application may be unstable, and thus the display of the content to be recovered cannot be realized.
[0118] Based on this, the embodiments of the present application store the content being viewed during the use of the content application at a time, that is, during the process in which the automatic recovery function is started, the content being viewed before the content application is exited is stored constantly, so that during the process of the content being viewed through the content application, multiple saving operations are performed at different time nodes, so that after the content application is abnormally exited, the display of the content to be recovered can be realized.
[0119] Specifically, the timed storage content is saved every first preset time, the timed storage content is the content being viewed through the content application, and during the process of the content being viewed through the content application, the timed storage content is saved at different time nodes, which is equivalent to constantly saving the content being viewed at different time nodes, so that the content being viewed by the user at different time nodes can be saved respectively, that is, multiple times, and thus even if the content application is abnormally exited or the like, the content to be recovered fails to be saved, one of the multiple saved timed storage contents can be selected as a target timed storage content, and during the subsequent display of the content, the target timed storage content is used as the content to be recovered, which is equivalent to responding to the acquisition of the opening operation for the content application, and displaying the target timed storage content, the target timed storage content is the content to be recovered for display.
[0120] The target timed storage content is the timed storage content with the minimum difference between the storage time and the opening time in the multiple timed storage contents. The storage time is the time at which the timed storage content is stored, and the opening time is the time corresponding to the opening operation performed again for the content application.
[0121] The embodiments of the present application do not specifically limit the length of the first preset time, and a person skilled in the art can set it according to actual needs. For example, the first preset time can be set according to the type of the content. For example, if the content is a short video with a length of about 3 minutes, 3 minutes can be set as the first preset time, that is, the currently viewed short video is stored every 3 minutes. For another example, since the length of the short video is not fixed, the length of each short video is set as the preset length of this time, so that the saving is triggered once a new short video is played, so as to ensure the stability of the automatic recovery function, and as far as possible to reduce the user's repeated viewing of the content after the display of the content to be recovered, and improve the user experience.
[0122] Therefore, in the process of viewing the content through the content application, the content currently being viewed is stored as the timing storage content every first preset time, and the timing storage content is stored, that is, in the process of viewing the content through the content application, the saving operation is performed multiple times at different time nodes, so that the content being viewed at different time nodes is stored multiple times, even if the content application is not saved to the content being viewed when the content application exits due to abnormal exit or other reasons, the timing storage content corresponding to the storage time closest to the opening time, that is, the target timing storage content, can be taken as the content to be recovered, and the target timing storage content is displayed to improve the user's viewing experience.
[0123] The embodiments of the present application do not specifically limit the way of determining the target timing storage content from the plurality of timing storage contents, and the following will be described by taking two ways as examples.
[0124] The first way is to obtain the storage time of each timing storage content, determine the difference between the plurality of storage times and the opening time, and determine the timing storage content corresponding to the storage time with the smallest difference as the target timing storage content.
[0125] The second way is to take the i-th stored timing storage content as an example, delete the (i-1)-th acquired and stored timing storage content, save the i-th acquired timing storage content, and i is a positive integer.
[0126] In other words, the system retrieves timed storage content every first preset time interval. Each time the retrieved timed storage content is stored, the previously stored content is deleted before the newly retrieved content is saved. This ensures that only one set of timed storage content is saved for each instance of application use, and this content has the most recent storage time. Therefore, when retrieving target timed storage content, it's unnecessary to compare storage times from multiple sets; instead, only the currently stored, most recent content is retrieved. This eliminates the need for comparison operations, improving the speed of retrieving target timed storage content, reducing the time users spend waiting for the displayed content to be restored, and improving the user experience. Furthermore, it ensures that timed storage content can be restored and displayed in the event of an abnormal exit while reducing storage pressure.
[0127] As one possible implementation, different content to be recovered is stored in different storage containers. Each storage container includes multiple data groups, and different data groups are used to store different types of sub-data of the content to be recovered. Each data group includes a view, a view model, and a model, thereby separating the user interface (UI) of the content application from its underlying data model. Data binding enables automatic synchronization of data and user interface, thereby reducing code coupling and improving the maintainability and testability of the content application.
[0128] The following sections will explain the view, view model, and model respectively.
[0129] (1) The model represents the data model or business logic of the content application and is responsible for handling data access, processing, and manipulation. It typically includes data structures, database operations, network requests, etc. The model does not interact directly with the user interface layer; it only exposes some interfaces for the view model layer to call, enabling the view model to obtain the required data.
[0130] (2) The view is the visual part of the user interface, responsible for displaying data and interacting with the user.
[0131] (3) The view model is the bridge between the view and the model, responsible for retrieving data from the model and transforming it into a form usable by the view. The view model does not directly manipulate the view, but binds data to the view through a data binding mechanism, so that changes in the data can be automatically reflected in the view, achieving two-way data binding. The view model usually also contains user interaction logic, such as handling user input and button clicks.
[0132] After introducing the concepts of view, view model, and model, the following describes the process of saving the content to be restored based on this data architecture.
[0133] If the content data related to the content to be recovered, such as the content to be recovered, additional data, etc., is acquired, the content data is stored in the storage container corresponding to the content to be recovered, and different types of sub-data in the content data are stored in different data groups included in the storage container, i.e., different data groups are used to store different types of sub-data of the content to be recovered. The following takes a target type in multiple types as an example to illustrate the storage manner of sub-data belonging to the target type, i.e., target type sub-data.
[0134] If the view model in the target data group detects the target type sub-data, the view in the target data group is sent a notification of updating the view based on the target type sub-data, and the target type sub-data is stored in the model in the target data group, wherein the target data group is a data group used to store the target type sub-data.
[0135] Referring to FIG. 9, which is a schematic diagram of storing content data provided by an embodiment of the present application. The storage container shown in FIG. 9 is used to store content data related to the content to be recovered, which includes M types, M being an integer greater than 1. Therefore, the storage container includes M data groups, each of which is used to store sub-data of one type. When content data related to the content to be recovered, such as user operation information, configuration information issued by the server, etc., is acquired, different types of data in the content data are stored in different models in different data groups, and a notification is sent to the views in different data groups to update each view based on the data saved in the model in the corresponding data group, i.e., the update of the view is driven based on the update of the model.
[0136] Continuing to take the video as an example, the video address link can be saved by model 1, the progress information of the video can be saved by model 2, the setting parameters of the user for the video can be saved by model 3, and the user operation information can be saved by model 4.
[0137] It should be noted that when sub-data is saved by a model, if the sub-data of each model is not saved at the same time, such as the user operation information is saved for the kth time and the progress information is saved for the k-2th time, k being an integer multiple of 2. It may cause deviation when recovering and displaying. Therefore, when corresponding sub-data is saved by multiple models, if multiple sub-data are acquired and saved at the same time, the saving is continued, otherwise the saving is not performed.
[0138] Thus, by subdividing the content data related to the content to be recovered, storing the sub-data of different data types in different data groups in the model, through the data architecture of view-view model-model, separating the user interface logic from the view, and separating the data processing logic from the view and the model, the responsibilities of each component are more clear, and the code is easier to organize and maintain. The view model acts as a bridge between the view and the model, responsible for converting the data in the model into a form available to the view, and automatically synchronizing the data to the view through data binding. This two-way binding makes the update of the user interface automatic, and the developer only needs to focus on the processing of the data and the writing of the business logic, without worrying too much about the update of the user interface, which is convenient and fast.
[0139] If multiple contents to be recovered are saved, the most recent content to be recovered needs to be selected from the multiple contents to be recovered for recovery display. The following continues to take the above data architecture as an example to describe the process of recovering and displaying the content to be recovered.
[0140] After obtaining the opening operation of the content application, it is also necessary to determine whether the content application has opened the automatic recovery function, i.e., whether the content collection control has been triggered before the content application opening operation. If the content collection control has been triggered before the last exit operation, the content application has opened the automatic recovery function. If the content collection control has been triggered before the execution of the current opening operation, and the time corresponding to the opening operation is within the duration of the automatic recovery function opened by the content collection control, the content application has opened the automatic recovery function. If the content collection control has not been triggered before the execution of the current opening operation, the automatic recovery function is not opened.
[0141] In response to obtaining the opening operation of the content application, and the content application opening the automatic recovery function, the most recent content to be recovered is determined from the multiple contents to be recovered that have been saved, i.e., the content to be recovered with the smallest difference between the save time and the opening time. Since different recovery contents correspond to different storage containers, the storage container corresponding to the most recent content to be recovered, i.e., the target storage container, can be selected from the multiple storage containers. The target storage container includes multiple data groups, and each data group includes a view, a view model, and a model.
[0142] Based on this, the sub-content stored by each model in the multiple data groups included in the target storage container is obtained from the target storage container corresponding to the most recent content to be recovered. As previously described, the model is used for storage, and the models in different data groups are used for storing sub-contents of different types.
[0143] Further, the view model is used to connect the model and the view, and the view is used to display the recently to-be-resumed content. Thus, according to the sub-data in each model included in the plurality of data groups of the target storage container, the corresponding view is notified by the view model corresponding to each model, so that the corresponding view is rendered based on the sub-data in each model, thereby realizing the display of the recently to-be-resumed content.
[0144] For example, from the target storage container corresponding to the recently to-be-resumed content, four data groups included in the target storage container are obtained, each data group including a view, a view model, and a model, and the four models included in the four data groups, wherein the model 1 stores a video address link, the model 2 stores the progress information of the video, the model 3 stores the setting parameters of the user for the video, and the model 4 stores the user operation information. After each view model obtains the data from the model, the corresponding view is notified to update the view. For example, after the view model 3 obtains the setting parameters of the user for the video from the model 3, the view 3 is notified to realize the display of the video content based on the setting parameters of the user for the video.
[0145] It can be understood that, in the process of displaying the to-be-resumed content, the sub-data obtained from the model is used for display, so as to ensure a high degree of restoration. For example, if the viewing setting information is different from the current viewing setting, the viewing setting information is used for display.
[0146] Thus, in the process of starting the automatic resume function, if the content application is entered again, the recently to-be-resumed content is determined from the plurality of to-be-resumed contents, and the sub-data is obtained from the plurality of models included in the target storage container corresponding to the recently to-be-resumed content through the view model, so that each view is updated and displayed based on each sub-data, thereby realizing the display of the recently to-be-resumed content. Through data-driven display, the success rate of the display is improved.
[0147] The process of obtaining the to-be-resumed content is described below with reference to the above data architecture.
[0148] The end of the life cycle means that the view model is no longer used by the associated Activity (a component of an application, which provides an area on the screen to allow the user to make some interactive operations) or Fragment (a component that can be embedded in the Activity), and the resources thereof are released or recycled. If the life cycle of the view model included in the storage container corresponding to the to-be-resumed content ends, the content application can be exited, and the content data related to the to-be-resumed content can be obtained and stored in the storage container corresponding to the to-be-resumed content.
[0149] Alternatively, the pending content data related to the content to be recovered can be acquired every second preset time, and if the pending content data acquired at two adjacent times is different, the pending content data acquired at the later time is stored as the content data. For example, if the pending content data acquired at the jth time is different from the pending content data acquired at the (j-1)th time, the pending content data acquired at the jth time is determined as the content data, and j is a positive integer. Thus, the storage is performed again when the pending content data is different, reducing the number of storage times.
[0150] For example, the content data related to the content to be recovered can also be acquired every second preset time, and the content data is stored in the storage container corresponding to the content to be recovered.
[0151] Referring to FIG. 10, which is a content data storage manner provided by an embodiment of the present application, two strategies for triggering storage are provided in FIG. 10. Strategy one: the view model acquires content data every second preset time, and after the view model acquires the content data, the content data is saved in the corresponding model, for example, in M models. Strategy two: when the view model lifecycle ends, the content data is acquired and saved in the corresponding model.
[0152] Thus, in the process of viewing content through the content application, the content currently being viewed is stored as the timing storage content every second preset time, and the timing storage content is stored, that is, in the process of viewing content through the content application, the content being viewed at different time nodes is saved multiple times, so that the content being viewed at different time nodes is stored multiple times. Even if the content application does not save the content being viewed at the time of exiting the content application due to abnormal exit or other reasons, the timing storage content corresponding to the storage time closest to the opening time, that is, the target timing storage content, can be displayed as the content to be recovered, thereby improving the viewing experience of the user. Moreover, the saving operation can also be performed once again when the view model lifecycle ends, so that the state at the time of exiting can be restored as much as possible during subsequent display and recovery, thereby improving the viewing experience of the user. For example, if the content being edited is being commented before exiting the content application, the editing interface is pulled up based on the user operation information during the display and recovery, and the edited content is filled into the editing box for the user to continue editing.
[0153] In order to facilitate further understanding of the technical solutions provided by the embodiments of the present application, the execution subject of the content recovery method provided by the embodiments of the present application is taken as a terminal device, and the content application is taken as a video application as an example, and the content recovery method is introduced in whole.
[0154] The process of using the automatic recovery function in the video application generally includes three stages, namely, recording the scene information, saving the scene information, and recovering the video scene. The following will be described respectively.
[0155] The video scene refers to a collection of data such as to-be-restored content, progress information, viewing setting information, user operation information and historical content, i.e., the content data related to the to-be-restored content in the foregoing scheme.
[0156] Stage one, record the scene information.
[0157] The content collection control is displayed in the content application, and the automatic restoration function is started after a triggering operation for the content collection control is acquired. In the process of starting the automatic restoration function, the to-be-restored content is recorded in response to an exit operation for the content application being acquired, and the timing storage content is recorded every preset time.
[0158] Stage two, save the scene information.
[0159] The timing storage content acquired continuously and the to-be-restored content acquired by exiting the video application are stored in a persistent storage medium such as a server or a database.
[0160] Stage three, restore the video scene.
[0161] When the video application is entered again, if the automatic restoration function is started, the recent to-be-restored content can be acquired and displayed, so that the recent to-be-restored content is restored and displayed, and the user's viewing experience is improved.
[0162] For the content restoration method described above, the application also provides a corresponding content restoration device to make the content restoration method described above applicable and implemented in practice.
[0163] Referring to FIG. 11, which is a structural schematic diagram of a content restoration device provided by an embodiment of the application. As shown in FIG. 11, the content restoration device 1100 includes a display unit 1101, a saving unit 1102 and a restoring unit 1103.
[0164] The display unit 1101 is configured to display a content collection control in a content application, and the content collection control is used to restore and display interrupted content.
[0165] The saving unit 1102 is configured to, after a triggering operation for the content collection control is acquired, save to-be-restored content in response to an exit operation for the content application being acquired, the to-be-restored content being content being viewed when the content application is exited.
[0166] The restoring unit 1103 is configured to, in response to an opening operation for the content application being acquired, restore and display the to-be-restored content.
[0167] It can be seen from the above technical solution that by setting the content collection control in the content application, if a trigger operation for the content collection control is acquired, it indicates that the user has a demand for content continuation viewing, and the content application starts the automatic recovery function. In the process of starting the automatic recovery function, in response to acquiring an exit operation for the content application, the to-be-resumed content, i.e., the content viewed when the content application is exited, is saved. In response to acquiring an opening operation for the content application, i.e., after entering the content application again, since the automatic recovery function was started before the content application was closed, the to-be-resumed content is displayed. Thus, by adding the content collection control in the content application, the content collection control is used to display the interrupted content, so as to determine whether the user has a demand for content continuation viewing according to whether the content collection control is triggered, and then determine whether to display the interrupted content when the content application is entered again. The effect of determining whether to display the to-be-resumed content based on user demand is achieved, so that the to-be-resumed content can be displayed through one interaction with the content collection control, the number of interactions is reduced, the content recovery process is simplified, and the user experience is improved.
[0168] As a possible implementation manner, a time interval between an exit time corresponding to the exit operation and an opening time of the opening operation is greater than a time threshold.
[0169] As a possible implementation manner, if the to-be-resumed content and the additional data are saved, the saving unit 1102 is specifically configured to:
[0170] The to-be-resumed content and the additional data are displayed, the additional data including one or more combinations of progress information, viewing setting information, user operation information, and historical content, the viewing setting information being a setting parameter corresponding to the to-be-resumed content in a process of viewing the to-be-resumed content, the user operation information being an operation parameter for the to-be-resumed content, and the historical content being content viewed before the to-be-resumed content.
[0171] As a possible implementation manner, if a plurality of to-be-resumed contents have been saved, the restoring unit 1103 is specifically configured to:
[0172] In response to acquiring an opening operation for the content application, a most recent to-be-resumed content is acquired, the most recent to-be-resumed content being a to-be-resumed content with a smallest difference value between a saving time and an opening time of the opening operation;
[0173] The most recent to-be-resumed content is displayed.
[0174] As a possible implementation manner, the display unit 1101 is specifically configured to display a plurality of the to-be-resumed contents in response to obtaining a triggering operation for a collection control, different to-be-resumed contents being contents saved by the content application in different times.
[0175] The resuming unit 1103 is specifically configured to resume displaying a first target content in the plurality of to-be-resumed contents in response to a selection operation for the first target content.
[0176] As a possible implementation manner, the apparatus further includes a deleting unit configured to:
[0177] delete, from the plurality of to-be-resumed contents, a second target content in the plurality of to-be-resumed contents in response to obtaining a deleting operation for the second target content; or,
[0178] determine a latest triggering time of each to-be-resumed content.
[0179] delete, from the plurality of to-be-resumed contents, N to-be-resumed contents corresponding to the latest triggering times farthest from a current time, N being a positive integer.
[0180] As a possible implementation manner, the display unit 1101 is specifically configured to:
[0181] display the content collection control in a display page of the viewing content in response to obtaining a triggering operation for the viewing content, the viewing content being a content being viewed through the content application.
[0182] As a possible implementation manner, if the video content is viewed through the content application, the display unit 1101 is specifically configured to:
[0183] display the content collection control in a pause page of the viewing content in response to obtaining a pause operation for the viewing content, the viewing content being a content being viewed through the content application.
[0184] As a possible implementation manner, the display unit 1101 is specifically configured to display a plurality of function keeping time length controls in response to obtaining a triggering operation for the content collection control, the function keeping time length control being used for indicating a keeping time length of a function corresponding to the content collection control.
[0185] After obtaining a selection operation for a target keeping time length control in the plurality of function keeping time length controls, the resuming unit 1103 is specifically configured to resume displaying the to-be-resumed content in response to obtaining an opening operation for the content application within a keeping time length indicated by the target keeping time length control.
[0186] As a possible implementation manner, the saving unit 1102 is specifically configured to:
[0187] After obtaining the triggering operation on the content collection control, in response to obtaining the exit operation on the content application, save the to-be-resumed content in the persistent storage medium.
[0188] As a possible implementation manner, if the persistent storage medium is built in the server, the saving unit 1102 is specifically configured to:
[0189] According to the to-be-resumed content and the account identifier logged in the content application, generate a storage request;
[0190] Send the storage request to the server, so as to store the to-be-resumed content into the persistent storage medium in the server;
[0191] The resuming unit 1103 is specifically configured to:
[0192] According to the account identifier, obtain the to-be-resumed content corresponding to the account identifier from the server;
[0193] Resume displaying the to-be-resumed content.
[0194] As a possible implementation manner, after obtaining the triggering operation on the content collection control, the saving unit 1102 is specifically configured to:
[0195] Save the timing storage content every first preset time, the timing storage content being content being viewed by the content application;
[0196] If the to-be-resumed content fails to be saved, determine a target timing storage content from a plurality of timing storage contents, the target timing storage content being a timing storage content with a minimum difference value between a storage time and an opening time;
[0197] Determine the target timing storage content as the to-be-resumed content.
[0198] As a possible implementation manner, the saving unit 1102 is specifically configured to:
[0199] Delete the timing storage content stored for the i-1th time, i being a positive integer;
[0200] Save the timing storage content stored for the i th time, i being a positive integer.
[0201] As a possible implementation manner, if a storage container used to save the to-be-resumed content includes a plurality of data groups, each of the data groups including a view, a view model and a model, the saving unit 1102 is specifically configured to:
[0202] If the content data related to the content to be recovered is obtained, the content data is stored into the storage container corresponding to the content to be recovered, and different types of sub-data in the content data are stored into different data groups included in the storage container;
[0203] The storage mode of the target type sub-data belonging to the target type among the multiple types is as follows:
[0204] If the target type sub-data is detected by the view model in the target data group, the target type sub-data is stored into the model in the target data group, and a notification of updating the view based on the target type sub-data is sent to the view in the target data group, the target data group being a data group for storing the target type sub-data.
[0205] As a possible implementation, if multiple contents to be recovered are saved, the recovery unit 1103 is specifically configured to:
[0206] In response to obtaining an opening operation for the content application, a most recent content to be recovered is determined from the multiple contents to be recovered, the most recent content to be recovered being a content to be recovered with the minimum difference between the saving time and the opening time of the opening operation;
[0207] From the target storage container corresponding to the most recent content to be recovered, sub-data in each model in multiple data groups included in the target storage container is obtained;
[0208] According to the sub-data in each model in the multiple data groups included in the target storage container, a notification is sent to the corresponding view through the view model corresponding to each model;
[0209] Based on the sub-data in each model, each view recovers and displays the most recent content to be recovered.
[0210] As a possible implementation, the apparatus further includes an obtaining unit configured to:
[0211] If the life cycle of the view model included in the storage container corresponding to the content to be recovered ends, content data related to the content to be recovered is obtained; or,
[0212] The pending content data related to the content to be recovered is obtained every second preset time;
[0213] If the jth pending content data obtained is different from the (j-1)th pending content data obtained, the jth pending content data obtained is determined as the content data, j being a positive integer.
[0214] The embodiments of the present application also provide a computer device, which can be a server or a terminal device. The computer device provided by the embodiments of the present application will be introduced from the perspective of hardware embodiment. FIG. 12 shows a structural diagram of a server, and FIG. 13 shows a structural diagram of a terminal device.
[0215] Referring to FIG. 12, which is a structural diagram of a server provided by the embodiments of the present application, the server 1400 can have great differences due to different configurations or performances, and can include one or more processors 1422, such as a central processing unit (CPU), a memory 1432, one or more storage media 1430 (for example, one or more mass storage devices) for storing one or more application programs 1442 or data 1444. The memory 1432 and the storage media 1430 can be temporary storage or persistent storage. The programs stored in the storage media 1430 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the server. Further, the processor 1422 can be configured to communicate with the storage media 1430 and execute the series of instruction operations in the storage media 1430 on the server 1400.
[0216] The server 1400 can also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and / or one or more operating systems 1441, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
[0217] The steps performed by the server in the above embodiments can be based on the server structure shown in FIG. 12.
[0218] The processor 1422 is configured to perform the following steps:
[0219] displaying a content collection control in the content application, the content collection control being used to resume displaying interrupted content;
[0220] after obtaining a triggering operation for the content collection control, in response to obtaining an exit operation for the content application, saving to-be-resumed content, the to-be-resumed content being content being viewed when the content application is exited;
[0221] in response to obtaining an opening operation for the content application, resuming displaying the to-be-resumed content.
[0222] Optionally, the processor 1422 can further execute the method steps of any of the content recovery method embodiments described in the present application.
[0223] Referring to FIG. 13, it is a structural schematic diagram of a terminal device provided in an embodiment of the present application. Taking the terminal device as a smart phone as an example, FIG. 13 shows a block diagram of part of the structure of the smart phone, which includes: radio frequency (RF) circuit 1510, memory 1520, input unit 1530, display unit 1540, sensor 1550, audio circuit 1560, wireless fidelity (WiFi) module 1570, processor 1580, and power supply 1590, and the like. Those skilled in the art can understand that the structure of the smart phone shown in FIG. 13 does not constitute a limitation to the smart phone, and can include more or fewer components than shown, or combine certain components, or different component arrangements.
[0224] The various constituent components of the smart phone will be specifically introduced below in combination with FIG. 13:
[0225] The RF circuit 1510 can be used for receiving and sending signals in the process of information or call, especially, receiving the downlink information of the base station and processing by the processor 1580; in addition, sending the uplink data to the base station.
[0226] The memory 1520 can be used for storing software programs and modules, and the processor 1580 realizes various function applications and data processing of the smart phone by running the software programs and modules stored in the memory 1520.
[0227] The input unit 1530 can be used for receiving input digital or character information, and generating key signal input related to user settings and function control of the smart phone. Specifically, the input unit 1530 can include a touch panel 1531 and other input devices 1532. The touch panel 1531, also known as a touch screen, can collect touch operations of a user on or near it, and drive the corresponding connection device according to the pre-set program. In addition to the touch panel 1531, the input unit 1530 can also include other input devices 1532. Specifically, the other input devices 1532 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, on-off buttons, etc.), trackballs, mice, joysticks, and the like.
[0228] The display unit 1540 can be used to display information input by a user or information provided to the user, as well as various menus of the smart phone. The display unit 1540 can include a display panel 1541, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0229] The smart phone can further include at least one sensor 1550, such as a light sensor, a motion sensor, and other sensors. Gyroscopes, barometers, hygrometers, thermometers, infrared sensors, and other sensors that can be configured in the smart phone are not described here.
[0230] The audio circuit 1560, the speaker 1561, and the microphone 1562 can provide an audio interface between a user and the smart phone. The audio circuit 1560 can convert received audio data into an electrical signal and transmit the electrical signal to the speaker 1561, which converts the electrical signal into a sound signal and outputs the sound signal. On the other hand, the microphone 1562 converts a sound signal collected into an electrical signal, which is received by the audio circuit 1560 and converted into audio data. The audio data is output to the processor 1580 for processing, and then transmitted to another smart phone via the RF circuit 1510, or output to the memory 1520 for further processing.
[0231] The processor 1580 is the control center of the smart phone, which connects various parts of the smart phone through various interfaces and lines, and performs various functions and processes data of the smart phone by running or executing software programs and / or modules stored in the memory 1520 and calling data stored in the memory 1520. Optionally, the processor 1580 can include one or more processing units.
[0232] The smart phone further includes a power supply 1590 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1580 through a power management system, so as to realize functions such as charge management, discharge management, and power consumption management through the power management system.
[0233] Although not shown, the smart phone can further include a camera, a Bluetooth module, and the like, which are not described here.
[0234] In the embodiments of the present application, the memory 1520 included in the smart phone can store a computer program and transmit the computer program to the processor.
[0235] The processor 1580 included in the smart phone can execute the content recovery method provided in the above embodiments according to instructions in the computer program.
[0236] The embodiment of the present application further provides a computer readable storage medium for storing a computer program, the computer program being used for executing the content recovery method provided by the above embodiment.
[0237] The embodiment of the present application further provides a computer program product or computer program, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the content recovery method provided in various optional implementation manners of the above aspect.
[0238] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium. When the program is executed, the program executes the steps of the above method embodiments. The foregoing storage medium can be at least one of the following: a read-only memory (English: Read-Only Memory, abbreviated as ROM), a RAM, a magnetic disk or an optical disk, and various computer program storage media.
[0239] All data collected by the present application (such as account data of content applications) are collected with the consent and authorization of the object to which the data belongs (such as a user, an institution or an enterprise), and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0240] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "correspond to" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.
[0241] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that contains the functions of the module or unit.
[0242] It should be noted that each of the embodiments in the present specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment mainly describes the difference from other embodiments. Especially, for the device and system embodiments, since they are basically similar to the method embodiments, they are described more simply, and the relevant parts can be referred to the part of the description of the method embodiments. The above-described device and system embodiments are merely illustrative, and the units described as separate components can be or can not be physically separated, and the components shown as units can be or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiments according to the actual needs. Those skilled in the art can understand and implement it without creative labor.
[0243] The above describes only one specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. On the basis of the implementation manners provided by the above aspects of the present application, further combinations can be made to provide more implementation manners. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A content recovery method, the method being performed by a computer device, the method comprising: displaying a content collection control in a content application, the content collection control being used to recover and display interrupted content; in response to obtaining a trigger operation for the content collection control, saving a content to be recovered in response to obtaining a quit operation for the content application, the content to be recovered being content being viewed when the content application is quit; in response to obtaining an open operation for the content application, recovering and displaying the content to be recovered. 2.The method of claim 1, wherein a time interval between a quit time corresponding to the quit operation and an open time of the open operation is greater than a time threshold. 3.The method of claim 1 or 2, wherein if the content to be recovered and additional data are saved, the recovering and displaying the content to be recovered comprises: recovering and displaying the content to be recovered and the additional data, the additional data comprising one or more combinations of progress information, viewing setting information, user operation information and historical content, the viewing setting information being a setting parameter corresponding to the content to be recovered in a process of viewing the content to be recovered, the user operation information being an operation parameter for the content to be recovered, and the historical content being content viewed before the content to be recovered. 4.The method of any one of claims 1-3, wherein if a plurality of the content to be recovered have been saved, the recovering and displaying the content to be recovered in response to obtaining the open operation for the content application comprises: in response to obtaining the open operation for the content application, obtaining a most recent content to be recovered, the most recent content to be recovered being a content to be recovered with a smallest difference between a saving time and the open time of the open operation; and recovering and displaying the most recent content to be recovered. 5.The method of any one of claims 1-3, further comprising: in response to obtaining a trigger operation for a collection control, displaying a plurality of the content to be recovered, different content to be recovered being content saved when the content application is quit different times; and in response to a selection operation for a first target content in the plurality of the content to be recovered, recovering and displaying the first target content. 6.The method of claim 5, further comprising: in response to obtaining a deletion operation for a second target content in the plurality of the content to be recovered, deleting the second target content from the plurality of the content to be recovered; or determining a most recent trigger time of each of the content to be recovered; and from the plurality of the content to be recovered, deleting N content to be recovered corresponding to the most recent trigger time farthest from a current time, N being a positive integer. 7.The method of any one of claims 1-6, wherein the displaying the content collection control in the content application comprises: in response to obtaining a trigger operation for a viewing content, displaying the content collection control in a display page of the viewing content, the viewing content being content being viewed through the content application. 8. The method of any of claims 1-6, wherein the displaying the content collection control in the content application comprises: in response to obtaining a pause operation for the viewing content, displaying the content collection control in a pause page of the viewing content, the viewing content being content being viewed by the content application.
9. The method of any of claims 1-8, further comprising: in response to obtaining a trigger operation for the content collection control, displaying a plurality of function duration controls, the function duration controls being used to indicate a duration of a function corresponding to the content collection control; and in response to obtaining a selection operation for a target function duration control in the plurality of function duration controls, the resuming displaying the to-be-resumed content in response to obtaining an opening operation for the content application comprises: in response to obtaining an opening operation for the content application within the duration indicated by the target function duration control, resuming displaying the to-be-resumed content.
10. The method of any of claims 1-8, wherein the saving the to-be-resumed content in response to obtaining a quit operation for the content application after obtaining the trigger operation for the content collection control comprises: in response to obtaining a quit operation for the content application after obtaining the trigger operation for the content collection control, saving the to-be-resumed content in a persistent storage medium.
11. The method of claim 10, wherein the saving the to-be-resumed content in the persistent storage medium comprises: generating a storage request according to the to-be-resumed content and an account identifier used to log in the content application; sending the storage request to a server to store the to-be-resumed content in a persistent storage medium in the server; and wherein the resuming displaying the to-be-resumed content comprises: obtaining the to-be-resumed content corresponding to the account identifier from the server according to the account identifier; and resuming displaying the to-be-resumed content.
12. The method of any of claims 1-11, further comprising, after the obtaining the trigger operation for the content collection control: saving a timing storage content every first preset time, the timing storage content being content being viewed by the content application; in response to failing to save the to-be-resumed content, determining a target timing storage content from a plurality of the timing storage contents, the target timing storage content being a timing storage content having a smallest difference between a storage time and an opening time; and determining the target timing storage content as the to-be-resumed content.
13. The method of claim 12, wherein the saving the timing storage content for the ith time comprises: deleting an (i-1)th timing storage content; and saving an ith timing storage content, i being a positive integer. 14. The method of any of claims 1-13, wherein if a storage container for storing the content to be resumed comprises a plurality of data groups, each of the data groups comprising a view, a view model and a model, the storing the content to be resumed comprises: if content data related to the content to be resumed is obtained, storing the content data into the storage container corresponding to the content to be resumed, different types of sub-data in the content data being stored into different data groups comprised in the storage container; and wherein a storage manner of target type sub-data, which is sub-data belonging to a target type among the plurality of types, is as follows: if the target type sub-data is detected by a view model in a target data group, storing the target type sub-data into a model in the target data group, and sending a notification of updating a view based on the target type sub-data to the view in the target data group, the target data group being a data group for storing the target type sub-data.
15. The method of claim 14, wherein if a plurality of the content to be resumed is stored, the resuming displaying the content to be resumed in response to obtaining an open operation applied to the content application comprises: in response to obtaining the open operation applied to the content application, determining a latest content to be resumed from the plurality of the content to be resumed, the latest content to be resumed being a content to be resumed with a smallest difference between a storage time and an open time of the open operation; obtaining sub-data in each model in a plurality of data groups comprised in a target storage container from the target storage container corresponding to the latest content to be resumed; sending a notification to a corresponding view through a view model corresponding to each model according to the sub-data in each model in the plurality of data groups comprised in the target storage container; and resuming displaying the latest content to be resumed through each of the views based on the sub-data in each of the models.
16. The method of claim 14, further comprising: if a life cycle of a view model comprised in a storage container corresponding to the content to be resumed ends, obtaining content data related to the content to be resumed; or, obtaining pending content data related to the content to be resumed every second preset time; and if the pending content data obtained at a jth time is different from the pending content data obtained at a (j-1)th time, determining the pending content data obtained at the jth time as the content data, j being a positive integer. a display unit, a storage unit and a resuming unit; the display unit is configured to display a content collection control in a content application, the content collection control being used to resume displaying interrupted content; the storage unit is configured to, in response to obtaining an exit operation applied to the content application after obtaining a trigger operation applied to the content collection control, store content to be resumed, the content to be resumed being content being viewed when the content application is exited; and the resuming unit is configured to resume displaying the content to be resumed in response to obtaining an open operation applied to the content application.
18. A computer device, comprising a processor and a memory. 17. A content recovery apparatus, the apparatus comprising: The memory is configured to store a computer program and transmit the computer program to the processor. The processor is configured to execute the method according to any one of claims 1-16 according to the computer program. 19.A computer readable storage medium configured to store a computer program, the computer program being configured to execute the method according to any one of claims 1-16. 20.A computer program product comprising a computer program which, when executed on a computer device, causes the computer device to execute the method according to any one of claims 1-16.
Citation Information
Patent Citations
Application content collection method and device
CN107045527A
Media content system for transferring a playback marker between network-connected playback devices
CN112565837A
Playback system join with base
US10001965B1
Communication apparatus
US20080212939A1
Systems and methods for software state capture and playback
US20120159324A1