[go: up one dir, main page]

CN107729216A - Application program management and control method, device, storage medium and electronic device - Google Patents

Application program management and control method, device, storage medium and electronic device Download PDF

Info

Publication number
CN107729216A
CN107729216A CN201711047047.3A CN201711047047A CN107729216A CN 107729216 A CN107729216 A CN 107729216A CN 201711047047 A CN201711047047 A CN 201711047047A CN 107729216 A CN107729216 A CN 107729216A
Authority
CN
China
Prior art keywords
application program
temperature value
temperature
preset
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711047047.3A
Other languages
Chinese (zh)
Other versions
CN107729216B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711047047.3A priority Critical patent/CN107729216B/en
Publication of CN107729216A publication Critical patent/CN107729216A/en
Priority to PCT/CN2018/110512 priority patent/WO2019085748A1/en
Application granted granted Critical
Publication of CN107729216B publication Critical patent/CN107729216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/20Cooling means
    • G06F1/206Cooling means comprising thermal management
    • 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/3013Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
    • 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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • 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/445Program loading or initiating
    • G06F9/44594Unloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Power Sources (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an application program control method, an application program control device, a storage medium and electronic equipment, wherein the method comprises the following steps: acquiring a first temperature value of the electronic equipment; if the first temperature value is greater than or equal to a first preset temperature threshold value, acquiring the occupied resource proportion of the application program; if the occupied resource proportion of the application program is larger than the preset proportion threshold value, limiting the occupied resource proportion of the application program; and within the first preset time, obtaining second temperature values of the electronic equipment for multiple times, and stopping obtaining the temperature values in the second preset time according to the second temperature values. The resource occupation condition of each application does not need to be scanned in a round-robin manner, and when the temperature of the electronic equipment is higher, the resource occupation can be reduced, and the temperature of the electronic equipment can be reduced.

Description

应用程序管控方法、装置、存储介质及电子设备Application program management and control method, device, storage medium and electronic device

技术领域technical field

本申请属于通信技术领域,尤其涉及一种应用程序管控方法、装置、存储介质及电子设备。The present application belongs to the technical field of communication, and in particular relates to an application program management and control method, device, storage medium and electronic equipment.

背景技术Background technique

在电子设备智能领域,深刻影响用户使用体验的一种情况就是电子设备发热。电子设备发热的原因有很多种,比如前景应用程序是非常耗费CPU、GPU资源的大型游戏。一般对于前景应用程序导致发热的情况,是用户能够的接受的。然而在其他一些情况下,后台应用在用户未感知的情况下进行一些耗费CPU、GPU等资源的操作导致的发热,则造成了非常不好的用户体验。In the field of electronic equipment intelligence, one of the conditions that deeply affects the user experience is the heating of electronic equipment. There are many reasons for electronic equipment to heat up. For example, the foreground application is a large-scale game that consumes CPU and GPU resources. Generally, the situation that the foreground application causes heat is acceptable to the user. However, in some other cases, the background application performs some operations that consume resources such as CPU and GPU without the user's awareness, resulting in heat generation, resulting in a very bad user experience.

发明内容Contents of the invention

本申请提供一种应用程序管控方法、装置、存储介质及电子设备,能够防止电子设备的温度过热。The present application provides an application program management and control method, device, storage medium and electronic equipment, which can prevent the temperature of the electronic equipment from overheating.

第一方面,本申请实施例提供一种应用程序管控方法,应用于电子设备,所述方法包括步骤:In the first aspect, the embodiment of the present application provides an application program management and control method, which is applied to electronic equipment, and the method includes the steps of:

获取所述电子设备的第一温度值;Acquiring a first temperature value of the electronic device;

若所述第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;If the first temperature value is greater than or equal to a first preset temperature threshold, obtaining the proportion of resources occupied by the application;

若所述应用程序的占用资源比例大于预设比例阈值,则限制所述应用程序占用资源比例;If the proportion of resources occupied by the application is greater than a preset proportion threshold, limit the proportion of resources occupied by the application;

在第一预设时长内,多次获取所述电子设备的第二温度值,得到多个第二温度值,根据所述多个第二温度值停止第二预设时长获取温度值。Within the first preset time period, the second temperature value of the electronic device is acquired multiple times to obtain a plurality of second temperature values, and the acquisition of the temperature value for the second preset time period is stopped according to the plurality of second temperature values.

第二方面,本申请实施例提供一种应用程序管控装置,应用于电子设备,所述管控装置包括:In the second aspect, the embodiment of the present application provides an application program management and control device, which is applied to electronic equipment, and the management and control device includes:

第一获取单元,用于获取所述电子设备的第一温度值;a first acquiring unit, configured to acquire a first temperature value of the electronic device;

第二获取单元,若所述第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;A second acquisition unit, if the first temperature value is greater than or equal to a first preset temperature threshold, then acquire the proportion of resources occupied by the application;

管控单元,用于若所述应用程序的占用资源比例大于预设比例阈值,则限制所述应用程序占用资源比例;A management and control unit, configured to limit the resource occupation ratio of the application program if the resource occupation ratio of the application program is greater than a preset ratio threshold;

控制单元,用于在第一预设时长内,多次获取所述电子设备的第二温度值,得到多个第二温度值,根据所述多个第二温度值停止第二预设时长获取温度值。The control unit is configured to acquire the second temperature value of the electronic device multiple times within the first preset time period to obtain multiple second temperature values, and stop obtaining the second preset time length according to the multiple second temperature values temperature value.

第三方面,本申请实施例提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述的应用程序管控方法。In a third aspect, the embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is run on a computer, the computer is made to execute the above-mentioned application program management method.

第四方面,本申请实施例提供一种电子设备,包括处理器和存储器,所述存储器有计算机程序,所述处理器通过调用所述计算机程序,用于执行上述的应用程序管控方法。In a fourth aspect, the embodiment of the present application provides an electronic device, including a processor and a memory, the memory has a computer program, and the processor is used to execute the above application program management method by invoking the computer program.

本申请实施例提供的应用程序管控方法、装置、存储介质及电子设备,通过获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,根据多个第二温度值停止第二预设时长获取温度值。不需要轮循扫描各个应用的资源占用情况,当电子设备的温度较高时,可以减少资源占用,降低电子设备的温度。The application control method, device, storage medium, and electronic device provided in the embodiments of the present application obtain the first temperature value of the electronic device; if the first temperature value is greater than or equal to the first preset temperature threshold, then obtain the occupation of the application Resource ratio; if the proportion of resources occupied by the application is greater than the preset ratio threshold, limit the proportion of resources occupied by the application; within the first preset time period, obtain the second temperature value of the electronic device multiple times, according to the multiple second temperature values Stop acquiring the temperature value for a second preset time period. There is no need to scan the resource occupation of each application in turn, and when the temperature of the electronic device is high, the resource occupation can be reduced and the temperature of the electronic device can be lowered.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative efforts.

图1为本申请实施例提供的应用程序管控装置的系统示意图;FIG. 1 is a system schematic diagram of an application management and control device provided in an embodiment of the present application;

图2为本申请实施例提供的应用程序管控装置的应用场景示意图;FIG. 2 is a schematic diagram of an application scenario of an application management and control device provided in an embodiment of the present application;

图3为本申请实施例提供的应用程序管控方法的流程示意图;FIG. 3 is a schematic flow diagram of an application control method provided in an embodiment of the present application;

图4为本申请实施例提供的状态机的示意图;FIG. 4 is a schematic diagram of a state machine provided in an embodiment of the present application;

图5为本申请实施例提供的应用程序管控装置的结构示意图;FIG. 5 is a schematic structural diagram of an application management and control device provided in an embodiment of the present application;

图6为本申请实施例提供的应用程序管控装置的另一结构示意图;FIG. 6 is another schematic structural diagram of the application program management and control device provided by the embodiment of the present application;

图7为本申请实施例提供的电子设备的结构示意图;FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图8为本申请实施例提供的电子设备的另一结构示意图。FIG. 8 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Referring to the drawings, wherein the same reference numerals represent the same components, the principles of the present application are exemplified by being implemented in a suitable computing environment. The following description is based on illustrated specific embodiments of the present application, which should not be construed as limiting other specific embodiments of the present application that are not described in detail here.

在以下的说明中,本申请的具体实施例将参考由一部或多部计算机所执行的步骤及符号来说明,除非另有述明。因此,这些步骤及操作将有数次提到由计算机执行,本文所指的计算机执行包括了由代表了以一结构化型式中的数据的电子信号的计算机处理单元的操作。此操作转换该数据或将其维持在该计算机的内存系统中的位置处,其可重新配置或另外以本领域测试人员所熟知的方式来改变该计算机的运作。该数据所维持的数据结构为该内存的实体位置,其具有由该数据格式所定义的特定特性。但是,本申请原理以上述文字来说明,其并不代表为一种限制,本领域测试人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。In the following description, specific embodiments of the present application will be described with reference to steps and symbols executed by one or more computers, unless otherwise stated. Accordingly, these steps and operations will several times be referred to as being computer-implemented, which herein refers to operations by a computer processing unit of electronic signals representing data in a structured form. This operation transforms the data or maintains it at a location in the computer's memory system that can reconfigure or otherwise alter the operation of the computer in a manner well known to testers in the art. The data structures maintained by the data are physical locations in the memory that have certain characteristics defined by the data format. However, the principle of the present application is described in the above text, which is not meant to be a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.

本文所使用的术语“模块”可看做为在该运算系统上执行的软件对象。本文所述的不同组件、模块、引擎及服务可看做为在该运算系统上的实施对象。而本文所述的装置及方法可以以软件的方式进行实施,当然也可在硬件上进行实施,均在本申请保护范围之内。The term "module" as used herein may be considered a software object that executes on the computing system. The various components, modules, engines and services described herein can be considered as implementation objects on the computing system. The devices and methods described herein can be implemented in the form of software, and of course can also be implemented in hardware, all of which are within the protection scope of the present application.

本申请中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是某些实施例还包括没有列出的步骤或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。The terms "first", "second" and "third" in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include steps or modules that are not listed, or some embodiments Other steps or modules inherent to these processes, methods, products or devices are also included.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

当电子设备的发热温度值过高时,在用户态主动进行轮循扫描各个应用程序的资源占用情况,然后根据各个应用程序的资源占比情况,清理一个或多个应用程序。但是,如此需要在用户态不断地主动轮循监测系统情况,本身有不小的资源消耗。加上对系统的不了解,一些用户即便是发现了异常也不一定会采取措施。其中,该电子设备可以是智能手机、平板电脑、台式电脑、笔记本电脑、或者掌上电脑等设备。When the heating temperature of the electronic device is too high, the user mode actively scans the resource occupation of each application program in round robin, and then cleans up one or more applications according to the resource ratio of each application program. However, this requires continuous active round-robin monitoring of the system status in the user mode, which itself consumes a lot of resources. Coupled with the lack of understanding of the system, some users may not necessarily take measures even if they find anomalies. Wherein, the electronic device may be a device such as a smart phone, a tablet computer, a desktop computer, a notebook computer, or a handheld computer.

请参阅图1,图1为本申请实施例提供的应用程序管控装置的系统示意图。该应用程序管控装置主要用于:获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,根据多个第二温度值停止第二预设时长获取温度值。Please refer to FIG. 1 . FIG. 1 is a system schematic diagram of an application program management and control device provided in an embodiment of the present application. The application program management and control device is mainly used to: obtain the first temperature value of the electronic device; if the first temperature value is greater than or equal to the first preset temperature threshold, obtain the resource occupation ratio of the application program; if the resource occupation ratio of the application program is greater than The preset proportion threshold limits the proportion of resources occupied by the application program; within the first preset time period, obtains the second temperature value of the electronic device multiple times, and stops obtaining the temperature value for the second preset time period according to the multiple second temperature values.

具体的,请参阅图2,图2为本申请实施例提供的应用程序管控装置的应用场景示意图。比如,应用程序管控装置在接收第一温度值大于或等于第一预设温度阈值时,检测到在电子设备运行的应用程序包括应用程序a、应用程序b以及应用程序c;然后分别获取应用程序a对应的占用资源比例A、应用程序b对应的占用资源比例B以及应用程序c对应的占用资源比例C;其中占用资源比例A、B大于预设比例阈值,占用资源比例C小于预设比例阈值,并且,应用程序a为前台应用程序,能被用户感知,应用程序b为后台应用程序,不能被用户感知,则限制应用程序a的占用资源比例,如将应用程序a占用资源比例限制在当前占用资源比例之下,或将应用程序a占用资源比例限制在预设比例阈值之下。清理应用程序b,如关闭或冻结应用程序b。Specifically, please refer to FIG. 2 . FIG. 2 is a schematic diagram of an application scenario of an application program management and control device provided in an embodiment of the present application. For example, when the application program control device receives the first temperature value greater than or equal to the first preset temperature threshold, it detects that the application programs running on the electronic device include application program a, application program b, and application program c; The proportion of resources occupied by a corresponds to A, the proportion of resources occupied by application b corresponds to the proportion of resources occupied by C, and the proportion of resources occupied by application c corresponds to C; where the proportions of occupied resources A and B are greater than the preset proportion threshold, and the proportion of occupied resources C is less than the preset proportion threshold , and, application a is a foreground application, which can be perceived by the user, and application b is a background application, which cannot be perceived by the user, then limit the proportion of resources occupied by application a, for example, limit the proportion of resources occupied by application a to the current below the resource occupancy ratio, or limit the resource occupancy ratio of application a below the preset ratio threshold. Clean up application b, such as closing or freezing application b.

本申请实施例提供一种应用程序管控方法,该应用程序管控方法的执行主体可以是本申请实施例提供的应用程序管控装置,或者集成了该应用程序管控装置的电子设备,其中该应用程序管控装置可以采用硬件或者软件的方式实现。An embodiment of the present application provides an application program management and control method. The execution subject of the application program management and control method may be the application program management and control device provided in the embodiment of the present application, or an electronic device integrated with the application program management and control device, wherein the application program management and control The device can be realized by hardware or software.

本申请实施例将从应用程序管控装置的角度进行描述,该应用程序管控装置具体可以集成在电子设备中。该应用程序管控方法包括:获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,根据多个第二温度值停止第二预设时长获取温度值。Embodiments of the present application will be described from the perspective of an application program management and control apparatus, and the application program management and control apparatus may specifically be integrated in an electronic device. The application control method includes: obtaining a first temperature value of the electronic device; if the first temperature value is greater than or equal to a first preset temperature threshold, obtaining the resource occupation ratio of the application program; if the resource occupation ratio of the application program is greater than the preset The proportion threshold limits the proportion of resources occupied by the application; within the first preset time period, acquires the second temperature value of the electronic device multiple times, and stops acquiring the temperature value for the second preset time period according to the multiple second temperature values.

请参阅图3,图3为本申请实施例提供的应用程序管控方法的流程示意图。本申请实施例提供的应用程序管控方法应用于电子设备,具体流程可以如下:Please refer to FIG. 3 . FIG. 3 is a schematic flowchart of an application program management and control method provided in an embodiment of the present application. The application management and control method provided in the embodiment of the present application is applied to electronic equipment, and the specific process may be as follows:

步骤101,获取电子设备的第一温度值。Step 101, acquiring a first temperature value of an electronic device.

电子设备的第一温度值可以为电子设备的主芯片的温度值,也可以为电池的温度值,也可以为其他芯片或存储器的温度值。电子设备的第一温度值通过内核获取。内核可以用较少的资源获取温度值。The first temperature value of the electronic device may be the temperature value of the main chip of the electronic device, may also be the temperature value of the battery, or may be the temperature value of other chips or memory. The first temperature value of the electronic device is obtained through the kernel. The kernel can fetch temperature values with less resources.

步骤102,若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例。Step 102, if the first temperature value is greater than or equal to the first preset temperature threshold, obtain the resource occupation ratio of the application program.

第一预设温度阈值可以提前设置,如在电子设备生产中就设置,也可以在出厂后设置。考虑到电子设备的温度受环境影响,一个动态可配的第一预设温度阈值能更好地适配不同的国家、地区,不同季节下的应用场景。其中可以在内核增加预设节点,如sys节点,供有权限的用户态进程注册第一预设温度阈值。内核监控电子设备的当前温度,可以仅占用较少的资源,而利用应用程序通过架构层获取温度值则需要占用较多的资源。在电子设备的当前温度即第一温度值达到第一预设温度阈值以后,通过预设接口将第一温度值上报。上报过后,当电子设备的第一温度值在第一预设温度阈值之上发生变化时(如升高,或者降低),内核将继续上报以供用户态决策。预设接口为特定net l ink接口。第一预设温度阈值可以为摄氏40度,也可以为摄氏50度、摄氏60度等。The first preset temperature threshold can be set in advance, for example, during the production of the electronic equipment, or it can be set after leaving the factory. Considering that the temperature of electronic equipment is affected by the environment, a dynamically configurable first preset temperature threshold can better adapt to application scenarios in different countries and regions and in different seasons. Wherein, a preset node, such as a sys node, can be added in the kernel for the authorized user mode process to register the first preset temperature threshold. The kernel monitors the current temperature of the electronic device, which can only occupy less resources, while using the application program to obtain the temperature value through the architecture layer requires more resources. After the current temperature of the electronic device, that is, the first temperature value reaches the first preset temperature threshold, the first temperature value is reported through the preset interface. After reporting, when the first temperature value of the electronic device changes (for example, increases or decreases) above the first preset temperature threshold, the kernel will continue to report for decision-making in user mode. The default interface is a specific net link interface. The first preset temperature threshold may be 40 degrees Celsius, or may be 50 degrees Celsius, 60 degrees Celsius, or the like.

应用程序占用资源比例可以为应用程序占用CPU的比例,也可以为应用程序占用GPU的比例,也可以应用程序占用内存的比例,也可以为应用程序占用CPU、GPU和内存中的两个或3个的综合值。预设比例阈值可以根据可以提前设置,如在电子设备生产中就设置,也可以在出厂后设置。预设比例阈值可以设置为30%,也可以设置为25%、35d%等。The proportion of resources occupied by the application can be the proportion of the CPU occupied by the application, the proportion of the GPU occupied by the application, the proportion of the memory occupied by the application, or two or three of the CPU, GPU and memory occupied by the application. composite value. The preset ratio threshold can be set in advance, for example, during the production of electronic equipment, or after leaving the factory. The preset ratio threshold can be set to 30%, and can also be set to 25%, 35d%, etc.

在一些实施例中,间隔获取应用程序的两个或多个子占用资源比例,根据两个或多个子占用资源比例获取占用资源比例。如可以将两个或多个子占用资源比例按平均值获取占用资源比例,也可以按不同权重获取占用资源比例,如按获取时间顺序设置不同的权重,越新获取的子占用资源比例权重越大,还可以去掉一个明显的峰值和/或谷值,再求平均值。In some embodiments, two or more sub-occupancy resource ratios of the application are acquired at intervals, and the occupancy resource ratios are acquired according to the two or more sub-occupancy resource ratios. For example, the ratio of two or more sub-occupied resources can be obtained according to the average value, or the ratio of occupied resources can be obtained according to different weights. For example, different weights can be set according to the order of acquisition time. The newer the sub-occupied resource ratio obtained, the greater the weight , you can also remove an obvious peak and/or valley, and then average.

在一些实施例中,若第一温度大于或等于内核新增预设节点内的第一预设温度阈值,则获取应用程序的占用资源比例。In some embodiments, if the first temperature is greater than or equal to a first preset temperature threshold in the newly added preset node of the kernel, the proportion of resources occupied by the application program is obtained.

步骤103,若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例。Step 103, if the resource occupation ratio of the application program is greater than the preset ratio threshold, limit the resource occupation ratio of the application program.

可选的,获取应用程序的占用资源比例可以为获取全部应用程序的占用资源比例,然后将该应用程序限制占用资源比例。Optionally, obtaining the resource occupation ratio of the application may be obtaining the resource occupation ratio of all applications, and then limiting the resource occupation ratio of the application.

可选的,获取应用程序的占用资源比例可以为获取一个或多个应用程序的占用资源比例,然后将对应的应用程序限制占用资源比例。Optionally, obtaining the resource occupation ratio of an application may be obtaining the resource occupation ratio of one or more applications, and then limiting the resource occupation ratio of the corresponding application.

可选的,获取应用程序的占用资源比例可以为预先设置应用程序的白名单,将一些系统应用程序,和其他一些不可清理的应用程序排除,将其他可以清理、可限制占用资源比例的应用程序放入白名单,每次都只获取白名单的应用程序的占用资源比例,然后将该应用程序限制占用资源比例。Optionally, obtaining the proportion of resources occupied by the application can be a whitelist of pre-set applications, excluding some system applications and other applications that cannot be cleaned, and other applications that can be cleaned and can limit the proportion of resources occupied Put it into the whitelist, and only get the resource occupation ratio of the application in the whitelist every time, and then limit the resource occupation ratio of the application.

限制占用资源比例可以为一个具体的比例值,如20%、30%等,也可以为0,即将该应用程序关闭。The resource occupation ratio limit can be a specific ratio value, such as 20%, 30%, etc., and can also be 0, that is, close the application program.

限制应用程序占用资源比例,具体可以为:若应用程序为前台应用程序,则限制应用程序占用资源比例;若应用程序为后台应用程序,则将应用程序清理。Limiting the proportion of resources occupied by the application can be specifically: if the application is a foreground application, limit the proportion of resources occupied by the application; if the application is a background application, clean up the application.

前台应用程序,如现在使用即时通讯应用,则该即时通讯应用为前台应用程序,另外与该通讯应用关联的应用也可以为前台应用程序,如输入法应用。前台应用程序也可以可被使用的应用,如其正为前台应用提供服务的应用程序;如其在播放音频的应用程序。若应用程序的前台应用程序,则限制应用程序的占用资源比例。限制应用程序的占用资源比例,可以为限制应用程序的占用资源比例在当前占用资源比例之下,也可以限制应用程序的占用资源比例在预设比例阈值之下,也可以限制应用程序的占用资源比例降低一定比例,如在当前的占用资源比例的基础上降低10%。The foreground application program, if an instant messaging application is used now, the instant messaging application is the foreground application program, and the application associated with the communication application can also be the foreground application program, such as an input method application. A foreground application can also be an application that can be used, such as an application that is providing services to the foreground application; such as an application that is playing audio. If the application is a foreground application, limit the proportion of resources occupied by the application. Limiting the proportion of resources occupied by applications can be to limit the proportion of resources occupied by applications below the current proportion of resources occupied, or to limit the proportion of resources occupied by applications to be below the preset proportion threshold, or to limit the proportion of resources occupied by applications The ratio is reduced by a certain percentage, such as 10% on the basis of the current occupied resource ratio.

若应用程序为后台应用程序,则将该后台应用程序清理,后台应用程序为暂时不使用的后台程序,清理应用程序可以为关闭该应用程序,或冻结该应用程序。If the application program is a background application program, the background application program is cleaned. The background application program is a background program that is not used temporarily. The application program cleaning can be closing the application program or freezing the application program.

步骤104,在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。Step 104, within the first preset time period, acquire the second temperature value of the electronic device multiple times to obtain multiple second temperature values, and stop acquiring the temperature value for the second preset time period according to the multiple second temperature values.

第一预设时长和第二预设时长可以相等,也可以不相等,如第一预设时长为3秒,第二预设时长为5秒,当然也可以为其他值。在第一预设时长后,获取电子设备当前的第二温度值,若第二温度值大于第一预设温度阈值,则在第二预设时长内停止获取温度值。若第二温度值小于第一预设温度阈值,则重新等待内核上报。The first preset duration and the second preset duration may be equal or unequal, for example, the first preset duration is 3 seconds, and the second preset duration is 5 seconds, and of course other values may also be used. After the first preset time period, the current second temperature value of the electronic device is acquired, and if the second temperature value is greater than the first preset temperature threshold, the acquisition of the temperature value is stopped within the second preset time period. If the second temperature value is less than the first preset temperature threshold, then wait for the kernel to report again.

在一些实施例中,在第一预设时长内,多次获取第二温度值,若多个第二温度值都大于第一预设温度阈值,则在第一预设时长结束后,将停止第二预设时长获取温度值,降低系统消耗。In some embodiments, within the first preset time period, the second temperature value is acquired multiple times, and if the multiple second temperature values are greater than the first preset temperature threshold, then after the first preset time period ends, the acquisition will stop. The temperature value is obtained for the second preset time period to reduce system consumption.

在一些实施例中,在第一预设时长内,多次获取第二温度值,若大于或等于第一预设温度阈值的第二温度值个数比例达到预设个数比例,则停止第二预设时长获取温度值,降低系统消耗。预设个数比例可以为60%,也可以为其他值,如70%,80%等。In some embodiments, within the first preset time period, the second temperature value is obtained multiple times, and if the ratio of the number of second temperature values greater than or equal to the first preset temperature threshold reaches the preset ratio, the second temperature value is stopped. Two preset time intervals to obtain temperature values to reduce system consumption. The preset number ratio can be 60%, or other values, such as 70%, 80%, etc.

在一些实施例中,在第一预设时长内,多次获取第二温度值,若多个第二温度值中仅一两次小于第一预设温度阈值,大于第一预设温度阈值的第二温度值个数更多,也可以则在第一预设时长结束后,将停止第二预设时长获取温度值。In some embodiments, within the first preset time period, the second temperature value is obtained multiple times, if only one or two of the multiple second temperature values are less than the first preset temperature threshold, and one or two of the multiple second temperature values are greater than the first preset temperature threshold The number of the second temperature value is more, and it is also possible that after the first preset time period is over, the acquisition of the temperature value for the second preset time period will be stopped.

由上可知,本申请实施例提供的应用程序管控方法,通过获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。不需要轮循扫描各个应用的资源占用情况,当电子设备的温度较高时,可以减少资源占用,降低电子设备的温度。It can be seen from the above that the application program control method provided by the embodiment of the present application obtains the first temperature value of the electronic device; if the first temperature value is greater than or equal to the first preset temperature threshold value, then obtains the resource occupation ratio of the application program; if If the proportion of resources occupied by the application is greater than the preset proportion threshold, the proportion of resources occupied by the application is limited; within the first preset time period, the second temperature value of the electronic device is acquired multiple times to obtain multiple second temperature values. The second temperature value stops acquiring the temperature value for a second preset time period. There is no need to scan the resource occupation of each application in turn, and when the temperature of the electronic device is high, the resource occupation can be reduced and the temperature of the electronic device can be lowered.

请参阅图4,图4为本申请实施例提供的状态机的示意图。本申请实施例提供的状态机应用于电子设备,状态机具体包括:Please refer to FIG. 4 , which is a schematic diagram of a state machine provided by an embodiment of the present application. The state machine provided in the embodiment of the present application is applied to electronic equipment, and the state machine specifically includes:

初始状态,系统启动进入的状态,主要完成一些初始化操作,然后进入空闲状态;The initial state, the state entered by the system startup, mainly completes some initialization operations, and then enters the idle state;

空闲状态,表示电子设备当前的温度在第一预设温度阈值之下,等待电子设备的第一温度值超过第一预设温度阈值,当电子设备的第一温度值超过第一预设温度阈值,则进入扫描状态;Idle state, indicating that the current temperature of the electronic device is below the first preset temperature threshold, waiting for the first temperature value of the electronic device to exceed the first preset temperature threshold, when the first temperature value of the electronic device exceeds the first preset temperature threshold , enter the scanning state;

扫描状态,开始对系统当前正在运行的应用程序进行扫描,得到每个应用程序占用资源比例。若其中一个或多个应用程序的占用资源比例大于预设比例阈值,则检测该应用程序是否为用户当前能感知到的应用(比如其正为前台应用提供服务,或其正在播放音频等情况)。如果该应用程序是一个用户不可感知的应用,则可以将其清理;否则可以根据策略限制该应用能占用的各项资源。进入监控状态。如果扫描过程中,电子设备的第一温度值小于第一预设温度阈值,则进入空闲状态。Scan status, start to scan the applications currently running in the system, and get the proportion of resources occupied by each application. If the proportion of resources occupied by one or more applications is greater than the preset ratio threshold, detect whether the application is an application that the user can currently perceive (for example, it is providing services for the foreground application, or it is playing audio, etc.) . If the application is an application that is imperceptible to the user, it can be cleaned up; otherwise, various resources that the application can occupy can be restricted according to policies. Enter the monitoring state. If the first temperature value of the electronic device is lower than the first preset temperature threshold during the scanning process, the electronic device enters an idle state.

可选的,还可以对系统当前正在运行的应用程序做两次扫描,中间间隔3秒,两次扫描后,计算出每个应用程序占用资源比例。Optionally, two scans may be performed on the currently running applications in the system with an interval of 3 seconds. After the two scans, the proportion of resources occupied by each application is calculated.

需要说明的是,上述实施方式中,可以对系统当前正在运行的应用程序做多次扫描,两次扫描中间可以间隔其他时间,如2秒、5秒等。It should be noted that, in the above implementation manner, multiple scans may be performed on the application programs currently running in the system, and other time intervals may be between the two scans, such as 2 seconds, 5 seconds, and so on.

监控状态,表示系统已经对应用程序作出处理,系统将监控电子设备的温度值是否会降低到第一预设温度阈值以下。如果在第一预设时长内温度仍在第一预设温度阈值之上,说明导致发热的可能是前景应用,这是能够接受的情况,因此状态机将进入休眠状态。如果监控过程中,电子设备的第一温度值小于第一预设温度阈值,则进入空闲状态。如果监控过程中,电子设备的第一温度值大于第一预设温度阈值,而且还在第一预设时长内,则进入扫描状态。The monitoring state means that the system has processed the application program, and the system will monitor whether the temperature value of the electronic device will drop below the first preset temperature threshold. If the temperature is still above the first preset temperature threshold within the first preset time period, it means that the foreground application may cause heat generation, which is an acceptable situation, so the state machine will enter the sleep state. If during the monitoring process, the first temperature value of the electronic device is less than the first preset temperature threshold, the electronic device enters an idle state. If during the monitoring process, the first temperature value of the electronic device is greater than the first preset temperature threshold and is still within the first preset time period, then enter the scanning state.

休眠状态,表示电子设备当前温度过高可能是能接受的前景应用程序导致,为避免反复扫描系统带来的额外开销,将沉睡第二预设时长。除非在第二预设时长内,电子设备的温度值持续上升超过第二预设温度阈值,则系统将重新进入扫描状态进行扫描。否则在休眠结束后重新进入空闲状态。第二预设温度阈值大于第一预设温度阈值。In the sleep state, it means that the current temperature of the electronic device is too high and may be caused by an acceptable foreground application. In order to avoid the additional overhead caused by repeated scanning of the system, it will sleep for a second preset duration. Unless the temperature value of the electronic device continues to rise above the second preset temperature threshold within the second preset time period, the system will re-enter the scanning state for scanning. Otherwise, re-enter the idle state after hibernation ends. The second preset temperature threshold is greater than the first preset temperature threshold.

请参阅图5,图5为本申请实施例提供的应用程序管控装置的结构示意图。其中该应用程序管控装置300应用于电子设备,该应用程序管控装置300包括第一获取单元301、第二获取单元302、管控单元303以及控制单元304。其中:Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of an application management and control device provided in an embodiment of the present application. The application management and control apparatus 300 is applied to electronic equipment, and the application management and control apparatus 300 includes a first acquisition unit 301 , a second acquisition unit 302 , a management and control unit 303 and a control unit 304 . in:

第一获取单元301,用于获取电子设备的第一温度值。The first acquiring unit 301 is configured to acquire a first temperature value of the electronic device.

电子设备的第一温度值可以为电子设备的主芯片的温度值,也可以为电池的温度值,也可以为其他芯片或存储器的温度值。电子设备的第一温度值通过内核获取。内核可以用较少的资源获取温度值。The first temperature value of the electronic device may be the temperature value of the main chip of the electronic device, may also be the temperature value of the battery, or may be the temperature value of other chips or memory. The first temperature value of the electronic device is obtained through the kernel. The kernel can fetch temperature values with less resources.

在一些实施例中,第一获取单元301,还用于当内核获取的两个相邻第一温度值不同时,获取内核上报的电子设备当前的第一温度值。In some embodiments, the first obtaining unit 301 is further configured to obtain the current first temperature value of the electronic device reported by the core when two adjacent first temperature values obtained by the core are different.

电子设备的第一温度值可以为电子设备的主芯片的温度值,也可以为电池的温度值,也可以为其他芯片或存储器的温度值。电子设备的第一温度值通过内核获取。内核可以用较少的资源获取温度值。The first temperature value of the electronic device may be the temperature value of the main chip of the electronic device, may also be the temperature value of the battery, or may be the temperature value of other chips or memory. The first temperature value of the electronic device is obtained through the kernel. The kernel can fetch temperature values with less resources.

第二获取单元302,若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例。The second obtaining unit 302 obtains the proportion of resources occupied by the application program if the first temperature value is greater than or equal to the first preset temperature threshold.

第一预设温度阈值可以提前设置,如在电子设备生产中就设置,也可以在出厂后设置。考虑到电子设备的温度受环境影响,一个动态可配的第一预设温度阈值能更好地适配不同的国家、地区,不同季节下的应用场景。其中可以在内核增加预设节点,如sys节点,供有权限的用户态进程注册第一预设温度阈值。内核监控电子设备的当前温度,可以仅占用较少的资源,而利用应用程序通过架构层获取温度值则需要占用较多的资源。在电子设备的当前温度即第一温度值达到第一预设温度阈值以后,通过预设接口将第一温度值上报。预设接口为特定netl ink接口。上报过后,当电子设备的第一温度值在第一预设温度阈值之上发生变化时(如升高,或者降低),内核将继续上报以供用户态决策。第一预设温度阈值可以为摄氏40度,也可以为摄氏50度、摄氏60度等。The first preset temperature threshold can be set in advance, for example, during the production of the electronic equipment, or it can be set after leaving the factory. Considering that the temperature of electronic equipment is affected by the environment, a dynamically configurable first preset temperature threshold can better adapt to application scenarios in different countries and regions and in different seasons. Wherein, a preset node, such as a sys node, can be added in the kernel for the authorized user mode process to register the first preset temperature threshold. The kernel monitors the current temperature of the electronic device, which can only occupy less resources, while using the application program to obtain the temperature value through the architecture layer requires more resources. After the current temperature of the electronic device, that is, the first temperature value reaches the first preset temperature threshold, the first temperature value is reported through the preset interface. The default interface is a specific netlink interface. After reporting, when the first temperature value of the electronic device changes (for example, increases or decreases) above the first preset temperature threshold, the kernel will continue to report for decision-making in user mode. The first preset temperature threshold may be 40 degrees Celsius, or may be 50 degrees Celsius, 60 degrees Celsius, or the like.

应用程序占用资源比例可以为应用程序占用CPU的比例,也可以为应用程序占用GPU的比例,也可以应用程序占用内存的比例,也可以为应用程序占用CPU、GPU和内存中的两个或3个的综合值。预设比例阈值可以根据可以提前设置,如在电子设备生产中就设置,也可以在出厂后设置。预设比例阈值可以设置为30%,也可以设置为25%、35d%等。The proportion of resources occupied by the application can be the proportion of the CPU occupied by the application, the proportion of the GPU occupied by the application, the proportion of the memory occupied by the application, or two or three of the CPU, GPU and memory occupied by the application. composite value. The preset ratio threshold can be set in advance, for example, during the production of electronic equipment, or after leaving the factory. The preset ratio threshold can be set to 30%, and can also be set to 25%, 35d%, etc.

在一些实施例中,第二获取单元包括资源比例获取子单元和计算子单元。资源比例获取子单元,间隔获取应用程序的两个或多个子占用资源比例。计算子单元,用于根据两个或多个子占用资源比例获取占用资源比例。如可以将两个或多个子占用资源比例按平均值获取占用资源比例,也可以按不同权重获取占用资源比例,如按获取时间顺序设置不同的权重,越新获取的子占用资源比例权重越大,还可以去掉一个明显峰值和/或谷值,再求平均值。In some embodiments, the second obtaining unit includes a resource ratio obtaining subunit and a calculating subunit. The resource ratio is used to obtain subunits, and the resource ratio occupied by two or more subunits of the application is obtained at intervals. The calculation subunit is used to obtain resource occupancy ratios according to two or more sub resource occupancy ratios. For example, the ratio of two or more sub-occupied resources can be obtained according to the average value, or the ratio of occupied resources can be obtained according to different weights. For example, different weights can be set according to the order of acquisition time. The newer the sub-occupied resource ratio obtained, the greater the weight , you can also remove an obvious peak and/or valley, and then calculate the average value.

在一些实施例中,第二获取单元,还用于若第一温度大于或等于内核新增预设节点内的第一预设温度阈值,则获取应用程序的占用资源比例。In some embodiments, the second obtaining unit is further configured to obtain the resource occupation ratio of the application program if the first temperature is greater than or equal to the first preset temperature threshold in the newly added preset node of the kernel.

管控单元303,用于若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例。The management and control unit 303 is configured to limit the resource occupation ratio of the application program if the resource occupation ratio of the application program is greater than a preset ratio threshold.

可选的,获取应用程序的占用资源比例可以为获取全部应用程序的占用资源比例,然后将该应用程序限制占用资源比例。Optionally, obtaining the resource occupation ratio of the application may be obtaining the resource occupation ratio of all applications, and then limiting the resource occupation ratio of the application.

可选的,获取应用程序的占用资源比例可以为获取一个或多个应用程序的占用资源比例,然后将对应的应用程序限制占用资源比例。Optionally, obtaining the resource occupation ratio of an application may be obtaining the resource occupation ratio of one or more applications, and then limiting the resource occupation ratio of the corresponding application.

可选的,获取应用程序的占用资源比例可以为预先设置应用程序的白名单,将一些系统应用程序,和其他一些不可清理的应用程序排除,将其他可以清理、可限制占用资源比例的应用程序放入白名单,每次都只获取白名单的应用程序的占用资源比例,然后将该应用程序限制占用资源比例。Optionally, obtaining the proportion of resources occupied by the application can be a whitelist of pre-set applications, excluding some system applications and other applications that cannot be cleaned, and other applications that can be cleaned and can limit the proportion of resources occupied Put it into the whitelist, and only get the resource occupation ratio of the application in the whitelist every time, and then limit the resource occupation ratio of the application.

限制占用资源比例可以为一个具体的比例值,如20%、30%等,也可以为0,即将该应用程序关闭。The resource occupation ratio limit can be a specific ratio value, such as 20%, 30%, etc., and can also be 0, that is, close the application program.

限制应用程序占用资源比例,具体可以为:若应用程序为前台应用程序,则限制应用程序占用资源比例;若应用程序为后台应用程序,则将应用程序清理。Limiting the proportion of resources occupied by the application can be specifically: if the application is a foreground application, limit the proportion of resources occupied by the application; if the application is a background application, clean up the application.

前台应用程序,如现在使用即时通讯应用,则该即时通讯应用为前台应用程序,另外与该通讯应用关联的应用也可以为前台应用程序,如输入法应用。前台应用程序也可以可被使用的应用,如其正为前台应用提供服务的应用程序;如其在播放音频的应用程序。若应用程序的前台应用程序,则限制应用程序的占用资源比例。限制应用程序的占用资源比例,可以为限制应用程序的占用资源比例在当前占用资源比例之下,也可以限制应用程序的占用资源比例在预设比例阈值之下,也可以限制应用程序的占用资源比例降低一定比例,如在当前的占用资源比例的基础上降低10%。The foreground application program, if an instant messaging application is used now, the instant messaging application is the foreground application program, and the application associated with the communication application can also be the foreground application program, such as an input method application. A foreground application can also be an application that can be used, such as an application that is providing services to the foreground application; such as an application that is playing audio. If the application is a foreground application, limit the proportion of resources occupied by the application. Limiting the proportion of resources occupied by applications can be to limit the proportion of resources occupied by applications below the current proportion of resources occupied, or to limit the proportion of resources occupied by applications to be below the preset proportion threshold, or to limit the proportion of resources occupied by applications The ratio is reduced by a certain percentage, such as 10% on the basis of the current occupied resource ratio.

若应用程序为后台应用程序,则将该后台应用程序清理,后台应用程序为暂时不使用的后台程序,清理应用程序可以为关闭该应用程序,或冻结该应用程序。If the application program is a background application program, the background application program is cleaned. The background application program is a background program that is not used temporarily. The application program cleaning can be closing the application program or freezing the application program.

控制单元304,用于在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。The control unit 304 is configured to acquire the second temperature value of the electronic device multiple times within the first preset time period to obtain multiple second temperature values, and stop acquiring the temperature value for the second preset time period according to the multiple second temperature values.

第一预设时长和第二预设时长可以相等,也可以不相等,如第一预设时长为3秒,第二预设时长为5秒,当然也可以为其他值。在第一预设时长后,获取电子设备当前的第二温度值,若第二温度值大于第一预设温度阈值,则在第二预设时长内停止获取温度值。若第二温度值小于第一预设温度阈值,则重新等待内核上报。The first preset duration and the second preset duration may be equal or unequal, for example, the first preset duration is 3 seconds, and the second preset duration is 5 seconds, and of course other values may also be used. After the first preset time period, the current second temperature value of the electronic device is acquired, and if the second temperature value is greater than the first preset temperature threshold, the acquisition of the temperature value is stopped within the second preset time period. If the second temperature value is less than the first preset temperature threshold, then wait for the kernel to report again.

在一些实施例中,在第一预设时长内,多次获取第二温度值,若多个第二温度值都大于第一预设温度阈值,则在第一预设时长结束后,将停止第二预设时长获取温度值,降低系统消耗。In some embodiments, within the first preset time period, the second temperature value is acquired multiple times, and if the multiple second temperature values are greater than the first preset temperature threshold, then after the first preset time period ends, the acquisition will stop. The temperature value is obtained for the second preset time period to reduce system consumption.

在一些实施例中,在第一预设时长内,多次获取第二温度值,若大于或等于第一预设温度阈值的第二温度值个数比例达到预设个数比例,则停止第二预设时长获取温度值,降低系统消耗。预设个数比例可以为60%,也可以为其他值,如70%,80%等。In some embodiments, within the first preset time period, the second temperature value is obtained multiple times, and if the ratio of the number of second temperature values greater than or equal to the first preset temperature threshold reaches the preset ratio, the second temperature value is stopped. Two preset time intervals to obtain temperature values to reduce system consumption. The preset number ratio can be 60%, or other values, such as 70%, 80%, etc.

在一些实施例中,在第一预设时长内,多次获取第二温度值,若多个第二温度值中仅一两次小于第一预设温度阈值,大于第一预设温度阈值的第二温度值个数更多,也可以则在第一预设时长结束后,将停止第二预设时长获取温度值。In some embodiments, within the first preset time period, the second temperature value is obtained multiple times, if only one or two of the multiple second temperature values are less than the first preset temperature threshold, and one or two of the multiple second temperature values are greater than the first preset temperature threshold The number of the second temperature value is more, and it is also possible that after the first preset time period is over, the acquisition of the temperature value for the second preset time period will be stopped.

由上可知,本申请实施例提供的应用程序管控装置,通过获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。不需要轮循扫描各个应用的资源占用情况,当电子设备的温度较高时,可以减少资源占用,降低电子设备的温度。It can be seen from the above that the application program management and control device provided in the embodiment of the present application obtains the first temperature value of the electronic device; if the first temperature value is greater than or equal to the first preset temperature threshold, then obtains the proportion of resources occupied by the application program; if If the proportion of resources occupied by the application is greater than the preset proportion threshold, the proportion of resources occupied by the application is limited; within the first preset time period, the second temperature value of the electronic device is acquired multiple times to obtain multiple second temperature values. The second temperature value stops acquiring the temperature value for a second preset time period. There is no need to scan the resource occupation of each application in turn, and when the temperature of the electronic device is high, the resource occupation can be reduced and the temperature of the electronic device can be lowered.

请参阅图6,图6为本申请实施例提供的应用程序管控装置的另一结构示意图。其中该应用程序管控装置300应用于电子设备,该应用程序管控装置300包括内核320和状态机310。其中:Please refer to FIG. 6 . FIG. 6 is another schematic structural diagram of an application program management and control device provided in an embodiment of the present application. Where the application program management and control apparatus 300 is applied to electronic equipment, the application program management and control apparatus 300 includes a kernel 320 and a state machine 310 . in:

内核320,用于获取电子设备的第一温度值,当获取的两个相邻第一温度值不同时,上报当前的第一温度值;The kernel 320 is configured to acquire the first temperature value of the electronic device, and report the current first temperature value when the acquired two adjacent first temperature values are different;

状态机310,包括:State machine 310, comprising:

第一获取单元301,用于获取内核上报的第一温度值;The first acquiring unit 301 is configured to acquire the first temperature value reported by the kernel;

第二获取单元302,若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;The second acquiring unit 302, if the first temperature value is greater than or equal to the first preset temperature threshold, then acquire the resource occupation ratio of the application program;

管控单元303,用于若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;The management and control unit 303 is configured to limit the resource occupation ratio of the application program if the resource occupation ratio of the application program is greater than a preset ratio threshold;

控制单元304,用于在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。The control unit 304 is configured to acquire the second temperature value of the electronic device multiple times within the first preset time period to obtain multiple second temperature values, and stop acquiring the temperature value for the second preset time period according to the multiple second temperature values.

内核以较小的资源消耗,监控电子设备的当前温度。在当前温度达到预设温度阈值以后,通过预设接口将当前温度上报给用户态。上报过后,当当前温度在预设温度阈值之上发生变化时(如升高,或者降低),内核将继续上报以供用户态决策。预设接口为特定netlink接口。The kernel monitors the current temperature of the electronic device with a small resource consumption. After the current temperature reaches the preset temperature threshold, the current temperature is reported to the user state through the preset interface. After reporting, when the current temperature changes (such as increasing or decreasing) above the preset temperature threshold, the kernel will continue to report for user mode decision-making. The default interface is a specific netlink interface.

上报后的处理是一个持续渐变的过程,而内核对于温度变化的事件是持续上报的。因此为了维护不同层面间的状态匹配,我们在用户态维护了一个状态机。The processing after reporting is a continuous and gradual process, and the kernel continuously reports temperature changes. Therefore, in order to maintain state matching between different levels, we maintain a state machine in user mode.

在一些实施例中,内核增加预设节点,供有权限的用户态进程注册温度阈值。通过内核增加预设节点,如sys节点,供有权限的用户态进程注册温度阈值。可以较小的资源消耗,获取温度值。考虑到电子设备的温度受环境的影响,一个动态可配的阈值能更好地适配不同的国家、地区,不同季节下的应用场景。In some embodiments, the kernel adds a preset node for authorized user mode processes to register temperature thresholds. Add preset nodes through the kernel, such as sys nodes, for authorized user mode processes to register temperature thresholds. The temperature value can be obtained with less resource consumption. Considering that the temperature of electronic devices is affected by the environment, a dynamically configurable threshold can better adapt to application scenarios in different countries, regions, and seasons.

在一些实施例中,状态机320还用于在第二预设时长内,进入休眠状态;In some embodiments, the state machine 320 is further configured to enter a sleep state within a second preset duration;

内核320,还用于当获取的第一温度值大于第二预设温度阈值时,上报唤醒信号至状态机,第二预设温度阈值大于第一预设温度阈值;The kernel 320 is also configured to report a wake-up signal to the state machine when the acquired first temperature value is greater than a second preset temperature threshold, and the second preset temperature threshold is greater than the first preset temperature threshold;

状态机310,还用于当收到唤醒信号时,则退出休眠状态,并获取应用程序的占用资源比例。然后若应用程序的占用资源比例大于预设比例阈值,则将应用程序限制占用资源比例。接着在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。如此循环。The state machine 310 is also configured to exit the dormant state when receiving a wake-up signal, and obtain the resource occupation ratio of the application program. Then, if the proportion of resources occupied by the application is greater than the preset proportion threshold, the proportion of resources occupied by the application is limited. Then within the first preset time period, acquire the second temperature value of the electronic device multiple times to obtain multiple second temperature values, and stop acquiring the temperature value for the second preset time period according to the multiple second temperature values. So cycle.

由上可知,本申请实施例提供的应用程序管控装置,通过内核获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则内核上报第一温度值,状态机获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。不需要轮循扫描各个应用的资源占用情况,当电子设备的温度较高时,可以减少资源占用,降低电子设备的温度。It can be seen from the above that the application control device provided by the embodiment of the present application obtains the first temperature value of the electronic device through the kernel; if the first temperature value is greater than or equal to the first preset temperature threshold, the kernel reports the first temperature value, and the status obtain the resource occupation ratio of the application program; if the resource occupation ratio of the application program is greater than the preset ratio threshold, limit the resource occupation ratio of the application program; within the first preset duration, obtain the second temperature value of the electronic device multiple times, and obtain A plurality of second temperature values, according to the plurality of second temperature values, stop acquiring temperature values for a second preset duration. There is no need to scan the resource occupation of each application in turn, and when the temperature of the electronic device is high, the resource occupation can be reduced and the temperature of the electronic device can be lowered.

本申请实施例中,应用程序管控装置与上文实施例中的应用程序管控方法属于同一构思,在应用程序管控装置上可以运行应用程序管控方法实施例中提供的任一方法,其具体实现过程详见应用程序管控方法的实施例,此处不再赘述。In the embodiment of this application, the application program management and control device and the application program management and control method in the above embodiments belong to the same concept, any method provided in the application program management and control method embodiment can be run on the application program management and control device, and its specific implementation process For details, refer to the embodiment of the application program management and control method, which will not be repeated here.

本申请实施例还提供一种电子设备。请参阅图7,电子设备400包括处理器401以及存储器402。其中,处理器401与存储器402电性连接。The embodiment of the present application also provides an electronic device. Referring to FIG. 7 , an electronic device 400 includes a processor 401 and a memory 402 . Wherein, the processor 401 is electrically connected with the memory 402 .

处理器400是电子设备400的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器402内的计算机程序,以及调用存储在存储器402内的数据,执行电子设备400的各种功能并处理数据,从而对电子设备400进行整体监控。The processor 400 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or loading computer programs stored in the memory 402 and calling data stored in the memory 402, the processor 400 executes electronic various functions of the device 400 and process data, so as to monitor the electronic device 400 as a whole.

存储器402可用于存储软件程序以及模块,处理器401通过运行存储在存储器402的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器401对存储器402的访问。The memory 402 can be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402 . The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, computer programs required by at least one function (such as sound playback function, image playback function, etc.); Data created by the use of electronic devices, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 402 may further include a memory controller to provide the processor 401 with access to the memory 402 .

在本申请实施例中,电子设备400中的处理器401会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器402中,并由处理器401运行存储在存储器402中的计算机程序,从而实现各种功能,如下:获取所述电子设备的第一温度值;若所述第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若所述应用程序的占用资源比例大于预设比例阈值,则限制所述应用程序占用资源比例;在第一预设时长内,多次获取所述电子设备的第二温度值,得到多个第二温度值,根据所述多个第二温度值停止第二预设时长获取温度值。In this embodiment of the application, the processor 401 in the electronic device 400 will follow the steps below to load the instructions corresponding to the process of one or more computer programs into the memory 402, and run the instructions stored in the memory 402 by the processor 401. The computer program in the computer, so as to realize various functions, as follows: obtain the first temperature value of the electronic device; if the first temperature value is greater than or equal to the first preset temperature threshold value, then obtain the resource occupation ratio of the application program; If the resource occupation ratio of the application program is greater than a preset ratio threshold, limit the resource occupation ratio of the application program; within the first preset time period, obtain the second temperature value of the electronic device multiple times to obtain a plurality of second temperature values Two temperature values, stopping acquiring temperature values for a second preset time period according to the plurality of second temperature values.

在一些实施方式中,处理器401还用于执行以下步骤:若所述多个第二温度值大于或等于第一预设温度阈值,则停止第二预设时长获取温度值。In some implementations, the processor 401 is further configured to perform the following step: if the multiple second temperature values are greater than or equal to a first preset temperature threshold, stop acquiring temperature values for a second preset duration.

在一些实施方式中,处理器401还用于执行以下步骤:若所述多个第二温度值中,大于或等于第一预设温度阈值的第二温度值个数比例达到预设个数比例,则停止第二预设时长获取温度值。In some implementations, the processor 401 is further configured to perform the following step: if among the plurality of second temperature values, the number ratio of the second temperature values greater than or equal to the first preset temperature threshold reaches the preset number ratio , then stop acquiring the temperature value for the second preset time period.

在一些实施方式中,处理器401还用于执行以下步骤:若所述应用程序为前台应用程序,则限制所述应用程序占用资源比例;In some implementations, the processor 401 is further configured to perform the following steps: if the application is a foreground application, limit the proportion of resources occupied by the application;

若所述应用程序为后台应用程序,则将所述应用程序清理。If the application program is a background application program, the application program is cleaned up.

在一些实施方式中,处理器401还用于执行以下步骤:间隔获取应用程序的两个或多个子占用资源比例,根据两个或多个所述子占用资源比例获取所述占用资源比例。In some implementations, the processor 401 is further configured to perform the following steps: acquiring two or more sub-occupancy resource ratios of the application program at intervals, and acquiring the occupancy resource ratio according to the two or more sub-occupancy resource ratios.

在一些实施方式中,处理器401还用于执行以下步骤:In some implementations, the processor 401 is further configured to perform the following steps:

通过预设接口获取内核上报的所述电子设备的第一温度值。The first temperature value of the electronic device reported by the kernel is acquired through a preset interface.

在一些实施方式中,处理器401还用于执行以下步骤:In some implementations, the processor 401 is further configured to perform the following steps:

当内核获取的两个相邻所述第一温度值不同时,获取内核上报的所述电子设备当前的第一温度值。When the two adjacent first temperature values acquired by the core are different, the current first temperature value of the electronic device reported by the core is acquired.

在一些实施方式中,处理器401还用于执行以下步骤:In some implementations, the processor 401 is further configured to perform the following steps:

若所述第一温度大于或等于内核新增预设节点内的第一预设温度阈值,则获取应用程序的占用资源比例。If the first temperature is greater than or equal to the first preset temperature threshold in the newly added preset node of the kernel, the resource occupation ratio of the application program is obtained.

由上述可知,本申请实施例提供的电子设备,通过获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。不需要轮循扫描各个应用的资源占用情况,当电子设备的温度较高时,可以减少资源占用,降低电子设备的温度。It can be seen from the above that the electronic device provided by the embodiment of the present application acquires the first temperature value of the electronic device; if the first temperature value is greater than or equal to the first preset temperature threshold, then obtains the proportion of resources occupied by the application program; if the application program If the proportion of resources occupied by the application program is greater than the preset proportion threshold, the proportion of resources occupied by the application program is limited; within the first preset time period, the second temperature value of the electronic device is acquired multiple times to obtain multiple second temperature values, and according to the multiple second The temperature value stops acquiring the temperature value for a second preset time period. There is no need to scan the resource occupation of each application in turn, and when the temperature of the electronic device is high, the resource occupation can be reduced and the temperature of the electronic device can be lowered.

请一并参阅图8,在一些实施方式中,电子设备400还可以包括:显示器403、射频电路404、音频电路405以及电源406。其中,其中,显示器403、射频电路404、音频电路405以及电源406分别与处理器401电性连接。Please refer to FIG. 8 together. In some embodiments, the electronic device 400 may further include: a display 403 , a radio frequency circuit 404 , an audio circuit 405 and a power supply 406 . Wherein, the display 403 , the radio frequency circuit 404 , the audio circuit 405 and the power supply 406 are respectively electrically connected to the processor 401 .

显示器403可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示器403可以包括显示面板,在一些实施方式中,可以采用液晶显示器(Liquid Crystal Display,LCD)、或者有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。The display 403 can be used to display information input by or provided to the user and various graphical user interfaces, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display 403 may include a display panel. In some implementation manners, the display panel may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD) or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).

