CN112379804B - Application control method and electronic equipment - Google Patents

Application control method and electronic equipment Download PDF

Info

Publication number
CN112379804B
CN112379804B CN202011278091.7A CN202011278091A CN112379804B CN 112379804 B CN112379804 B CN 112379804B CN 202011278091 A CN202011278091 A CN 202011278091A CN 112379804 B CN112379804 B CN 112379804B
Authority
CN
China
Prior art keywords
application
mode
data
target
electronic equipment
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
CN202011278091.7A
Other languages
Chinese (zh)
Other versions
CN112379804A (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 CN202011278091.7A priority Critical patent/CN112379804B/en
Publication of CN112379804A publication Critical patent/CN112379804A/en
Application granted granted Critical
Publication of CN112379804B publication Critical patent/CN112379804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses an application control method and electronic equipment, wherein the method comprises the following steps: monitoring whether the current running state of the electronic equipment meets a mode switching condition; wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in a display area of the electronic equipment, application contents of running applications are output in the display windows, and the display windows occupy partial areas in the display area; outputting application content of an operating application in a display area of the electronic equipment in the second operation mode; under the condition that the current running state meets the mode switching condition, obtaining application data of a target application, wherein the application data at least represents the current state of the target application; and after the electronic equipment completes the switching of the operation mode, controlling the target application to operate according to the application data.

Description

Application control method and electronic equipment
Technical Field
The present application relates to the field of system control technologies, and in particular, to an application control method and an electronic device.
Background
Currently, electronic devices based on an Android operating system are usually configured with a plurality of operating modes, such as a working mode, an entertainment mode, or other modes, and the switching of the modes may be triggered by means of connection of accessories, change of device forms, user operation, and the like.
Before the mode switching is performed, one or more applications or processes are generally run on the electronic device. During the mode switching, the application running on the electronic device is forced to be closed, and after the mode switching is completed, the electronic device can be restored to the application running state before the mode switching only by restarting the closed application by the user, so that the operation complexity of the user is high.
Therefore, a technical solution capable of reducing the complexity of the user operation is needed.
Disclosure of Invention
In view of this, the present application provides an application control method and an electronic device, including:
an application control method comprising:
monitoring whether the current running state of the electronic equipment meets a mode switching condition;
wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in a display area of the electronic equipment, application contents of running applications are output in the display windows, and the display windows occupy partial areas in the display area; outputting application content of a running application in a display area of the electronic equipment in the second running mode;
under the condition that the current running state meets the mode switching condition, obtaining application data of a target application, wherein the application data at least represents the current state of the target application;
and after the electronic equipment completes the switching of the operation mode, controlling the target application to operate according to the application data.
The above method, preferably, obtaining application data of the target application includes:
reading application data of a target application in a cache region, wherein the application data recorded in the running process of the target application is stored in the cache region;
the application data comprises data on at least one data dimension, and the data dimension at least comprises any one or any multiple of a running progress dimension, a resource calling dimension and an application configuration dimension.
In the method, preferably, when the mode switching condition is a condition for switching from the first operation mode to the second operation mode, the target application includes a first application corresponding to a display window having a focus in the display area;
wherein the controlling the target application to run according to the application data includes:
and controlling the first application to run according to the application data, so that the application content of the first application is output in the display area, and the application content of the first application corresponds to the application data of the first application.
The method preferably further includes: a second application corresponding to a display window without a focus in the display area;
wherein the controlling the target application to run according to the application data further comprises:
and controlling the second application to run according to the application data, wherein the second application is in a background running state, and the application content of the second application corresponds to the application data of the second application.
In the above method, preferably, when the mode switching condition is a condition for switching from the second operation mode to the first operation mode, the target application includes a third application corresponding to the display area;
wherein the controlling the target application to run according to the application data includes:
drawing a first display window in the display area, the first display window having a focus;
and controlling the third application to run according to the application data, so that the application content of the third application is output in the first display window, and the application content of the third application corresponds to the application data of the third application.
In the above method, preferably, the target application further includes: a fourth application in a background running state;
wherein the controlling the target application to run according to the application data further comprises:
drawing a second display window in the display area, the second display window having no focus;
and controlling the fourth application to run according to the application data, so that the application content of the fourth application is output in the second display window, and the application content of the fourth application corresponds to the application data of the fourth application.
In the method, preferably, the window display parameter of the display window drawn in the first operation mode corresponds to a configuration parameter.
Preferably, the controlling the target application to run according to the application data includes:
controlling the target application to run, and configuring a state parameter of a running state of the target application to correspond to the application data, wherein the state parameter at least comprises: any one or more of the operation progress parameter, the resource calling parameter and the application configuration parameter.
The method preferably monitors whether the current operating state of the electronic device meets the mode switching condition, and includes any one or more of the following items:
monitoring whether a target device meeting a mode switching condition is connected to the electronic device;
monitoring whether a mode switching control on electronic equipment is operated, wherein the mode switching control is used for indicating the electronic equipment to switch a current running mode;
the electronic device is monitored for changes in device configuration.
An application control apparatus comprising:
a state monitoring unit 701 configured to monitor whether a current operating state of the electronic device satisfies a mode switching condition;
wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in a display area of the electronic equipment, application contents of running applications are output in the display windows, and the display windows occupy partial areas in the display area; outputting application content of a running application in a display area of the electronic equipment in the second running mode;
a data obtaining unit 702, configured to obtain application data of a target application when the current operating state meets the mode switching condition, where the application data at least represents a current state of the target application;
an operation control unit 703 is configured to control the target application to operate according to the application data after the electronic device completes switching of the operation mode.
An electronic device, comprising:
a display having a display area;
the processor is used for monitoring whether the current running state of the electronic equipment meets a mode switching condition; wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in the display area, application content of an operation application is output in the display window, and the display window occupies a partial area in the display area; outputting application content of running applications in the display area in the second running mode; under the condition that the current running state meets the mode switching condition, obtaining application data of a target application, wherein the application data at least represents the current state of the target application; and after the electronic equipment completes the switching of the operation mode, controlling the target application to operate according to the application data.
According to the application control method and the electronic device, whether the current running state of the electronic device meets the condition of switching between the first running mode and the second running mode is monitored, wherein the first running mode is a mode that application content is output in a display area in a form of a display window, and the second running mode is a mode that application content is output in the display area in a full screen mode, so that under the condition that the current running state of the electronic device meets the condition, the application can be automatically controlled to run according to application data obtained in advance after the electronic device completes switching of the running modes by obtaining application data capable of representing the current state of a target application, the application does not need to be forcibly closed during mode switching, the user does not need to operate the application again after mode switching, and the operation of the user is reduced by automatically controlling application recovery, so that the operation complexity of the user is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of an application control method according to an embodiment of the present disclosure;
FIGS. 2-6 are exemplary diagrams of embodiments of the present application, respectively;
fig. 7 is a schematic structural diagram of an application control apparatus according to a second embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to a third embodiment of the present application;
fig. 9 and 10 are exemplary diagrams of the pad to which the embodiment of the present application is applied.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a flowchart of an implementation of an application control method provided in an embodiment of the present application is shown, where the method may be applied to an electronic device configured with multiple applications and having multiple operation modes, such as a mobile phone or a pad. In different operation modes, one or more applications can be operated in the electronic equipment. The technical scheme in the embodiment is mainly used for controlling the applications running in the electronic equipment to realize automatic recovery after the mode of the electronic equipment is switched, so that the operation complexity of a user is reduced.
Specifically, the method in this embodiment may include the following steps:
step 101: and monitoring whether the current running state of the electronic equipment meets the mode switching condition, and executing the step 102 under the condition that the current running state meets the mode switching condition.
The mode switching condition may be a condition for switching the electronic device between the first operation mode and the second operation mode.
The first operating mode here means: the application content of the application running on the electronic equipment is output in the form of display windows in a display area of the electronic equipment, one or more display windows can be displayed in the display area, overlapped parts can exist between the display windows, the display windows can also be minimized to a taskbar of the display area, the display windows minimized to the taskbar can restore the output display on the display area after being operated by a user, each display window output on the display area can occupy partial area of the display area, as shown in fig. 2, the display window of the video playing application is positioned at the forefront, and the display window of the chat application is blocked; or, the display window may also occupy all areas of the display area, as shown in fig. 3, the chat application occupies all areas, at this time, the display window displayed in all areas of the display area covers other display windows, the first operation mode at this time is to output application content of each application in a form of window drawing, and may also be referred to as a productivity mode or a working mode;
the second operating mode is: the application content of the application running on the electronic device is output in the display area of the electronic device in a full-screen display manner, while only the application content of the current application is displayed in the display area, and other applications running on the electronic device are in a background running state, as shown in fig. 4, the video playing application is in a foreground running state, while the chat application is in a background running state, and at this time, the second running mode outputs the application content of the foreground running application in a non-window drawing manner, which may also be referred to as a normal mode.
Based on this, in this embodiment, whether the mode switching condition of the electronic device is satisfied can be determined by monitoring the current operating state of the electronic device, and the following implementation manners may be specifically provided:
in an implementation manner, in this embodiment, whether a target device meeting a mode switching condition is connected to an electronic device may be monitored, where the target device is a device that can trigger the electronic device to switch between a first operation mode and a second operation mode, such as a keyboard or a display, and specifically, in this embodiment, whether a connection state of a target interface, such as a serial interface or a parallel interface, on the electronic device is converted from an unconnected state to a connected state, and the connected state represents that the target interface is connected to the target device to monitor whether the target device is connected to the electronic device.
Based on this, under the condition that it is monitored that the target device is connected to the electronic device, it can be determined that the current operating state of the electronic device meets the mode switching condition.
In an implementation manner, in this embodiment, whether a mode switching control on the electronic device is operated may be monitored, the mode switching control is used to instruct the electronic device to switch the current operating mode, and the control may be implemented in a key region of software, as shown in fig. 5, or in an entity key of hardware, as shown in fig. 6, a button for switching the mode is provided at an edge of one side of the electronic device, and in this embodiment, whether the mode switching control is operated is monitored.
Based on this, under the condition that the mode switching control is monitored to be operated, it can be determined that the current operation state of the electronic device meets the mode switching condition.
In one implementation manner, in this embodiment, whether the electronic device has a change in device configuration may be monitored, where the device configuration may be understood as a device configuration structure of the electronic device, such as whether the foldable screen is changed from a folded state to an unfolded state. For example, the device structure of the pad realizes the change of the device form structure with the relative position change between the bracket and the body, so that the pad is changed from a flat plate form to a notebook form or from the notebook form to the flat plate form. In this embodiment, whether the mode switching condition is satisfied is determined by detecting whether the electronic device is changed in a device form structure, where different device form structures correspond to different operation modes of the electronic device, for example, a tablet form corresponds to a second operation mode of the electronic device, i.e., a normal mode, and a notebook form corresponds to a first operation mode of the electronic device, i.e., an operating mode.
Based on this, under the condition that the electronic equipment is monitored to have the change on the equipment structure, the current operation state of the electronic equipment can be determined to meet the mode switching condition.
Of course, the manner of monitoring whether the mode switching condition is satisfied in this embodiment is not limited to the above implementation manners, and any state or parameter that can enable the electronic device to generate the switching instruction for instructing to switch between the first operation mode and the second operation mode may be used as the implementation manner of monitoring whether the mode switching condition is satisfied.
Step 102: application data of the target application is obtained.
The application data at least represents the current state of the target application, such as the running progress state of the target application, the resource scheduling state of the target application, the application configuration state of the target application, and the like.
Specifically, in this embodiment, the application data of the target application may be read in a cache area of the electronic device, where the cache area is an area configured for storing the application data in the electronic device, and the application data of the target application is recorded in the cache area in the running process of the target application, so that the application data recorded in the running process of the target application is stored in the cache area.
The application data obtained in this embodiment may include data in at least one data dimension, and the data in the data dimension may represent the current state of the target application in the corresponding dimension. Specifically, the data dimensions here may be: any one or more of front-end background dimension, running progress dimension, resource calling dimension, application configuration dimension and the like.
For example, the application data of the video playing application includes status data of front-end running or background running, progress status data of video playing, resource names and resource positions of video resources being played and video resources being played, configuration data such as cache paths of cached video content, and the like.
It should be noted that the target application in this embodiment refers to an application that is started and in a running state in the electronic device, where the target application includes an application that is in a foreground running state in the electronic device and also includes an application that is in a background running state in the electronic device. Taking the case of switching from the first operation mode to the second operation mode as an example, the application data of the target application obtained in this embodiment includes application data of the target application corresponding to the display window with the focus, also includes application data of the target application corresponding to the shielded display window, and also includes application data corresponding to the display window minimized to the taskbar; taking the case of switching the second operation mode as an example, the application data of the target application obtained in this embodiment includes application data of the target application whose application content is output in the display area, that is, in the front-end operation, and also includes application data of the target application in the background operation.
Specifically, in this embodiment, after the application data of the target application is obtained, the obtained application data may be cached in a memory cache of the electronic device, or may be stored in the hard disk.
Step 103: and after the electronic equipment completes the switching of the operation mode, controlling the target application to operate according to the application data.
Specifically, in this embodiment, after it is monitored that the electronic device completes switching of the operation mode, that is, switches from the first operation mode to the second operation mode or switches from the second operation mode to the first operation mode, the target application may be controlled to operate according to the previously obtained application data, and the target application is automatically controlled to return to the state of the electronic device before switching of the operation mode without restarting the application after closing the application.
In an implementation manner, when the control target application runs according to the application data in step 103, the following implementation manners are specifically adopted:
controlling the running of the target application, and configuring the state parameters of the running state of the target application to correspond to the application data items, wherein the state parameters at least comprise: any one or more of the operation progress parameter, the resource scheduling parameter and the application configuration parameter.
For example, the running of the video playing application is controlled, the video resource being played by the video playing application is configured to be consistent with the video resource being played in the resource scheduling dimension in the application data, the video resource already played by the video playing application is configured to be consistent with the video resource being played in the resource scheduling dimension in the application data, the progress parameter of the video playing application is configured to be consistent with the state data in the running progress dimension in the application data, the cache path in the video playing application is configured to be consistent with the cache path in the application configuration dimension in the application data, and the like, so that the video playing application continues to run according to the running state before mode switching after the mode switching of the electronic device is completed.
It should be noted that the running state of the target application may be understood as a lifecycle state in which the target application is located, such as a starting state, a state of running to a certain stage, and a state of running ending. Therefore, in this embodiment, the target application is controlled to remain unchanged in the running state after the mode switching of the electronic device, that is, the lifecycle of the target application is kept unchanged during the mode switching of the electronic device, so that the working content of the target application used by the user is not lost.
It can be seen from the foregoing technical solutions that, in the application control method provided in the first embodiment of the present application, whether the current operating state of the electronic device satisfies a condition for switching between a first operating mode and a second operating mode is monitored, where the first operating mode is a mode in which application content is output in a display area in a form of a display window, and the second operating mode is a mode in which application content is output in the display area in a full screen mode, so that, when the current operating state of the electronic device satisfies the condition, by obtaining application data of a target application that can represent the current state, the application can be automatically controlled to run according to application data obtained in advance after the electronic device completes switching of the operating modes, and thus the application does not need to be forcibly closed during mode switching, and does not need to be re-operated by a user after mode switching, and further reduces user operations by automatically controlling application recovery, thereby reducing operation complexity of the user.
In one implementation, when the mode switching condition is a condition of switching from the first operation mode to the second operation mode, that is, a condition of switching from the working mode to the normal mode, the target application at least includes a first application corresponding to a display window having a focus in a display region, where the first application is an application corresponding to application content output by a display window at the frontmost end, and the focus here may be understood as an operated focus, such as a position point where an input cursor is located, as shown in fig. 2, the first application is a video playing application;
based on this, when the control target application runs according to the application data in step 103, the following method can be implemented:
and controlling the first application to run according to the application data thereof, so that the application content of the first application is output in the display area, and the application content of the first application corresponds to the application data of the first application.
That is, in the case of switching from the first operation mode to the second operation mode, in this embodiment, after the electronic device is switched to the second operation mode, the application content of the first application corresponding to the display window having focus in the original first operation mode is output to the display area in the second operation mode, at this time, the current state corresponding to the application content of the first application in the display area corresponds to the application data of the first application in the original first operation mode, thereby implementing that the first application on the electronic device continues to operate according to the operation state in the first operation mode after the electronic device is switched to the second operation mode.
In addition, in the electronic device in the first operation mode, in addition to the first application, other applications may also be run in the background, for example, an application corresponding to an occluded display window or an application corresponding to a display window minimized to the taskbar, and an application corresponding to a display window that does not have a focus, where the target application further includes: a second application corresponding to the display window without the focus in the display area, as shown in fig. 2, the second application is a chat application;
based on this, when the control target application runs according to the application data in step 103, the following processing may be further included:
and controlling the second application to run according to the application data of the second application, wherein the second application is in a background running state, and the application content of the second application corresponds to the application data of the second application.
That is to say, in the case of switching from the first operation mode to the second operation mode, in this embodiment, after the electronic device is switched to the second operation mode, the application content of the second application corresponding to the display window that has no focus in the original first operation mode is not output, but the second application is run on the electronic device and is controlled to run in the background, and the current state corresponding to the application content of the second application running in the background corresponds to the application data of the second application in the original first operation mode, so that the second application on the electronic device continues to run according to the running state in the first operation mode after the electronic device is switched to the second operation mode, and is only viewed by the user in the background running state.
In one implementation, when the mode switching condition is a condition of switching from the second operation mode to the first operation mode, that is, a condition of switching from the normal mode to the working mode, the target application at least includes a third application corresponding to the display area, where the third application is an application in a front-end operation state, as shown in fig. 4, the third application is a video playing application;
based on this, when the control target application runs according to the application data in step 103, the following method can be implemented:
and drawing a first display window in the display area, wherein the first display window has a focus, and then controlling the third application to run according to the application data of the third application, so that the application content of the third application is output in the first display window with the focus, and the application content of the third application corresponds to the application data of the third application.
That is to say, in the case of switching from the second operation mode to the first operation mode, in this embodiment, after the electronic device is switched to the first operation mode, the application content of the third application that is in the front end operation state in the original second operation mode is output in the display window that has the focus in the first operation mode, at this time, the current state corresponding to the application content output in the first display window by the third application corresponds to the application data of the third application in the original second operation mode, and thus, it is achieved that the third application on the electronic device continues to operate according to the operation state in the second operation mode after the electronic device is switched to the first operation mode.
In addition, in the second operation mode, in addition to the third application, other applications may also be run in the electronic device in the background, at this time, the target application further includes fourth applications that are in the background running state, as shown in fig. 4, the fourth applications are chat applications;
based on this, when the control target application runs according to the application data in step 103, the following processing may be further included:
and drawing a second display window in the display area, wherein the second display window does not have a focus, the second display window at the moment can be in a display state of being blocked or not blocked by the first display window or can be in a display state of being minimized to a task bar, and then controlling a fourth application to run according to the application data, so that the application content of the fourth application is output in the second display window, and the application content of the fourth application corresponds to the application data of the fourth application.
That is to say, in the case of switching from the second operation mode to the first operation mode, after the electronic device is switched to the first operation mode, in this embodiment, after the electronic device is switched to the first operation mode, the application content of the fourth application that is in the background operation state in the original second operation mode is output in the display window that has no focus in the first operation mode, at this time, the current state corresponding to the application content output by the fourth application in the second display window corresponds to the application data of the fourth application in the original second operation state, and thus, it is achieved that the fourth application on the electronic device continues to operate according to the operation state in the second operation mode after the electronic device is switched to the first operation mode, but may be blocked by other display windows or minimized to the task bar.
Based on the above implementation, after the electronic device is switched to the first operation mode, the window display parameters of the drawn display window correspond to configuration parameters, where the configuration parameters may be default preset parameters or may be determined according to historical parameters of the first operation mode recorded by the electronic device, where the historical parameters of the first operation mode may be understood as configuration parameters recorded by the electronic device in the first operation mode at the previous time or at the previous times, and specifically, the configuration parameters may include parameters such as a window size, a window position, a window color, and a window transparency. Correspondingly, the window display parameters may include any one or more of window size, window position, window color, window transparency, and the like. Based on this, in this embodiment, the window display parameters of the first display window and the second display window may be set according to the configuration parameters, so as to draw the display windows of which the window display parameters correspond to the configuration parameters.
Referring to fig. 7, a schematic structural diagram of an application control apparatus provided in the second embodiment of the present application is shown, where the apparatus may be loaded in an electronic device that is configured with multiple applications and has multiple operation modes, such as a mobile phone or a pad. In different operation modes, one or more applications can be operated in the electronic equipment. The technical scheme in the embodiment is mainly used for controlling the applications running in the electronic equipment to realize automatic recovery after the mode of the electronic equipment is switched, so that the operation complexity of a user is reduced.
Specifically, the apparatus in this embodiment may include the following units:
a state monitoring unit 701 configured to monitor whether a current operating state of the electronic device satisfies a mode switching condition;
wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in a display area of the electronic equipment, application contents of running applications are output in the display windows, and the display windows occupy partial areas in the display area; outputting application content of a running application in a display area of the electronic equipment in the second running mode;
a data obtaining unit 702, configured to obtain application data of a target application when the current operating state meets the mode switching condition, where the application data at least represents a current state of the target application;
an operation control unit 703 is configured to control the target application to operate according to the application data after the electronic device completes switching of the operation mode.
It can be seen from the foregoing technical solutions that, in an application control apparatus provided in the second embodiment of the present application, whether a current operating state of an electronic device satisfies a condition for switching between a first operating mode and a second operating mode is monitored, where the first operating mode is a mode in which application content is output in a display area in a form of a display window, and the second operating mode is a mode in which application content is output in the display area in a full screen mode, so that, when the current operating state of the electronic device satisfies the condition, application data of a target application that can represent the current state is obtained, and the application can be automatically controlled to operate according to the application data obtained in advance after the electronic device completes switching of the operating modes, and thus the application does not need to be forcibly closed during mode switching, and does not need to be re-operated by a user after mode switching, and further, operation of the user is reduced by automatically controlling application recovery, thereby reducing operation complexity of the user.
In one implementation, the data obtaining unit 702 is specifically configured to: reading application data of a target application in a cache region, wherein the application data recorded in the running process of the target application is stored in the cache region; the application data comprises data on at least one data dimension, and the data dimension at least comprises any one or any multiple of a running progress dimension, a resource calling dimension and an application configuration dimension.
In one implementation manner, in a case that the mode switching condition is a condition for switching from the first operation mode to the second operation mode, the target application includes a first application corresponding to a display window having a focus in the display area;
the operation control unit 703 is specifically configured to: and controlling the first application to run according to the application data, so that the application content of the first application is output in the display area, and the application content of the first application corresponds to the application data of the first application.
Further, the target application further comprises: a second application corresponding to a display window without a focus in the display area;
wherein, the operation control unit 703 is further configured to: and controlling the second application to run according to the application data, wherein the second application is in a background running state, and the application content of the second application corresponds to the application data of the second application.
In one implementation manner, in a case that the mode switching condition is a condition for switching from the second operation mode to the first operation mode, the target application includes a third application corresponding to the display area;
the operation control unit 703 is specifically configured to: drawing a first display window in the display area, the first display window having a focus; and controlling the third application to run according to the application data, so that the application content of the third application is output in the first display window, and the application content of the third application corresponds to the application data of the third application.
Further, the target application further comprises: a fourth application in a background running state;
wherein, the operation control unit 703 is further configured to: drawing a second display window in the display area, the second display window having no focus; and controlling the fourth application to run according to the application data, so that the application content of the fourth application is output in the second display window, and the application content of the fourth application corresponds to the application data of the fourth application.
Optionally, the window display parameter of the display window drawn in the first operation mode corresponds to a configuration parameter.
In one implementation, the operation control unit 703 is specifically configured to: controlling the target application to run, and configuring a state parameter of a running state of the target application to correspond to the application data, wherein the state parameter at least comprises: any one or more of the operation progress parameter, the resource calling parameter and the application configuration parameter.
In one implementation manner, the state detecting unit 701 monitors whether the current operating state of the electronic device satisfies a mode switching condition, which includes any one or more of the following items:
monitoring whether a target device meeting a mode switching condition is connected to the electronic device;
monitoring whether a mode switching control on the electronic equipment is operated, wherein the mode switching control is used for indicating the electronic equipment to switch the current running mode;
the electronic device is monitored for changes in device configuration.
It should be noted that, for the specific implementation of each unit in the present embodiment, reference may be made to the corresponding content in the foregoing, and details are not described here.
Referring to fig. 8, a schematic structural diagram of an electronic device according to a third embodiment of the present application is provided, where the electronic device may be an electronic device that is configured with multiple applications and has multiple operation modes, such as a mobile phone or a pad. In different operation modes, one or more applications can be operated in the electronic equipment. The technical scheme in the embodiment is mainly used for controlling the applications running in the electronic equipment to realize automatic recovery after the mode of the electronic equipment is switched, so that the operation complexity of a user is reduced.
Specifically, the electronic device in this embodiment may include the following structure:
a display 801 having a display area;
a processor 802 configured to monitor whether a current operating state of the electronic device satisfies a mode switching condition; wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in the display area, application content of an operation application is output in the display window, and the display window occupies a partial area in the display area; outputting application content of running applications in the display area in the second running mode; under the condition that the current running state meets the mode switching condition, obtaining application data of a target application, wherein the application data at least represents the current state of the target application; and after the electronic equipment completes the switching of the operation mode, controlling the target application to operate according to the application data.
Of course, the electronic device in this embodiment may further include a memory for storing the application programs and data generated by the application programs, and the processor 802 may execute the application programs to implement the above functions.
It can be seen from the foregoing technical solutions that, in the electronic device provided in the third embodiment of the present application, whether the current operating state of the electronic device meets the condition for switching between the first operating mode and the second operating mode is monitored, where the first operating mode is a mode in which application content is output in the display area in the form of a display window, and the second operating mode is a mode in which application content is output in the display area in full screen, so that, when the current operating state of the electronic device meets the condition, by obtaining application data of the target application, which can represent the current state, the application can be automatically controlled to run according to application data obtained in advance after the electronic device completes switching of the operating modes, and thus the application does not need to be forcibly closed during switching of the modes, and does not need to be re-operated by a user after switching of the modes, and further, the operation of the user is reduced by automatically controlling application recovery, thereby reducing the operation complexity of the user.
It should be noted that, the specific implementation of the processor in the present embodiment may refer to the corresponding content in the foregoing, and is not described in detail here.
Taking the switching between the working mode and the normal mode in the pad as an example, the technical scheme of the application is exemplified:
firstly, in the application, each state of the application is recorded by maintaining the life cycle of the application running on the pad, and the application is allowed to run simultaneously, so that when the mode of the pad is switched to change the window form of the application, the application does not need to be completely closed and restarted, and the life cycle of the application is recovered according to the stored state data after the corresponding new window form is drawn in a new mode through the stored state data of the application.
As shown in fig. 9, an architecture diagram for implementing Application function in the pad is shown, where the left side of the vertical line is a management module of the Application life cycle, such as an Application Activity module, a Multi-Application synchronous recovery module Multi-result, an Activity management Service module Activity Manager Service, an Activity Stack module Activity Stack, an Activity start Stack module Activity Starter, and a Stack supervisor module Stack hypervisor, and the like, and the right side is an Application presentation logic module, such as a Window and Window mode module Window free, a Window management Service module Windows Manager Service, a Window task module Windows task, a display logic unit Surface, a display management unit surfaceflag, an optimization unit reset, an embedded open graphics library EGL, and a logic unit gallery of FB/LCD, and the like. In current native systems, the modules on the left and right sides are interleaved without decoupling, and therefore, must be restarted after being fully shut down in the mode switching process. In the application, the left and right modules are decoupled, the management module of the life cycle on the left side is designed to be unchanged, and the right module is only required to be controlled to be correspondingly changed in the mode switching process, so that the application organization mode of the pad based on the screen is switched to the application display and organization mode based on the window, or the application display and organization mode based on the window is switched to the application organization mode based on the screen.
A specific flow for controlling the application lifecycle is shown in fig. 10, in which:
after the application is activated Activity Starts, the application Starts to create and execute application oncreate () and onstart () and controls the application to start onrestore (), after which the application gets to focus getfocus or lostfocus, when the application is in focus state, if mode switching is found, i.e. configchange is configured, then flow thru exception is inserted, e.g. status is recorded and onpause, if the user needs to continue application running, application toforegond and onrestore are hoisted by icon process, if not, flow proceeds to stop onstop, memory recycle memory, process progress, or complete close ontorship and shotdown, and the user clicks on application icon, application restarts and creates process, control logic for applications that are not in focus is shown as right flow.
In practical applications, in the normal mode in pad, the display unit is based on the screen. However, the present application is shown on a window basis in the productivity mode of the operating system in the office mode such as windows. Whereas in the conventional art, the change from the frame to the full screen can be realized by a full screen operation. But it cannot be realized when switching from an operation mode without frames, such as a normal mode, to a mode with frames, such as a productivity mode. In order to achieve the purpose that the application is changed only in the presentation mode and the successful logic but the execution logic in the application is not changed, the application redefines the state machine for executing the application so as to record a series of data such as the execution process number of the application, the resources occupied by the process, the display direction, the coordinates, the Z-axis position and the like of the successful application, so that when the mode is switched, under the control of the state machine, the algorithm of the state machine calculates the display window in the new mode through the state machine according to different parameters recorded under the operation of two different mode applications, such as the coordinates, the direction, the process number, the resource number and the like, and simultaneously restores the execution flow of the application program.
Taking a chat application or a video playing application as an example, it is necessary to restore to which page the application is in full-screen mode, what video is played, and where the application is played, which are logic data of the application program itself, and these data affect the execution phase of the application.
On one hand, the data required by the new state machine is calculated in the application, on the other hand, the data of the application per se is recovered in the application, and under the control of the state machine, on one hand, errors of the application in a new presentation mode can be avoided, and meanwhile, the execution logic of the application can be prevented from being interrupted.
Therefore, according to the technical scheme, the electronic equipment can be triggered to be switched between the working mode and the non-working mode through inserting and pulling the keyboard or clicking the menu and the like without strong intervention of a user, and the state before switching is recovered through controlling the application, so that the data of the user is ensured not to be lost, for example, in the folding process of the folding screen, the mode is switched and the data is ensured not to be lost. Moreover, the data need not be saved repeatedly for reminding.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An application control method comprising:
monitoring whether the current running state of the electronic equipment meets a mode switching condition;
wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in a display area of the electronic equipment, application contents of running applications are output in the display windows, and the display windows occupy partial areas in the display area; outputting application content of an operating application in a display area of the electronic equipment in the second operation mode; the first operation mode is a working mode, and the second operation mode is a common mode;
under the condition that the current running state meets the mode switching condition, obtaining application data of a target application, wherein the application data at least represents the current state of the target application; the target application comprises an application in a foreground running state in the electronic equipment and an application in a background running state in the electronic equipment;
after the electronic equipment completes the switching of the running mode, the target application is controlled to run according to the application data, so that the running state of the target application is kept unchanged after the mode of the electronic equipment is switched by automatically controlling the recovery of the target application, the situation that the application is forcibly closed when the mode of the electronic equipment is switched and the closed application needs to be restarted after the mode is switched is avoided.
2. The method of claim 1, obtaining application data for a target application, comprising:
reading application data of a target application in a cache region, wherein the application data recorded in the running process of the target application is stored in the cache region;
the application data comprises data on at least one data dimension, and the data dimension at least comprises any one or any multiple of a running progress dimension, a resource calling dimension and an application configuration dimension.
3. The method according to claim 1 or 2, wherein in a case where the mode switching condition is a condition for switching from the first operation mode to the second operation mode, the target application includes a first application corresponding to a display window having focus in the display region;
wherein the controlling the target application to run according to the application data includes:
and controlling the first application to run according to the application data, so that the application content of the first application is output in the display area, and the application content of the first application corresponds to the application data of the first application.
4. The method of claim 3, the target application further comprising: a second application corresponding to a display window without a focus in the display area;
wherein the controlling the target application to run according to the application data further comprises:
and controlling the second application to run according to the application data, wherein the second application is in a background running state, and the application content of the second application corresponds to the application data of the second application.
5. The method according to claim 1 or 2, wherein in a case where the mode switching condition is a condition for switching from the second operation mode to the first operation mode, the target application includes a third application corresponding to the display area;
wherein the controlling the target application to run according to the application data includes:
drawing a first display window in the display area, the first display window having a focus;
and controlling the third application to run according to the application data, so that the application content of the third application is output in the first display window, and the application content of the third application corresponds to the application data of the third application.
6. The method of claim 5, the target application further comprising: a fourth application in a background running state;
wherein the controlling the target application to run according to the application data further comprises:
drawing a second display window in the display area, the second display window having no focus;
and controlling the fourth application to run according to the application data, so that the application content of the fourth application is output in the second display window, and the application content of the fourth application corresponds to the application data of the fourth application.
7. The method of claim 6, wherein the window display parameters of the display window rendered in the first mode of operation correspond to configuration parameters.
8. The method of claim 1 or 2, the controlling the target application to run according to the application data, comprising:
controlling the target application to run, and configuring a state parameter of a running state of the target application to correspond to the application data, wherein the state parameter at least comprises: any one or more of the operation progress parameter, the resource calling parameter and the application configuration parameter.
9. The method according to claim 1 or 2, wherein monitoring whether the current operation state of the electronic device meets the mode switching condition comprises any one or more of the following:
monitoring whether a target device meeting a mode switching condition is connected to the electronic device;
monitoring whether a mode switching control on electronic equipment is operated, wherein the mode switching control is used for indicating the electronic equipment to switch a current running mode;
the electronic device is monitored for changes in device configuration.
10. An electronic device, comprising:
a display having a display area;
the processor is used for monitoring whether the current running state of the electronic equipment meets a mode switching condition; wherein the mode switching condition is a condition for switching between a first operation mode and a second operation mode; in the first operation mode, one or more display windows are arranged in the display area, application content of an operation application is output in the display window, and the display window occupies a partial area in the display area; outputting application content of running applications in the display area in the second running mode; the first operation mode is a working mode, and the second operation mode is a common mode; under the condition that the current running state meets the mode switching condition, obtaining application data of a target application, wherein the application data at least represents the current state of the target application; the target application comprises an application in a foreground running state in the electronic equipment and an application in a background running state in the electronic equipment; after the electronic equipment completes the switching of the running mode, the target application is controlled to run according to the application data, so that the running state of the target application is kept unchanged after the mode of the electronic equipment is switched by automatically controlling the recovery of the target application, the situation that the application is forcibly closed when the mode of the electronic equipment is switched and the closed application needs to be restarted after the mode is switched is avoided.
CN202011278091.7A 2020-11-16 2020-11-16 Application control method and electronic equipment Active CN112379804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011278091.7A CN112379804B (en) 2020-11-16 2020-11-16 Application control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011278091.7A CN112379804B (en) 2020-11-16 2020-11-16 Application control method and electronic equipment

Publications (2)

Publication Number Publication Date
CN112379804A CN112379804A (en) 2021-02-19
CN112379804B true CN112379804B (en) 2023-01-17

Family

ID=74584760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011278091.7A Active CN112379804B (en) 2020-11-16 2020-11-16 Application control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN112379804B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118227215B (en) * 2024-05-10 2024-07-23 麒麟软件有限公司 Dual-mode window manager solving method under domestic platform

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235662A (en) * 2013-04-18 2013-08-07 广东欧珀移动通信有限公司 Method and terminal for achieving automatic switch of input modes
CN106126145A (en) * 2016-06-29 2016-11-16 联想(北京)有限公司 A kind of display packing and electronic equipment
CN106168870A (en) * 2016-06-30 2016-11-30 深圳市金立通信设备有限公司 A kind of split screen window display method and terminal
CN106547417A (en) * 2015-09-21 2017-03-29 腾讯科技(深圳)有限公司 The method and apparatus for showing background task message
CN107273111A (en) * 2017-05-03 2017-10-20 深圳市金立通信设备有限公司 A kind of multi-screen display method and terminal
CN107690613A (en) * 2015-06-07 2018-02-13 苹果公司 For manipulating the equipment, method and graphic user interface of application widget
CN107870716A (en) * 2017-11-07 2018-04-03 广东欧珀移动通信有限公司 The method and apparatus for calling background application
CN109144447A (en) * 2018-07-30 2019-01-04 Oppo广东移动通信有限公司 Split screen window adjusting method, device, storage medium and electronic equipment
CN109298907A (en) * 2018-08-23 2019-02-01 Oppo广东移动通信有限公司 Application program display methods, application program display device and terminal
CN110113668A (en) * 2019-03-19 2019-08-09 视联动力信息技术股份有限公司 A kind of window processing method and processing device based on IE plug-in unit

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103235662A (en) * 2013-04-18 2013-08-07 广东欧珀移动通信有限公司 Method and terminal for achieving automatic switch of input modes
CN107690613A (en) * 2015-06-07 2018-02-13 苹果公司 For manipulating the equipment, method and graphic user interface of application widget
CN106547417A (en) * 2015-09-21 2017-03-29 腾讯科技(深圳)有限公司 The method and apparatus for showing background task message
CN106126145A (en) * 2016-06-29 2016-11-16 联想(北京)有限公司 A kind of display packing and electronic equipment
CN106168870A (en) * 2016-06-30 2016-11-30 深圳市金立通信设备有限公司 A kind of split screen window display method and terminal
CN107273111A (en) * 2017-05-03 2017-10-20 深圳市金立通信设备有限公司 A kind of multi-screen display method and terminal
CN107870716A (en) * 2017-11-07 2018-04-03 广东欧珀移动通信有限公司 The method and apparatus for calling background application
CN109144447A (en) * 2018-07-30 2019-01-04 Oppo广东移动通信有限公司 Split screen window adjusting method, device, storage medium and electronic equipment
CN109298907A (en) * 2018-08-23 2019-02-01 Oppo广东移动通信有限公司 Application program display methods, application program display device and terminal
CN110113668A (en) * 2019-03-19 2019-08-09 视联动力信息技术股份有限公司 A kind of window processing method and processing device based on IE plug-in unit

Also Published As

Publication number Publication date
CN112379804A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
EP3690629B1 (en) Display management method and system of mobile terminal
RU2646376C2 (en) User interface elements for multiple displays
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
JP2012507089A (en) Surface and manage window-specific controls
US20120173986A1 (en) Background synchronization within a multi-environment operating system
CN104252284A (en) File display method and device
US9678632B2 (en) Data processing method and apparatus
WO2017143710A1 (en) Method and device for controlling multisystem mobile terminal
CN112540709A (en) Split screen display method and device, electronic equipment and readable storage medium
WO2014158220A1 (en) Display instance management
CN107368235B (en) Multi-task switching method of function machine and function machine
US20200167173A1 (en) Application launching method and display device
CN108549575B (en) Processing method and device for quitting split screen, storage medium and electronic equipment
US20230244510A1 (en) Task Start Method and Electronic Device
EP3979148B1 (en) Presenting method and system of machine learning automatic modeling process
CN112379804B (en) Application control method and electronic equipment
KR20000018932A (en) System for developing games and a method therefor
US11907599B2 (en) Information processing method, apparatus, electronic device, and storage medium
CN105843471A (en) Information processing method and electronic device
CN100547548C (en) Method for realizing graphic user interface during period of turn-on and computer system
CN108401455B (en) Multi-system control method, control device and mobile terminal
CN113407290B (en) Application notification display method and device and electronic equipment
CN115934281A (en) Method, device, equipment and medium for starting page optimization based on Android APP
US20120252536A1 (en) Mobile terminal
CN115033307B (en) Application starting method and device, storage medium 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