[go: up one dir, main page]

CN106020990A - Control method for central processing unit and terminal equipment - Google Patents

Control method for central processing unit and terminal equipment Download PDF

Info

Publication number
CN106020990A
CN106020990A CN201610512628.9A CN201610512628A CN106020990A CN 106020990 A CN106020990 A CN 106020990A CN 201610512628 A CN201610512628 A CN 201610512628A CN 106020990 A CN106020990 A CN 106020990A
Authority
CN
China
Prior art keywords
processing unit
central processing
cores
unit
operating frequency
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
CN201610512628.9A
Other languages
Chinese (zh)
Other versions
CN106020990B (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.)
Beijing Tianrun Jiahe Technology Co.,Ltd.
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610512628.9A priority Critical patent/CN106020990B/en
Publication of CN106020990A publication Critical patent/CN106020990A/en
Application granted granted Critical
Publication of CN106020990B publication Critical patent/CN106020990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/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/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the invention discloses a control method for a central processing unit and terminal equipment, which are applied to the technical field of mobile communications. The method in the embodiment of the invention comprises the following steps of monitoring the frame rate of a currently-running application program in the terminal equipment; judging whether the frame rate of the currently-running application program is smaller than a first preset threshold or not; if the frame rate of the currently-running application program is smaller than the first preset threshold, improving the number of running kernels of the central processing unit and/or the working frequency of the kernels of the central processing unit. According to the embodiment of the invention, the power consumption of a CPU (Central Processing Unit) and the limitation of performance optimization are reduced.

Description

一种中央处理器的控制方法及终端设备A control method of a central processing unit and a terminal device

技术领域technical field

本发明涉及移动通信技术领域,尤其涉及一种中央处理器的控制方法及终端设备。The invention relates to the technical field of mobile communication, in particular to a control method of a central processing unit and a terminal device.

背景技术Background technique

随着终端设备(例如,智能手机以及平板电脑等)的快速发展,多核处理器在终端设备中得到广泛的应用,使得终端设备处理器的性能越来越好,相应的,终端设备的功耗也随之增大,进而导致终端设备的续航时间变短。With the rapid development of terminal equipment (for example, smart phones and tablet computers, etc.), multi-core processors are widely used in terminal equipment, making the performance of terminal equipment processors better and better. Correspondingly, the power consumption of terminal equipment It also increases accordingly, which in turn leads to a shorter battery life of the terminal device.

终端设备中的中央处理器(Central Processing Unit,CPU)不是一直运行在一个频率上,而是会根据实际的需求进行调频,使CPU运行在不同的频率,从而达到功耗和性能最优的目的。目前,通过预先设置不同的应用程序一一对应的CPU性能调整策略,在终端设备运行时,检测终端设备当前的应用程序,查找出与终端设备当前的应用程序匹配的CPU性能调整策略,并执行该CPU性能调整策略对CPU的性能进行调整。但是,采用预先设置应用程序与CPU性能调整策略对应的方式,在某一应用程序不在预设列表中时,则无法对CPU性能进行调整,因此,在对CPU功耗及性能优化方面具有一定的局限性。The central processing unit (Central Processing Unit, CPU) in the terminal device does not always run at one frequency, but will adjust the frequency according to actual needs, so that the CPU runs at different frequencies, so as to achieve the purpose of optimal power consumption and performance . At present, by pre-setting the CPU performance adjustment strategy corresponding to different application programs one by one, when the terminal device is running, the current application program of the terminal device is detected, and the CPU performance adjustment strategy matching the current application program of the terminal device is found, and executed The CPU performance adjustment policy adjusts the performance of the CPU. However, by adopting the method of presetting the correspondence between the application program and the CPU performance adjustment strategy, when a certain application program is not in the preset list, the CPU performance cannot be adjusted. Therefore, it has certain advantages in terms of CPU power consumption and performance optimization. limitation.

发明内容Contents of the invention

本发明实施例提供了一种中央处理器的控制方法及终端设备,通过监测终端设备中当前运行的应用程序的帧率,动态控制CPU运行的内核数量和/或CPU内核的工作频率,降低了CPU功耗及性能优化的局限性。Embodiments of the present invention provide a central processing unit control method and a terminal device. By monitoring the frame rate of the application program currently running in the terminal device, the number of cores running on the CPU and/or the operating frequency of the CPU core are dynamically controlled to reduce the Limitations of CPU power consumption and performance optimization.

本发明实施例第一方面公开了一种中央处理器的控制方法,包括:The first aspect of the embodiment of the present invention discloses a control method of a central processing unit, including:

监测终端设备中当前运行的应用程序的帧率;Monitor the frame rate of the application program currently running in the terminal device;

判断所述当前运行的应用程序的帧率是否小于第一预设阈值;judging whether the frame rate of the currently running application is less than a first preset threshold;

若小于所述第一预设阈值,则提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。If it is less than the first preset threshold, increase the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit.

作为一种可选的实施方式,所述提高中央处理器运行的内核数量和/或中央处理器内核的工作频率,包括:As an optional implementation, the increasing the number of cores run by the CPU and/or the operating frequency of the cores of the CPU includes:

开启所述中央处理器的所有内核;Turn on all cores of the central processing unit;

将所述中央处理器的所有内核的工作频率调整为最高频率。and adjusting the operating frequency of all cores of the central processing unit to the highest frequency.

作为一种可选的实施方式,所述提高中央处理器运行的内核数量和/或中央处理器内核的工作频率之后,所述方法还包括:As an optional implementation manner, after increasing the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit, the method further includes:

判断所述当前运行的应用程序的帧率是否大于第二预设阈值;judging whether the frame rate of the currently running application is greater than a second preset threshold;

若所述当前运行的应用程序的帧率大于所述第二预设阈值,则降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率。If the frame rate of the currently running application program is greater than the second preset threshold, reduce the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores.

作为一种可选的实施方式,所述降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率,包括:As an optional implementation manner, the reducing the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores includes:

按照预设规则逐步降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率,直至所述当前运行的应用程序的帧率大于所述第一预设阈值,而不大于所述第二预设阈值。Gradually reduce the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores according to preset rules until the frame rate of the currently running application is greater than the first preset threshold, without greater than the second preset threshold.

作为一种可选的实施方式,所述方法还包括:As an optional implementation, the method also includes:

监测所述中央处理器的温度;monitoring the temperature of the central processing unit;

若所述中央处理器的温度超过预设温度,则降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率。If the temperature of the central processing unit exceeds the preset temperature, the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit are reduced.

本发明实施例第二方面公开了一种终端设备,包括:The second aspect of the embodiment of the present invention discloses a terminal device, including:

第一监测单元,用于监测终端设备中当前运行的应用程序的帧率;The first monitoring unit is used to monitor the frame rate of the application currently running in the terminal device;

第一判断单元,用于判断所述当前运行的应用程序的帧率是否小于第一预设阈值;A first judging unit, configured to judge whether the frame rate of the currently running application is less than a first preset threshold;

第一调整单元,用于在所述当前运行的应用程序的帧率小于所述第一预设阈值时,提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。The first adjustment unit is configured to increase the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores when the frame rate of the currently running application program is lower than the first preset threshold.

作为一种可选的实施方式,所述第一调整单元包括:As an optional implementation manner, the first adjustment unit includes:

开启单元,用于开启所述中央处理器的所有内核;an opening unit, configured to open all cores of the central processing unit;

频率调整单元,用于将所述中央处理器的所有内核的工作频率调整为最高频率。The frequency adjustment unit is used to adjust the working frequency of all the cores of the central processing unit to the highest frequency.

作为一种可选的实施方式,所述终端设备还包括:As an optional implementation manner, the terminal device further includes:

第二判断单元,用于判断所述当前运行的应用程序的帧率是否大于第二预设阈值;A second judging unit, configured to judge whether the frame rate of the currently running application is greater than a second preset threshold;