射频电路404可以用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 404 can be used to send and receive radio frequency signals to establish wireless communication with network equipment or other electronic equipment through wireless communication, and to send and receive signals with network equipment or other electronic equipment.

音频电路405可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。The audio circuit 405 can be used to provide an audio interface between the user and the electronic device through a speaker or a microphone.

电源406可以用于给电子设备400的各个部件供电。在一些实施方式中,电源406可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 406 may be used to power various components of the electronic device 400 . In some implementations, the power supply 406 can be logically connected to the processor 401 through a power management system, so as to implement functions such as managing charging, discharging, and power consumption through the power management system.

尽管图8中未示出,电子设备400还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 8 , the electronic device 400 may also include a camera, a Bluetooth module, etc., which will not be repeated here.

本申请实施例还提供一种存储介质,存储介质存储有计算机程序,当计算机程序在计算机上运行时,使得计算机执行上述任一实施例中的应用程序管控方法,比如:获取电子设备的第一温度值;若第一温度值大于或等于第一预设温度阈值,则获取应用程序的占用资源比例;若应用程序的占用资源比例大于预设比例阈值,则限制应用程序占用资源比例;在第一预设时长内,多次获取电子设备的第二温度值,得到多个第二温度值,根据多个第二温度值停止第二预设时长获取温度值。The embodiment of the present application also provides a storage medium, the storage medium stores a computer program, and when the computer program runs on the computer, the computer executes the application program management and control method in any of the above embodiments, such as: obtaining the first temperature value; if the first temperature value is greater than or equal to the first preset temperature threshold, obtain the proportion of resources occupied by the application; if the proportion of resources occupied by the application is greater than the preset proportion threshold, limit the proportion of resources occupied by the application; Within a preset period of time, the second temperature value of the electronic device is acquired multiple times to obtain a plurality of second temperature values, and the acquisition of the temperature value is stopped for a second preset period of time according to the plurality of second temperature values.

