Application UI Process Termination for Resource Efficiency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for switching applications between foreground and background on electronic terminals waste processing resources as they continue to execute the same processes, leading to low resource utilization efficiency.
Innovation Solution
A processing method that separates user interface (UI) and logic processes, terminating the UI process when an application is switched to background and recreating it when returned to foreground, allowing the logic process to continue running.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the application continues to execute the same process when switched to background, then the application can quickly return to foreground state, but processing resources are wasted and resource utilization efficiency decreases
Solution Approach 1:
The patent segments the application process into two independent parts: UI process and logic process. The UI process is terminated when the application switches to background, while the logic process continues running. This segmentation allows the system to save CPU resources by not executing UI-related code in the background, while maintaining the ability to quickly restore the UI when the application returns to foreground.
Solution Approach 2:
The patent changes the execution state parameter of the UI process based on the application's foreground/background status. When switched to background, the UI process execution parameter changes from 'running' to 'terminated'. When returned to foreground, the parameter changes back to 'running', enabling quick restoration without continuous resource consumption.
2Duration of action of moving object
If the UI process continues to run in background, then the user interface can be immediately displayed when returned to foreground, but CPU processing resources are occupied unnecessarily
Solution Approach 1:
The patent extracts the UI process from the continuous execution chain when the application is in background mode. By taking out the UI process execution specifically (while keeping logic process running), the system eliminates unnecessary CPU resource occupation for UI-related operations in the background, while preserving the capability to quickly restore UI when needed.
3Reliability
If all processes including UI are kept running in background, then the application state is fully maintained, but memory space is consumed and power consumption increases
Solution Approach 1:
The patent implements dynamic process management where the UI process execution state adapts to the application's visibility status. The UI process is dynamically terminated when the application moves to background and dynamically restarted when returned to foreground. This dynamic approach maintains application reliability by preserving logic process state while adaptively managing UI process resources based on actual usage needs.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
The present disclosure provides a processing method for an application program and a device thereof, which relates to the field of electronic terminals, and which may effectively save processing resources of electronic terminals, so as to improve utilization efficiency of resources. The method of present disclosure mainly includes: switching (S11) an application program from running in foreground to running in background, wherein processes of the application program comprise a user interface (UI) process and a logic process; and terminating (S12) the UI process of the application program, and keeping the logic process of the application program running. The embodiments of present disclosure are mainly applied to processing procedures of application programs in electronic terminals.