[go: up one dir, main page]

CN114741136B - Processing method and electronic equipment - Google Patents

Processing method and electronic equipment

Info

Publication number
CN114741136B
CN114741136B CN202210481074.6A CN202210481074A CN114741136B CN 114741136 B CN114741136 B CN 114741136B CN 202210481074 A CN202210481074 A CN 202210481074A CN 114741136 B CN114741136 B CN 114741136B
Authority
CN
China
Prior art keywords
representative image
active component
component
image set
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210481074.6A
Other languages
Chinese (zh)
Other versions
CN114741136A (en
Inventor
卢宁
陈涌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202210481074.6A priority Critical patent/CN114741136B/en
Publication of CN114741136A publication Critical patent/CN114741136A/en
Application granted granted Critical
Publication of CN114741136B publication Critical patent/CN114741136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a processing method and electronic equipment, which generate a first representative image set, display the first representative image set on a display interface in response to the satisfaction of preset conditions, enable the first representative image set to be related to a movable component running in a background, enable the first movable component running in the background and related to the representative image indicated by a selection operation to be restored to a front operation in response to the selection operation of the first representative image set, and enable the required component to be quickly and efficiently restored to the front operation from the background.

Description

Processing method and electronic equipment
Technical Field
The application belongs to the technical field of application window management, and particularly relates to a processing method and electronic equipment.
Background
In the process of starting and running an application, a series of activities (application program windows) of the application are managed through an application stack (or Activity stack).
In full screen mode, only the activities at the top layer of the application stack are in an interactable state, and the activities which are opened but not in the interactable state (namely, background activities) are sequentially put into the application stack, if a user wants to check a certain background Activity which is opened before, only the rollback key can be clicked to rollback one by one until the user is rollback to the required Activity, the operation is complex and the efficiency is low, and the background Activity life cycle is in a stored state, and the foreground is returned again to pass through the onRestart- > onStart- > onResumed life cycle, so that the flow is complex, and the user experience and the equipment performance can be affected when the user frequently operates.
Disclosure of Invention
Therefore, the application discloses the following technical scheme:
A method of processing, the method comprising:
Generating a first set of representative images;
In response to a preset condition being met, displaying a first set of representative images on a display interface, the first set of representative images being associated with a movable component running in the background;
And responding to the selection operation of the first representative image set, and restoring the first movable component which is associated with the representative image indicated by the selection operation and runs in the background to the foreground.
Optionally, the generating the first representative image set includes:
in response to an exit operation of a second movable component of an application running in the foreground, managing an application stack corresponding to the second movable component, so that the second movable component runs in the background in a first state; and establishing an association relation between the second movable component and the corresponding representative image, and associating the representative image associated with the second movable component to the first representative image set.
Optionally, the managing the application stack corresponding to the second active component, so that the second active component runs in the background in the first state includes:
adjusting the position and the state of the second movable component in the application stack in response to the exit operation, wherein a second state adjustment process on the second movable component triggered based on the adjustment of the position of the second movable component in the application stack is intercepted so that the second movable component runs in the background in a first state, and the first state is a state for enabling the component to have interaction capability;
and the second state adjustment process of the second movable component is used for adjusting the second movable component to a state losing interaction capability when the second movable component is switched to the background.
Optionally, the associating the representative image associated with the second active component to the first representative image set includes:
Acquiring a component window screenshot corresponding to the second movable component on a display interface at the moment of switching the second movable component to the background;
And the component window screenshot is used as a representative image of the second movable component to be associated with the first representative image set, wherein the first representative image set comprises representative images of the movable components of the application running in the background, and the relative positions of the representative images of the movable components in the first representative image set are consistent with the relative positions of the movable components in the application stack.
Optionally, the responding to the selection operation of the first representative image set, and restoring the first active component running in the background and associated with the representative image indicated by the selection operation to the foreground operation includes:
Responsive to a first selection operation of the first set of representative images, switching the first active component to full screen display and operation on a display interface;
Or, in response to a second selection operation of the first representative image set, switching the first active component to non-full screen display and operation on a display interface.
Optionally, the switching the first active component to be displayed and operated in a non-full screen on a display interface in response to a second selection operation of the first representative image set includes:
acquiring position information indicated by the second selection operation on a display interface;
and switching the first movable component to display and operate in the area corresponding to the position information on the display interface.
Optionally, the method responds to the selection operation of the first representative image set, and further includes:
And adjusting a first movable component which runs in the background and is associated with the representative image indicated by the selection operation from the current position in the application stack to the stack top position.
Optionally, the method further comprises:
In response to a delete operation on the first set of representative images, deleting representative images indicated by the delete operation from the first set of representative images, and removing and destroying the removed third active components associated with the deleted representative images from the application stack.
Optionally, the method further comprises:
In response to switching the application to background operation, each active component of the application in the application stack is adjusted from the first state to a second state, wherein the second state is used for enabling the active component to lose interactive capability and correspondingly convert into an inactive component;
Or, in response to a selection operation of the second representative image set, restoring representative images indicated by the selection operation of the second representative image set to the first representative image set, creating an active component corresponding to the restored representative images, adding the created active component to the application stack, and placing the active component in the first state.
An electronic device, comprising:
A memory for storing a set of computer instructions;
a processor for implementing a processing method as claimed in any preceding claim by executing a set of instructions stored on a memory.
A storage medium having stored thereon at least one set of computer instructions which, when invoked and executed, is adapted to carry out a processing method as claimed in any one of the preceding claims.
According to the processing method and the electronic device disclosed by the application, the first representative image set is generated, the first representative image set is displayed on the display interface in response to the preset condition being met, the first representative image set is related to the movable component running in the background, the first movable component running in the background, which is related to the representative image indicated by the selection operation, is restored to the foreground in response to the selection operation on the first representative image set, and the required component is quickly and efficiently restored to the foreground from the background.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a treatment method provided by the application;
FIG. 2 is a process diagram of generating a first representative image set provided by the present application;
FIG. 3 is a diagram showing different states of an application and an application component provided by the present application when the application and the application component are running in the foreground/background;
FIG. 4 is an example of an application of the first representative image set provided by the present application;
FIG. 5 is an example of displaying different activities on left and right split screens of a display interface of an electronic device under split screen application provided by the application;
FIG. 6 is a schematic flow chart of another method of treatment provided by the present application;
FIG. 7 is a schematic flow chart of a further processing method according to the present application;
FIG. 8 is a schematic flow chart of a further processing method according to the present application;
Fig. 9 is a component configuration diagram of an electronic device provided by the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application discloses a processing method and electronic equipment, which are mainly used for quickly and efficiently recovering a required application component from a background to a foreground operation through application component management and reducing the performance consumption of the equipment. The processing method is applicable to electronic devices, which may be, but are not limited to, in particular, numerous general purpose or special purpose computing device environments or configurations, such as personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor devices, and so forth.
Referring to fig. 1, a schematic flow chart of the treatment method of the present application is provided, and the treatment method includes the following steps:
step 101, a first set of representative images is generated.
In the process of starting and running the application, each component of the application is managed through an application stack, in the traditional technology, only the component at the top layer of the application stack is in an interactable state in a full-screen mode, and the component at the non-top layer is in a non-interactable state and is managed based on a first-in-last-out/last-in-first-out mechanism. When a component is opened every time, the component is pressed to the stack top of the corresponding application stack when the window interface of the component is displayed and operated on the display interface of the electronic equipment, the original component in the application stack sequentially moves to a position towards the stack bottom, and the original foreground component (which is positioned at the secondary top position after moving) at the stack top is subjected to life cycle management to withdraw from the foreground, and is controlled to be in a non-interactive state. If a user wants to check a certain previously opened target background component, only the backspace key can be clicked to backspace one by one, each component in the stack top direction of the target background component is popped up through backspace operation until the target background component is restored to the stack top position, the target background component is restored to the display interface for display and operation, and meanwhile, a series of life cycle management processes (such as onRestart- > onStart- > onResumed) are executed on the target background component, so that the window interfaces of the target background component can be interacted.
The application component may specifically be a series of Activity (application window) components of an application.
To achieve fast and efficient restoration of a desired application component from background to foreground operation, embodiments of the present application generate a corresponding first set of representative images for an application.
Optionally, in the present application, an application corresponds to an application stack for managing a series of components (activities) of the application, and corresponds to a first representative image set, where the first representative image set includes representative images of active components running in the background of the corresponding application, and the first representative image set is associated with active components running in the background of the corresponding application, that is, each representative image in the first representative image set is associated with a corresponding active component running in the background.
The representative image of the active component is used for enabling the user to identify and determine the active component associated with the representative image based on the image information of the representative image, and the representative image can be, but is not limited to, a component window screenshot corresponding to the active component on a display interface, or an image containing any distinguishable information of the active component, such as an icon image containing a "friend circle" component icon, and the like. The screenshot of the movable component corresponding to the display interface may be, but not limited to, a screenshot of the movable component corresponding to the display interface at a moment of switching the movable component from the foreground to the background, a screenshot of the movable component corresponding to the display interface at any moment of switching to the background, or the like, which is not limited as long as the related background movable component can be identified based on the carried image information.
Preferably, in the embodiment of the application, the screenshot of the component window corresponding to the active component on the display interface at the moment of switching the active component to the background is adopted as the representative image of the active component.
In this step, the process of generating the first representative image set is shown in fig. 2, and may be implemented as follows:
in step 201, in response to an exit operation of the second active component of the application running in the foreground, an application stack corresponding to the second active component is managed, so that the second active component runs in the background in the first state.
The second active component may be any foreground component of an application running in the foreground of the electronic device, such as an Activity component corresponding to a main interface window or a non-main interface window of the application running in the foreground. The application stack corresponding to the second movable component is specifically an application stack corresponding to the application to which the second movable component belongs.
The first state is a state for enabling the component to have interaction capability, and may specifically be Resumed states in the life cycle of the Activity component.
The exit operation of the second active component may specifically be a rollback operation performed by the user on the second active component, or a corresponding forward operation performed on a window interface of the second active component for further calling out a next active component, which is not limited. For the above-mentioned rollback operation, for example, the rollback operation of returning from the WeChat "friend circle" to the WeChat "main interface" can be regarded as the rollback operation of the "friend circle" component, for example, the rollback operation performed on the WeChat "main interface" for directly exiting the WeChat application from the foreground can be regarded as the rollback operation of the "WeChat main interface" component, for the above-mentioned forward operation, for example, the operation of calling out an article shared by a contact from the "friend circle" can be regarded as the rollback operation of the "friend circle" component. The user can withdraw the second movable component from the foreground by performing the above-mentioned corresponding type of operation on the second movable component according to actual requirements.
In the embodiment of the application, the application stack corresponding to the second movable component is managed in response to the exit operation of the second movable component of the foreground application. The management of the application stack corresponding to the second movable component at least comprises adjusting the position and the state of the second movable component in the application stack. Specifically, the second movable component is moved from the current position corresponding to the application stack to a position towards the stack bottom, and second state adjustment processing on the second movable component, which is triggered based on adjustment of the position of the second movable component in the application stack, is intercepted, so that the second movable component runs in the background in a first state such as Resumed.
Wherein the second state adjustment process is used for adjusting the active component to a state losing interaction capability when the active component is switched to the background, and includes, but is not limited to, onPsuse and onStop processes sequentially performed on the active component by sequentially calling and executing onPsuse and onStop functions.
Specifically, the life cycle management function of the application Activity component mainly includes onCreate, onStart, onResume, onPsuse, onStop, onRestart, onDestroy functions, and the functions/meanings of the functions are as follows:
onCreate the application is called when being first created in the process of starting and running, and is used for setting layout files of the Activity components, binding some common static operations such as button monitors and the like;
onStart is used to make the Activity visible to the user to be invoked;
onResume the method is used for enabling the Activity to obtain the focus of the user, namely the user can operate the Activity and is called;
onPause called when the application starts other activities, which is generally used for saving the data in the current Activity;
onStop to be invoked when the Activity is made invisible;
onRestart, called when the stopped Activity is restarted;
onDestroy is called when the finish () method of Activity is called or system resources are insufficient.
In the conventional technology, when a component is exited from the foreground, in addition to adjusting the position of the component in the application stack, the onPause, onStop processing of the component is invoked by onPause functions and onStop functions based on the component position adjustment trigger, so that the component state is sequentially adjusted from the current state to Paused, stoped state. In which state the component loses interactivity.
In the embodiment of the present application, when the second active component is adjusted to the position of the corresponding application stack in response to the exit operation of the second active component on the foreground application, a series of processes such as onPause, onStop, etc. on the second active component triggered by adjusting the position of the second active component in the application stack are intercepted, so that the state of the second active component is maintained in a first state that can be used to enable the component to have interaction capability, such as Resumed state (i.e. the state of the component after the process of executing onResume function on the component), specifically, as shown in fig. 3 (in fig. 3, "Task foreground" indicates that the component belongs to an application running on the foreground), and accordingly, after the second active component is switched from the foreground to the background, the second active component is still in a ready state that can support the display and interaction of the second active component on the foreground, so as to support the visual display and the interactive state of the second active component at any time without going through a complex lifecycle flow such as onRestart- > onStart- > onResumed.
It is easy to understand that in the embodiment of the present application, when a certain active component of the foreground is withdrawn from the foreground and is correspondingly switched from the foreground to the background, the component still maintains its active component attribute, and is not switched from the active component to the inactive component corresponding to Paused, stoped or the like.
Step 202, establishing an association relationship between the second active component and the corresponding representative image, and associating the representative image associated with the second active component to the first representative image set.
Optionally, acquiring a component window screenshot corresponding to the second active component on the display interface at the moment of switching the second active component to the background, and associating the component window screenshot as a representative image of the second active component to the first representative image set. It is easy to understand that in practical application, the non-switching (the component is switched from the foreground to the background) moment may be also used as a representative image of the second active component, such as a component window screenshot corresponding to the display interface of the second active component, or an image containing any identifiable information of the second active component (such as an icon image of the second active component), and associated with the first representative image set, which is not limited, so long as the image information contained in the image can effectively assist the user to identify the background component associated with the image, and the second active component can be used as the representative image of the background component, which belongs to the protection scope of the embodiment of the present application.
The step of associating the component window screenshot as a representative image of the second active component to the first representative image set may specifically be that, on the basis of establishing an association relationship between the second active component and the component window screenshot thereof, the component window screenshot is added as an element of the first representative image set to the first representative image set, and by adding a representative image (such as the component window screenshot) of the active component that exits from the foreground to the first representative image set, the generation or dynamic update of the first representative image set is achieved.
Wherein the relative positions of the representative images of each active component in the first set of representative images are consistent with the relative positions of each active component in the corresponding application stack.
The first representative image set may be implemented in a variety of ways including, but not limited to, lists, queues, etc., and may be visually displayed, in particular, through menus or floating windows, etc.
Step 102, in response to the preset condition being met, displaying a first representative image set on the display interface, wherein the first representative image set is associated with the active component running in the background.
In one embodiment, the preset condition may be set such that the association of the representative image of the active component to the first set of representative images is completed.
In this embodiment, specifically, when it is detected that the association of the representative image of the active component of the foreground application to the first representative image set is completed, for example, when the addition of the component window screenshot of the currently active component of the foreground application to the first representative image set is completed, it is determined that the preset condition is satisfied, and the first representative image set is displayed on the display interface in response to the determination result. Accordingly, in this embodiment, each time a representative image of the active component is added to the first representative image set, the updated first representative image set is automatically recalled and displayed on the electronic device display interface.
However, the present invention is not limited thereto, and in other embodiments, the preset condition may be set such that the execution of the call-out operation for calling out the first representative image set is detected.
In this embodiment, upon detecting that an operator (e.g., a finger, a keyboard/mouse, etc.) performs a call-out operation of calling out the first representative image set, it is determined that a preset condition is satisfied, and in response to the determination result, the first representative image set is displayed on the display interface.
Referring to fig. 4, an application example of the latter embodiment is provided, where 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 a right edge area) of the display interface of the electronic device, so as to support the user to call out the menu for visual display by performing a touch operation in the area (such as a sliding operation from the side of the display interface into the interface, or a clicking operation in the area, etc.), where the menu includes representative images of respective background components of the corresponding foreground application. As in the example of fig. 4, the displayed sideslip menu specifically includes window shots (not shown in fig. 4) of a background component Activity3, activity4. The relative positions of the window shots corresponding to the activities 3, 4 and 7 in the sideslip menu are consistent with the relative positions of the activities 3, 4 in the corresponding application stack. In practical applications, the sideslip menu can be displayed on the display interface by adopting any one or a combination of the two embodiments, and the selection operation of the user on the sideslip menu is supported by displaying the sideslip menu on the display interface, so that the required components (such as Activity 6) can be quickly and efficiently restored from the background to the foreground.
Step 103, responding to the selection operation of the first representative image set, and restoring the first movable component which is associated with the representative image indicated by the selection operation and runs in the background to the foreground.
When a user needs to restore a certain background component of the foreground application to the foreground operation, a selection operation can be executed on the first representative image set, the electronic device detects and responds to the selection operation, and the first active component which is associated with the representative image indicated by the selection operation and operates in the background is restored to the foreground operation, which can be further specifically implemented as any one of the following:
11 Responding to a first selection operation on the first representative image set, and switching a first movable component which is related to the representative image indicated by the first selection operation and runs in the background to be displayed in full screen on a display interface and run;
12 In response to a second selection operation of the first set of representative images, switching 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 running on the display interface.
In the embodiment 12) in which the first active component is not displayed and operated in full screen, the position information indicated by the second selection operation on the display interface may be specifically obtained, and the first active component may be switched to be displayed and operated in the area corresponding to the position information on the display interface.
The number of the first movable components running in the background associated with the representative image indicated by the second selection operation may be one or more, and in the case of a plurality of the first movable components, the position information indicated by the second selection operation on the display interface is the position information of a plurality of different positions, and accordingly, the plurality of first movable components are simultaneously displayed in different areas of the display interface and are simultaneously in an interactable state.
The first selection operation and the second selection operation may be gesture operations, menu item selection operations based on operation menus, and the like, without limitation, and the second selection operation is different from the first selection operation, and exemplary, the first selection operation may be a click operation on a desired representative image in the first representative image set, and the second selection operation may be a drag operation on the selected representative image in the first representative image set. In this example, in response to a clicking operation on a corresponding representative image in the first representative image set, a first active component running in the background associated with the representative image indicated by the clicking operation is switched to be displayed and run in full screen on the display interface, and in response to a dragging operation on a selected representative image in the first representative image set, a first active component running in the background associated with the representative image indicated by the dragging operation is switched to be displayed and run in non full screen on the display interface.
Under the condition that the representative image indicated by the dragging operation is one, the number of the first movable components is correspondingly one, so that the first movable components associated with the representative image indicated by the dragging operation are directly displayed at the positions corresponding to the dragging operation release positions on the display interface in a non-full screen mode. And the display area of the first movable component can be obtained by monitoring the corresponding release position coordinates when the drag operation (such as gesture-based drag operation) is released, and setting a corresponding area (such as a split screen area corresponding to the release position coordinates under split screen application or a corresponding large-and-small interface area containing the release position coordinates under non-split screen application) by taking the coordinate points as references.
When the drag operation is released, the plurality of first movable components can be specifically displayed at different positions of the display interface according to the layout strategy. The layout policy may be a layout policy under a split-screen application or a non-split-screen application, without limitation. Under the split screen application, the layout policy may specifically be that a plurality of first active components are respectively displayed on different split screens of the display interface, referring to fig. 5, an example is shown in which two split screens, namely, a left split screen and a right split screen, of the display interface of the electronic device are respectively used for displaying Activity1 and Activity2 under the split screen application, in this example, a sideslip menu of a first representative image set is simultaneously displayed in an edge area of the right split screen, and a component window screenshot of each background Activity component is included in the sideslip menu, so that a user is supported to directly restore a required background Activity component (such as Activity 6) to a foreground operation by operating the menu. In the non-split-screen application, the layout policy may be that, according to the number of first active components to be displayed and the area size of the display interface of the electronic device, the display areas of each first active component are adaptively divided, and each first active component is respectively displayed in different divided display areas.
In the application, the state of the first movable component in the application stack is the first state such as Resumed state which can be used for enabling the component to have interaction capability, so that when one or more first movable components are restored to the foreground operation from the background, the first movable component can be directly visualized on the display interface based on the first state such as Resumed and the like and is in the interactable state, the user interaction experience is greatly improved, and meanwhile, the first movable component does not need to go through complicated life cycle management processes such as onRestart- > onStart- > onResumed and the like, and the performance consumption of equipment is reduced.
And synchronously adjusting the position of the first movable component in the application stack when the corresponding first movable component running in the background is restored to the foreground based on the selection operation, wherein the first movable component is specifically adjusted from the current position in the application stack to the stack top position. Further, if the number of the first movable components is one, the first movable components are directly hopped from the current position (the secondary top position or the position closer to the stack bottom direction than the secondary top position) in the application stack to the stack top position of the application stack, one or more components originally in the stack top direction of the first movable components are sequentially moved to the stack bottom direction by one position, and the positions of the components in the stack bottom direction of the first movable components are unchanged. If the number of the first movable components is multiple, the first movable components are respectively adjusted to each position in the stack top direction from the current position of the first movable components in the application stack, and are sequentially arranged in the stack top direction, wherein the arrangement sequence is inversely related to the recovery sequence of the first movable components to the foreground, the closer the recovery sequence is, the closer the adjusted positions of the first movable components in the application stack are to the stack top, the other components except the first movable components in the application stack are adapted to move to the stack bottom direction or maintain the original positions of the first movable components, and the relative positions of the other components in the application stack are maintained unchanged before and after the management of the application stack is completed.
As can be seen from the above, in the method of the present embodiment, a first representative image set is generated, the first representative image set is displayed on the display interface in response to the preset condition being met, the first representative image set is associated with the active component running in the background, and the first active component running in the background, which is associated with the representative image indicated by the selection operation, is restored to the foreground operation in response to the selection operation on the first representative image set. According to the scheme of the application, a user can quickly and efficiently restore the required components from the background to the foreground by selecting the first representative image set on the display interface, and the background components associated with the first representative image set are still maintained as active components, so that when the corresponding background components are restored to the foreground operation based on the first representative image set, a complex life cycle management flow is not required to be executed on the components, the performance consumption is reduced, the equipment performance is improved, and the user experience is improved.
In an embodiment, referring to the flowchart of the processing method provided in fig. 6, the processing method disclosed in the present application may further include the following processing:
Step 104, deleting the representative image indicated by the deleting operation from the first representative image set in response to the deleting operation on the first representative image set, and removing and destroying the removed third active component from the application stack associated with the deleted representative image.
The first representative image set supports the user to execute the selection operation (the required background movable components are quickly restored to the foreground operation based on the selection operation) and also supports the user to execute the deletion operation, and the removal and destruction management of the corresponding background movable components associated with the representative image indicated by the deletion operation in the application stack is realized by executing the deletion operation on the first representative image set.
The delete operation may also be a gesture operation or a menu item selection operation based on an operation menu (e.g., selecting a "delete" option in the operation menu), among other types of operations.
Specifically, when a user performs a deletion operation on a corresponding representative image in the first representative image set, the electronic device deletes the representative image indicated by the deletion operation from the first representative image set in response to detecting the deletion operation, and simultaneously, determines a background active component associated with the representative image indicated by the deletion operation based on an association relationship between each representative image in the first representative image set and the background active component, removes the associated background active component from the application stack, and destroys the removed background active component.
In the embodiment of the application, the user can directly delete the corresponding representative image in the first representative image set by executing the deleting operation on the basis of actual requirements (such as a window interface of the component which is not needed to be used by the user in the current running process of the application) by executing the rollback operation step by step, so that the components are popped from the application stack and the popped components are destroyed, thereby facilitating the convenient management of the components by the user, avoiding complex operation and reducing the performance consumption of equipment.
Optionally, referring to the flowchart of the processing method provided in fig. 7, the processing method of the previous embodiment may further include the following processing:
Step 105, associating the representative image deleted from the first set of representative images to the second set of representative images.
Associating the representative image deleted from the first representative image set to the second representative image set may specifically mean that the deleted representative image is added to the second representative image set as one element of the second representative image set, and the generation or dynamic update of the second representative image set is achieved by adding the representative image deleted from the first representative image set to the second representative image set.
The second representative image set includes representative images deleted from the first representative image set, which may also be implemented by, but not limited to, a list, a queue, etc., and may be visually displayed through a menu or a floating window, etc., such as automatically displaying the second representative image set each time the deleted representative image is added to the second representative image set, or displaying the second representative image set, etc., when the user performs an operation of calling up the second representative image set.
Optionally, for the first representative image set and/or the second representative image set displayed on the display interface, the set may be converted from the display state to the hidden state when the user does not operate the set or detects a hiding operation of the set by the user within a set period of time.
And 106, responding to the selection operation of the second representative image set, restoring the representative image indicated by the selection operation of the second representative image set to the first representative image set, creating an active component corresponding to the restored representative image, adding the created active component to the corresponding application stack, and enabling the active component to be in a first state.
The selection operation of the second representative image set may be a gesture operation or a menu item selection operation based on an operation menu.
When the user needs to restore the removed and destroyed component to the application stack, the electronic device responds to the selection operation to restore the representative image indicated by the selection operation in the second representative image set to the first representative image set, and at the same time, creates a target active component corresponding to the restored representative image, in particular, the electronic equipment background can realize the creation of the component by simulating the operation flow of opening the component window of the target movable component step by a user, adding the created component into a corresponding application stack, and placing the state of the component in a first state such as Resumed, namely a ready state, so as to support the rapid recovery of the component to the foreground operation at any time without going through complex life cycle flows such as onRestart- > onStart- > onResumed, and the like, thereby enabling the component to be in a visual display and interactable state.
In the conventional technology, for a component which has been removed from an application stack and destroyed (i.e. a component which has been popped from the application stack by a rollback operation on a component window, such as an article interface of a WeChat certain contact which has been withdrawn from the foreground by the rollback operation), a user needs to manually execute an operation procedure of opening the component window step by step to call out and display the window interface of the component again, and the embodiment of the present application sets a first representative image set and a second representative image set, so that the user can execute a selection operation on the second representative image set, and restoring the representative image of the required component to the first representative image set, creating the component by simulating the operation flow of opening the component in the background of the equipment, restoring the component to an application stack, and placing the component in a first state capable of enabling the component to have interaction capability, so as to support the quick restoration of the component to the foreground operation at any time, such as the quick restoration of the removed and destroyed WeChat seal interface to the foreground of the equipment, and the like, thereby avoiding the complicated operation of a user.
In an embodiment, referring to the flowchart of the processing method provided in fig. 8, the processing method disclosed in the present application may further include the following processing:
and step 107, in response to switching the foreground application to the background operation, each active component of the application in the corresponding application stack is adjusted from a first state to a second state, wherein the second state is a state for enabling the active component to lose the interactive capability and correspondingly convert into an inactive component.
Alternatively, the second state may be Stoped state in which the component is ultimately placed by sequentially invoking onPause, onStop functions on the component. In the second state the component loses interactivity and accordingly transitions from an active component to an inactive component.
In this embodiment, referring to fig. 3 in combination, when a user switches a foreground application to a background running (corresponding to "task background" in fig. 3), the electronic device detects and responds to the switching event, and adjusts all active components in an application stack corresponding to the application from a first state to a second state, for example, each component is converted from Resumed state to Stoped state by calling onPause, onStop functions on each component in the application stack in turn, so as to save energy of the device.
It is easy to understand that when the application is switched from the background to the foreground again to run, in response to the switching event, each component in the application stack corresponding to the application is directly converted from the second state to the first state, so that each component in the application stack is converted into a ready state capable of supporting display and interaction of the component in the foreground at the switching moment, and further, when a certain component is required to be switched to the foreground to run subsequently, the required component is supported to be quickly restored to a visual display and interactable state at any time on the premise that complex life cycle flows such as onRestart- > onStart- > onResumed are not required to pass.
Embodiments of the present application also disclose an electronic device, which may be, but is not limited to, a wide variety of general purpose or special purpose computing device environments or configurations, such as personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor devices, and the like.
As shown in fig. 9, the composition structure of the electronic device includes at least:
a memory 10 for storing a set of computer instructions;
The set of computer instructions may be implemented in the form of a computer program.
A processor 20 for implementing a processing method as disclosed in any of the method embodiments above by executing a set of computer instructions.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), application-specific integrated circuit (ASIC), digital Signal Processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, etc.
The electronic device is provided with a display device and/or a display interface, and can be externally connected with the display device.
Optionally, the electronic device further includes a camera assembly, and/or an external camera assembly is connected thereto.
In addition, the electronic device may include communication interfaces, communication buses, and the like. The memory, processor and communication interface communicate with each other via a communication bus.
The communication interface is used for communication between the electronic device and other devices. The communication bus may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc., and may be classified as an address bus, a data bus, a control bus, etc.
In addition, the embodiment of the application also discloses a storage medium, at least one group of computer instruction sets is stored on the storage medium, and the computer instruction sets are used for realizing the processing method disclosed in any embodiment when being called and executed.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
For convenience of description, the above system or apparatus is described as being functionally divided into various modules or units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
Finally, it is further noted that relational terms such as first, second, third, fourth, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (8)