在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM)、或者随机存取记忆体(Random Access Memory,RAM)等。In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a read only memory (Read Only Memory, ROM), or a random access memory (Random Access Memory, RAM), and the like.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

需要说明的是,对本申请实施例的应用程序管控方法而言,本领域普通测试人员可以理解实现本申请实施例应用程序管控方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如应用程序管控方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。It should be noted that, for the application program management and control method of the embodiment of the present application, ordinary testers in the field can understand that all or part of the process of implementing the application program management and control method of the embodiment of the application can be controlled by computer programs to control related hardware. Complete, the computer program can be stored in a computer-readable storage medium, such as stored in the memory of the electronic device, and executed by at least one processor in the electronic device, and the execution process can include, for example, the application program management method Example flow. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, and the like.

对本申请实施例的应用程序管控装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,存储介质譬如为只读存储器,磁盘或光盘等。For the application program management and control device in the embodiment of the present application, each functional module may be integrated into one processing chip, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium, such as a read-only memory, magnetic disk or optical disk.

以上对本申请实施例所提供的一种应用程序管控方法、装置、存储介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The application management and control method, device, storage medium, and electronic equipment provided by the embodiments of the present application have been described above in detail. In this paper, specific examples are used to illustrate the principles and implementation methods of the present application. The description of the above embodiments It is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation and application scope. In summary, this The content of the description should not be understood as limiting the application.

