Processing method and electronic device

By generating and displaying a collection of representative images, users can quickly choose to restore the backend activity to the foreground, solving the problems of cumbersome operations and performance impacts in the prior art, and achieving efficient component management.

CN114741136BActive Publication Date: 2025-07-22LENOVO (BEIJING) LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210481074.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2025-07-22
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

In full-screen mode, the life cycle of the background Activity component is in STOPPED state, and users need to restore it to the foreground through fallback operations one by one, which is cumbersome and affects device performance and user experience.

Method used

Generate a first representative image collection, display the collection on the display interface to represent the active components in the background, and restore the background components to the foreground in response to the selection operation to avoid complex life cycle flow.

Benefits of technology

It realizes rapid and efficient recovery of backend components to the foreground, reducing device performance consumption and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114741136B_ABST
    Figure CN114741136B_ABST
Patent Text Reader

Abstract

The present application discloses a processing method and an electronic device. The processing method and the electronic device generate a first set of representative images, display the first set of representative images on a display interface in response to meeting a preset condition, the first set of representative images is associated with active components running in the background, and in response to a selection operation on the first set of representative images, the first active component running in the background associated with the representative image indicated by the selection operation is restored to the foreground for running, achieving the restoration of the required component from the background to the foreground for running quickly and efficiently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of application window management, and particularly relates to a processing method and an electronic device. Background Art

[0002] During the process of starting and running an application, a series of Activities (application windows) of the application are managed through an application stack (or called Activity stack).

[0003] Among them, in full-screen mode, only the Activity at the top of the application stack is in an interactive state. The Activities that have been opened but are not in an interactive state (i.e., background Activities) are placed in the application stack in sequence. If the user hopes to view a certain background Activity that has been opened before, they can only click the back button to backtrack one by one until they backtrack to the required Activity. The operation is cumbersome and inefficient. Moreover, the background Activity life cycle is in the STOPPED state, and when returning to the foreground, it will go through the onRestart->onStart->onResumed life cycle, the process is complex, and it will affect the user experience and device performance during frequent operations. Summary of the Invention

[0004] For this reason, the present application discloses the following technical solutions:

[0005] A processing method, the method includes:

[0006] Generate a first set of representative images;

[0007] In response to meeting a preset condition, display the first set of representative images on the display interface, and the first set of representative images is associated with the active components running in the background;

[0008] In response to a selection operation on the first set of representative images, resume the first active component running in the background associated with the selected representative image to the foreground for running.

[0009] Optionally, the generating the first set of representative images includes:

[0010] In response to an exit operation on a second active component of the application running in the foreground, manage the application stack corresponding to the second active component, so that the second active component runs in the background in a first state; establish an association relationship between the second active component and the corresponding representative image, and associate the representative image associated with the second active component to the first set of representative images.

[0011] Optionally, the managing the application stack corresponding to the second active component, so that the second active component runs in the background in a first state, includes:

[0012] In response to the exit operation, adjust the position and state of the second active component in the application stack, where the second state adjustment process for the second active component triggered based on adjusting the position of the second active component in the application stack is intercepted so that the second active component runs in the background in a first state, and the first state is a state for enabling the component to have interaction capabilities;

[0013] Wherein, the second state adjustment process for the second active component is used to adjust the second active component to a state of losing interaction capabilities when the second active component switches to the background.

[0014] Optionally, associating the representative image associated with the second active component with the first representative image set includes:

[0015] Obtain a screenshot of the component window corresponding to the second active component on the display interface at the moment when the second active component is switched to the background;

[0016] Associate the screenshot of the component window as the representative image of the second active component with the first representative image set; the first representative image set includes the representative images of each active component running in the background of the application, and the relative positions of the representative images of each active component in the first representative image set are the same as the relative positions of each active component in the application stack.

[0017] Optionally, in response to a selection operation on the first representative image set, restoring the first active component associated with the representative image indicated by the selection operation to the foreground for running includes:

[0018] In response to a first selection operation on the first representative image set, switch the first active component to be full-screen displayed and run on the display interface;

[0019] Or, in response to a second selection operation on the first representative image set, switch the first active component to be non-full-screen displayed and run on the display interface.

[0020] Optionally, in response to a second selection operation on the first representative image set, switching the first active component to be non-full-screen displayed and run on the display interface includes:

[0021] Obtain the position information indicated by the second selection operation on the display interface;

[0022] Switch the first active component to be displayed and run in the area corresponding to the position information on the display interface.