1.一种处理方法,所述方法包括:1. A processing method, the method comprising: 生成第一代表图像集合;generating a first representative image set; 响应于满足预设条件,在显示界面上显示第一代表图像集合,所述第一代表图像集合关联于运行于后台的活动组件;In response to satisfying a preset condition, displaying a first representative image set on a display interface, wherein the first representative image set is associated with an active component running in the background; 响应于对所述第一代表图像集合的选择操作,将所述选择操作指示的代表图像关联的运行于后台的第一活动组件恢复至前台运行;In response to a selection operation on the first representative image set, restoring a first active component running in the background and associated with the representative image indicated by the selection operation to the foreground; 其中,所述生成第一代表图像集合包括:Wherein, generating the first representative image set comprises: 响应于对运行于前台的应用的第二活动组件的退出操作,管理所述第二活动组件所对应的应用栈,以使所述第二活动组件以第一状态运行于后台;建立所述第二活动组件与对应代表图像的关联关系,将所述第二活动组件关联的代表图像关联至所述第一代表图像集合;In response to an exit operation on a second active component of an application running in the foreground, managing an 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 with the first representative image set; 响应于对所述第一代表图像集合的删除操作,从所述第一代表图像集合删除所述删除操作指示的代表图像,并从所述应用栈中将所删除代表图像关联的第三活动组件移除以及销毁移除的所述第三活动组件。In response to a deletion operation on the first representative image set, the representative image indicated by the deletion operation is deleted from the first representative image set, and a third active component associated with the deleted representative image is removed from the application stack and the removed third active component is destroyed. 2.根据权利要求1所述的方法,所述管理所述第二活动组件所对应的应用栈,以使所述第二活动组件以第一状态运行于后台,包括:2. According to the method of claim 1, managing the application stack corresponding to the second activity component so that the second activity component runs in the background in the first state comprises: 响应于所述退出操作调整所述第二活动组件在所述应用栈中的位置和状态,其中拦截基于调整所述第二活动组件在所述应用栈中的位置而触发的对所述第二活动组件进行的第二状态调整处理以使得所述第二活动组件以第一状态运行于后台,所述第一状态为用于使组件具备交互能力的状态;In response to the exit operation, the position and state of the second active component in the application stack are adjusted, wherein a second state adjustment process of 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, wherein the first state is a state for enabling the component to have an interactive capability; 其中,对所述第二活动组件的所述第二状态调整处理,用于在所述第二活动组件切换至后台时将所述第二活动组件调整为失去交互能力的状态。The second state adjustment processing of the second active component is used to adjust the second active component to a state of losing interaction capability when the second active component is switched to the background. 3.根据权利要求1所述的方法,所述将所述第二活动组件关联的代表图像关联至所述第一代表图像集合,包括:3. The method according to claim 1, wherein associating the representative image associated with the second active component to the first representative image set comprises: 获取将所述第二活动组件切换至后台的时刻所述第二活动组件在显示界面对应的组件窗口截图;Obtain a screenshot of a component window corresponding to the second active component on the display interface when the second active component is switched to the background; 将所述组件窗口截图作为所述第二活动组件的代表图像关联至所述第一代表图像集合;所述第一代表图像集合包括所述应用的各个运行于后台的活动组件的代表图像,所述第一代表图像集合中各个活动组件的代表图像的相对位置与各个活动组件在所述应用栈中的相对位置一致。The component window screenshot is associated with the first representative image set as the representative image of the second active component; the first representative image set includes representative images of each active component of the application running in the background, and the relative position of the representative image of each active component in the first representative image set is consistent with the relative position of each active component in the application stack. 4.根据权利要求1所述的方法,所述响应于对所述第一代表图像集合的选择操作,将所述选择操作指示的代表图像关联的运行于后台的第一活动组件恢复至前台运行,包括:4. The method according to claim 1, wherein 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 and running in the background to the foreground, comprises: 响应于对所述第一代表图像集合的第一选择操作,将所述第一活动组件切换至在显示界面全屏显示并运行;In response to a first selection operation on the first representative image set, switching the first active component to be displayed and run in full screen on the display interface; 或,响应于对所述第一代表图像集合的第二选择操作,将所述第一活动组件切换至在显示界面非全屏显示并运行。Or, in response to a second selection operation on the first representative image set, the first active component is switched to be displayed and run in a non-full screen mode on the display interface. 5.根据权利要求4所述的方法,所述响应于对所述第一代表图像集合的第二选择操作,将所述第一活动组件切换至在显示界面非全屏显示并运行,包括:5. The method according to claim 4, wherein in response to a second selection operation on the first representative image set, switching the first active component to be displayed and run in a non-full screen on a display interface comprises: 获取所述第二选择操作在显示界面上指示的位置信息;Acquire location information indicated by the second selection operation on the display interface; 将所述第一活动组件切换至在显示界面上所述位置信息对应的区域显示并运行。The first active component is switched to be displayed and run in the area corresponding to the position information on the display interface. 6.根据权利要求1所述的方法,响应对所述第一代表图像集合的选择操作,还包括:6. The method according to claim 1, in response to a selection operation on the first representative image set, further comprising: 将所述选择操作指示的代表图像关联的运行于后台的第一活动组件从在所述应用栈中的当前位置调整至栈顶位置。The first active component running in the background and associated with the representative image indicated by the selection operation is adjusted from a current position in the application stack to a stack top position. 7.根据权利要求1所述的方法,还包括:7. The method according to claim 1, further comprising: 响应于将所述应用切换至后台运行,将所述应用栈中所述应用的各个活动组件从所述第一状态调整为第二状态;所述第二状态为用于使活动组件失去交互能力相应转换为非活动组件的状态;In response to switching the application to background operation, 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 causing the active component to lose its interactive capability and be converted into an inactive component accordingly; 或,将从所述第一代表图像集合中删除的代表图像关联至第二代表图像集合;响应于对所述第二代表图像集合的选择操作,将对所述第二代表图像集合的选择操作指示的代表图像恢复至所述第一代表图像集合,创建对应于所恢复代表图像的活动组件,将创建的活动组件加入所述应用栈并使所述活动组件处于所述第一状态。Or, the representative image deleted from the first representative image set is associated with the second representative image set; in response to a selection operation on the second representative image set, the representative image indicated by the selection operation on the second representative image set is restored to the first representative image set, an active component corresponding to the restored representative image is created, the created active component is added to the application stack and the active component is placed in the first state. 8.一种电子设备,包括:8. An electronic device, comprising: 存储器,用于存放计算机指令集;Memory, used to store computer instruction sets; 处理器,用于通过执行存储器上存放的指令集,实现如权利要求1-7任一项所述的处理方法。A processor, configured to implement the processing method according to any one of claims 1 to 7 by executing an instruction set stored in a memory.
CN202210481074.6A 2022-05-05 2022-05-05 Processing method and electronic equipment Active CN114741136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210481074.6A CN114741136B (en) 2022-05-05 2022-05-05 Processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210481074.6A CN114741136B (en) 2022-05-05 2022-05-05 Processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN114741136A CN114741136A (en) 2022-07-12
CN114741136B true CN114741136B (en) 2025-07-22