Claims (18)

1. a kind of application program management-control method, applied to electronic equipment, it is characterised in that methods described includes step:
Obtain the first temperature value of the electronic equipment;
If first temperature value is more than or equal to the first preset temperature threshold value, the occupancy resource ratio of application program is obtained;
If the occupancy resource ratio of the application program is more than preset ratio threshold value, limits the application program and take resource ratio Example;
In the first preset duration, the second temperature value of the electronic equipment is repeatedly obtained, obtains multiple second temperature values, according to The multiple second temperature value stops the second preset duration and obtains temperature value.
2. application program management-control method according to claim 1, it is characterised in that described according to the multiple second temperature Value stops the step of the second preset duration obtains temperature value, including:
If the multiple second temperature value is more than or equal to the first preset temperature threshold value, stops the second preset duration and obtain temperature Value.
3. application program management-control method according to claim 1, it is characterised in that described according to the multiple second temperature Value stops the step of the second preset duration obtains temperature value, including:
If the second temperature value number ratio more than or equal to the first preset temperature threshold value reaches predetermined number ratio, stop Two preset durations obtain temperature value.
4. application program management-control method according to claim 1, it is characterised in that the limitation application program takes The step of resource ratio, including:
If the application program is foreground application, limits the application program and take resource ratio;
If the application program is background application, the application program is cleared up.
5. application program management-control method according to claim 1, it is characterised in that the occupancy money for obtaining application program The step of source ratio, including:
Two or more sub- occupancy resource ratios of interval acquiring application program, according to two or more sub- occupancy resource ratios Example obtains the occupancy resource ratio.
6. application program management-control method according to claim 1, it is characterised in that described to obtain the of the electronic equipment The step of one temperature value, including:
The first temperature value of the electronic equipment that kernel reports is obtained by preset interface.
7. application program management-control method according to claim 1, it is characterised in that described to obtain the of the electronic equipment The step of one temperature value, including:
When two adjacent first temperature value differences that kernel obtains, it is current to obtain the electronic equipment that reports of kernel First temperature value.
8. application program management-control method according to claim 1, it is characterised in that if first temperature value is more than Or equal to the first preset temperature threshold value, then the step of obtaining the occupancy resource ratio of application program, including:
If journey is applied in the first preset temperature threshold value that first temperature is more than or equal in the newly-increased default node of kernel, acquisition The occupancy resource ratio of sequence.
9. a kind of control device of application program, applied to electronic equipment, it is characterised in that the control device includes:
First acquisition unit, for obtaining the first temperature value of the electronic equipment;
Second acquisition unit, if first temperature value is more than or equal to the first preset temperature threshold value, obtain application program Take resource ratio;
Control unit, if the occupancy resource ratio for the application program is more than preset ratio threshold value, limit the application Program takes resource ratio;
Control unit, in the first preset duration, repeatedly obtaining the second temperature value of the electronic equipment, obtain multiple Two temperature values, the second preset duration is stopped according to the multiple second temperature value and obtains temperature value.
10. application program control device according to claim 9, it is characterised in that described control unit, if being additionally operable to institute State multiple second temperature values and be more than or equal to the first preset temperature threshold value, then stop the second preset duration and obtain temperature value.
11. application program control device according to claim 9, it is characterised in that described control unit, if being additionally operable to big Reach predetermined number ratio in or equal to the second temperature value number ratio of the first preset temperature threshold value, then stop second it is default when It is long to obtain temperature value.
12. application program control device according to claim 9, it is characterised in that the control unit, if being additionally operable to institute It is foreground application to state application program, then limits the application program and take resource ratio;If the application program is backstage Application program, then the application program is cleared up.
13. application program control device according to claim 9, it is characterised in that the second acquisition unit includes:
Resource ratio obtains subelement, for two or more sub- occupancy resource ratios of interval acquiring application program,
Computation subunit, for obtaining the occupancy resource ratio according to two or more sub- occupancy resource ratios.
14. application program control device according to claim 9, it is characterised in that the first acquisition unit, be additionally operable to The first temperature value of the electronic equipment that kernel reports is obtained by preset interface.
15. application program control device according to claim 9, it is characterised in that the first acquisition unit, be additionally operable to When two adjacent first temperature value differences that kernel obtains, obtain the electronic equipment that reports of kernel it is current first Temperature value.
16. application program control device according to claim 9, it is characterised in that the first acquisition unit, be additionally operable to If the first preset temperature threshold value that first temperature is more than or equal in the newly-increased default node of kernel, obtains application program Take resource ratio.
17. a kind of storage medium, is stored thereon with computer program, it is characterised in that when the computer program is in computer During upper operation so that the computer performs the application program management-control method as described in any one of claim 1 to 8.
18. a kind of electronic equipment, including processor and memory, the memory have computer program, it is characterised in that described Processor is by calling the computer program, for performing the application program management and control side as described in any one of claim 1 to 8 Method.
CN201711047047.3A 2017-10-31 2017-10-31 Application program control method and device, storage medium and electronic equipment Active CN107729216B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711047047.3A CN107729216B (en) 2017-10-31 2017-10-31 Application program control method and device, storage medium and electronic equipment
PCT/CN2018/110512 WO2019085748A1 (en) 2017-10-31 2018-10-16 Application program management and control method and apparatus, and storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711047047.3A CN107729216B (en) 2017-10-31 2017-10-31 Application program control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107729216A true CN107729216A (en) 2018-02-23
CN107729216B CN107729216B (en) 2020-03-10