[0023] Optionally, in response to a selection operation on the first representative image set, the above method further includes:

[0024] Adjust the first active component running in the background associated with the representative image indicated by the selection operation from the current position in the application stack to the top position of the stack.

[0025] Optionally, the above method further includes:

[0026] In response to a deletion operation on the first set of representative images, delete the representative image indicated by the deletion operation from the first set of representative images, and remove and destroy the third active component associated with the deleted representative image from the application stack.

[0027] Optionally, the above method further includes:

[0028] In response to switching the application to run in the background, adjust each active component of the application in the application stack from the first state to the second state; the second state is a state for making the active component lose its interaction ability and correspondingly convert to an inactive component.

[0029] Or, associate the representative image deleted from the first set of representative images with a second set of representative images; in response to a selection operation on the second set of representative images, restore the representative image indicated by the selection operation on the second set of representative images to the first set of representative images, create an active component corresponding to the restored representative image, add the created active component to the application stack and make the active component in the first state.

[0030] An electronic device, comprising:

[0031] A memory for storing a set of computer instructions;

[0032] A processor for implementing the processing method as described in any one of the above by executing the instruction set stored on the memory.

[0033] A storage medium having at least a set of computer instructions stored thereon, and when the computer instruction set is called and executed, it is used to implement the processing method as described in any one of the above.

[0034] As can be seen from the above solutions, the processing method and the electronic device disclosed in the present application generate a first set of representative images, display the first set of representative images on the display interface in response to meeting a preset condition, the first set of representative images is associated with an active component running in the background, and in response to a selection operation on the first set of representative images, restore the first active component associated with the representative image indicated by the selection operation to the foreground operation, realizing quickly and efficiently restoring the required component from the background to the foreground operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0036] Figure 1 is a schematic flowchart of a processing method provided by the present application;

[0037] Figure 2 is a process diagram of generating a first representative image set provided by the present application;

[0038] Figure 3 are different states corresponding to the application and application components provided by the present application when running in the foreground / background respectively;

[0039] Figure 4 is an application example of the first representative image set provided by the present application;

[0040] Figure 5 is an example of different Activities being displayed in the left and right split screens of the display interface of an electronic device under the split-screen application provided by the present application;

[0041] Figure 6 is another schematic flowchart of the processing method provided by the present application;

[0042] Figure 7 is yet another schematic flowchart of the processing method provided by the present application;

[0043] Figure 8 is still another schematic flowchart of the processing method provided by the present application;

[0044] Figure 9 is a composition structure diagram of the electronic device provided by the present application. Detailed implementation manners

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of them. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0046] Embodiments of the present application disclose a processing method and an electronic device, which are mainly used to quickly and efficiently restore the required application components from the background to the foreground for operation through application component management, and reduce the performance consumption of the device. The processing method can be applied to an electronic device. The electronic device applying the method of the present application can specifically be, but is not limited to, devices under numerous general or special computing device environments or configurations, such as: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, and so on.

[0047] See Figure 1 The flowchart of the processing method provided by the present application. The processing method includes the following processing steps:

[0048] Step 101, generate a first set of representative images.

[0049] During the process of starting and running an application, each component of the application is managed through an application stack. In the traditional technology, in the full-screen mode, only the component at the top of the application stack is in an interactive state, and the non-top components are in a non-interactive state, and the application stack is managed based on the last-in-first-out / first-in-last-out mechanism. Among them, when each component is opened and the window interface of the component is displayed and run on the display interface of the electronic device, the component is pushed onto the top of the corresponding application stack, and the original components in the application stack move one position in the direction of the stack bottom in turn, and the life cycle of the original foreground component at the top position of the stack (which is in the sub-top position after moving) is managed to make it exit the foreground, and at the same time, it is controlled to be in a non-interactive state. If the user hopes to view a certain target background component that has been opened before, they can only click the back button to go back one by one. Through the back operation, the components above the target background component in the stack are popped out until the target background component is restored to the top position of the stack, and the target background component is restored to be displayed and run on the display interface, and at the same time, a series of life cycle management processes (such as onRestart->onStart->onResumed) are executed on the target background component to make its window interface interactive.

[0050] The application component can specifically be a series of Activity (application program window) components of the application.

[0051] To quickly and efficiently restore the required application components from the background to the foreground for operation, embodiments of the present application generate a corresponding first set of representative images for the application.