Family

ID=82285234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210481074.6A Active CN114741136B (en) 2022-05-05 2022-05-05 Processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN114741136B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933468A (en) * 2017-03-13 2017-07-07 深圳市金立通信设备有限公司 A kind of user interface switching method and terminal
CN114244951A (en) * 2020-09-08 2022-03-25 华为技术有限公司 Method for opening page by application program, medium and electronic equipment thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024812A1 (en) * 2011-07-13 2013-01-24 Z124 Foreground/background assortment of hidden windows
CN112130715B (en) * 2019-06-25 2022-09-09 华为技术有限公司 A display method and electronic device
CN114327179B (en) * 2021-11-30 2022-12-16 荣耀终端有限公司 Application starting method, electronic equipment and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933468A (en) * 2017-03-13 2017-07-07 深圳市金立通信设备有限公司 A kind of user interface switching method and terminal
CN114244951A (en) * 2020-09-08 2022-03-25 华为技术有限公司 Method for opening page by application program, medium and electronic equipment thereof

Also Published As

Publication number Publication date
CN114741136A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
WO2021035884A1 (en) Screen mirroring method and apparatus, terminal, and storage medium
WO2020238815A1 (en) Display control method and device, electronic device and storage medium
JP7233109B2 (en) Touch-sensitive surface-display input method, electronic device, input control method and system with tactile-visual technology
WO2019041779A1 (en) Terminal interface switching, moving and gesture processing method and device and terminal
CN108829314B (en) Screenshot selecting interface selection method, device, equipment and storage medium
WO2012110989A1 (en) Method, apparatus and computer program product for integrated application and task manager display
CN112099707A (en) Display method and device and electronic equipment
CN108984093B (en) Touch operation method, device, storage medium and electronic device
CN113918260A (en) Application program display method and device and electronic equipment
CN111984130B (en) Quick operation method, device and electronic equipment
CN112835485A (en) Application interface processing method, apparatus, electronic device and readable storage medium
WO2013004130A1 (en) Dockbar implementation method, device and system
CN112269508A (en) Display method and device and electronic equipment
CN113885981A (en) Desktop editing method and device and electronic equipment
CN115407909A (en) Content sharing method, device, terminal and storage medium
CN112269501A (en) Icon moving method and device and electronic equipment
CN114741136B (en) Processing method and electronic equipment
CN103870113B (en) Information processing method and electronic equipment
CN114416269A (en) Interface display method and display device
CN114116098A (en) Application icon management method and device, electronic equipment and storage medium
CN114564134A (en) Application icon display method and device
CN113885749A (en) Icon display method and device and electronic equipment
CN114222355A (en) Terminal power saving display method and device and electronic equipment
CN112667327B (en) Screen rotation display method, device, computer equipment and storage medium
CN114020389A (en) Application program display method and device and electronic equipment

Legal Events

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