Family

ID=61202519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711047047.3A Active CN107729216B (en) 2017-10-31 2017-10-31 Application program control method and device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN107729216B (en)
WO (1) WO2019085748A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108490913A (en) * 2018-03-22 2018-09-04 深圳市沃特沃德股份有限公司 Method and device for controlling temperature of vehicle-mounted system
CN109388540A (en) * 2018-09-30 2019-02-26 联想(北京)有限公司 A kind of processing method and electronic equipment
WO2019085748A1 (en) * 2017-10-31 2019-05-09 Oppo广东移动通信有限公司 Application program management and control method and apparatus, and storage medium and electronic device
CN111708633A (en) * 2020-05-28 2020-09-25 北京赛博云睿智能科技有限公司 Dynamic resource adjustment method and system
CN112463350A (en) * 2019-09-09 2021-03-09 珠海市魅族科技有限公司 Background application optimization method and device, storage medium and electronic device
CN113075983A (en) * 2021-04-01 2021-07-06 浪潮电子信息产业股份有限公司 CPU cooling method, device, equipment and computer readable storage medium
CN115373443A (en) * 2022-08-26 2022-11-22 深圳市广通远驰科技有限公司 Temperature control method, temperature control device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306095A (en) * 2011-07-21 2012-01-04 宇龙计算机通信科技(深圳)有限公司 Application management method and terminal
CN103699471A (en) * 2014-01-13 2014-04-02 浪潮(北京)电子信息产业有限公司 Method and device for controlling temperature of computer hardware
CN106371970A (en) * 2016-08-29 2017-02-01 北京小米移动软件有限公司 Application monitoring method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510422B (en) * 2011-10-09 2014-06-25 惠州Tcl移动通信有限公司 Mobile terminal and method for regulating operating load thereof
CN106095022B (en) * 2016-05-31 2020-09-25 联想(北京)有限公司 Control method and electronic equipment
CN106126841B (en) * 2016-06-30 2019-08-23 福州瑞芯微电子股份有限公司 A kind of method and apparatus based on hardware frequency conversion
CN107729216B (en) * 2017-10-31 2020-03-10 Oppo广东移动通信有限公司 Application program control method and device, storage medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306095A (en) * 2011-07-21 2012-01-04 宇龙计算机通信科技(深圳)有限公司 Application management method and terminal
CN103699471A (en) * 2014-01-13 2014-04-02 浪潮(北京)电子信息产业有限公司 Method and device for controlling temperature of computer hardware
CN106371970A (en) * 2016-08-29 2017-02-01 北京小米移动软件有限公司 Application monitoring method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019085748A1 (en) * 2017-10-31 2019-05-09 Oppo广东移动通信有限公司 Application program management and control method and apparatus, and storage medium and electronic device
CN108490913A (en) * 2018-03-22 2018-09-04 深圳市沃特沃德股份有限公司 Method and device for controlling temperature of vehicle-mounted system
CN108490913B (en) * 2018-03-22 2020-12-22 深圳市沃特沃德股份有限公司 Method and device for controlling temperature of vehicle-mounted system
CN109388540A (en) * 2018-09-30 2019-02-26 联想(北京)有限公司 A kind of processing method and electronic equipment
CN112463350A (en) * 2019-09-09 2021-03-09 珠海市魅族科技有限公司 Background application optimization method and device, storage medium and electronic device
CN111708633A (en) * 2020-05-28 2020-09-25 北京赛博云睿智能科技有限公司 Dynamic resource adjustment method and system
CN113075983A (en) * 2021-04-01 2021-07-06 浪潮电子信息产业股份有限公司 CPU cooling method, device, equipment and computer readable storage medium
CN115373443A (en) * 2022-08-26 2022-11-22 深圳市广通远驰科技有限公司 Temperature control method, temperature control device, electronic equipment and storage medium
CN115373443B (en) * 2022-08-26 2024-04-05 深圳市广通远驰科技有限公司 Temperature control method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2019085748A1 (en) 2019-05-09
CN107729216B (en) 2020-03-10