第二调整单元,用于在所述当前运行的应用程序的帧率大于所述第二预设阈值时,降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率。A second adjustment unit, configured to reduce the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores when the frame rate of the currently running application is greater than the second preset threshold .

作为一种可选的实施方式,As an optional implementation,

所述第二调整单元,具体用于按照预设规则逐步降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率,直至所述当前运行的应用程序的帧率大于所述第一预设阈值,而不大于所述第二预设阈值。The second adjustment unit is specifically configured to gradually reduce the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores according to preset rules until the frame rate of the currently running application is greater than The first preset threshold is not greater than the second preset threshold.

作为一种可选的实施方式,所述终端设备还包括:As an optional implementation manner, the terminal device further includes:

第二监测单元,用于监测所述中央处理器的温度;a second monitoring unit, configured to monitor the temperature of the central processing unit;

第三调整单元,用于在所述中央处理器的温度超过预设温度时,降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率。The third adjustment unit is configured to reduce the number of cores run by the central processor and/or the operating frequency of the cores of the central processor when the temperature of the central processor exceeds a preset temperature.

从以上技术方案可以看出,本发明实施例具有以下优点:通过监测终端设备中当前运行的应用程序的帧率;并在终端设备中当前运行的应用程序的帧率小于第一预设阈值时,提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。实施本发明实施例,通过监测终端设备中当前运行的应用程序的帧率,动态控制CPU运行的内核数量和/或CPU内核的工作频率,降低了CPU功耗及性能优化的局限性。It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages: by monitoring the frame rate of the application program currently running in the terminal device; and when the frame rate of the application program currently running in the terminal device is less than the first preset threshold , increasing the number of cores the CPU runs and/or the operating frequency of the CPU cores. By implementing the embodiment of the present invention, by monitoring the frame rate of the application program currently running in the terminal device, the number of cores run by the CPU and/or the operating frequency of the CPU cores are dynamically controlled, thereby reducing the limitations of CPU power consumption and performance optimization.

附图说明Description of drawings

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

图1是本发明实施例公开的一种中央处理器的控制方法的流程示意图;Fig. 1 is a schematic flow chart of a control method of a central processing unit disclosed in an embodiment of the present invention;

图2是本发明实施例公开的另一种中央处理器的控制方法的流程示意图;Fig. 2 is a schematic flow chart of another central processing unit control method disclosed in the embodiment of the present invention;

图3是本发明实施例公开的一种终端设备的结构示意图;FIG. 3 is a schematic structural diagram of a terminal device disclosed in an embodiment of the present invention;

图4是本发明实施例公开的另一种终端设备的结构示意图;FIG. 4 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention;

图5是本发明实施例公开的另一种终端设备的结构示意图。Fig. 5 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention.

具体实施方式detailed description

为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments . Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”和“第三”是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second" and "third" in the specification and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the term "comprise", as well as any variations thereof, is intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.

本发明实施例提供了一种中央处理器的控制方法及终端设备,通过监测终端设备中当前运行的应用程序的帧率,动态控制CPU运行的内核数量和/或CPU内核的工作频率,降低了CPU功耗及性能优化的局限性。Embodiments of the present invention provide a central processing unit control method and a terminal device. By monitoring the frame rate of the application program currently running in the terminal device, the number of cores running on the CPU and/or the operating frequency of the CPU core are dynamically controlled to reduce the Limitations of CPU power consumption and performance optimization.

请参阅图1,图1是本发明实施例公开的一种中央处理器的控制方法的流程示意图。其中,图1所示的中央处理器的控制方法可以包括以下步骤:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of a control method of a central processing unit disclosed by an embodiment of the present invention. Wherein, the control method of the central processing unit shown in Figure 1 may include the following steps:

101、监测终端设备中当前运行的应用程序的帧率;101. Monitor the frame rate of the application program currently running in the terminal device;

本发明实施例中,终端设备可以包括手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)、移动互联网设备(Mobile Internet Device,MID)以及销售终端(Point of Sales,POS)等,本发明实施例后续不作复述。In the embodiment of the present invention, the terminal device may include a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), a mobile Internet device (Mobile Internet Device, MID), and a sales terminal (Point of Sales, POS), etc., the present invention The following examples will not be repeated.

帧率(Frame Rate)是用于测量显示帧数的量度。所谓的测量单位为每秒显示帧数(Frames per Second,FPS)或“赫兹”(Hz)。可以通过修改操作系统源码,打开系统源码中的帧率检测开关,从而对运行在该系统上的应用程序进行帧率检测;或者,还可以修改应用程序源码,在应用程序源码中编写帧率检测代码模块等,具体采用何种检测帧率的方式,本发明实施例不作唯一性限定。Frame Rate is a metric used to measure the number of frames displayed. The so-called unit of measurement is Frames per Second (FPS) or "Hertz" (Hz). You can modify the source code of the operating system and turn on the frame rate detection switch in the system source code, so as to detect the frame rate of the application program running on the system; or you can also modify the source code of the application program and write the frame rate detection in the application program source code The embodiment of the present invention does not uniquely limit the specific method of detecting the frame rate of the code module and the like.

102、判断上述当前运行的应用程序的帧率是否小于第一预设阈值;102. Determine whether the frame rate of the currently running application is less than a first preset threshold;

本发明实施例中,由于人类眼睛的特殊生理结构,如果所看画面的帧率高于24的时候,就会认为是连贯的,此现象称之为视觉暂留。对与游戏来说,如果帧率小于30的话,游戏会显得不连贯。因此,第一预设阈值可以根据经验确定,或者根据试验确定,以可以保证用户的流畅使用为原则。In the embodiment of the present invention, due to the special physiological structure of human eyes, if the frame rate of the viewed picture is higher than 24, it will be considered coherent, and this phenomenon is called persistence of vision. For games, if the frame rate is less than 30, the game will appear choppy. Therefore, the first preset threshold can be determined based on experience, or determined based on experiments, based on the principle of ensuring the user's smooth use.

103、若小于第一预设阈值,则提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。103. If it is less than the first preset threshold, increase the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit.

本发明实施例中,若终端设备中当前运行的应用程序的帧率小于第一预设阈值,则说明运行该应用程序时可能出现卡顿现象,因此可以通过提高中央处理器运行的内核数量和/或中央处理器内核的工作频率来消除卡顿现象。In the embodiment of the present invention, if the frame rate of the application program currently running in the terminal device is less than the first preset threshold, it means that the application program may be stuck when running the application program. Therefore, by increasing the number of cores run by the CPU and and/or the operating frequency of the CPU core to eliminate stuttering.

在图1所描述的中央处理器的控制方法中,通过监测终端设备中当前运行的应用程序的帧率;并在终端设备中当前运行的应用程序的帧率小于第一预设阈值时,提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。降低了CPU功耗及性能优化的局限性。In the control method of the central processing unit described in FIG. 1, by monitoring the frame rate of the application program currently running in the terminal device; and when the frame rate of the application program currently running in the terminal device is less than the first preset threshold, increase the The number of cores the CPU is running on and/or the operating frequency of the CPU cores. Reduced the limitations of CPU power consumption and performance optimization.

进一步地,请参阅图2,图2是本发明实施例公开的另一种中央处理器的控制方法的流程示意图。其中,图2所示的中央处理器的控制方法可以包括以下步骤:Further, please refer to FIG. 2 . FIG. 2 is a schematic flow chart of another central processing unit control method disclosed in an embodiment of the present invention. Wherein, the control method of the central processing unit shown in Figure 2 may include the following steps:

201、监测终端设备中当前运行的应用程序的帧率;201. Monitor the frame rate of the application program currently running in the terminal device;

202、判断上述当前运行的应用程序的帧率是否小于第一预设阈值;202. Determine whether the frame rate of the above-mentioned currently running application is less than a first preset threshold;