[0052] Optionally, in this application, one application corresponds to an application stack for managing a series of components (Activities) of the application and a first representative image set. The first representative image set includes representative images of each background-running activity component of the corresponding application, and the first representative image set is associated with each background-running activity component of the corresponding application. That is to say, an association is established between each representative image in the first representative image set and a corresponding background-running activity component.

[0053] The representative image of the activity component is used to enable the user to identify and determine the activity component associated with the representative image based on its image information. The representative image can be, but is not limited to, a screenshot of the component window corresponding to the activity component on the display interface, or an image containing any recognizable information of the activity component, such as an icon image containing the icon of the "Moments" component, etc. Among them, the screenshot of the component window corresponding to the activity component on the display interface can be, but is not limited to, the screenshot of the component window corresponding to the activity component at the moment when the activity component is switched from the foreground to the background, or the screenshot of the component window corresponding to the activity component at any moment other than switching to the background, etc. There is no restriction on this, as long as the background activity component associated with it can be identified based on the image information it carries.

[0054] Preferably, in the embodiment of this application, the screenshot of the component window corresponding to the activity component at the moment when the activity component is switched to the background is used as the representative image of the activity component.

[0055] In this step, the process of generating the first representative image set is as Figure 2 shown and can be implemented as:

[0056] Step 201: In response to an exit operation on a second activity component of an application running in the foreground, manage the application stack corresponding to the second activity component so that the second activity component runs in the background in a first state.

[0057] Among them, the second activity component can be any foreground component of an application running in the foreground of the electronic device, such as the main interface window of the application running in the foreground or the Activity component corresponding to a non-main interface window, etc. The application stack corresponding to the second activity component is specifically the application stack corresponding to the application to which the second activity component belongs.

[0058] The first state is a state for enabling the component to have interaction capabilities, and specifically can be the Resumed state in the Activity component life cycle.

[0059] The exit operation on the second active component may specifically be a back operation performed by the user on the second active component, or a corresponding forward operation performed on the window interface of the second active component for further invoking the next active component, without limitation thereto. For the above-mentioned back operation, for example, the back operation of returning from the "Moments" of WeChat to the "Main Interface" of WeChat can be regarded as an exit operation on the "Moments" component. Another example is the back operation performed on the "Main Interface" of WeChat to directly exit the WeChat application from the foreground, which can also be regarded as an exit operation on the "WeChat Main Interface" component. For the above-mentioned forward operation, for example, the operation of invoking an article shared by a certain contact from the "Moments" can also be regarded as an exit operation on the "Moments" component. The user can, according to actual needs, perform the above corresponding type of operation on the second active component to exit the second active component from the foreground.

[0060] In an embodiment of the present application, in response to an exit operation on the second active component of the foreground application, the application stack corresponding to the second active component is managed. The management of the application stack corresponding to the second active component includes at least adjusting the position and state of the second active component in the application stack. Specifically, the second active component is moved one position in the stack bottom direction from its current position corresponding in the application stack, and the second state adjustment process for the second active component triggered based on the adjustment of the position of the second active component in the application stack is intercepted, so that the second active component runs in the background in a first state such as the Resumed state.

[0061] Among them, the above-mentioned second state adjustment process is used to adjust the active component to a state of losing interaction ability when the active component switches to the background, including but not limited to the onPause and onStop processes sequentially executed on the component by sequentially calling and executing the onPause function and the onStop function.

[0062] Specifically, the life cycle management functions of the application Activity component mainly include functions such as onCreate, onStart, onResume, onPause, onStop, onRestart, onDestroy, etc. The functions / meanings of each function are as follows:

[0063] onCreate: When the application starts and runs, it is called when the Activity is first created, and is used for some general static operations such as setting the layout file of the Activity component and binding button listeners.

[0064] onStart: It is called when the Activity becomes visible to the user.

[0065] onResume: Used to make the Activity gain user focus, that is, it is called when the user can operate this Activity;

[0066] onPause: Called when the application starts another Activity, generally used to save data in the current Activity;

[0067] onStop: Called when the Activity becomes invisible;

[0068] onRestart: Called when a stopped Activity is restarted;

[0069] onDestroy: Called when the finish() method of the Activity is called or when the system resources are insufficient.

[0070] In the traditional technology, when a component exits the foreground, in addition to adjusting the position of the component in the application stack, the onPause function and onStop function of the component are triggered based on the adjustment of the component position to perform onPause and onStop processing on the component, so that the component state is sequentially adjusted from the current state to the Paused and Stoped states. In this state, the component loses its interaction ability.

[0071] Different from the traditional technology, in the embodiment of the present application, when responding to the exit operation of the second active component of the foreground application and adjusting the position of the second active component in the corresponding application stack, a series of processes such as onPause and onStop of the second active component triggered by adjusting the position of the second active component in the application stack are intercepted, so as to maintain the state of the second active component in the first state that can be used to make the component have the interaction ability, such as the Resumed state (that is, the state of the component after performing the onResume function on the component), specifically as Figure 3 shown ( Figure 3 in which "Task foreground" means that the application to which the component belongs runs in the foreground), and correspondingly, after the second active component is switched from the foreground to the background, it is still in the ready state that can support the display and interaction of the second active component in the foreground, so as to support restoring the visual display and interactive state of the second active component at any time without going through complex life cycle processes such as onRestart->onStart->onResumed.

[0072] It is easy to understand that in the embodiment of the present application, when an active component in the foreground exits the foreground and is correspondingly switched from the foreground to the background, the component still maintains its active component attribute and does not switch from the active component to an inactive component corresponding to states such as Paused and Stoped.

[0073] Step 202: Establish an association relationship between the second active component and the corresponding representative image, and associate the representative image associated with the second active component to the first representative image set.

[0074] Optionally, obtain a screenshot of the component window corresponding to the second active component on the display interface at the moment when the second active component is switched to the background, and use this component window screenshot as the representative image of the second active component and associate it with the first representative image set. It is easy to understand that in practical applications, a screenshot of the component window corresponding to the second active component at a non-switching (switching the component from the foreground to the background) moment, or an image containing any recognizable information of the second active component (such as the icon image of the second active component), etc. can also be used as the representative image of the second active component and associated with the first representative image set. There is no limitation in this regard, as long as the image information contained in the image can effectively assist the user in identifying the background component associated with the image, it can be used as the representative image of the background component and all belong to the protection scope of the embodiments of the present application.

[0075] Associating the component window screenshot as the representative image of the second active component to the first representative image set may specifically refer to, on the basis of establishing the association relationship between the second active component and its component window screenshot, adding the component window screenshot as an element of the first representative image set to the first representative image set. By adding the representative image (such as the component window screenshot) of the active component exiting the foreground to the first representative image set, the generation or dynamic update of the first representative image set is realized.

[0076] Among them, the relative positions of the representative images of each active component in the first representative image set are the same as the relative positions of each active component in the corresponding application stack.

[0077] There are various implementation methods for the first representative image set, including but not limited to methods such as lists and queues, and can be visually displayed specifically through a menu or a floating window, etc.

[0078] Step 102: In response to meeting a preset condition, display the first representative image set on the display interface, and the first representative image set is associated with the active components running in the background.

[0079] In one implementation manner, the above preset condition can be set as: completing the association of the representative image of the active component to the first representative image set.

[0080] In this embodiment, specifically, when it is detected that the representative image of the active component of the foreground application is associated with the first representative image set, such as when the screenshot of the component window of the current active component of the foreground application is added to the first representative image set, it is determined that the preset condition is satisfied, and in response to this determination result, the first representative image set is displayed on the display interface. Correspondingly, in this embodiment, every time a representative image of an active component is added to the first representative image set, the updated first representative image set is automatically called up and displayed on the display interface of the electronic device.

[0081] However, it is not limited to this. In other embodiments, the above preset condition can also be set as: detecting the execution of the call-out operation for calling out the first representative image set.

[0082] In this embodiment, once it is detected that an operating body (such as a finger, a keyboard / mouse, etc.) executes the call-out operation for calling out the first representative image set, it is determined that the preset condition is satisfied, and in response to this determination result, the first representative image set is displayed on the display interface.

[0083] See Figure 4 , an application example of the latter embodiment is provided. In this example, the first representative image set is implemented as a side-sliding menu, and a touchable area is set in a preset edge area (such as the right edge area) of the display interface of the electronic device, supporting the user to call out the menu for visual display by performing a touch operation in this area (such as a sliding operation from the side of the display interface into the interface, or a click operation in this area, etc.). The menu includes the representative images of each background component of the corresponding foreground application. For example, in the example of Figure 4 , the displayed side-sliding menu specifically includes the screenshots of the windows of the background components Activity3, Activity4... Activity7... of a certain foreground application ( Figure 4 not shown). The relative positions of the screenshots corresponding to Activity3, Activity4... Activity7... in the side-sliding menu are the same as the relative positions of Activity3, Activity4... Activity7... in the corresponding application stack. In actual applications, any of the above embodiments or a combination of the two embodiments can be used to implement the display of the side-sliding menu on the display interface. By displaying the side-sliding menu on the display interface, it supports the user's selection operation on the side-sliding menu, and quickly and efficiently restores the required component (such as Activity6) from the background to the foreground for running.

[0084] Step 103: In response to the selection operation on the first representative image set, restore the first active component running in the background associated with the representative image indicated by the selection operation to the foreground for running.

[0085] When the user needs to resume a certain background component of the foreground application to run in the foreground, a selection operation can be performed on the first set of representative images. The electronic device detects and responds to this selection operation, and resumes the first active component running in the background associated with the representative image indicated by the selection operation to run in the foreground. Specifically, it can be further implemented in any of the following ways:

[0086] 11) In response to a first selection operation on the first set of representative images, switch the first active component running in the background associated with the representative image indicated by the first selection operation to full-screen display and run on the display interface;

[0087] 12) In response to a second selection operation on the first set of representative images, switch the first active component running in the background associated with the representative image indicated by the second selection operation to non-full-screen display and run on the display interface.

[0088] In the implementation 12) of non-full-screen display and running of the first active component, specifically, the position information indicated by the second selection operation on the display interface can be obtained, and the first active component can be switched to display and run in the area corresponding to the position information on the display interface.

[0089] Among them, the number of the first active components running in the background associated with the representative image indicated by the second selection operation can be one or more. In the case of multiple ones, the position information indicated by the second selection operation on the display interface is the position information of multiple different positions. Correspondingly, multiple first active components are simultaneously displayed in different areas of the display interface and are simultaneously in an interactive state.

[0090] The first selection operation and the second selection operation can be various types of operations such as gesture operations and menu item selection operations based on an operation menu, without limitation, and the second selection operation is different from the first selection operation. Exemplarily, the first selection operation can be a click operation on the required representative image in the first set of representative images, and the second selection operation can be a drag operation on the selected representative image in the first set of representative images. In this example, in response to a click operation on the corresponding representative image in the first set of representative images, the first active component running in the background associated with the representative image indicated by the click operation is switched to full-screen display and run on the display interface. In response to a drag operation on the selected representative image in the first set of representative images, the first active component running in the background associated with the representative image indicated by the drag operation is switched to non-full-screen display and run on the display interface.

[0091] Among them, when the representative image indicated by the drag operation is one, the number of the first active components is correspondingly one. Therefore, it is only necessary to non-full-screen display the one first active component associated with the representative image indicated by the drag operation at the position corresponding to the release of the drag operation on the display interface. Specifically, the release position coordinates corresponding to the release of the drag operation (such as a gesture-based drag operation) can be monitored, and a corresponding area (such as the split-screen area corresponding to the release position coordinates in a split-screen application, or the corresponding-sized interface area including the release position coordinate point in a non-split-screen application, etc.) can be set with reference to this coordinate point as the display area of the first active component.

[0092] When the representative images indicated by the drag operation are multiple, the number of the first active components is multiple. In this case, when the drag operation is released, specifically, the multiple first active components can be respectively displayed at different positions on the display interface according to the layout strategy. This layout strategy can be a layout strategy in a split-screen application or a non-split-screen application, without limitation. Among them, in a split-screen application, this layout strategy can specifically be to respectively display the multiple first active components in different split-screens of the display interface. Refer to Figure 5 , which shows an example of respectively displaying Activity1 and Activity2 in the left and right split-screens of the display interface of an electronic device in a split-screen application. In this example, a side-slip menu of the first representative image set is simultaneously displayed in the edge area of the right split-screen. The side-slip menu includes screenshots of the component windows of each background Activity component, and supports the user to directly restore the required background Activity component (such as Activity6) to the foreground for running by operating this menu. In a non-split-screen application, the above layout strategy can be to adaptively divide the display areas for each first active component according to the number of first active components to be displayed and the area size of the display interface of the electronic device, and respectively display each first active component in the different display areas divided.

[0093] Since in this application, the state of the first active component in the application stack is the first state that can be used to enable the component to have interaction capabilities, such as the Resumed state. Therefore, when restoring one or more first active components from the background to the foreground for running, the first active component can be directly visually displayed on the display interface based on the first state such as Resumed and made in an interactive state, greatly improving the user interaction experience; at the same time, there is no need to go through complex life cycle management processes such as onRestart -> onStart -> onResumed for the first active component, reducing the performance consumption of the device.

[0094] When restoring the corresponding first active component running in the background to the foreground based on a selection operation, synchronously adjust the position of the first active component in the application stack. Specifically, adjust the first active component from its current position in the application stack to the top position of the stack. Further, if the number of first active components is one, directly jump the first active component from its current position (the second-top position or a position closer to the bottom of the stack than the second-top position) in the application stack to the top position of the application stack. One or more components originally in the direction of the top of the stack of the first active component move one position in sequence towards the bottom of the stack, and the components in the direction of the bottom of the stack of the first active component remain unchanged in position. If the number of first active components is multiple, respectively adjust the multiple first active components from their current positions in the application stack to the respective positions in the direction of the top of the stack and arrange them in order in the direction of the top of the stack. Among them, the arrangement order is inversely related to the restoration order of each first active component restored to the foreground. The later the restoration order, the closer its adjusted position in the application stack is to the top of the stack. Other components in the application stack except each first active component adaptively move towards the bottom of the stack or maintain their original positions, and before and after completing the management of the application stack, the relative positions of each component among the other components in the application stack remain unchanged.

[0095] As can be seen from the above solution, the method of this embodiment generates a first representative image set, displays the first representative image set on the display interface in response to meeting a preset condition. The first representative image set is associated with the active components running in the background. In response to a selection operation on the first representative image set, restore the first active component running in the background associated with the representative image indicated by the selection operation to the foreground. Based on the solution of this application, the user can quickly and efficiently restore the required component from the background to the foreground by performing a selection operation on the first representative image set on the display interface. And since the background components associated with the first representative image set remain active components, when restoring the corresponding background component to the foreground based on the first representative image set, there is no need to execute a complex life cycle management process for this component, reducing performance consumption, improving device performance and enhancing the user experience.

[0096] In one embodiment, referring to Figure 6 the provided flowchart of the processing method, the processing method disclosed in this application may further include the following processing:

[0097] Step 104, in response to a deletion operation on the first representative image set, delete the representative image indicated by the deletion operation from the first representative image set, and remove the third active component associated with the deleted representative image from the application stack and destroy the removed third active component.

[0098] The first set of representative images not only supports the user to perform a selection operation on it (based on which the required background activity component can be quickly restored to the foreground for running), but also supports the user to perform a deletion operation on it. By performing a deletion operation on the first set of representative images, the corresponding background activity component associated with the representative image indicated by the deletion operation is removed and destroyed in the application stack.

[0099] The deletion operation can also be various types of operations such as a gesture operation or a menu item selection operation based on an operation menu (such as selecting the "Delete" option in the operation menu).

[0100] Specifically, when the user performs a deletion operation on the corresponding representative image in the first set of representative images, the electronic device, in response to detecting the deletion operation, deletes the representative image indicated by the deletion operation from the first set of representative images. At the same time, based on the association relationship between each representative image in the first set of representative images and the background activity component, the background activity component associated with the representative image indicated by the deletion operation is determined, and the associated background activity component is removed from the application stack and the removed background activity component is destroyed.

[0101] In the traditional technology, the user needs to perform a step-by-step rollback operation to stack out the component from the application stack and destroy the stacked-out component. In contrast, in the embodiments of the present application, the user can directly perform a deletion operation on the corresponding representative image in the first set of representative images based on actual needs (such as when the user does not need to use the window interface of the component during the current operation of the application), and remove and destroy the background activity component associated with the deleted representative image from the application stack, which is convenient for the user to manage the component, avoids cumbersome operations, and reduces the performance consumption of the device.

[0102] Optionally, referring to Figure 7 the provided flowchart of the processing method, the processing method of the previous embodiment may further include the following processing:

[0103] Step 105: Associate the representative image deleted from the first set of representative images with the second set of representative images.

[0104] Associating the representative image deleted from the first set of representative images with the second set of representative images may specifically refer to adding the deleted representative image as an element of the second set of representative images to the second set of representative images. By adding the representative image deleted from the first set of representative images to the second set of representative images, the generation or dynamic update of the second set of representative images is achieved.

[0105] The second-generation representative image set contains the representative images deleted from the first-generation representative image set, and can be implemented in ways such as, but not limited to, a list, a queue, etc., and can be visually displayed through a menu or a floating window, etc. For example, when the deleted representative images are added to the second-generation representative image set each time, the second-generation representative image set is automatically displayed, or when the user performs an operation to call out the second-generation representative image set, the second-generation representative image set is displayed, etc.

[0106] Optionally, for the first-generation representative image set and / or the second-generation representative image set displayed on the display interface, when the user does not operate on the set within a set duration or a hide operation of the user on the set is detected, the set is converted from the display state to the hidden state.

[0107] Step 106, in response to a selection operation on the second-generation representative image set, restore the representative image indicated by the selection operation on the second-generation representative image set to the first-generation representative image set, create an active component corresponding to the restored representative image, add the created active component to the corresponding application stack and make the active component in the first state.

[0108] The selection operation on the second-generation representative image set can also be various types of operations such as a gesture operation or a menu item selection operation based on an operation menu.

[0109] The components associated with each representative image included in the second-generation representative image set have been removed from and destroyed in the application stack. When the user needs to restore the removed and destroyed components to the application stack, a selection operation can be performed on the second-generation representative image set. The electronic device responds to the selection operation, restores the representative image indicated by the selection operation in the second-generation representative image set to the first-generation representative image set. At the same time, a target active component corresponding to the restored representative image is created. Specifically, the electronic device background can create the component by simulating the operation process of the user opening the component window of the target active component step by step, add the created component to the corresponding application stack, and set the state of the component to the first state such as Resumed, that is, the ready state, so as to quickly restore the component to the foreground operation at any time without going through complex life cycle processes such as onRestart->onStart->onResumed, and make it in a visually displayed and interactive state.

[0110] In the prior art, for a component that has been removed from and destroyed in the application stack (i.e., a component that has been popped out of the application stack through a back operation on the component window, such as the article interface of a certain WeChat contact that has exited the foreground through a back operation), the user needs to manually execute the operation process of opening the component window step by step to recall and display the window interface of the component again. In the embodiments of the present application, by setting the first and second representative image sets, the user can perform a selection operation on the second representative image set to restore the representative image of the required component to the first representative image set, and at the same time, by simulating the operation process of opening the component in the device background, create the component, restore it to the application stack, and place the component in the first state that can be used to enable the component to have interaction capabilities, so as to support quickly restoring the component to the foreground operation at any time, such as quickly restoring the article interface of a certain WeChat contact that has been removed and destroyed to the device foreground, etc., avoiding cumbersome operations for the user.

[0111] In one embodiment, referring to Figure 8 the flowchart of the processing method provided, the processing method disclosed in the present application may further include the following processing:

[0112] Step 107, in response to switching the above foreground application to run in the background, adjust each active component of the application in the corresponding application stack from the first state to the second state; the second state is a state for making the active component lose interaction capabilities and correspondingly convert to an inactive component.

[0113] Optionally, the second state may be the Stoped state in which the component finally resides after sequentially calling the onPause and onStop functions on the component. In the second state, the component loses interaction capabilities and correspondingly converts from an active component to an inactive component.

[0114] In this embodiment, in combination with referring to Figure 3 , when the user switches a certain foreground application to run in the background (corresponding to Figure 3 "task background" in

[0115] ), the electronic device detects and responds to the switching event, and adjusts all active components in the application stack corresponding to the application from the first state to the second state, such as making each component convert from the Resumed state to the Stoped state by sequentially calling the onPause and onStop functions on each component in the application stack, etc., to save device power consumption.It is easy to understand that when the application is switched from the background to the foreground again, in response to the switching event, the present application directly converts each component in the application stack corresponding to the application from the second state to the first state, so that each component in the application stack is converted into a ready state that supports displaying and interacting with the component in the foreground at the switching moment. Furthermore, when a certain component needs to be switched to the foreground for operation later, it is supported to quickly restore the required component to the visual display and interactive state at any time without going through complex life cycle processes such as onRestart->onStart->onResumed.

[0116] The embodiment of the present application also discloses an electronic device, which may specifically be, but is not limited to, devices under numerous general or specific computing device environments or configurations, such as: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, and so on.

[0117] The composition structure of the electronic device, as Figure 9 shown, at least includes:

[0118] A memory 10, used to store computer instruction sets;

[0119] The computer instruction set can be implemented in the form of a computer program.

[0120] A processor 20, used to implement the processing method disclosed in any of the above method embodiments by executing the computer instruction set.

[0121] The processor 20 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, etc.

[0122] The electronic device is equipped with a display device and / or has a display interface and can externally connect a display device.

[0123] Optionally, the electronic device further includes a camera component and / or is connected to an external camera component.