Similar Documents

Publication Publication Date Title
CN107729216B (en) Application program control method and device, storage medium and electronic equipment
US10970085B2 (en) Resource management with dynamic resource policies
CN103782272B (en) Switch task between isomery core
US8112646B2 (en) Buffering techniques for power management
US9142001B2 (en) Performance allocation method and apparatus
CN107577508B (en) Application processing method, device, readable storage medium and mobile terminal
US20170308148A1 (en) Adaptive Doze to Hibernate
US20210337523A1 (en) Pdcch monitoring method and apparatus, terminal, base station, and storage medium
CN106358225B (en) Network data processing method and device and mobile terminal
CN105978971A (en) Message pushing method and device, and message pushing server
CN107450952B (en) Application control method and device, storage medium and electronic equipment
CN106020962A (en) Progress control method and terminal equipment
CN110018905B (en) Information processing method, device, computer device, and computer-readable storage medium
CN106125891A (en) Terminal power optimization method, device and terminal
CN110032429A (en) Information processing method, device, mobile terminal and computer readable storage medium
CN109803360A (en) WiFi dormancy control method, device, electronic equipment and storage medium
CN108011860B (en) Method, device and terminal for processing broadcast message
US20180321723A1 (en) Offline Battery Management in a Device
CN109992314A (en) Data reporting method, device, terminal and storage medium
CN114968551B (en) Process management method and device, electronic equipment and storage medium
CN106331156A (en) Terminal information interaction method and device
CN106937370A (en) A broadcast message sending method, device and mobile terminal
CN107025118A (en) Terminate the method and device of application program
US9639137B2 (en) Control method and electronic device
CN116955271A (en) Method and device for storing data copy, electronic equipment and storage medium

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant