[go: up one dir, main page]

WO2019034104A1 - 终端自动释放后台进程占用资源的方法、存储介质及终端 - Google Patents

终端自动释放后台进程占用资源的方法、存储介质及终端 Download PDF

Info

Publication number
WO2019034104A1
WO2019034104A1 PCT/CN2018/100809 CN2018100809W WO2019034104A1 WO 2019034104 A1 WO2019034104 A1 WO 2019034104A1 CN 2018100809 W CN2018100809 W CN 2018100809W WO 2019034104 A1 WO2019034104 A1 WO 2019034104A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
terminal
background
threshold
automatically
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.)
Ceased
Application number
PCT/CN2018/100809
Other languages
English (en)
French (fr)
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.)
JRD Communication Shenzhen Ltd
Original Assignee
JRD Communication Shenzhen 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 JRD Communication Shenzhen Ltd filed Critical JRD Communication Shenzhen Ltd
Priority to EP18845751.9A priority Critical patent/EP3671451B1/en
Priority to US16/639,572 priority patent/US11138041B2/en
Publication of WO2019034104A1 publication Critical patent/WO2019034104A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • 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/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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • 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

Definitions

  • the present application relates to the field of terminal process technologies, and in particular, to a method, a storage medium, and a terminal for automatically releasing resources occupied by a background process by a terminal.
  • An embodiment of the present invention provides a method for automatically releasing a resource occupied by a background process, a storage medium, and a terminal, which can enable the terminal to automatically release the system hardware resources occupied by the background process to save power.
  • an embodiment of the present application provides a method for a terminal to automatically release resources occupied by a background process, where the method includes the following steps:
  • the terminal detects that the process is transferred to the background, and determines whether the process is in a buffer state, and if so, Unloading the system hardware resources occupied by the process;
  • the terminal automatically releases the resource occupied by the background process, wherein the terminal detects that the process is transferred to the background, determines whether the process is in a buffer state, and if so, automatically releases the system hardware occupied by the process.
  • the steps of the resources include:
  • the terminal detects that the process is transferred to the background, and determines that the process is in a buffer state, and then closes all or part of the hardware resource monitoring registered by the process;
  • the terminal detects that the process is transferred to the background, determines that the process is not in the buffer state, and jumps to a step of performing the determining whether the process is in an operating state.
  • the terminal automatically releases a method for the background process to occupy resources, where the process includes:
  • the terminal automatically releases the resource occupied by the background process, wherein the determining whether the process is in an operating state, and if not, maintaining the original state, specifically includes:
  • the terminal automatically releases the resource occupied by the background process, wherein the determining whether the running state maintains the preset threshold of the inter-time threshold is maintained, and if yes, automatically releasing the system hardware resources occupied by the process If not, the steps of maintaining the original state include:
  • the terminal automatically releases the resource occupied by the background process, where the upper threshold of the dice can be manually set or automatically set.
  • an embodiment of the present application provides a storage medium, where the storage medium stores a computer program, and the computer program can be executed to implement the following steps:
  • the terminal detects that the process is transferred to the background, determines whether the process is in a buffer state, and if so, automatically releases system hardware resources occupied by the process;
  • the storage medium wherein the terminal detects that the process is transferred to the background, and determines whether the process is in a buffer state. If yes, the step of automatically releasing the system hardware resources occupied by the process includes:
  • the terminal detects that the process is transferred to the background, and determines that the process is in a buffer state, and then closes all or part of the hardware resource monitoring registered by the process;
  • the terminal detects that the process is transferred to the background, determines that the process is not in the buffer state, and jumps to a step of performing the determining whether the process is in an operating state.
  • the storage medium wherein the process includes: wake-up lock, Bluetooth, GPS monitoring, WiFi.
  • the storage medium wherein the determining whether the process is in an operating state, and if not, maintaining the original state, specifically includes:
  • the storage medium wherein the determining whether the running state maintains the preset threshold of the inter-turn threshold is maintained, and if so, automatically releasing the system hardware resources occupied by the process, and if not, maintaining the original
  • the steps of the state include:
  • the storage medium, wherein the threshold of the inter-turn threshold can be manually set or automatically set.
  • an embodiment of the present application provides a terminal, including: a processor, a memory communicatively coupled to the processor, the memory storing a computer program, where the processor is configured to invoke the memory a computer program to implement the following steps:
  • the terminal detects that the process is transferred to the background, and determines whether the process is in a buffer state. If yes, the system hardware resources occupied by the process are automatically released.
  • the terminal where the terminal detects that the process is transferred to the background, determines whether the process is in a buffer state, and if so, automatically releases the system hardware resources occupied by the process, specifically including
  • the terminal detects that the process is transferred to the background, and determines that the process is in a buffer state, and then closes all or part of the hardware resource monitoring registered by the process;
  • the terminal detects that the process is transferred to the background, determines that the process is not in the buffer state, and jumps to a step of performing the determining whether the process is in an operating state.
  • the terminal where the process includes: wake-up lock, Bluetooth, GPS monitoring, WiFi.
  • the terminal where the determining whether the process is in an operating state, and if not, maintaining the original state, specifically includes:
  • the terminal wherein the determining whether the running state maintains the preset time threshold has been reached, and if yes, automatically releasing the system hardware resources occupied by the process, and if not, maintaining the original state
  • the steps include:
  • the present invention provides a method, a storage medium, and a terminal for automatically releasing a background process by a terminal.
  • the method includes: A.
  • the terminal detects that the process is transferred to the background, and determines whether the process is In the buffer state, if yes, the system hardware resources occupied by the process are automatically released. If not, step B is performed; B. determining whether the process is in the running state, and if yes, executing step C, if not, maintaining the original The state is: C. It is determined whether the running state maintains the preset threshold of the inter-time threshold.
  • the system hardware resources occupied by the process are automatically released, and if not, the original state is maintained.
  • the terminal detects that the process is transferred to the background and determines that the process meets the condition, the application automatically releases the system hardware resources occupied by the background process to save power.
  • FIG. 1 is a flow chart of a preferred embodiment of a method for automatically releasing a background process resource by a terminal provided by the present application.
  • FIG. 2 is a flow chart of logic determination in a preferred embodiment of a method for automatically releasing a background process resource by a terminal provided by the present application.
  • FIG. 3 is a working flow chart of determining a state of a process in a preferred embodiment of a method for automatically releasing a background process resource by a terminal provided by the present application.
  • FIG. 4 is a working flow chart of determining a running state in a preferred embodiment of a method for automatically releasing a background process resource by a terminal provided by the present application.
  • FIG. 5 is a flowchart of a method for determining that a running state is maintained during a preferred embodiment of a method for automatically releasing a background process by a terminal provided by the present application.
  • FIG. 6 is a functional block diagram of a terminal provided by the present application.
  • FIG. 7 is a schematic structural diagram of an embodiment of a terminal provided by the present application.
  • FIG. 1 is a method for automatically releasing a background process by the terminal according to the present application.
  • Step S100 The terminal detects that the process is transferred to the background, and determines whether the process is in a buffer state. If yes, the system hardware resources occupied by the process are automatically released. If not, step S200 is performed.
  • Step S200 determining whether the process is in an operating state, if yes, executing step S300, and if not, maintaining the original state.
  • Step S300 Determine whether the running state maintains the preset threshold of the inter-time threshold, and if yes, automatically release the system hardware resources occupied by the process, and if not, maintain the original state.
  • the process includes: wake-up lock, Bluetooth, GPS monitoring, WiFi.
  • the service B (B service) is a process state in Android, the process state has no foreground interface, and the service in the process is not associated with any foreground interface, and the buffer state (Cache). It is also a process state in Android, which has neither a front-end interface nor any service.
  • the process of the service B (B service) and the buffer state (Cache) it automatically releases the system hardware resources occupied by the process, such as the occupied GPS monitor, wake lock, etc., to achieve the terminal (such as Mobile phones, tablets, etc.) are more energy efficient.
  • step S100 first, to confirm the status of the process before step S100, when the terminal detects that the process is transferred to the background, confirms the status of the current process, and then determines whether the process is in a buffer state, and if so, The system hardware resources occupied by the process are automatically released. If not, the next step S20 0 is performed.
  • the next step S200 is used to determine whether the current state of the process is suitable for automatically releasing the system hardware resources occupied by the system, that is, whether the process is in the running state, and if so, executing the next step S300, if No, it remains in its original state.
  • Step S300 is used to determine whether the running state maintains the preset threshold of the inter-time threshold, and if so, automatically release the system hardware resources occupied by the process, and if not, maintain the original state.
  • FIG. 2 is an automatic terminal according to the present application.
  • a method for logically judging a preferred embodiment of the method for releasing resources occupied by a background process When the terminal detects that the process is transferred to the background, it determines whether the process is in a buffer state, and if so, automatically releases the system hardware resources occupied by the process, and if the process is not in the buffer state, further determines the process. Whether it is in the running state, if it is not in the running state, it can be maintained in the original state.
  • the running state it is further determined whether the running state has reached the preset threshold of the inter-turn threshold, if the preset is not reached. If the upper threshold is reached, the original state is maintained. If the preset threshold is reached, the system hardware resources occupied by the process are automatically released.
  • the step S100 specifically includes:
  • the terminal detects that the process is transferred to the background, and determines that the process is in a buffer state, and then closes all or part of the hardware resource monitoring registered by the process.
  • S102 The terminal detects that the process is transferred to the background, determines that the process is not in the buffer state, and jumps to the next execution step.
  • the terminal first confirms the process status, and when it is detected that the process is transferred to the background, the terminal determines whether the process is in the buffer state, and then shuts down all or part of the hardware resource monitoring registered by the process. If it is determined that the process is not in the buffer state, the process jumps to the next execution step S200.
  • step S200 specifically includes:
  • Step S201 Determine that the process is in an running state, and jump to the next execution step.
  • Step S202 Determine that the process is not in the running state, and maintain the original state.
  • the terminal first confirms the process status, and when it is detected that the process is transferred to the background, the terminal determines whether the process is not in the buffer state, and then continues to determine the location. Whether the process is in the running state, if it is not in the running state, it will not be processed, and the original state will be maintained. If it is in the running state, it is necessary to further judge the length of the running state that has been maintained. [0084] In a further embodiment, as shown in FIG. 5, the step S300 specifically includes:
  • Step S301 It is determined that the operating state maintenance period has reached the upper limit of the preset threshold, and the system hardware resources occupied by the process are automatically released.
  • Step S302 Determine that the running state does not reach the upper limit of the preset threshold, and maintain the original state.
  • the automatic release is automatically performed.
  • the system hardware resources occupied by the process are maintained in the original state if the running state does not reach the upper limit of the preset threshold.
  • the upper threshold of the inter-turn threshold may be manually set or automatically set, and the upper limit of the inter-turn threshold is 10 to 60 minutes. Preferably, the upper threshold of the inter-turn threshold is 30 minutes.
  • the present application further provides a terminal.
  • the terminal includes: a processor (pr OCeSSOr ) 10, a memory 20, a communication interface 30, and a communication bus 40;
  • the processor 10, the memory 20, and the communication interface 30 complete communication with each other through the communication bus 40.
  • the communication interface 30 is used for information transmission between communication devices of the terminal;
  • the processor 10 is configured to invoke a computer program in the memory 20 to perform the method provided by the foregoing method embodiments.
  • the method includes: A.
  • the terminal detects that the process is transferred to the background, and determines the location. Whether the process is in a buffer state, and if so, the system hardware resources occupied by the process are automatically released. If not, step B is performed; B. determining whether the process is in a running state, and if yes, executing step C, if not, And maintaining the original state; C. determining whether the running state maintains the preset threshold of the inter-time threshold, and if so, automatically releasing the system hardware resources occupied by the process, and if not, maintaining the original state
  • the present application further provides a storage medium, wherein the storage medium stores a computer program, and the computer program can be executed to implement a method for the terminal to automatically release resources occupied by a background process.
  • FIG. 7 is a block diagram showing a specific structure of a terminal provided by an embodiment of the present application.
  • the terminal may be used to implement a method for automatically releasing a resource occupied by a background process by a terminal provided in the foregoing embodiment.
  • the terminal 1200 can be a smartphone or a tablet.
  • the terminal 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one shown) computer readable storage medium, an input unit 130, The display unit 140, the sensor 150, the audio circuit 160, the transmission module 170, and the processor 180 including the processing core of one or more (only one shown in the figure) and the power supply 190 and the like.
  • RF Radio Frequency
  • the RF circuit 110 is for receiving and transmitting electromagnetic waves, and mutually converting electromagnetic waves and electrical signals to communicate with a communication network or other devices.
  • the RF circuit 110 can include various existing circuit components for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, a memory, and the like.
  • SIM Subscriber Identity Module
  • the RF circuit 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices over a wireless network.
  • the wireless network described above may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the above wireless network can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), and wideband code. Divisional Multiple Access Technology (Wideband Code Division)
  • WCDMA Code Division Access
  • CDMA Code Division Multiple Access
  • Time Division Multiple Access Time Division Multiple Access
  • TDMA Time Division Multiple Access
  • Wi-Fi Wireless Fidelity
  • Wi-Max Wireless Fidelity
  • I-I instant messaging and short messages
  • I-I instant messaging and short messages
  • the memory 120 can be used to store software programs and modules, such as the program instructions/modules corresponding to the method for automatically releasing the background process resources by the terminal in the above embodiment, and the processor 180 runs the software program and the module stored in the memory 120. In order to perform various function applications and data processing, that is, the terminal automatically releases the resources occupied by the background process.
  • the memory 120 can include a high speed random access memory, and can also include Non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 120 can further include memory remotely located relative to processor 180, which can be connected to terminal 1200 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input unit 130 can be configured to receive input numeric or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
  • input unit 130 can include touch-sensitive surface 131 as well as other input devices 132.
  • Touch-sensitive surface 131 also referred to as a touch display or trackpad, can collect touch operations on or near the user (eg, the user uses a finger, stylus, etc., on any touch-sensitive surface 131 or on the touch-sensitive surface 131 The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information
  • the processor 180 is provided and can receive commands from the processor 180 and execute them.
  • the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 130 can also include other input devices 132.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, key presses, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal 1200, which can be composed of graphics, text, icons, video, and any combination thereof.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of an LCD (Liq uid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141.
  • touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
  • Terminal 1200 can also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may move to the ear ⁇ at the terminal 1200, and close the display panel 141 and / or backlight.
  • the gravity acceleration sensor can detect the acceleration in all directions (usually three axes), and the static ⁇ can detect the magnitude and direction of gravity, which can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal 1200 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, not here Let me repeat.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the terminal 1200.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, and the audio circuit 160 After receiving, it is converted into audio data, and then processed by the audio data output processor 18, sent to the other terminal via the RF circuit 110, or outputted to the memory 1 20 for further processing.
  • the audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 1200.
  • the terminal 1200 can help the user to send and receive emails, browse web pages, access streaming media, etc. through the transmission module 170 (for example, a Wi-Fi module), which provides wireless broadband Internet access for users.
  • the transmission module 170 for example, a Wi-Fi module
  • FIG. 7 shows the transmission module 170, it will be understood that it does not belong to the essential configuration of the terminal 1200, and may be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 180 is a control center of the terminal 1200 that connects various parts of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and by calling them stored in the memory 120.
  • the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, and For applications, etc., the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • Terminal 1200 also includes a power source 190 (such as a battery) that powers various components, in some embodiments, The power supply can be logically coupled to the processor 180 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal 1200 may further include a camera (such as a front camera, a rear camera), a Bluetooth module, and the like, and details are not described herein.
  • the display unit of the terminal is a touch screen display
  • the terminal further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be processed by one or more The execution of one or more programs includes instructions for performing the following operations:
  • the terminal detects that the process is transferred to the background, and determines whether the process is in a buffer state. If yes, the system hardware resources occupied by the process are automatically released.
  • the terminal where the terminal detects that the process is transferred to the background, determines whether the process is in a buffer state, and if yes, automatically releases the system hardware resources occupied by the process, specifically including
  • the terminal detects that the process is transferred to the background, and determines that the process is in a buffer state, and then shuts down all or part of the hardware resource monitoring registered by the process;
  • the terminal detects that the process is transferred to the background, determines that the process is not in the buffer state, and jumps to a step of performing the determining whether the process is in an operating state.
  • the terminal where the process includes: wake-up lock, Bluetooth, GPS monitoring, WiFi.
  • the terminal where the determining whether the process is in an operating state, and if not, maintaining the original state, specifically includes:
  • the terminal wherein the determining whether the running state maintains a preset time threshold has been reached If yes, the system hardware resources occupied by the process are automatically released, and if not, the step of maintaining the original state includes:
  • a terminal automatically releases a method, a storage medium, and a terminal for occupying resources by a background process
  • the method includes: the terminal detects that the process is transferred to the background, and determines whether the process is buffered. Status, if yes, automatically release the system hardware resources occupied by the process, if not, execute step B; B, determine whether the process is in the running state, and if yes, execute step C, if not, maintain the original state; C. Determine whether the running state maintains the preset threshold of the inter-time threshold, and if yes, automatically release the system hardware resources occupied by the process, and if not, maintain the original state.
  • the terminal automatically releases the system hardware resources occupied by the background process to save power.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请提供终端自动释放后台进程占用资源的方法,检测到进程被转入后台,判断进程是否处于缓冲状态,若是,自动释放进程占用的系统硬件资源,若否,判断进程是否处于运行状态,若否,则维持原状态;若是,则判断运行状态维持时间是否已达到预设时间阈值上限,若是,则自动释放进程占用的系统硬件资源,若否,则维持原状态。

Description

终端自动释放后台进程占用资源的方法、 存储介质及终端
[0001] 本申请要求于 2017年 8月 16日提交中国专利局、 申请号为 201710700687.3、 发明 名称为"终端自动释放后台进程占用资源的方法、 存储介质及终端"的中国专利申 请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
[0002] 本申请涉及终端进程技术领域, 尤其涉及的是一种终端自动释放后台进程占用 资源的方法、 存储介质及终端。
背景技术
[0003] 生产生活中, 人们在使用终端 (如手机、 平板电脑) 过程中会发现有很多未正 在使用的应用耗电量很高。 由于终端的当前系统对应用后台进程的处理是按照 系统设定规则调整进程等级的, 以安卓 (Android) 系统为例, 其按照后台进程 状态把后台进程分为: 主应用 (home app) , 服务 A (A service) , 服务 B (B service) , 高速缓冲 (Cache) 进程等几种状态, 因此需要考虑到进程各种状态 下的耗电情况。 虽然系统会按照这些进程所处的不同状态调整进程的 CPU占用, 但是其无法同吋把这些进程所占用的一些硬件资源释放, 例如, 服务 B (B service) , 高速缓冲 (Cache) 进程所占用的系统硬件资源常常是终端中比较耗 电的项目, 因此仍可能会导致整个系统的耗电很高。
[0004] 因此, 现有技术有待于进一步的改进。
[0005] 发明内容
[0006] 本申请实施例提供一种终端自动释放后台进程占用资源的方法、 存储介质及终 端, 能够使终端通过判断自动释放后台进程所占用的系统硬件资源, 以达到节 省电量的目的。
[0007] 第一方面, 本申请实施例提供一种终端自动释放后台进程占用资源的方法, 其 中, 所述方法包括步骤:
[0008] 终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若是, 则自 动释放所述进程占用的系统硬件资源;
[0009] 若否, 则判断所述进程是否处于运行状态, 若否, 则维持原状态;
[0010] 若是, 则判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则 自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。
[0011] 所述终端自动释放后台进程占用资源的方法, 其中, 所述终端检测到进程被转 入后台吋, 判断所述进程是否处于缓冲状态, 若是, 则自动释放所述进程占用 的系统硬件资源的步骤, 具体包括:
[0012] 所述终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则关闭所述 进程注册的全部或部分硬件资源监听;
[0013] 终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转至执行所 述判断所述进程是否处于运行状态的步骤。
[0014] 所述终端自动释放后台进程占用资源的方法, 其中, 所述进程包括:
[0015] 唤醒锁、 蓝牙、 GPS监听、 WiFi。
[0016] 所述终端自动释放后台进程占用资源的方法, 其中, 所述判断所述进程是否处 于运行状态, 若否, 则维持原状态的步骤, 具体包括:
[0017] 判断出所述进程处于运行状态, 跳转至执行所述判断所述运行状态维持吋间是 否已达到预设吋间阈值上限的步骤;
[0018] 判断出所述进程未处于运行状态, 则维持原状态。
[0019] 所述终端自动释放后台进程占用资源的方法, 其中, 所述判断所述运行状态维 持吋间是否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的系统 硬件资源, 若否, 则维持原状态的步骤, 具体包括:
[0020] 判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放所述进程占 用的系统硬件资源;
[0021] 判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状态。
[0022] 所述终端自动释放后台进程占用资源的方法, 其中, 所述吋间阈值上限可手动 设置或自动设置。
[0023] 所述终端自动释放后台进程占用资源的方法, 其中, 所述吋间阈值上限为 10~6 0分钟。 [0024] 第二方面, 本申请实施例提供一种存储介质, 其中, 所述存储介质存储有计算 机程序, 所述计算机程序能够被执行以实现如下步骤:
[0025] 终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若是, 则自 动释放所述进程占用的系统硬件资源;
[0026] 若否, 则判断所述进程是否处于运行状态, 若否, 则维持原状态;
[0027] 若是, 则判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则 自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。
[0028] 所述存储介质, 其中, 所述终端检测到进程被转入后台吋, 判断所述进程是否 处于缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源的步骤, 具体 包括:
[0029] 所述终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则关闭所述 进程注册的全部或部分硬件资源监听;
[0030] 终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转至执行所 述判断所述进程是否处于运行状态的步骤。
[0031] 所述存储介质, 其中, 所述进程包括: 唤醒锁、 蓝牙、 GPS监听、 WiFi。
[0032] 所述存储介质, 其中, 所述判断所述进程是否处于运行状态, 若否, 则维持原 状态的步骤, 具体包括:
[0033] 判断出所述进程处于运行状态, 跳转至执行所述判断所述运行状态维持吋间是 否已达到预设吋间阈值上限的步骤;
[0034] 判断出所述进程未处于运行状态, 则维持原状态。
[0035] 所述存储介质, 其中, 所述判断所述运行状态维持吋间是否已达到预设吋间阈 值上限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状 态的步骤, 具体包括:
[0036] 判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放所述进程占 用的系统硬件资源;
[0037] 判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状态。
[0038] 所述存储介质, 其中, 所述吋间阈值上限可手动设置或自动设置。
[0039] 所述存储介质, 其中, 所述吋间阈值上限为 10~60分钟。 [0040] 第三方面, 本申请实施例提供一种终端, 其中, 包括: 处理器、 与处理器通信 连接的存储器, 所述存储器存储有计算机程序, 所述处理器用于调用所述存储 器中的计算机程序, 以实现如下步骤:
[0041] 终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若是, 则自 动释放所述进程占用的系统硬件资源;
[0042] 若否, 则判断所述进程是否处于运行状态, 若否, 则维持原状态;
[0043] 若是, 则判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则 自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。
[0044] 所述终端, 其中, 所述终端检测到进程被转入后台吋, 判断所述进程是否处于 缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源的步骤, 具体包括
[0045] 所述终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则关闭所述 进程注册的全部或部分硬件资源监听;
[0046] 终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转至执行所 述判断所述进程是否处于运行状态的步骤。
[0047] 所述终端, 其中, 所述进程包括: 唤醒锁、 蓝牙、 GPS监听、 WiFi。
[0048] 所述终端, 其中, 所述判断所述进程是否处于运行状态, 若否, 则维持原状态 的步骤, 具体包括:
[0049] 判断出所述进程处于运行状态, 跳转至执行所述判断所述运行状态维持吋间是 否已达到预设吋间阈值上限的步骤;
[0050] 判断出所述进程未处于运行状态, 则维持原状态。
[0051] 所述终端, 其中, 所述判断所述运行状态维持吋间是否已达到预设吋间阈值上 限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态的 步骤, 具体包括:
[0052] 判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放所述进程占 用的系统硬件资源;
[0053] 判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状态。
[0054] 所述终端, 其中, 所述吋间阈值上限可手动设置或自动设置。 [0055] 有益效果: 本申请所提供的一种终端自动释放后台进程占用资源的方法、 存储 介质及终端, 所述方法包括: A、 终端检测到进程被转入后台吋, 判断所述进程 是否处于缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则执行步骤 B ; B、 判断所述进程是否处于运行状态, 若是, 则执行步骤 C, 若 否, 则维持原状态; C、 判断所述运行状态维持吋间是否已达到预设吋间阈值上 限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。 本申请通过在终端检测到进程被转入后台并判断出所述进程符合条件吋, 则自 动释放后台进程所占用的系统硬件资源, 以达到节省电量的目的。
对附图的简要说明
附图说明
[0056] 图 1是本申请提供的终端自动释放后台进程占用资源的方法较佳实施例的流程 图。
[0057] 图 2是本申请提供的终端自动释放后台进程占用资源的方法较佳实施例中的逻 辑判断流程图。
[0058] 图 3是本申请提供的终端自动释放后台进程占用资源的方法较佳实施例中判断 进程状态的工作流程图。
[0059] 图 4是本申请提供的终端自动释放后台进程占用资源的方法较佳实施例中判断 运行状态的工作流程图。
[0060] 图 5是本申请提供的终端自动释放后台进程占用资源的方法较佳实施例中判断 运行状态维持吋间的工作流程图。
[0061] 图 6是本申请提供的终端的功能原理框图。
[0062] 图 7是本申请提供的终端的实施例的具体结构示意图。
[0063] t m^
[0064] 为使本申请的目的、 技术方案及优点更加清楚、 明确, 以下参照附图并举实施 例对本申请进一步详细说明。 应当理解, 此处所描述的具体实施例仅仅用于解 释本申请, 并不用于限定本申请。
[0065] 请参见图 1, 图 1为本申请提供的所述终端自动释放后台进程占用资源的方法较 佳实施例的流程图。 如图 1所示, 所述方法包括步骤:
[0066] 步骤 S100、 终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则执行步骤 S200。
[0067] 步骤 S200、 判断所述进程是否处于运行状态, 若是, 则执行步骤 S300, 若否, 则维持原状态。
[0068] 步骤 S300、 判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。
[0069] 所述进程包括: 唤醒锁、 蓝牙、 GPS监听、 WiFi。
[0070] 需要说明的是, 服务 B (B service) 是安卓中的一种进程状态, 所述进程状态 没有前台界面, 进程中的服务也未与任何前台界面相关联, 缓冲状态 (Cache) , 也是安卓中的一种进程状态, 所述进程状态既没有前台界面, 也没有任何服 务。 通过对服务 B (B service) 和缓冲状态 (Cache) 的进程进行判断, 使其自动 释放所述进程所占用的系统硬件资源, 比如所占用的 GPS监听、 唤醒锁等, 能够 达到使终端 (如手机、 平板电脑等) 更省电的目的。
[0071] 具体实施吋, 首先, 要在步骤 S100之前确认进程的状态, 当终端检测到进程被 转入后台吋, 确认了当前进程的状态, 然后判断所述进程是否处于缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则执行下一个步骤 S20 0。 此吋所述的下一个步骤 S200用于判断当前进程所处的状态是否适合自动释放 其所占用的系统硬件资源, 即判断所述进程是否处于运行状态, 若是, 则执行 下一个步骤 S300, 若否, 则维持原状态。 也就是说, 若当前进程未处于运行状 态, 则只需维持原状即可, 若当前处于运行状态, 则执行下一个步骤 S300。 步 骤 S300用于判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。
[0072] 可见, 当终端检测到进程被转入后台并处于缓冲状态且符合运行状态维持吋间 的阈值上限吋, 就自动释放进程所占用的系统硬件资源, 这样就节约了系统硬 件资源同吋也节省了电量。
[0073] 进一步地, 为了更清楚的理解本申请的所述自动释放后台进程占用资源的方法 , 以下用逻辑流程图作进一步的解释。 如图 2所示, 图 2是本申请所述终端自动 释放后台进程占用资源的方法较佳实施例中的逻辑判断流程图。 当终端检测到 进程被转入后台吋, 判断所述进程是否处于缓冲状态, 如果是, 则自动释放所 述进程占用的系统硬件资源, 如果所述进程未处于缓冲状态, 则进一步判断所 述进程是否处于运行状态, 如果未处于运行状态, 则维持原状态即可, 如果处 于运行状态, 则进一步判断所述运行状态维持吋间是否已达到预设的吋间阈值 上限, 如果没有达到预设的吋间阈值上限, 则维持原状态, 如果已达到预设的 吋间阈值上限, 则自动释放所述进程占用的系统硬件资源。
[0074] 可见, 本申请所依据的进程若处于缓冲状态或低等级状态吋, 可对其进程所占 用的硬件资源进行限制, 因此, 所有涉及到嵌入式的系统均可以采用本申请的 方法, 只需要增加条件设置, 即本申请所述的自动释放后台进程占用的系统硬 件资源的方法, 具有很好的通用性。
[0075] 进一步地, 如图 3所示, 所述步骤 S100具体包括:
[0076] S101、 终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则关闭所 述进程注册的全部或部分硬件资源监听。
[0077] S102、 终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转至 下一个执行步骤。
[0078] 具体实施吋, 终端首先确认进程状态, 当检测到进程被转入后台, 则进行判断 , 若判断出所述进程处于缓冲状态, 则关闭所述进程注册的全部或部分硬件资 源监听, 若判断出所述进程未处于缓冲状态, 则跳转至下一个执行步骤 S200。
[0079] 可见, 通过判断进程是否处于缓冲状态, 进而关闭所述进程注册的全部或部分 硬件资源监听, 能够达到节省硬件资源和省电的目的。
[0080] 进一步地, 如图 4所示, 所述步骤 S200具体包括:
[0081] 步骤 S201、 判断出所述进程处于运行状态, 跳转至下一个执行步骤。
[0082] 步骤 S202、 判断出所述进程未处于运行状态, 则维持原状态。
[0083] 具体实施吋, 本申请的较佳实施例中, 终端首先确认进程状态, 当检测到进程 被转入后台, 则进行判断, 若判断出所述进程未处于缓冲状态, 则继续判断所 述进程是否处于运行状态, 如果未处于运行状态, 则不作处理, 维持原状态, 如果处于运行状态, 则需要进一步判断运行状态已维持的吋长。 [0084] 进一步的实施例, 如图 5所示, 所述步骤 S300具体包括:
[0085] 步骤 S301、 判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放 所述进程占用的系统硬件资源;
[0086] 步骤 S302、 判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状 态。
[0087] 具体实施吋, 当判断出所述进程处于运行状态吋, 则进一步判断运行状态已维 持的吋长, 如果所述运行状态维持吋间已达到预设吋间阈值上限, 则自动释放 所述进程占用的系统硬件资源, 如果所述运行状态维持吋间未达到预设吋间阈 值上限, 维持原状态。 其中, 所述吋间阈值上限可手动设置或自动设置, 所述 吋间阈值上限为 10~60分钟, 优选地, 所述吋间阈值上限为 30分钟。
[0088] 本申请还提供了一种终端, 如图 6所示, 所述终端包括: 处理器 (prOCeSSOr)10、 存储器 (memory)20、 通信接口(Communications Interface)30和通信总线 40; 其中
[0089] 所述处理器 10、 存储器 20、 通信接口 30通过所述通信总线 40完成相互间的通信
[0090] 所述通信接口 30用于所述终端的通信设备之间的信息传输;
[0091] 所述处理器 10用于调用所述存储器 20中的计算机程序, 以执行上述各方法实施 例所提供的方法, 例如, 包括: A、 终端检测到进程被转入后台吋, 判断所述进 程是否处于缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源, 若否 , 则执行步骤 B ; B、 判断所述进程是否处于运行状态, 若是, 则执行步骤 C, 若否, 则维持原状态; C、 判断所述运行状态维持吋间是否已达到预设吋间阈值 上限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态
[0092] 本申请还提供一种存储介质, 其中, 所述存储介质存储有计算机程序, 所述计 算机程序能够被执行以实现所述终端自动释放后台进程占用资源的方法。
[0093] 图 7示出了本申请实施例提供的终端的具体结构框图, 该终端可以用于实施上 述实施例中提供的终端自动释放后台进程占用资源的方法。 该终端 1200可以为 智能手机或平板电脑。 [0094] 如图 7所示, 终端 1200可以包括 RF (Radio Frequency , 射频) 电路 110、 包括有 一个或一个以上 (图中仅示出一个) 计算机可读存储介质的存储器 120、 输入单 元 130、 显示单元 140、 传感器 150、 音频电路 160、 传输模块 170、 包括有一个或 者一个以上 (图中仅示出一个) 处理核心的处理器 180以及电源 190等部件。 本 领域技术人员可以理解, 图 7中示出的终端 1200结构并不构成对终端 1200的限定
, 可以包括比图示更多或更少的部件, 或者组合某些部件, 或者不同的部件布 置。 其中:
[0095] RF电路 110用于接收以及发送电磁波, 实现电磁波与电信号的相互转换, 从而 与通讯网络或者其他设备进行通讯。 RF电路 110可包括各种现有的用于执行这些 功能的电路元件, 例如, 天线、 射频收发器、 数字信号处理器、 加密 /解密芯片 、 用户身份模块 (SIM) 卡、 存储器等等。 RF电路 110可与各种网络如互联网、 企业内部网、 无线网络进行通讯或者通过无线网络与其他设备进行通讯。 上述 的无线网络可包括蜂窝式电话网、 无线局域网或者城域网。 上述的无线网络可 以使用各种通信标准、 协议及技术, 包括但并不限于全球移动通信系统 (Global System for Mobile Communication, GSM) 、 增强型移动通信技术 (Enhanced Data GSM Environment, EDGE), 宽带码分多址技术 (Wideband Code Division
Multiple Access, WCDMA) , 码分多址技术 (Code Division Access, CDMA) 、 曰寸分多址技术 (Time Division Multiple Access,
TDMA) , 无线保真技术 (Wireless Fidelity , Wi-Fi) (如美国电气和电子工程 师协会标准 IEEE 802.11a, IEEE 802.11b, IEEE802.11g和 /或 IEEE 802.11η) 、 网络电话 (Voice over Internet Protocol, VoIP) 、 全球微波互联接入 (Worldwide Interoperability for Microwave Access , Wi-Max) 、 其他用于由 I 牛、 即日寸通讯及 短消息的协议, 以及任何其他合适的通讯协议, 甚至可包括那些当前仍未被幵 发出来的协议。
[0096] 存储器 120可用于存储软件程序以及模块, 如上述实施例中终端自动释放后台 进程占用资源的方法对应的程序指令 /模块, 处理器 180通过运行存储在存储器 12 0内的软件程序以及模块, 从而执行各种功能应用以及数据处理, 即实现终端自 动释放后台进程占用资源的功能。 存储器 120可包括高速随机存储器, 还可包括 非易失性存储器, 如一个或者多个磁性存储装置、 闪存、 或者其他非易失性固 态存储器。 在一些实例中, 存储器 120可进一步包括相对于处理器 180远程设置 的存储器, 这些远程存储器可以通过网络连接至终端 1200。 上述网络的实例包 括但不限于互联网、 企业内部网、 局域网、 移动通信网及其组合。
[0097] 输入单元 130可用于接收输入的数字或字符信息, 以及产生与用户设置以及功 能控制有关的键盘、 鼠标、 操作杆、 光学或者轨迹球信号输入。 具体地, 输入 单元 130可包括触敏表面 131以及其他输入设备 132。 触敏表面 131, 也称为触摸 显示屏或者触控板, 可收集用户在其上或附近的触摸操作 (比如用户使用手指 、 触笔等任何适合的物体或附件在触敏表面 131上或在触敏表面 131附近的操作 ) , 并根据预先设定的程式驱动相应的连接装置。 可选的, 触敏表面 131可包括 触摸检测装置和触摸控制器两个部分。 其中, 触摸检测装置检测用户的触摸方 位, 并检测触摸操作带来的信号, 将信号传送给触摸控制器; 触摸控制器从触 摸检测装置上接收触摸信息, 并将它转换成触点坐标, 再送给处理器 180, 并能 接收处理器 180发来的命令并加以执行。 此外, 可以采用电阻式、 电容式、 红外 线以及表面声波等多种类型实现触敏表面 131。 除了触敏表面 131, 输入单元 130 还可以包括其他输入设备 132。 具体地, 其他输入设备 132可以包括但不限于物 理键盘、 功能键 (比如音量控制按键、 幵关按键等) 、 轨迹球、 鼠标、 操作杆 等中的一种或多种。
[0098] 显示单元 140可用于显示由用户输入的信息或提供给用户的信息以及终端 1200 的各种图形用户接口, 这些图形用户接口可以由图形、 文本、 图标、 视频和其 任意组合来构成。 显示单元 140可包括显示面板 141, 可选的, 可以采用 LCD(Liq uid Crystal Display, 液晶显示器)、 OLED(Organic Light-Emitting Diode,有机发光 二极管)等形式来配置显示面板 141。 进一步的, 触敏表面 131可覆盖显示面板 141 , 当触敏表面 131检测到在其上或附近的触摸操作后, 传送给处理器 180以确定 触摸事件的类型, 随后处理器 180根据触摸事件的类型在显示面板 141上提供相 应的视觉输出。 虽然在图 7中, 触敏表面 131与显示面板 141是作为两个独立的部 件来实现输入和输出功能, 但是在某些实施例中, 可以将触敏表面 131与显示面 板 141集成而实现输入和输出功能。 [0099] 终端 1200还可包括至少一种传感器 150, 比如光传感器、 运动传感器以及其他 传感器。 具体地, 光传感器可包括环境光传感器及接近传感器, 其中, 环境光 传感器可根据环境光线的明暗来调节显示面板 141的亮度, 接近传感器可在终端 1200移动到耳边吋, 关闭显示面板 141和 /或背光。 作为运动传感器的一种, 重力 加速度传感器可检测各个方向上 (一般为三轴) 加速度的大小, 静止吋可检测 出重力的大小及方向, 可用于识别手机姿态的应用 (比如横竖屏切换、 相关游 戏、 磁力计姿态校准) 、 振动识别相关功能 (比如计步器、 敲击) 等; 至于终端 1200还可配置的陀螺仪、 气压计、 湿度计、 温度计、 红外线传感器等 其他传感器, 在此不再赘述。
[0100] 音频电路 160、 扬声器 161, 传声器 162可提供用户与终端 1200之间的音频接口 。 音频电路 160可将接收到的音频数据转换后的电信号, 传输到扬声器 161, 由 扬声器 161转换为声音信号输出; 另一方面, 传声器 162将收集的声音信号转换 为电信号, 由音频电路 160接收后转换为音频数据, 再将音频数据输出处理器 18 0处理后, 经 RF电路 110以发送给比如另一终端, 或者将音频数据输出至存储器 1 20以便进一步处理。 音频电路 160还可能包括耳塞插孔, 以提供外设耳机与终端 1200的通信。
[0101] 终端 1200通过传输模块 170 (例如 Wi-Fi模块) 可以帮助用户收发电子邮件、 浏 览网页和访问流式媒体等, 它为用户提供了无线的宽带互联网访问。 虽然图 7示 出了传输模块 170, 但是可以理解的是, 其并不属于终端 1200的必须构成, 完全 可以根据需要在不改变发明的本质的范围内而省略。
[0102] 处理器 180是终端 1200的控制中心, 利用各种接口和线路连接整个手机的各个 部分, 通过运行或执行存储在存储器 120内的软件程序和 /或模块, 以及调用存储 在存储器 120内的数据, 执行终端 1200的各种功能和处理数据, 从而对手机进行 整体监控。 可选的, 处理器 180可包括一个或多个处理核心; 在一些实施例中, 处理器 180可集成应用处理器和调制解调处理器, 其中, 应用处理器主要处理操 作系统、 用户界面和应用程序等, 调制解调处理器主要处理无线通信。 可以理 解的是, 上述调制解调处理器也可以不集成到处理器 180中。
[0103] 终端 1200还包括给各个部件供电的电源 190 (比如电池) , 在一些实施例中, 电源可以通过电源管理系统与处理器 180逻辑相连, 从而通过电源管理系统实现 管理充电、 放电、 以及功耗管理等功能。 电源 190还可以包括一个或一个以上的 直流或交流电源、 再充电系统、 电源故障检测电路、 电源转换器或者逆变器、 电源状态指示器等任意组件。
[0104] 尽管未示出, 终端 1200还可以包括摄像头 (如前置摄像头、 后置摄像头) 、 蓝 牙模块等, 在此不再赘述。 具体在本实施例中, 终端的显示单元是触摸屏显示 器, 终端还包括有存储器, 以及一个或者一个以上的程序, 其中一个或者一个 以上程序存储于存储器中, 且经配置以由一个或者一个以上处理器执行述一个 或者一个以上程序包含用于进行以下操作的指令:
[0105] 终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若是, 则自 动释放所述进程占用的系统硬件资源;
[0106] 若否, 则判断所述进程是否处于运行状态, 若否, 则维持原状态;
[0107] 若是, 则判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则 自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。
[0108] 所述终端, 其中, 所述终端检测到进程被转入后台吋, 判断所述进程是否处于 缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源的步骤, 具体包括
[0109] 所述终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则关闭所述 进程注册的全部或部分硬件资源监听;
[0110] 终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转至执行所 述判断所述进程是否处于运行状态的步骤。
[0111] 所述终端, 其中, 所述进程包括: 唤醒锁、 蓝牙、 GPS监听、 WiFi。
[0112] 所述终端, 其中, 所述判断所述进程是否处于运行状态, 若否, 则维持原状态 的步骤, 具体包括:
[0113] 判断出所述进程处于运行状态, 跳转至执行所述判断所述运行状态维持吋间是 否已达到预设吋间阈值上限的步骤;
[0114] 判断出所述进程未处于运行状态, 则维持原状态。
[0115] 所述终端, 其中, 所述判断所述运行状态维持吋间是否已达到预设吋间阈值上 限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态的 步骤, 具体包括:
[0116] 判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放所述进程占 用的系统硬件资源;
[0117] 判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状态。
[0118] 所述终端, 其中, 所述吋间阈值上限可手动设置或自动设置。
[0119] 综上所述, 本申请所提供的一种终端自动释放后台进程占用资源的方法、 存储 介质及终端, 方法包括: 终端检测到进程被转入后台吋, 判断所述进程是否处 于缓冲状态, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则执行 步骤 B ; B、 判断所述进程是否处于运行状态, 若是, 则执行步骤 C, 若否, 则 维持原状态; C、 判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若 是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态。 本申请 通过在终端检测到进程被转入后台并判断出所述进程符合条件吋, 则自动释放 后台进程所占用的系统硬件资源, 以达到节省电量的目的。
[0120] 当然, 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程 , 是可以通过计算机程序来指令相关硬件 (如处理器, 控制器等) 来完成, 所 述的程序可存储于一计算机可读取的存储介质中, 该程序在执行吋可包括如上 述各方法实施例的流程。 其中所述的存储介质可为存储器、 磁碟、 光盘等。
[0121] 可以理解的是, 对本领域普通技术人员来说, 可以根据本申请的技术方案及其 发明构思加以等同替换或改变, 而所有这些改变或替换都应属于本申请所附的 权利要求的保护范围。

Claims

权利要求书
[权利要求 1] 一种终端自动释放后台进程占用资源的方法, 其中, 所述方法包括步 骤:
终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若 是, 则自动释放所述进程占用的系统硬件资源; 若否, 则判断所述进程是否处于运行状态, 若否, 则维持原状态; 若是, 则判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状 态。
[权利要求 2] 根据权利要求 1所述终端自动释放后台进程占用资源的方法, 其中, 所述终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态 , 若是, 则自动释放所述进程占用的系统硬件资源的步骤, 具体包括 所述终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则 关闭所述进程注册的全部或部分硬件资源监听; 所述终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转至执行所述判断所述进程是否处于运行状态的步骤。
[权利要求 3] 根据权利要求 2所述终端自动释放后台进程占用资源的方法, 其中, 所述进程包括:
唤醒锁、 蓝牙、 GPS监听、 WiFi。
[权利要求 4] 根据权利要求 1所述终端自动释放后台进程占用资源的方法, 其中, 所述判断所述进程是否处于运行状态, 若否, 则维持原状态的步骤, 具体包括:
判断出所述进程处于运行状态, 跳转至执行所述判断所述运行状态维 持吋间是否已达到预设吋间阈值上限的步骤;
判断出所述进程未处于运行状态, 则维持原状态。
[权利要求 5] 根据权利要求 1所述终端自动释放后台进程占用资源的方法, 其中, 所述判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是 , 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状态的 步骤, 具体包括:
判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放所 述进程占用的系统硬件资源;
判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状态 根据权利要求 5所述终端自动释放后台进程占用资源的方法, 其中, 所述吋间阈值上限可手动设置或自动设置。
根据权利要求 6所述终端自动释放后台进程占用资源的方法, 其中, 所述吋间阈值上限为 10~60分钟。
一种存储介质, 其中, 所述存储介质存储有计算机程序, 所述计算机 程序能够被执行以实现如下步骤:
终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若 是, 则自动释放所述进程占用的系统硬件资源;
若否, 则判断所述进程是否处于运行状态, 若否, 则维持原状态; 若是, 则判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状 态。
根据权利要求 8所述存储介质, 其中, 所述终端检测到进程被转入后 台吋, 判断所述进程是否处于缓冲状态, 若是, 则自动释放所述进程 占用的系统硬件资源的步骤, 具体包括:
所述终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则 关闭所述进程注册的全部或部分硬件资源监听;
终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转 至执行所述判断所述进程是否处于运行状态的步骤。
根据权利要求 9所述存储介质, 其中, 所述进程包括: 唤醒锁、 蓝牙 、 GPS监听、 WiFio
根据权利要求 8所述存储介质, 其中, 所述判断所述进程是否处于运 行状态, 若否, 则维持原状态的步骤, 具体包括:
判断出所述进程处于运行状态, 跳转至执行所述判断所述运行状态维 持吋间是否已达到预设吋间阈值上限的步骤;
判断出所述进程未处于运行状态, 则维持原状态。
根据权利要求 8所述存储介质, 其中, 所述判断所述运行状态维持吋 间是否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的 系统硬件资源, 若否, 则维持原状态的步骤, 具体包括:
判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放所 述进程占用的系统硬件资源;
判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状态 根据权利要求 12所述存储介质, 其中, 所述吋间阈值上限可手动设置 或自动设置。
根据权利要求 13所述存储介质, 其中, 所述吋间阈值上限为 10~60分 钟。
一种终端, 其中, 包括: 处理器、 与处理器通信连接的存储器, 所述 存储器存储有计算机程序, 所述处理器用于调用所述存储器中的计算 机程序, 以实现如下步骤:
终端检测到进程被转入后台吋, 判断所述进程是否处于缓冲状态, 若 是, 则自动释放所述进程占用的系统硬件资源;
若否, 则判断所述进程是否处于运行状态, 若否, 则维持原状态; 若是, 则判断所述运行状态维持吋间是否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的系统硬件资源, 若否, 则维持原状 态。
根据权利要求 15所述终端, 其中, 所述终端检测到进程被转入后台吋 , 判断所述进程是否处于缓冲状态, 若是, 则自动释放所述进程占用 的系统硬件资源的步骤, 具体包括:
所述终端检测到进程被转入后台, 判断出所述进程处于缓冲状态, 则 关闭所述进程注册的全部或部分硬件资源监听;
所述终端检测到进程被转入后台, 判断出所述进程未处于缓冲状态, 跳转至执行所述判断所述进程是否处于运行状态的步骤。
[权利要求 17] 根据权利要求 16所述终端, 其中, 所述进程包括: 唤醒锁、 蓝牙、 G
PS监听、 WiFi。
[权利要求 18] 根据权利要求 15所述终端, 其中, 所述判断所述进程是否处于运行状 态, 若否, 则维持原状态的步骤, 具体包括:
判断出所述进程处于运行状态, 跳转至执行所述判断所述运行状态维 持吋间是否已达到预设吋间阈值上限的步骤;
判断出所述进程未处于运行状态, 则维持原状态。
[权利要求 19] 根据权利要求 15所述终端, 其中, 所述判断所述运行状态维持吋间是 否已达到预设吋间阈值上限, 若是, 则自动释放所述进程占用的系统 硬件资源, 若否, 则维持原状态的步骤, 具体包括:
判断出所述运行状态维持吋间已达到预设吋间阈值上限, 自动释放所 述进程占用的系统硬件资源;
判断出所述运行状态维持吋间未达到预设吋间阈值上限, 维持原状态
[权利要求 20] 根据权利要求 19所述终端, 其中, 所述吋间阈值上限可手动设置或自 动设置。
PCT/CN2018/100809 2017-08-16 2018-08-16 终端自动释放后台进程占用资源的方法、存储介质及终端 Ceased WO2019034104A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18845751.9A EP3671451B1 (en) 2017-08-16 2018-08-16 Method of automatically releasing resource occupied by background process of terminal, storage medium and terminal
US16/639,572 US11138041B2 (en) 2017-08-16 2018-08-16 Method for automatically releasing resource occupied by process in background of terminal, storage medium and terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710700687.3 2017-08-16
CN201710700687.3A CN107544847A (zh) 2017-08-16 2017-08-16 终端自动释放后台进程占用资源的方法、存储介质及终端

Publications (1)

Publication Number Publication Date
WO2019034104A1 true WO2019034104A1 (zh) 2019-02-21

Family

ID=60970815

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/100809 Ceased WO2019034104A1 (zh) 2017-08-16 2018-08-16 终端自动释放后台进程占用资源的方法、存储介质及终端

Country Status (4)

Country Link
US (1) US11138041B2 (zh)
EP (1) EP3671451B1 (zh)
CN (1) CN107544847A (zh)
WO (1) WO2019034104A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727473A (zh) * 2019-10-10 2020-01-24 Oppo广东移动通信有限公司 资源控制方法及装置、系统、存储介质和电子设备
CN113434222A (zh) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 应用程序的控制方法、装置、存储介质及电子装置
US11138041B2 (en) 2017-08-16 2021-10-05 JRD Communication (Shenzhen) Ltd. Method for automatically releasing resource occupied by process in background of terminal, storage medium and terminal

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114860151B (zh) * 2021-02-05 2024-07-30 阿里巴巴集团控股有限公司 控制多缓存系统刷盘的方法以及装置
CN113747552B (zh) * 2021-06-18 2024-03-19 荣耀终端有限公司 一种功耗优化方法和电子设备
CN113469024B (zh) * 2021-06-29 2022-07-08 深圳市商汤科技有限公司 人脸考勤方法及装置、电子设备及计算机可读存储介质
US12488443B2 (en) * 2021-12-16 2025-12-02 Samsung Electronics Co., Ltd. Method and electronic device for enhancing image quality
CN116382876A (zh) * 2023-04-28 2023-07-04 维沃移动通信有限公司 任务管理方法、装置、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324500A (zh) * 2013-05-06 2013-09-25 广州市动景计算机科技有限公司 一种回收内存的方法及装置
CN104199731A (zh) * 2014-09-12 2014-12-10 北京奇虎科技有限公司 对应用程序的进程进行管理的方法及装置
WO2015131679A1 (zh) * 2014-08-28 2015-09-11 中兴通讯股份有限公司 任务进程的处理方法及装置
CN105468426A (zh) * 2016-01-05 2016-04-06 珠海市魅族科技有限公司 一种应用冻结的方法及终端
CN107544847A (zh) * 2017-08-16 2018-01-05 惠州Tcl移动通信有限公司 终端自动释放后台进程占用资源的方法、存储介质及终端

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102098581B1 (ko) * 2015-10-29 2020-04-08 후아웨이 테크놀러지 컴퍼니 리미티드 단말기 기반 웨이크록(wakelock)의 제어 방법, 장치, 및 단말기

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324500A (zh) * 2013-05-06 2013-09-25 广州市动景计算机科技有限公司 一种回收内存的方法及装置
WO2015131679A1 (zh) * 2014-08-28 2015-09-11 中兴通讯股份有限公司 任务进程的处理方法及装置
CN104199731A (zh) * 2014-09-12 2014-12-10 北京奇虎科技有限公司 对应用程序的进程进行管理的方法及装置
CN105468426A (zh) * 2016-01-05 2016-04-06 珠海市魅族科技有限公司 一种应用冻结的方法及终端
CN107544847A (zh) * 2017-08-16 2018-01-05 惠州Tcl移动通信有限公司 终端自动释放后台进程占用资源的方法、存储介质及终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3671451A4

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11138041B2 (en) 2017-08-16 2021-10-05 JRD Communication (Shenzhen) Ltd. Method for automatically releasing resource occupied by process in background of terminal, storage medium and terminal
CN110727473A (zh) * 2019-10-10 2020-01-24 Oppo广东移动通信有限公司 资源控制方法及装置、系统、存储介质和电子设备
CN110727473B (zh) * 2019-10-10 2023-11-03 Oppo广东移动通信有限公司 资源控制方法及装置、系统、存储介质和电子设备
CN113434222A (zh) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 应用程序的控制方法、装置、存储介质及电子装置
CN113434222B (zh) * 2021-06-30 2023-06-09 青岛海尔科技有限公司 应用程序的控制方法、装置、存储介质及电子装置

Also Published As

Publication number Publication date
EP3671451A1 (en) 2020-06-24
US20200241925A1 (en) 2020-07-30
EP3671451B1 (en) 2024-04-03
CN107544847A (zh) 2018-01-05
EP3671451A4 (en) 2021-07-28
US11138041B2 (en) 2021-10-05

Similar Documents

Publication Publication Date Title
WO2019034104A1 (zh) 终端自动释放后台进程占用资源的方法、存储介质及终端
WO2015090248A1 (zh) 服务器的过载保护方法及装置
WO2016150331A1 (zh) 一种运行游戏客户端的方法和装置
CN107071147B (zh) 一种参数调整方法及设备
WO2017008569A1 (zh) 消息更新方法、装置及终端
WO2015081664A1 (zh) 控制无线网络开关方法、装置、设备及系统
WO2019052554A1 (zh) 减少ue能力信令结构体内容的方法、存储介质及手机
WO2019029618A1 (zh) Ims语音通话网络的切换方法、存储设备及移动终端
CN106453511A (zh) 一种数据备份方法及设备
WO2018045878A1 (zh) 触摸屏参数的调整方法及相关产品
CN106326074A (zh) 处理器运行参数的调整方法及移动终端
CN107567080A (zh) 降低功耗的方法及终端设备
WO2019011231A1 (zh) 降低移动终端sar值的方法及存储介质、移动终端
WO2019011335A1 (zh) 一种移动终端及其控制方法和可读存储介质
WO2019029564A1 (zh) 一种控制移动终端显示亮度的方法、移动终端及存储装置
WO2019047973A1 (zh) 一种终端操作方法及终端、计算机可读存储介质
CN105162930B (zh) 移动终端的录音方法及装置
WO2015081880A1 (zh) 集群业务属性处理的方法、装置和系统
CN105100361B (zh) 移动终端的录音方法及装置
WO2018045874A1 (zh) 信息处理的方法及相关产品
CN106851737A (zh) 一种发送上行数据的方法,及终端设备
CN106255146B (zh) 一种终端的省电控制方法、装置和终端
CN106815085B (zh) 一种消息处理方法,及终端设备
CN105282330B (zh) 自动连接网络的方法及装置
WO2017215663A1 (zh) 一种音效处理的方法及终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18845751

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018845751

Country of ref document: EP

Effective date: 20200316