[0124] In addition, the electronic device may further include components such as a communication interface and a communication bus. The memory, the processor, and the communication interface complete communication with each other through the communication bus.

[0125] The communication interface is used for communication between an electronic device and other devices. The communication bus can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0126] In addition, an embodiment of the present application also discloses a storage medium, on which at least one set of computer instruction sets is stored. When the computer instruction sets are called and executed, they are used to implement the processing method disclosed in any of the above embodiments.

[0127] It should be noted that the various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.

[0128] For the convenience of description, when describing the above system or device, it is divided into various modules or units according to functions for description. Of course, when implementing the present application, the functions of each unit can be implemented in one or more software and / or hardware.

[0129] From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present application.

[0130] Finally, it should also be noted that in this article, relational terms such as first, second, third, and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including the said element.

[0131] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A processing method, the method comprising: Generating a first set of representative images; In response to meeting a preset condition, displaying the first set of representative images on a display interface, the first set of representative images being associated with an active component running in the background; In response to a selection operation on the first set of representative images, resuming the first active component running in the background, associated with the representative image indicated by the selection operation, to run in the foreground; Wherein, the generating the first set of representative images includes: In response to an exit operation on a second active component of an application running in the foreground, managing the application stack corresponding to the second active component, so that the second active component runs in the background in a first state; establishing an association relationship between the second active component and a corresponding representative image, and associating the representative image associated with the second active component to the first set of representative images; In response to a deletion operation on the first set of representative images, deleting the representative image indicated by the deletion operation from the first set of representative images, and removing and destroying a third active component associated with the deleted representative image from the application stack.

2. The method according to claim 1, wherein the managing the application stack corresponding to the second active component, so that the second active component runs in the background in a first state, includes: Adjusting the position and state of the second active component in the application stack in response to the exit operation, wherein intercepting a second state adjustment process for the second active component triggered based on adjusting the position of the second active component in the application stack, so that the second active component runs in the background in a first state, the first state being a state for enabling the component to have an interaction ability; Wherein, the second state adjustment process for the second active component is used to adjust the second active component to a state of losing the interaction ability when the second active component switches to the background.

3. The method according to claim 1, wherein the associating the representative image associated with the second active component to the first set of representative images includes: Obtaining a screenshot of a component window corresponding to the second active component on the display interface at the moment when the second active component is switched to the background; Associating the screenshot of the component window as the representative image of the second active component to the first set of representative images; The first set of representative images includes representative images of respective active components of the application running in the background, and the relative positions of the representative images of the respective active components in the first set of representative images are consistent with the relative positions of the respective active components in the application stack.

4. The method according to claim 1, wherein the resuming the first active component running in the background, associated with the representative image indicated by the selection operation, to run in the foreground in response to a selection operation on the first set of representative images includes: In response to a first selection operation on the first set of representative images, switching the first active component to be full-screen displayed and running on the display interface; Or, in response to a second selection operation on the first set of representative images, switching the first active component to be non-full-screen displayed and running on the display interface.

5. The method according to claim 4, wherein in response to a second selection operation on the first set of representative images, switching the first active component to be displayed and run in a non-full-screen mode on the display interface includes: Obtaining position information indicated by the second selection operation on the display interface; Switching the first active component to be displayed and run in the area corresponding to the position information on the display interface.

6. The method according to claim 1, wherein in response to a selection operation on the first set of representative images, it further includes: Adjusting the first active component running in the background and associated with the representative image indicated by the selection operation from its current position in the application stack to the top position of the stack.

7. The method according to claim 1, further includes: In response to switching the application to run in the background, adjusting each active component of the application in the application stack from the first state to a second state; The second state is a state for making the active component lose its interaction ability and correspondingly convert to an inactive component; Or, associating the representative image deleted from the first set of representative images with a second set of representative images; In response to a selection operation on the second set of representative images, restoring the representative image indicated by the selection operation on the second set of representative images to the first set of representative images, creating an active component corresponding to the restored representative image, adding the created active component to the application stack, and making the active component in the first state.

8. An electronic device, comprising: A memory for storing a set of computer instructions; A processor for implementing the processing method according to any one of claims 1-7 by executing the set of instructions stored on the memory.

Citation Information

Patent Citations

  • User interface switching method and terminal

    CN106933468A

  • Method for opening page of application program, medium and electronic equipment

    CN114244951A

  • Foreground / background assortment of hidden windows

    US20160054862A1