203、若小于第一预设阈值,则开启中央处理器的所有内核;将上述中央处理器的所有内核的工作频率调整为最高频率;203. If it is less than the first preset threshold, turn on all the cores of the central processing unit; adjust the operating frequency of all the cores of the central processing unit to the highest frequency;

本发明实施例中,在终端设备中当前运行的应用程序的帧率小于第一预设阈值时,调整终端设备中的CPU以最大性能输出。其中,调整终端设备中的CPU以最大性能输出包括:开启中央处理器的所有内核;将上述中央处理器的所有内核的工作频率调整为最高频率。In the embodiment of the present invention, when the frame rate of the application program currently running in the terminal device is lower than the first preset threshold, the CPU in the terminal device is adjusted to output with maximum performance. Wherein, adjusting the CPU in the terminal device to output the maximum performance includes: turning on all cores of the central processing unit; adjusting the working frequency of all the cores of the central processing unit to the highest frequency.

其中,随着电子技术的不断发展,CPU的内核已经从单核进化到双核、四核甚至八核,内核数越多能够带来更快的数据处理速度,但是一般情况下也会有一定的性能空闲,因此,开启CPU中的所有内核,可以进一步提高数据处理速度。Among them, with the continuous development of electronic technology, the core of the CPU has evolved from single-core to dual-core, quad-core or even eight-core. The more cores can bring faster data processing speed, but generally there will be a certain The performance is idle, so turning on all the cores in the CPU can further increase the data processing speed.

其中,CPU频率,就是CPU的时钟频率,简单说是CPU运算时的工作的频率(1秒内发生的同步脉冲数)的简称,单位是Hz。它决定计算机的运行速度,随着计算机的发展,主频由过去MHZ发展到了当前的GHZ(1GHZ=10^3MHZ=10^6KHZ=10^9HZ)。将CPU的工作频率提高,直接设置为设计的最高频率,可以更进一步地提高数据处理速度;当然,也可选择调整为比较接近设计最高频率的状态工作。Among them, the CPU frequency is the clock frequency of the CPU. Simply put, it is the abbreviation of the working frequency (the number of synchronous pulses that occur within 1 second) during the CPU operation, and the unit is Hz. It determines the running speed of the computer. With the development of the computer, the main frequency has been developed from the past MHZ to the current GHZ (1GHZ=10^3MHZ=10^6KHZ=10^9HZ). Increase the operating frequency of the CPU and directly set it to the highest designed frequency, which can further increase the data processing speed; of course, you can also choose to adjust it to work at a state that is relatively close to the highest designed frequency.

进一步地,上述设计的最高频率可以通过终端设备的系统提供的调频接口进行调整,对于一般的终端设备而言,其系统都设置有对CPU进行调整的接口,在本发明实施例中,可以在调频时访问该接口调整CPU的工作频率。Furthermore, the highest frequency of the above design can be adjusted through the frequency modulation interface provided by the system of the terminal equipment. For general terminal equipment, the system is equipped with an interface for adjusting the CPU. In the embodiment of the present invention, it can be adjusted in Access this interface to adjust the operating frequency of the CPU during frequency tuning.

204、判断上述当前运行的应用程序的帧率是否大于第二预设阈值;204. Determine whether the frame rate of the above-mentioned currently running application is greater than a second preset threshold;

本发明实施例中,由于CPU的能耗速度的增加与CPU工作频率的增加并不是成正比,工作频率越高,能耗的速度可以说是成几何倍数增加,所以在实际的运转过程中,CPU一般都维持在一个比较适中的频率,工作频率再提高之后,数据处理的速度提高不太明显,但是发热、损耗带来的损失会增加明显。例如,在视频播放过程中,一般来说30FPS就是可以接受的,但是将性能提升至60FPS则可以明显提升交互感和逼真感,但是一般来说超过75FPS一般就不容易察觉到有明显的流畅度提升了。如果帧率超过屏幕刷新率只会浪费图形处理的能力,因为监视器不能以这么快的速度更新,这样超过刷新率的帧率就浪费掉了。In the embodiment of the present invention, since the increase of CPU energy consumption speed is not directly proportional to the increase of CPU operating frequency, the higher the operating frequency, the higher the energy consumption speed can be said to increase geometrically, so in the actual operation process, The CPU generally maintains a relatively moderate frequency. After the operating frequency is increased, the speed of data processing will not increase significantly, but the losses caused by heat generation and loss will increase significantly. For example, in the process of video playback, generally speaking, 30FPS is acceptable, but increasing the performance to 60FPS can significantly improve the sense of interaction and realism, but generally speaking, it is not easy to notice obvious fluency if it exceeds 75FPS Promoted. If the frame rate exceeds the screen refresh rate, it will only waste graphics processing power, because the monitor cannot update at such a fast rate, so the frame rate exceeding the refresh rate is wasted.

本发明实施例中,第二预设阈值可以根据显示屏幕的刷新率确定,或者根据试验确定,以减少不需要的帧率浪费。In the embodiment of the present invention, the second preset threshold may be determined according to the refresh rate of the display screen, or determined according to experiments, so as to reduce unnecessary waste of frame rate.

205、若上述当前运行的应用程序的帧率大于第二预设阈值,则按照预设规则逐步降低中央处理器运行的内核数量和/或中央处理器内核的工作频率,直至当前运行的应用程序的帧率大于第一预设阈值,而不大于第二预设阈值;205. If the frame rate of the above-mentioned currently running application program is greater than the second preset threshold, gradually reduce the number of cores run by the CPU and/or the operating frequency of the CPU cores according to preset rules until the currently running application program The frame rate is greater than the first preset threshold but not greater than the second preset threshold;

本发明实施例中,预设规则可以由用户根据经验设定,或者根据试验确定一个最优的策略,在终端设备中当前运行的应用程序的帧率大于第二预设阈值时,按照该预设规则逐步降低中央处理器运行的内核数量和/或中央处理器内核的工作频率,直至当前运行的应用程序的帧率大于第一预设阈值,而不大于第二预设阈值。例如,按照预设规则降低中央处理器运行的内核数量和/或中央处理器内核的工作频率之后,终端设备中当前运行的应用程序的帧率仍然大于第二预设阈值,则继续按照预设规则降低中央处理器运行的内核数量和/或中央处理器内核的工作频率,直至当前运行的应用程序的帧率大于第一预设阈值,而不大于第二预设阈值。In the embodiment of the present invention, the preset rule can be set by the user based on experience, or an optimal strategy can be determined based on experiments. When the frame rate of the application program currently running in the terminal device is greater than the second preset threshold, the preset rule A rule is set to gradually reduce the number of cores run by the CPU and/or the operating frequency of the cores of the CPU until the frame rate of the currently running application is greater than the first preset threshold but not greater than the second preset threshold. For example, after reducing the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit according to preset rules, if the frame rate of the application program currently running in the terminal device is still greater than the second preset threshold, continue to follow the preset rule. The rule reduces the number of cores run by the CPU and/or the operating frequency of the cores of the CPU until the frame rate of the currently running application is greater than the first preset threshold but not greater than the second preset threshold.

206、监测中央处理器的温度;206. Monitor the temperature of the central processing unit;

本发明实施例中,在开启中央处理器的所有内核;将上述中央处理器的所有内核的工作频率调整为最高频率之后,由于CPU的发热、损耗会显著性的增加,为了控制CPU的温度,可以实时监测CPU的温度。In the embodiment of the present invention, after turning on all the cores of the central processing unit; after adjusting the working frequency of all the cores of the central processing unit to the highest frequency, since the heating and loss of the CPU will increase significantly, in order to control the temperature of the CPU, Can monitor CPU temperature in real time.

207、若中央处理器的温度超过预设温度,则降低中央处理器运行的内核数量和/或中央处理器内核的工作频率。207. If the temperature of the central processing unit exceeds the preset temperature, reduce the number of cores running on the central processing unit and/or the operating frequency of the cores of the central processing unit.

本发明实施例中,预设温度可以根据CPU的说明书中的可承受的最高温度设定,或者根据试验确定。在CPU的温度超过预设温度时,降低中央处理器运行的内核数量和/或中央处理器内核的工作频率,以保证CPU的安全运行。In the embodiment of the present invention, the preset temperature may be set according to the maximum bearable temperature in the instruction manual of the CPU, or determined according to experiments. When the temperature of the CPU exceeds the preset temperature, the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit are reduced to ensure safe operation of the CPU.

请参阅图3,图3是本发明实施例公开的一种终端设备的结构示意图,如图3所示,该终端设备可以包括:Please refer to FIG. 3. FIG. 3 is a schematic structural diagram of a terminal device disclosed in an embodiment of the present invention. As shown in FIG. 3, the terminal device may include:

第一监测单元301,用于监测终端设备中当前运行的应用程序的帧率;The first monitoring unit 301 is configured to monitor the frame rate of the application currently running in the terminal device;

第一判断单元302,用于判断上述当前运行的应用程序的帧率是否小于第一预设阈值;The first judging unit 302 is configured to judge whether the frame rate of the above-mentioned currently running application is less than a first preset threshold;

第一调整单元303,用于在上述当前运行的应用程序的帧率小于第一预设阈值时,提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。The first adjustment unit 303 is configured to increase the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores when the frame rate of the currently running application is lower than a first preset threshold.

本发明实施例中,通过第一监测单元301监测终端设备中当前运行的应用程序的帧率,进一步地通过第一判断单元302判断上述当前运行的应用程序的帧率是否小于第一预设阈值,并在上述当前运行的应用程序的帧率小于第一预设阈值时,通过第一调整单元303提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。In the embodiment of the present invention, the first monitoring unit 301 monitors the frame rate of the currently running application program in the terminal device, and further uses the first judging unit 302 to determine whether the frame rate of the above-mentioned currently running application program is less than the first preset threshold , and when the frame rate of the currently running application is lower than the first preset threshold, the number of cores run by the central processing unit 303 and/or the operating frequency of the cores of the central processing unit are increased through the first adjustment unit 303 .

请一并参阅图4,图4是本发明实施例公开的另一种终端设备的结构示意图。其中,图4所示的终端设备是由图3所示的终端设备进行优化得到的,与图3所示的终端设备相比,上述第一调整单元303包括:Please refer to FIG. 4 together. FIG. 4 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention. Wherein, the terminal device shown in FIG. 4 is obtained by optimizing the terminal device shown in FIG. 3 . Compared with the terminal device shown in FIG. 3 , the above-mentioned first adjustment unit 303 includes:

开启单元3031,用于开启中央处理器的所有内核;Opening unit 3031, configured to open all cores of the central processing unit;

频率调整单元3032,用于将上述中央处理器的所有内核的工作频率调整为最高频率。The frequency adjustment unit 3032 is configured to adjust the working frequency of all the cores of the central processing unit to the highest frequency.

其中,通过开启单元3031以及频率调整单元3032可以使CPU以最佳性能输出。Wherein, the CPU can output with the best performance through the enabling unit 3031 and the frequency adjusting unit 3032 .

可选地,在图4所示的终端设备中,该终端设备还可以包括:Optionally, in the terminal device shown in Figure 4, the terminal device may also include:

第二判断单元304,用于判断上述当前运行的应用程序的帧率是否大于第二预设阈值;The second judging unit 304 is configured to judge whether the frame rate of the above-mentioned currently running application is greater than a second preset threshold;

第二调整单元305,用于在上述当前运行的应用程序的帧率是否大于第二预设阈值时,降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率。The second adjustment unit 305 is configured to reduce the number of cores run by the CPU and/or the operating frequency of the cores of the CPU when the frame rate of the currently running application is greater than a second preset threshold.

其中,通过第二判断单元304以及第二调整单元305可以在保证终端设备流畅性的同时,降低CPU的功耗。Wherein, through the second judging unit 304 and the second adjusting unit 305, the power consumption of the CPU can be reduced while ensuring the fluency of the terminal device.

可选地,在图4所示的终端设备中,Optionally, in the terminal device shown in Figure 4,

上述第二调整单元305,具体用于按照预设规则逐步降低中央处理器运行的内核数量和/或中央处理器内核的工作频率,直至当前运行的应用程序的帧率大于第一预设阈值,而不大于第二预设阈值。The above-mentioned second adjustment unit 305 is specifically configured to gradually reduce the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores according to preset rules until the frame rate of the currently running application is greater than the first preset threshold, not greater than the second preset threshold.

可选地,在图4所示的终端设备中,该终端设备还可以包括:Optionally, in the terminal device shown in Figure 4, the terminal device may also include:

第二监测单元306,用于监测中央处理器的温度;The second monitoring unit 306 is used to monitor the temperature of the CPU;

第三调整单元307,用于在上述中央处理器的温度超过预设温度时,降低所述中央处理器运行的内核数量和/或所述中央处理器内核的工作频率。The third adjusting unit 307 is configured to reduce the number of cores run by the central processor and/or the operating frequency of the cores of the central processor when the temperature of the central processor exceeds a preset temperature.

其中,通过第二监测单元306以及第三调整单元307可以实现保证CPU安全运行的目的。Wherein, through the second monitoring unit 306 and the third adjusting unit 307, the purpose of ensuring safe operation of the CPU can be achieved.

请参阅图5,图5是本发明实施例公开的另一种终端设备的结构示意图,如图5所示,该终端设备可以包括:Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of another terminal device disclosed in an embodiment of the present invention. As shown in FIG. 5, the terminal device may include:

输入单元501、处理器单元502、输出单元503、存储单元504、通信单元505以及电源506等组件。这些组件通过一条或多条总线507进行通信。本领域技术人员可以理解,图5所示的终端设备的结构并不构成对本发明的限定,它既可以是总线型结构,也可以是星型结构,还可以包括比图5所示的结构更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施方式中,图5所示的终端设备包括但不限于移动电话、移动电脑、平板电脑、个人数字助理(Personal Digital Assistant,PDA)等各种终端设备。Input unit 501 , processor unit 502 , output unit 503 , storage unit 504 , communication unit 505 , power supply 506 and other components. These components communicate over one or more buses 507 . Those skilled in the art can understand that the structure of the terminal equipment shown in Figure 5 does not constitute a limitation to the present invention, it can be a bus structure or a star structure, and it can also include more than the structure shown in Figure 5 More or fewer components, or combinations of certain components, or different arrangements of components. In the embodiment of the present invention, the terminal devices shown in FIG. 5 include but are not limited to various terminal devices such as mobile phones, mobile computers, tablet computers, and personal digital assistants (Personal Digital Assistant, PDA).

输入单元501用于实现用户与终端设备的交互和/或信息输入到终端设备中。在本发明具体实施方式中,输入单元501可以是触控面板,触控面板也称为触摸屏或触控屏,可收集用户在其上触摸或接近的操作动作。比如用户使用手指、触笔等任何适合的物体或附件在触控面板上或接近触控面板位置的操作动作,并根据预先设定的程式驱动相应的连接装置。可选的,触控面板可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸操作,并将检测到的触摸操作转换为电信号,以及将电信号传送给触摸控制器;触摸控制器从触摸检测装置上接收电信号,并将它转换成触点坐标,再送给处理器单元502。触摸控制器还可以接收处理器单元502发来的命令并执行。此外,可以采用电阻式、电容式、红外线(Infrared)以及表面声波等多种类型实现触控面板。The input unit 501 is configured to implement interaction between a user and a terminal device and/or input information into the terminal device. In a specific embodiment of the present invention, the input unit 501 may be a touch panel, which is also referred to as a touch screen or a touch screen, and can collect operations touched or approached by a user on it. For example, the user operates any suitable object or accessory such as a finger or a stylus on the touch panel or close to the touch panel, and drives the corresponding connection device according to a preset program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch operation, and converts the detected touch operation into an electrical signal, and transmits the electrical signal to the touch controller; the touch controller receives the electrical signal from the touch detection device, and converts it into The contact coordinates are then sent to the processor unit 502 . The touch controller can also receive and execute commands sent by the processor unit 502 . In addition, various types of touch panels such as resistive, capacitive, infrared (Infrared) and surface acoustic wave can be used to realize the touch panel.

处理器单元502为终端设备的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储单元504内的程序代码和/或模块,以及调用存储在存储单元504内的数据,以执行终端设备的各种功能和/或处理数据。处理器单元502可以由集成电路(Integrated Circuit,简称IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器单元502可以仅包括中央处理器(Central ProcessingUnit,简称CPU),也可以是CPU、数字信号处理器(digitalsignal processor,简称DSP)、图形处理器(Graphic Processing Unit,简称GPU)及通信单元中的控制芯片(例如基带芯片)的组合。在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。The processor unit 502 is the control center of the terminal equipment. It uses various interfaces and lines to connect various parts of the entire terminal equipment. By running or executing the program codes and/or modules stored in the storage unit 504, and calling the in order to perform various functions of the terminal device and/or process the data. The processor unit 502 may be composed of an integrated circuit (Integrated Circuit, IC for short), for example, may be composed of a single packaged IC, or may be composed of multiple packaged ICs connected with the same function or different functions. For example, the processor unit 502 may only include a central processing unit (Central Processing Unit, referred to as CPU), and may also be a CPU, a digital signal processor (digital signal processor, referred to as DSP), a graphics processor (Graphic Processing Unit, referred to as GPU) And the combination of the control chip (such as baseband chip) in the communication unit. In the embodiments of the present invention, the CPU may be a single computing core, or may include multiple computing cores.

输出单元503可以包括但不限于影像输出单元、声音输出和触感输出单元。影像输出单元用于输出文字、图片和/或视频。影像输出单元可包括显示面板,例如采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)、场发射显示器(field emission display,简称FED)等形式来配置的显示面板。或者影像输出单元可以包括反射式显示器,例如电泳式(electrophoretic)显示器,或利用光干涉调变技术(Interferometric Modulation of Light)的显示器。影像输出单元可以包括单个显示器或不同尺寸的多个显示器。在本发明的具体实施方式中,上述输入单元501所采用的触控面板亦可同时作为输出单元503的显示面板。虽然在图5中,输入单元501与输出单元503是作为两个独立的部件来实现终端设备的输入和输出功能,但是在某些实施例中,可以将触控面板与显示面板集成一体而实现终端设备的输入和输出功能。The output unit 503 may include but not limited to an image output unit, a sound output unit, and a touch output unit. The image output unit is used for outputting text, pictures and/or videos. The image output unit may include a display panel, such as a display configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), a field emission display (field emission display, FED for short), etc. panel. Alternatively, the image output unit may include a reflective display, such as an electrophoretic display, or a display using Interferometric Modulation of Light. The image output unit may include a single display or multiple displays of different sizes. In a specific implementation manner of the present invention, the touch panel used in the input unit 501 may also serve as the display panel of the output unit 503 at the same time. Although in FIG. 5, the input unit 501 and the output unit 503 are used as two independent components to realize the input and output functions of the terminal device, in some embodiments, the touch panel and the display panel may be integrated to realize Input and output functions of terminal equipment.

存储单元504可用于存储程序代码以及模块,处理器单元502通过运行存储在存储单元504的程序代码以及模块,从而执行终端设备的各种功能应用以及实现数据处理。存储单元504主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的程序代码;数据存储区可存储根据终端设备的使用所创建的数据(比如音频数据、电话本等)等。在本发明具体实施方式中,存储单元504可以包括易失性存储器,例如非挥发性动态随机存取内存(Nonvolatile RandomAccess Memory,简称NVRAM)、相变化随机存取内存(Phase Change RAM,简称PRAM)、磁阻式随机存取内存(Magetoresistive RAM,简称MRAM)等,还可以包括非易失性存储器,例如至少一个磁盘存储器件、电子可抹除可规划只读存储器(ElectricallyErasable ProgrammableRead-OnlyMemory,简称EEPROM)、闪存器件,例如反或闪存(NOR flash memory)或是反及闪存(NAND flash memory)。非易失存储器储存处理器单元502所执行的操作系统及程序代码。处理器单元502从非易失存储器加载运行程序与数据到内存并将数字内容储存于大量储存装置中。操作系统包括用于控制和管理常规系统任务,例如内存管理、存储设备控制、电源管理等,以及有助于各种软硬件之间通信的各种组件和/或驱动器。在本发明实施方式中,操作系统可以是Google公司的Android系统、Apple公司开发的iOS系统或Microsoft公司开发的Windows操作系统等,或者是Vxworks这类的嵌入式操作系统。The storage unit 504 can be used to store program codes and modules, and the processor unit 502 executes various functional applications of the terminal device and realizes data processing by running the program codes and modules stored in the storage unit 504 . The storage unit 504 mainly includes a program storage area and a data storage area, wherein the program storage area can store the operating system and program codes required by at least one function; the data storage area can store data created according to the use of the terminal equipment (such as audio data , phone book, etc.) etc. In a specific embodiment of the present invention, the storage unit 504 may include a volatile memory, such as a nonvolatile dynamic random access memory (Nonvolatile Random Access Memory, NVRAM for short), a phase change random access memory (Phase Change RAM, PRAM for short) , magnetoresistive random access memory (Magetoresistive RAM, referred to as MRAM), etc., can also include non-volatile memory, such as at least one disk storage device, electronically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM ), flash memory devices, such as NOR flash memory or NAND flash memory. The non-volatile memory stores the operating system and program codes executed by the processor unit 502 . The processor unit 502 loads the running program and data from the non-volatile memory to the internal memory and stores the digital content in the mass storage device. An operating system includes various components and/or drivers for controlling and managing general system tasks, such as memory management, storage device control, power management, etc., as well as facilitating communication between various hardware and software. In the embodiment of the present invention, the operating system may be the Android system of Google, the iOS system developed by Apple, or the Windows operating system developed by Microsoft, or an embedded operating system such as Vxworks.

通信单元505用于建立通信信道,使终端设备通过通信信道连接至远程服务器,并从远程服务器下载媒体数据。通信单元505可以包括无线局域网(Wireless Local Area Network,简称wireless LAN)模块、蓝牙模块、近距离无线通信(Near Field Communication,简称NFC)、基带(Base Band)模块等无线通信模块和以太网、通用串行总线(Universal Serial Bus,简称USB)、闪电接口(Lightning,目前Apple用于iPhone6/6s等设备)等有线通信模块。The communication unit 505 is configured to establish a communication channel, make the terminal device connect to the remote server through the communication channel, and download media data from the remote server. The communication unit 505 may include wireless communication modules such as a wireless local area network (Wireless Local Area Network, referred to as wireless LAN) module, a Bluetooth module, a near field communication (Near Field Communication, referred to as NFC), a base band (Base Band) module, and an Ethernet, general-purpose Serial bus (Universal Serial Bus, referred to as USB), lightning interface (Lightning, currently used by Apple for iPhone6/6s and other devices) and other wired communication modules.

电源506用于给终端设备的不同部件进行供电以维持其运行。作为一般性理解,电源506可以是内置的电池,例如常见的锂离子电池、镍氢电池等,也包括直接向终端设备供电的外接电源,例如AC适配器等。在本发明的一些实施方式中,电源506还可以作更为广泛的定义,例如还可以包括电源管理系统、充电系统、电源故障检测电路、电源转换器或逆变器、电源状态指示器(如发光二极管),以及与终端设备的电能生成、管理及分布相关联的其他任何组件。The power supply 506 is used to supply power to different components of the terminal equipment to maintain its operation. As a general understanding, the power supply 506 may be a built-in battery, such as a common lithium-ion battery, a nickel-metal hydride battery, etc., and also includes an external power supply that directly supplies power to the terminal device, such as an AC adapter. In some embodiments of the present invention, the power supply 506 can also be defined more broadly, for example, it can also include a power management system, a charging system, a power failure detection circuit, a power converter or an inverter, and a power status indicator (such as light-emitting diodes), and any other components associated with the generation, management, and distribution of electrical energy in end equipment.

在图5所示的终端设备中,处理器单元502可以调用存储单元504中存储的程序代码,用于执行以下操作:In the terminal device shown in FIG. 5, the processor unit 502 can call the program code stored in the storage unit 504 to perform the following operations:

监测终端设备中当前运行的应用程序的帧率;Monitor the frame rate of the application program currently running in the terminal device;

判断上述当前运行的应用程序的帧率是否小于第一预设阈值;Judging whether the frame rate of the above-mentioned currently running application is less than a first preset threshold;

若小于第一预设阈值,则提高中央处理器运行的内核数量和/或中央处理器内核的工作频率。If it is less than the first preset threshold, increase the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit.

作为另一种可选的实施方式,处理器单元502调用存储单元504中存储的程序代码,提高中央处理器运行的内核数量和/或中央处理器内核的工作频率包括以下步骤:As another optional implementation manner, the processor unit 502 calls the program code stored in the storage unit 504, and increasing the number of cores operated by the central processing unit and/or the operating frequency of the central processing unit core includes the following steps:

开启中央处理器的所有内核;Turn on all cores of the CPU;

将上述中央处理器的所有内核的工作频率调整为最高频率。Adjust the working frequency of all cores of the above-mentioned central processing unit to the highest frequency.

作为另一种可选的实施方式,处理器单元502调用存储单元504中存储的程序代码,在提高中央处理器运行的内核数量和/或中央处理器内核的工作频率之后,还用于执行以下步骤:As another optional implementation manner, the processor unit 502 calls the program code stored in the storage unit 504, and after increasing the number of cores run by the central processing unit and/or the operating frequency of the central processing unit cores, it is also used to execute the following step:

判断上述当前运行的应用程序的帧率是否大于第二预设阈值;Judging whether the frame rate of the above-mentioned currently running application is greater than a second preset threshold;

若上述当前运行的应用程序的帧率大于第二预设阈值,则降低中央处理器运行的内核数量和/或中央处理器内核的工作频率。If the frame rate of the above-mentioned currently running application program is greater than the second preset threshold, the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit are reduced.

作为另一种可选的实施方式,处理器单元502调用存储单元504中存储的程序代码,降低中央处理器运行的内核数量和/或中央处理器内核的工作频率包括:As another optional implementation manner, the processor unit 502 calls the program code stored in the storage unit 504, and reducing the number of cores run by the central processing unit and/or the operating frequency of the central processing unit core includes:

按照预设规则逐步降低中央处理器运行的内核数量和/或中央处理器内核的工作频率,直至上述当前运行的应用程序的帧率大于上述第一预设阈值,而不大于上述第二预设阈值。Gradually reduce the number of cores run by the central processing unit and/or the operating frequency of the cores of the central processing unit according to preset rules until the frame rate of the currently running application is greater than the first preset threshold but not greater than the second preset threshold.

作为另一种可选的实施方式,处理器单元502调用存储单元504中存储的程序代码,还用于执行以下操作:As another optional implementation manner, the processor unit 502 calls the program code stored in the storage unit 504, and is also used to perform the following operations:

监测中央处理器的温度;Monitor the temperature of the CPU;

若上述中央处理器的温度超过预设温度,则降低中央处理器运行的内核数量和/或中央处理器内核的工作频率。If the temperature of the CPU exceeds the preset temperature, the number of cores run by the CPU and/or the operating frequency of the cores of the CPU are reduced.

在图5所描述的终端设备中,通过监测终端设备中当前运行的应用程序的帧率,动态控制CPU运行的内核数量和/或CPU内核的工作频率,降低了CPU功耗及性能优化的局限性。In the terminal device described in Figure 5, by monitoring the frame rate of the application program currently running in the terminal device, the number of cores running on the CPU and/or the operating frequency of the CPU core are dynamically controlled, reducing the limitations of CPU power consumption and performance optimization sex.

值得注意的是,上述终端设备的实施例中,所包括的各个单元只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。It is worth noting that, in the embodiments of the above-mentioned terminal equipment, the units included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, each functional unit The specific names are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present invention.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。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.

另外,本领域普通技术人员可以理解实现上述各方法实施例中的全部或部分步骤是可以通过程序来指令相关的硬件完成,相应的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。In addition, those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned method embodiments can be completed by instructing related hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The storage medium can be read-only memory, magnetic disk or optical disk and so on.

以上仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明实施例揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above are only preferred specific implementation modes of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present invention. , should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (10)

1. the control method of a central processing unit, it is characterised in that including:
The frame per second of the current application program run in monitoring terminal equipment;
Judge that whether the frame per second of application program of described current operation is less than the first predetermined threshold value;
If less than described first predetermined threshold value, then improving number of cores and/or central authorities that central processing unit runs The operating frequency of processor cores.
Method the most according to claim 1, it is characterised in that described raising central processing unit runs Number of cores and/or the operating frequency of central processor core, including:
Open all kernels of described central processing unit;
The operating frequency of all kernels of described central processing unit is adjusted to highest frequency.
Method the most according to claim 2, it is characterised in that described raising central processing unit runs After the operating frequency of number of cores and/or central processor core, described method also includes:
Judge that whether the frame per second of application program of described current operation is more than the second predetermined threshold value;
If the frame per second of the application program of described current operation is more than described second predetermined threshold value, then reduce described The number of cores of central processing unit operation and/or the operating frequency of described central processor core.
Method the most according to claim 3, it is characterised in that the described central processing unit of described reduction is transported The number of cores of row and/or the operating frequency of described central processor core, including:
Number of cores and/or the described centre that described central processing unit runs is gradually reduced according to preset rules The operating frequency of reason device kernel, until the frame per second of the application program of described current operation is first pre-more than described If threshold value, and the most described second predetermined threshold value.
5. according to method described in Claims 1-4 any one, it is characterised in that described method is also Including:
Monitor the temperature of described central processing unit;
If the temperature of described central processing unit exceedes preset temperature, then reduce what described central processing unit ran Number of cores and/or the operating frequency of described central processor core.
6. a terminal unit, it is characterised in that including:
First monitoring means, the frame per second of the current application program run in monitoring terminal equipment;
First judging unit, for judging that whether the frame per second of the application program of described current operation is less than first Predetermined threshold value;
First adjustment unit, first pre-less than described for the frame per second of the application program in described current operation If during threshold value, improve number of cores and/or the operating frequency of central processor core that central processing unit runs.
Terminal unit the most according to claim 6, it is characterised in that described first adjustment unit includes:
Open unit, for opening all kernels of described central processing unit;
Frequency adjustment unit, for being adjusted to the operating frequency of all kernels of described central processing unit Altofrequency.
Terminal unit the most according to claim 7, it is characterised in that described terminal unit also includes:
Second judging unit, for judging that whether the frame per second of the application program of described current operation is more than second Predetermined threshold value;
Second adjustment unit, second pre-more than described for the frame per second of the application program in described current operation If during threshold value, reduce number of cores and/or described central processor core that described central processing unit runs Operating frequency.
Terminal unit the most according to claim 8, it is characterised in that
Described second adjustment unit, specifically for gradually reducing described central processing unit fortune according to preset rules Row number of cores and/or the operating frequency of described central processor core, until described current operation should By the frame per second of program more than described first predetermined threshold value, and the most described second predetermined threshold value.
10. according to terminal unit described in claim 6 to 9 any one, it is characterised in that described end End equipment also includes:
Second monitoring means, for monitoring the temperature of described central processing unit;
3rd adjustment unit, for when the temperature of described central processing unit exceedes preset temperature, reduces institute State number of cores and/or the operating frequency of described central processor core that central processing unit runs.
CN201610512628.9A 2016-06-30 2016-06-30 Control method of central processing unit and terminal equipment Active CN106020990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610512628.9A CN106020990B (en) 2016-06-30 2016-06-30 Control method of central processing unit and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610512628.9A CN106020990B (en) 2016-06-30 2016-06-30 Control method of central processing unit and terminal equipment

Publications (2)

Publication Number Publication Date
CN106020990A true CN106020990A (en) 2016-10-12
CN106020990B CN106020990B (en) 2020-01-10

Family

ID=57106062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610512628.9A Active CN106020990B (en) 2016-06-30 2016-06-30 Control method of central processing unit and terminal equipment

Country Status (1)

Country Link
CN (1) CN106020990B (en)

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106527666A (en) * 2016-11-18 2017-03-22 宇龙计算机通信科技(深圳)有限公司 Control method of central processing unit and terminal equipment
CN106559579A (en) * 2016-11-30 2017-04-05 努比亚技术有限公司 Mobile terminal and CPU/GPU scheduling parameter update methods
CN106612539A (en) * 2016-12-30 2017-05-03 上海与德信息技术有限公司 Power consumption control method
CN106681833A (en) * 2016-12-27 2017-05-17 宇龙计算机通信科技(深圳)有限公司 Method and device for regulating CPU frequency
CN106780510A (en) * 2016-11-30 2017-05-31 宇龙计算机通信科技(深圳)有限公司 A kind of image processing method and terminal device
CN107148072A (en) * 2017-04-27 2017-09-08 上海斐讯数据通信技术有限公司 The acquisition methods and system of a kind of target resource parameter of intelligent terminal application
CN107463481A (en) * 2017-07-26 2017-12-12 努比亚技术有限公司 Data interactive method, mobile terminal and storage medium
CN107479894A (en) * 2017-08-21 2017-12-15 奇酷互联网络科技(深圳)有限公司 Application program accelerating method, system, mobile terminal and readable storage medium storing program for executing
CN107515787A (en) * 2017-08-31 2017-12-26 广东欧珀移动通信有限公司 Resource allocation method and related products
CN107547744A (en) * 2017-08-31 2018-01-05 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107577532A (en) * 2017-08-31 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107577533A (en) * 2017-08-31 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and related products
CN107577537A (en) * 2017-09-06 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107589998A (en) * 2017-08-31 2018-01-16 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107621981A (en) * 2017-09-06 2018-01-23 广东欧珀移动通信有限公司 Resource allocation method and related products
CN107621982A (en) * 2017-09-08 2018-01-23 维沃移动通信有限公司 A method for adjusting performance parameters of a processor and a mobile terminal
CN107832142A (en) * 2017-10-11 2018-03-23 广东欧珀移动通信有限公司 The resource allocation method and equipment of application program
CN108763012A (en) * 2018-03-13 2018-11-06 广东欧珀移动通信有限公司 Interim card information acquisition method, device and terminal
CN108958450A (en) * 2018-06-11 2018-12-07 江苏食品药品职业技术学院 Intelligence adjusts the computer of running frequency and power consumption
CN109298942A (en) * 2018-10-09 2019-02-01 Oppo广东移动通信有限公司 Image processing method and electronic device
CN109327622A (en) * 2018-11-22 2019-02-12 努比亚技术有限公司 Number of cores configuration method, mobile terminal and storage medium
CN109376053A (en) * 2018-09-20 2019-02-22 Oppo广东移动通信有限公司 Data processing method, device and mobile terminal
CN109413480A (en) * 2018-09-30 2019-03-01 Oppo广东移动通信有限公司 Picture processing method, device, terminal and storage medium
CN109445941A (en) * 2018-10-19 2019-03-08 Oppo广东移动通信有限公司 Method, apparatus, terminal and the storage medium of configuration processor performance
CN110377251A (en) * 2019-06-06 2019-10-25 努比亚技术有限公司 A kind of screen refresh rate method of adjustment, terminal and computer readable storage medium
CN110609603A (en) * 2019-09-20 2019-12-24 北京字节跳动网络技术有限公司 Frequency modulation method and device, terminal and storage medium
CN111338838A (en) * 2020-03-23 2020-06-26 Oppo广东移动通信有限公司 Method for controlling frequency of central processing unit and related device
CN111625426A (en) * 2020-05-29 2020-09-04 展讯通信(上海)有限公司 Terminal operation parameter adjusting method and device and computer readable storage medium
WO2020191685A1 (en) * 2019-03-27 2020-10-01 华为技术有限公司 Frequency adjustment method and apparatus applied to terminal, and electronic device
WO2021008543A1 (en) * 2019-07-16 2021-01-21 华为技术有限公司 Resource scheduling method and electronic device
CN112416580A (en) * 2020-11-13 2021-02-26 北京小米移动软件有限公司 Method, device and medium for determining optimal resource allocation mode in application runtime
CN114442792A (en) * 2022-02-09 2022-05-06 北京小米移动软件有限公司 Method and device for adjusting operating frequency of processor and storage medium
TWI785785B (en) * 2021-09-09 2022-12-01 華碩電腦股份有限公司 Electronic device and power management method thereof
CN115711758A (en) * 2022-11-04 2023-02-24 深圳市锐宝智联信息有限公司 Rail transit complete machine monitoring method, system, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7034868B2 (en) * 2000-11-06 2006-04-25 Mega Chips Corporation Image processing circuit
CN102200942A (en) * 2011-06-08 2011-09-28 宇龙计算机通信科技(深圳)有限公司 Cloud-computing-based application program behavior monitoring method and cloud server
US20140002500A1 (en) * 2012-06-27 2014-01-02 Canon Kabushiki Kaisha Image processing apparatus and image processing method
CN103927708A (en) * 2008-06-11 2014-07-16 英特尔公司 Performance Allocation Method And Apparatus
CN105334939A (en) * 2014-06-30 2016-02-17 北京安兔兔科技有限公司 Terminal power consumption control method and terminal power consumption control device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7034868B2 (en) * 2000-11-06 2006-04-25 Mega Chips Corporation Image processing circuit
CN103927708A (en) * 2008-06-11 2014-07-16 英特尔公司 Performance Allocation Method And Apparatus
CN102200942A (en) * 2011-06-08 2011-09-28 宇龙计算机通信科技(深圳)有限公司 Cloud-computing-based application program behavior monitoring method and cloud server
US20140002500A1 (en) * 2012-06-27 2014-01-02 Canon Kabushiki Kaisha Image processing apparatus and image processing method
CN105334939A (en) * 2014-06-30 2016-02-17 北京安兔兔科技有限公司 Terminal power consumption control method and terminal power consumption control device

Cited By (48)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106527666A (en) * 2016-11-18 2017-03-22 宇龙计算机通信科技(深圳)有限公司 Control method of central processing unit and terminal equipment
CN106559579A (en) * 2016-11-30 2017-04-05 努比亚技术有限公司 Mobile terminal and CPU/GPU scheduling parameter update methods
CN106780510A (en) * 2016-11-30 2017-05-31 宇龙计算机通信科技(深圳)有限公司 A kind of image processing method and terminal device
CN106681833A (en) * 2016-12-27 2017-05-17 宇龙计算机通信科技(深圳)有限公司 Method and device for regulating CPU frequency
CN106681833B (en) * 2016-12-27 2021-03-09 宇龙计算机通信科技(深圳)有限公司 Method and device for adjusting CPU frequency
CN106612539A (en) * 2016-12-30 2017-05-03 上海与德信息技术有限公司 Power consumption control method
CN107148072A (en) * 2017-04-27 2017-09-08 上海斐讯数据通信技术有限公司 The acquisition methods and system of a kind of target resource parameter of intelligent terminal application
CN107148072B (en) * 2017-04-27 2020-12-18 华讯高科股份有限公司 Method and system for acquiring target resource parameters of intelligent terminal application
CN107463481A (en) * 2017-07-26 2017-12-12 努比亚技术有限公司 Data interactive method, mobile terminal and storage medium
CN107479894A (en) * 2017-08-21 2017-12-15 奇酷互联网络科技(深圳)有限公司 Application program accelerating method, system, mobile terminal and readable storage medium storing program for executing
CN107577532A (en) * 2017-08-31 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107577533A (en) * 2017-08-31 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and related products
CN107589998A (en) * 2017-08-31 2018-01-16 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107547744A (en) * 2017-08-31 2018-01-05 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107515787A (en) * 2017-08-31 2017-12-26 广东欧珀移动通信有限公司 Resource allocation method and related products
CN107577533B (en) * 2017-08-31 2020-12-15 Oppo广东移动通信有限公司 Resource allocation method and related products
CN107577532B (en) * 2017-08-31 2019-10-29 Oppo广东移动通信有限公司 Resource allocation method and Related product
CN107577537A (en) * 2017-09-06 2018-01-12 广东欧珀移动通信有限公司 Resource allocation method and Related product
CN107621981A (en) * 2017-09-06 2018-01-23 广东欧珀移动通信有限公司 Resource allocation method and related products
CN107621982A (en) * 2017-09-08 2018-01-23 维沃移动通信有限公司 A method for adjusting performance parameters of a processor and a mobile terminal
CN107621982B (en) * 2017-09-08 2020-09-25 维沃移动通信有限公司 Method for adjusting performance parameters of processor and mobile terminal
CN107832142B (en) * 2017-10-11 2020-06-09 Oppo广东移动通信有限公司 Resource allocation method and equipment for application program
CN107832142A (en) * 2017-10-11 2018-03-23 广东欧珀移动通信有限公司 The resource allocation method and equipment of application program
CN108763012A (en) * 2018-03-13 2018-11-06 广东欧珀移动通信有限公司 Interim card information acquisition method, device and terminal
CN108763012B (en) * 2018-03-13 2020-07-24 Oppo广东移动通信有限公司 Card pause information acquisition method and device and terminal
CN108958450A (en) * 2018-06-11 2018-12-07 江苏食品药品职业技术学院 Intelligence adjusts the computer of running frequency and power consumption
CN109376053A (en) * 2018-09-20 2019-02-22 Oppo广东移动通信有限公司 Data processing method, device and mobile terminal
CN109376053B (en) * 2018-09-20 2022-11-08 Oppo广东移动通信有限公司 Data processing method and device and mobile terminal
CN109413480A (en) * 2018-09-30 2019-03-01 Oppo广东移动通信有限公司 Picture processing method, device, terminal and storage medium
CN109413480B (en) * 2018-09-30 2021-10-08 Oppo广东移动通信有限公司 Screen processing method, device, terminal and storage medium
CN109298942A (en) * 2018-10-09 2019-02-01 Oppo广东移动通信有限公司 Image processing method and electronic device
CN109298942B (en) * 2018-10-09 2022-07-12 Oppo广东移动通信有限公司 Picture processing method and electronic device
CN109445941A (en) * 2018-10-19 2019-03-08 Oppo广东移动通信有限公司 Method, apparatus, terminal and the storage medium of configuration processor performance
CN109327622B (en) * 2018-11-22 2021-10-29 努比亚技术有限公司 Kernel number configuration method, mobile terminal and storage medium
CN109327622A (en) * 2018-11-22 2019-02-12 努比亚技术有限公司 Number of cores configuration method, mobile terminal and storage medium
CN112789651B (en) * 2019-03-27 2023-07-18 华为技术有限公司 A frequency adjustment method, device and electronic equipment applied to a terminal
WO2020191685A1 (en) * 2019-03-27 2020-10-01 华为技术有限公司 Frequency adjustment method and apparatus applied to terminal, and electronic device
US11430358B2 (en) 2019-03-27 2022-08-30 Huawei Technologies Co., Ltd. Frequency adjustment method and apparatus applied to terminal, and electronic device
CN112789651A (en) * 2019-03-27 2021-05-11 华为技术有限公司 Frequency adjusting method and device applied to terminal and electronic equipment
CN110377251A (en) * 2019-06-06 2019-10-25 努比亚技术有限公司 A kind of screen refresh rate method of adjustment, terminal and computer readable storage medium
WO2021008543A1 (en) * 2019-07-16 2021-01-21 华为技术有限公司 Resource scheduling method and electronic device
CN110609603A (en) * 2019-09-20 2019-12-24 北京字节跳动网络技术有限公司 Frequency modulation method and device, terminal and storage medium
CN111338838A (en) * 2020-03-23 2020-06-26 Oppo广东移动通信有限公司 Method for controlling frequency of central processing unit and related device
CN111625426A (en) * 2020-05-29 2020-09-04 展讯通信(上海)有限公司 Terminal operation parameter adjusting method and device and computer readable storage medium
CN112416580A (en) * 2020-11-13 2021-02-26 北京小米移动软件有限公司 Method, device and medium for determining optimal resource allocation mode in application runtime
TWI785785B (en) * 2021-09-09 2022-12-01 華碩電腦股份有限公司 Electronic device and power management method thereof
CN114442792A (en) * 2022-02-09 2022-05-06 北京小米移动软件有限公司 Method and device for adjusting operating frequency of processor and storage medium
CN115711758A (en) * 2022-11-04 2023-02-24 深圳市锐宝智联信息有限公司 Rail transit complete machine monitoring method, system, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN106020990B (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN106020990B (en) Control method of central processing unit and terminal equipment
JP6800877B2 (en) Systems and methods for adaptive heat and performance management in electronic devices
US9766674B2 (en) USB power delivery controller sharing
EP3663925B1 (en) Method for processing refreshing display abnormality, and terminal
US20180225019A1 (en) Information obtaining method and apparatus
CN110716631B (en) Power supply management method, device, equipment and readable storage medium
US8619068B2 (en) Electronic apparatus, display panel control device and display panel control method
CN106325675B (en) Icon placement method and terminal device
CN111338838A (en) Method for controlling frequency of central processing unit and related device
JP6246931B2 (en) Improved power control technology for integrated PCIe controllers
CN111897263A (en) Smart glasses control method, device, storage medium and electronic device
US10079500B2 (en) Apparatus, method, and program product for powering a device using a USB connection
CN106358225B (en) Network data processing method and device and mobile terminal
US9477255B2 (en) Systems and methods for suspending idle devices based on idle policies for the devices
US20210373833A1 (en) Granular power management of display devices based on user interest
JP2015179330A (en) Electrical apparatus and display method
CN110377414A (en) Method and device for adjusting capacitive touch screen, terminal and storage medium
CN108897416A (en) It is a kind of to control method, apparatus and computer readable storage medium electric under GPU
CN117707320A (en) Method for controlling screen-off display, electronic equipment and storage medium
US10871875B2 (en) Cursor identification on an IHS display
CN104656873B (en) A kind of information processing method and electronic equipment
US20120091823A1 (en) Mobile storage device and method for managing power consumption of the mobile storage device
CN107291213B (en) Mode selection method, apparatus, terminal, and computer-readable storage medium
CN103838600A (en) Method and electronic device for controlling driving conditions based on operating state
US9001133B2 (en) Edid shadowing techniques for fast display startup

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20250919

Address after: 101102 Beijing Tongzhou District, Beijing Economic and Technological Development Area (Tongzhou), Huanke Middle Road No. 17, Building 26, 1st Floor, Room 102-121 (Cluster Registration)

Patentee after: Beijing Tianrun Jiahe Technology Co.,Ltd.

Country or region after: China

Address before: 518057, Nanshan District hi tech Industrial Park (North Zone), Guangdong, Shenzhen Province, No. 2, Mengxi Road

Patentee before: YULONG COMPUTER TELECOMMUNICATION SCIENTIFIC (SHENZHEN) Co.,Ltd.

Country or region before: China