Method for adjusting equipment performance and terminal equipment
By obtaining input events of the terminal device and adjusting the energy efficiency ratio of the processor, the lag and inaccuracy of power consumption adjustment in the prior art are solved, and precise adjustment of terminal device performance and improvement of user experience are achieved.
Patent Information
- Application Number
- CN202311021575.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-18
Smart Images

Figure CN119472965A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a method for adjusting device performance and a terminal device. Background Art
[0002] With the continuous development of terminal technology, the application of various terminal devices has become more and more extensive. At present, in order to achieve the convenience of carrying, the terminal device body is relatively thin, the battery capacity is small and the heat dissipation capacity is limited, which also brings great restrictions to the performance of the terminal device. Therefore, how to improve the performance experience of the terminal device while ensuring long battery life has also attracted more and more attention.
[0003] In the prior art, the load condition of the terminal device can be detected, and the power consumption adjustment strategy for a period of time in the future can be predicted based on the load condition of the terminal device in the history of a period of time, and then the power consumption of the terminal device in the future period of time can be adjusted based on the power consumption adjustment strategy. However, on the one hand, it is necessary to first count the load condition of the terminal device in the history of a period of time before adjusting the power consumption of the terminal device in the future period of time, which has serious lag; on the other hand, the load condition of the terminal device in the history cannot accurately reflect the load condition of the terminal device in the future period of time, so the adjustment effect of this power consumption adjustment strategy is very poor. Summary of the invention
[0004] In view of this, the present application provides a method for adjusting device performance and a terminal device, which can more accurately identify various input events and adjust the performance of the processor for each input event, thereby fully identifying the instantaneous scenario of user operation and improving user experience.
[0005] In order to achieve the above-mentioned objectives, in a first aspect, an embodiment of the present application provides a method for adjusting device performance, the method comprising: obtaining an input event for a terminal device; determining a first energy efficiency ratio corresponding to the input event; and adjusting the energy efficiency ratio of a processor in the terminal device to the first energy efficiency ratio.
[0006] In an embodiment of the present application, when an input event of a terminal device is obtained, and a first energy efficiency ratio corresponding to the input event is determined, the energy efficiency ratio of the processor in the terminal device is adjusted to the first energy efficiency ratio, thereby instructing the processor to run based on the first energy efficiency ratio, so that the performance of the processor can meet the needs of responding to the input event. On the one hand, the performance of the processor can be adjusted without relying on the load conditions of the processor or the terminal device, which improves the efficiency and effect of adjusting the performance of the processor and responding to input events; on the other hand, the performance of the processor can be adjusted according to specific input events, making the method of adjusting the performance of the device more accurate and reducing resource waste. For example, a PC device has the characteristics of a large display screen, multiple windows and multiple tasks. The method of adjusting the performance of the device provided in the embodiment of the present application can more accurately identify various input events and adjust the performance of the processor for each input event, thereby fully identifying the instantaneous scene of the user's operation and improving the user experience.
[0007] The input event may be an event generated based on data and information input by an input device, and the input device may be integrated in the terminal or connected to the terminal device.
[0008] In some embodiments, the input event may include an event type and device information. The event type may be used to indicate the type of the input event and distinguish different input events. The device information may indicate the input device corresponding to the input event. In some embodiments, the device information may include one or more of the following information: device identification, device type, device ID, device manufacturer, software version, hardware version, port number of the input device connected to the terminal device, etc.
[0009] In some embodiments, determining a first energy efficiency ratio corresponding to the input event includes: determining at least one of an event type of the input event and device information of an input device corresponding to the input event; and determining the first energy efficiency ratio based on at least one of the event type and device information of the input device.
[0010] Various input events can be distinguished by event types and corresponding input devices. Therefore, the first energy efficiency ratio corresponding to the input event is determined based on the event type and the input device. This makes it possible to determine different first energy efficiency ratios for multiple input events when the terminal device may include multiple input events.
[0011] In some embodiments, the method also includes: determining the platform type of the processor; determining the first energy efficiency ratio based on the event type and at least one of the device information of the input device includes: determining the first energy efficiency ratio based on the event type and at least one of the device information of the input device, and the platform type.
[0012] Since the adjustment range of the energy efficiency ratio corresponding to processors of different platforms may be different, determining the first energy efficiency ratio based on the event type, device information of the input device and the platform type of the processor can ensure that the first energy efficiency ratio is more closely matched with the processor in the terminal device, thereby improving the accuracy of the first energy efficiency ratio and further improving the accuracy of subsequent adjustment of device performance.
[0013] In some embodiments, before adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio, the method further includes: obtaining the temperature of the processor; updating the first energy efficiency ratio based on the temperature to obtain the updated first energy efficiency ratio, wherein the lower the temperature, the smaller the updated first energy efficiency ratio; adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio includes: adjusting the energy efficiency ratio of the processor in the terminal device to the updated first energy efficiency ratio.
[0014] Because when the processor temperature is high, further significantly improving the processor performance may reduce the stability of the processor, and when the processor temperature is low, only slightly improving the processor capacity may not fully utilize the processor performance. Therefore, in order to ensure the stability of the processor and to fully utilize the performance of the processor, when determining the first energy efficiency ratio, the first energy efficiency ratio can be adjusted based on the temperature of the processor. When the temperature of the processor is higher, the updated first energy efficiency ratio is also larger, thereby reducing the extent of the processor performance improvement, and when the temperature of the processor is lower, the updated first energy efficiency ratio is also smaller, thereby increasing the extent of the processor performance improvement.
[0015] In some embodiments, the method further includes: determining a first duration corresponding to the input event; when the processor runs for the first duration based at least on the first energy efficiency ratio, adjusting the energy efficiency ratio of the processor to a second energy efficiency ratio, the second energy efficiency ratio being greater than the first energy efficiency ratio. In some embodiments, the second energy efficiency ratio may be an energy efficiency ratio of an original state, such as an energy efficiency ratio when the terminal device is in a standby state or an idle state.
[0016] That is, the processor is instructed to run for at least a first duration based on the first energy efficiency ratio so that the performance of the terminal device can be improved in time to respond to input events, and when the duration for which the processor runs based on the first energy efficiency ratio is greater than or equal to the first duration, the processor can also be promptly instructed to run based on a higher second energy efficiency ratio to improve the battery life of the terminal device.
[0017] In some embodiments, determining the first duration corresponding to the input event includes: determining at least one of an event type of the input event and device information of an input device corresponding to the input event; and determining the first duration based on at least one of the event type and device information of the input device.
[0018] Various input events can be distinguished by event types and corresponding input devices. Therefore, the first duration corresponding to the input event is determined based on the event type and the input device. This allows different first durations to be determined for multiple input events when the terminal device may include multiple input events.
[0019] In some embodiments, before adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio, the energy efficiency ratio of the processor is a third energy efficiency ratio, and the third energy efficiency ratio is greater than the first energy efficiency ratio, and when the processor runs for the first duration at least based on the first energy efficiency ratio, adjusting the energy efficiency ratio of the processor to the second energy efficiency ratio includes: creating a timer when the processor starts to run based on the first energy efficiency ratio; setting the target duration of the timer to the first duration; and if the timer times out, adjusting the energy efficiency ratio of the processor to the second energy efficiency ratio.
[0020] In some embodiments, before adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio, the energy efficiency ratio of the processor is a third energy efficiency ratio, and the third energy efficiency ratio is less than or equal to the first energy efficiency ratio, and when the processor runs for the first duration at least based on the first energy efficiency ratio, adjusting the energy efficiency ratio of the processor to the second energy efficiency ratio includes: obtaining a timer, where the timer is a timer created when the processor starts to run based on the third energy efficiency ratio; extending the target duration of the timer by the first duration; and if the timer times out, adjusting the energy efficiency ratio of the processor to the second energy efficiency ratio.
[0021] When the third energy efficiency ratio is greater than the first energy efficiency ratio, the third energy efficiency ratio may include the following situations: in one possible situation, the energy efficiency ratio of the processor has not been adjusted in any way, that is, the third energy efficiency ratio may be the energy efficiency ratio of the original state, such as the energy efficiency ratio when the terminal device is in standby or idle state; in another possible situation, the energy efficiency ratio of the processor may have been adjusted at least once based on input events or any other means, but it is still greater than the first energy efficiency ratio after adjustment, that is, the current performance of the processor still cannot meet the requirements of the current input event. Therefore, in order to improve the efficiency and effect of responding to input events, the energy efficiency ratio of the processor in the terminal device can be adjusted to the first energy efficiency ratio to instruct the processor to start running based on the first energy efficiency ratio, and create a timer, and set the target duration of the timer to the first duration.
[0022] For example, if the third energy efficiency ratio and the second energy efficiency ratio are both energy efficiency ratios in the original state, the processor of the terminal device can first operate based on the energy efficiency ratio in the original state, and when an input event is detected, operate for a first period of time based on the first energy efficiency ratio corresponding to the input event, and then restore to the energy efficiency ratio in the original state.
[0023] For another example, the third energy efficiency ratio is equal to the second energy efficiency ratio, and neither the third energy efficiency ratio nor the second energy efficiency ratio is the energy efficiency ratio in the original state. Then, before the input event is detected, the energy efficiency ratio of the processor has been adjusted based on other events or scenarios. Then, when the input event is detected, the processor runs for a first period of time based on the first energy efficiency ratio corresponding to the input event, and then recovers to the value before the adjustment based on the input event, thereby ensuring that the processor can meet the performance requirements of other events or scenarios.
[0024] When the third energy efficiency ratio is greater than or equal to the first energy efficiency ratio, the energy efficiency ratio of the processor may have been adjusted at least once based on an input event or in any other way, and the current performance of the processor can meet the response requirements for the input event, so it is sufficient to extend the duration of improving the processor performance.
[0025] In some embodiments, before extending the target duration of the timer by the first duration, the method also includes: determining that the timer satisfies a delay condition, the delay condition including at least one of the following: the time interval for the most recent extension of the target duration in the current distance history is greater than or equal to the second duration; the number of times the target duration is extended is greater than or equal to a first value; the target duration is greater than or equal to a third duration.
[0026] By judging whether the timer meets the delay conditions, the time for the processor to run at a higher performance can be accurately controlled and extended. The fewer the delay conditions, the longer the processor can run at a higher performance, so that it can respond to more input events in a timely manner. Conversely, the more delay conditions, the more accurately the time to improve processor performance can be controlled, and on the basis of responding to input events in a timely manner, problems such as heating and poor battery life of terminal devices can be improved.
[0027] When the delay condition includes that the time interval of the most recent extension of the target duration in the current distance history is greater than or equal to the second duration, the problem of frequently increasing the target duration of the timer can be improved, thereby improving the problems of heating and poor battery life caused by this. For example, when the same or similar input events are frequently obtained (that is, at least one of the event type and device information of the two input events is the same), the problem of repeated frequency increase caused by the same or similar input events can be improved. Among them, the second duration can be obtained by prior setting. In some embodiments, the second duration can be 1s, and it can be understood that in actual applications, the second duration can also be other values.
[0028] When the delay condition includes the number of times the target duration is extended being greater than or equal to the first value, the problem of the processor running for too long at a higher performance due to too many delays in a single process of improving the performance of the processor can be improved, thereby improving the problems of heat generation and poor battery life caused by the delay. The first value can be obtained by setting in advance.
[0029] When the target duration is greater than or equal to the third duration, the problem of the processor running at a higher performance for too long in the process of improving the performance of the processor once can be improved, thereby improving the problems of heating and poor battery life caused by this. The third duration can be obtained by setting in advance, and the third duration can be greater than the first duration. In some embodiments, the third duration can be greater than or equal to the product of the first value and the first duration.
[0030] In a second aspect, an embodiment of the present application provides a device for adjusting device performance, the device comprising:
[0031] An acquisition module, used to acquire input events for a terminal device;
[0032] A determination module, configured to determine a first energy efficiency ratio corresponding to the input event;
[0033] An adjustment module is used to adjust the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio.
[0034] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory and a processor, the memory being used to store a computer program; the processor being used to execute any of the methods described in the first aspect above when calling the computer program.
[0035] In some embodiments, the terminal device is a personal computing device, a tablet device, or smart glasses.
[0036] In some implementations, when the terminal device is the personal computing device or the tablet device, the input device includes at least one of a keyboard, a touchpad, a mouse, and a touch screen.
[0037] In a fourth aspect, an embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any method described in the first aspect above.
[0038] The chip system may be a single chip or a chip module composed of multiple chips.
[0039] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in any one of the above-mentioned first aspects is implemented.
[0040] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any of the methods described in the first aspect above.
[0041] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0043] Figure 2 A software structure block diagram of a terminal device provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of the structure of a touch panel provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of a usage scenario of a terminal device provided in an embodiment of the present application;
[0046] Figure 5 A flow chart of a method for adjusting device performance provided in an embodiment of the present application;
[0047] Figure 6 A flow chart of a method for adjusting device performance provided in an embodiment of the present application;
[0048] Figure 7 A flow chart of a method for adjusting device performance provided in an embodiment of the present application;
[0049] Figure 8 A flowchart of a method for adjusting device performance provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The method for adjusting device performance provided in the embodiments of the present application can be applied to terminal devices such as personal computing devices (personal computers, PCs), laptops, ultra-mobile personal computers (ultra-mobile personal computers, UMPCs), netbooks, personal digital assistants (personal digital assistants, PDAs), tablet computers, mobile phones, wearable devices, (augmented reality, AR) / virtual reality (virtual reality, VR) devices, etc. The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
[0051] Please refer to Figure 1 , which is a schematic diagram of the structure of a terminal device 100 provided in the present application. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a camera 192, a display screen 193, etc.
[0052] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0053] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, and / or a baseband processor, etc. Different processing units may be independent devices or integrated into one or more processors.
[0054] The controller may be the nerve center and command center of the terminal device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0055] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This reduces repeated accesses and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0056] In some embodiments, the processor 110 may include one or more interfaces, which may include an inter-integrated circuit (I2C) interface, a USB interface, and / or a network interface.
[0057] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor, the charger, the flash, the camera 192, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor through the I2C interface, so that the processor 110 communicates with the touch sensor through the I2C bus interface to realize the touch function of the terminal device 100.
[0058] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. Exemplarily, the USB interface 130 can be used to connect input devices such as a mouse, a keyboard, a microphone, and a touchpad.
[0059] The network interface can be used as a connection point between the terminal device 100 and a private network or a public network, and can be used for the terminal device 100 to access the network. Exemplarily, the network interface can enable the terminal device 100 to communicate with other devices in the network. Exemplarily, the network interface can include an RJ-45 interface, an RJ-11 interface, and an optical fiber interface.
[0060] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0061] The wireless communication function of the terminal device 100 can be implemented through an antenna, a wireless communication module 160, a modem processor, a baseband processor, etc.
[0062] The terminal device 100 implements the display function through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0063] The terminal device 100 can realize the shooting function through ISP, camera 192, video codec, GPU, display screen 193 and application processor.
[0064] The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0065] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the terminal device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a performance adjustment application, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as application data of the performance adjustment application, etc.), etc.
[0066] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. When a touch operation is applied to the display screen 193, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A.
[0067] The touch sensor 180B may be disposed on the display screen 193, and the touch sensor 180B and the display screen 193 form a touch screen, also known as a "touch screen". The touch sensor 180B is used to detect a touch operation acting on or near it. The touch sensor 180B may pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation may be provided through the display screen 193. In other embodiments, the touch sensor 180B may also be disposed on the surface of the terminal device 100, which is different from the position of the display screen 193.
[0068] The key 190 includes a power button, a volume button, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100. Exemplarily, the terminal device 100 may include a keyboard, and the keyboard may include multiple keys 190.
[0069] Depend on Figure 1 It can be known that the terminal device may include core devices such as a processor, and may include external devices such as an input device, an output device, and an external memory. It can be understood that for different types of terminal devices 100, the input devices, output devices, and external memories included therein may also be different.
[0070] The input device is a device that can input data and information to the terminal device 100, and can be used for the user to exchange information with the terminal device 100. In some embodiments, the input device can provide input events to the terminal device, thereby providing these data and information to the terminal device 100 through the input events. Exemplarily, the terminal device 100 is a PC device, and the input device can include a mouse, a keyboard, a camera 192, a touch pad, a microphone 170C, a wireless communication module 160, and various sensors, etc. Exemplarily, the terminal device 100 is a mobile phone, and the input device can include buttons, a camera 192, a touch pad, a microphone 170C, a wireless communication module 160, and various sensors, etc.
[0071] The input device is a device that can output data and information to the outside of the terminal device 100, and can be used to respond to input such as user operations. For example, Figure 1 The antenna, wireless communication module 160, speaker 170A, display screen 193, etc. can all be used as output devices.
[0072] When the terminal device 100 is running, it can obtain input events through the input device, and then obtain external input data and information, and then respond to the input events through the processor to process the data and information. It can also transmit the response to the input event to the outside through the input device, thereby responding to the user or the external environment.
[0073] Take the example of a user taking a photo through the terminal device 100. The user clicks the icon of the camera application on the touch screen. When the touch sensor 180B in the touch screen receives the touch operation, the touch operation is processed into an input event (including touch coordinates, timestamp of the touch operation, and other information). The processor 110 identifies the control corresponding to the input event. The touch operation is a touch single-click operation. The control corresponding to the single-click operation is the control of the camera application icon. Therefore, the camera 192 is started, and a static image or video is captured through the camera 192, and the picture taken by the camera 192 is displayed on the touch screen.
[0074] It can be seen that when the performance of the terminal device 100 (such as the processor 110) is higher, the efficiency and accuracy of responding to or processing input events are better. Still taking the above-mentioned user taking a photo through the terminal device 100 as an example, the higher the performance of the terminal device 100 (such as the processor 110), the faster the speed of starting the camera 192 and displaying the shooting picture to the user through the touch screen, thereby providing the user with a smoother shooting experience.
[0075] The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes the Android system of the layered architecture as an example to exemplify the software structure of the terminal device 100.
[0076] Figure 2 It is a software structure block diagram of the terminal device 100 according to an embodiment of the present application.
[0077] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software structure of the terminal device 100 is, from top to bottom, an application layer, a kernel layer, and a firmware layer.
[0078] The application layer may include a series of application packages. For example, Figure 2 As shown, the application layer may include a performance tuning application, a policy library, and a probe. In some implementations, the application layer may also include a scenario library.
[0079] The probe can obtain various data such as events and / or messages from the bottom layer. These data can reflect the operating status of the terminal device 100, thereby providing a basis and support for adjusting the performance of the terminal device 100. Exemplarily, the probe includes a temperature control probe, which can be used to obtain the temperature of various devices such as the processor. Exemplarily, the probe can include an input probe, which can be used to obtain various input events of the terminal device 100 so that the terminal device 100 can respond to the input event in a timely manner. Exemplarily, the probe can include a load probe, which can be used to obtain the load condition of the processor. Exemplarily, the probe can include a process startup probe, which can be used to detect the started process. Exemplarily, the probe can include a focus window probe, which can be used to obtain the focus window in the display screen.
[0080] The policy library may include policy modes, policy rules, and decision centers for adjusting performance, so as to provide a decision-making method for determining performance parameters to the performance adjustment application. Exemplarily, the policy library may indicate the trigger conditions for the method for adjusting device performance provided in the embodiment of the present application. Exemplarily, the policy library may indicate the range of data obtained from the probe, such as determining the performance parameters only based on the data of the input probe, or determining the performance parameters based on the data of more probes such as the input probe, the temperature control probe, and the load probe. Exemplarily, the policy library can be used to identify one or more scenarios in the scenario library, and determine whether to adjust the performance of the terminal device based on the one or more scenarios.
[0081] The scene library may include one or more scenes defined in advance. Exemplarily, the scene library may include idle scenes, music scenes, design scenes, meeting scenes, office scenes, video rendering scenes, Internet scenes, evaluation scenes, and game scenes. Exemplarily, when the terminal device is in different scenes, the performance of the terminal device may be adjusted based on the scene to meet the performance requirements of the scene. For example, when the terminal device is in a game scene, the terminal device may be adjusted to a higher performance; and when the terminal device is in an idle scene, the terminal device may be adjusted to a lower performance.
[0082] The performance adjustment application can determine and issue performance parameters based on data such as input events obtained by the probe, thereby adjusting the performance of the terminal device 100. Exemplarily, the performance parameters may include the energy performance preference (EPP) of the processor. The energy performance preference, also known as the energy performance preference, can be used to reflect the scheduling tendency of the processor. The smaller the energy efficiency ratio, the higher the energy efficiency ratio, the lower the power consumption of the processor. Therefore, the processor can be set to a lower energy efficiency ratio to control the processor to increase its frequency, and the processor can be set to a higher energy efficiency ratio to control the processor to reduce its frequency. In some embodiments, processors of different platform types may have different hardware and software structures. Therefore, when the platform type of the processor is different, the numerical range of the energy efficiency ratio is also different. For example, The energy efficiency ratio adjustment range of the platform can be 0-255. The adjustment range corresponding to the platform may be 0 to 100. The platform type of the processor may refer to the software or hardware structure characteristics of the processor.
[0083] It is understandable that the performance adjustment application can also adjust the performance of the terminal device in other ways. Exemplarily, the other ways may include one or more of the following: minimizing the window of the terminal device in the background (i.e. Figure 2 Minimize the background as shown), stop rendering the window in the background (that is, Figure 2 Background rendering shown), freeze the background process (i.e. Figure 2 The process shown is frozen), and the power consumption of the terminal equipment is dynamically adjusted by load (i.e. Figure 2 The power consumption strategy and dynamic turbo frequency shown in the figure) increase the memory read frequency (i.e. Figure 2 memory frequency increase as shown).
[0084] It is also understandable that the application layer may also include other applications, such as music, games, videos, and the like.
[0085] The kernel layer may include device drivers, which may serve as an interface between upper layer applications and hardware devices. Exemplarily, driver devices may include input / output drivers such as mouse drivers, keyboard drivers, and touchpad drivers, wherein the mouse driver may drive the mouse to operate, the keyboard driver may drive the keyboard to operate, and the touchpad driver may drive the touchpad to operate. Exemplarily, device drivers may include power management drivers (acpi.sys), which may be used to manage the power supply of the terminal device 100, such as configuring the power supply mode, sending performance parameters to the processor, etc.
[0086] The firmware layer may include a basic input output system (BIOS), a model specific register (MSR), and an embedded controller (EC).
[0087] BIOS is a set of programs fixed to the motherboard of the terminal device. It stores the most important basic input and output programs of the terminal device 100, the self-test program after power-on, and the system self-starting program. It can read and write specific information of system settings from CMOS. It can provide the most basic and direct hardware settings and control for the terminal device 100.
[0088] MSR can be used for communication between hardware and operating system. Exemplarily, MSR can include MSR address corresponding to hardware. When BIOS sends instructions and other data to the hardware, BIOS can write the data to the MSR address corresponding to the hardware through serial management interface (SMI), thereby completing the configuration of the hardware. Exemplarily, MSR can be used for communication between processor and operating system, such as BIOS can write energy efficiency ratio into MSR address corresponding to processor, so that processor can increase or decrease frequency according to the energy efficiency ratio.
[0089] EC can be used to assist in managing external devices of the terminal device 100. Exemplarily, the external devices may include input devices, output devices, and external memory, etc. Among them, the input device is a device that can input data and information to the terminal device 100, and is used for the user to exchange information with the terminal device 100. Exemplarily, the terminal device 100 is a PC device, and the input device may include a mouse, a keyboard, a camera 192, a touchpad, a microphone 170C, a wireless communication module 160, and various sensors, etc. Exemplarily, the terminal device 100 is a mobile phone, and the input device may include a button, a camera 192, a touchpad, a microphone 170C, a wireless communication module 160, and various sensors, etc. Exemplarily, the EC can communicate with the BIOS through a communication bus such as an enhanced serial peripheral interface (eSPI) / a low pin count Bus (LPC), and communicate with the underlying hardware through a communication bus such as an I2C / platform environment control interface (PECI).
[0090] It is understandable that the external device may also communicate with the BIOS or kernel layer in the terminal device 100 in other ways. Exemplarily, the external device may also communicate with the BIOS in the terminal device 100 through a communication bus such as the USB interface 130, or a microcontroller unit (MCU) is provided in the external device, so that the external device may communicate with the BIOS in the terminal device 100 through the MCU.
[0091] For example, Figure 3As shown, the touch panel 300 includes an MCU 310, a near field communication (NFC) module 320, a touch panel driver integrated circuit (TPIC) 330, and a pressure sensing module 340. Exemplarily, the MCU 310 can control the NFC module 320 to receive or send data, thereby identifying other devices close to the terminal device 100 and performing data interaction with the other devices. Exemplarily, the MCU 310 performs gesture recognition based on the data collected by the TPIC 330, and / or performs pressure sensing based on the data collected by the pressure sensing module 340, thereby determining the position, pressure size, and pressing trajectory of the user pressing on the touch panel 300. The MCU 310 can obtain input events based on the data collected by one or more of the NFC module 320, the TPIC 330, and the pressure sensing module 340, and send the obtained input events to the BIOS in the terminal device 100 through the I2C bus, so that the terminal device 100 obtains the input events.
[0092] It is understood that, in practical applications, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the touch panel 300. In other embodiments of the present application, the touch panel 300 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0093] In order to facilitate understanding of the technical solutions in the embodiments of the present application, the application scenarios of the embodiments of the present application are first introduced below.
[0094] With the continuous development of terminal technology, the application of various terminal devices has become more and more extensive. At present, in order to achieve the convenience of carrying, the body of the terminal device is relatively light and thin, the battery capacity is small and the heat dissipation capacity is limited, which also brings great restrictions on the performance of the terminal device. Among them, when the performance of the terminal device is higher, the response delay obtained by the user operation is smaller, and the fluency perceived by the user is better. Taking the response to the input event as an example, when the delay of responding to the input event is less than 1 second, the user can better determine the causal relationship between the response and the input event, which is convenient for the user to achieve smooth, effective and controllable interaction between the user and the terminal device; when the delay is greater than or equal to 1s, the user may find it difficult to determine the causal relationship between the response and the input event, resulting in a feeling of waiting and jamming, or the user may not be able to perceive the response due to reasons such as attention diversion.
[0095] In addition, the impact of the delay in the terminal device responding to input events on the user experience is also related to the type of terminal device.
[0096] Please refer to Figure 4 , which is a schematic diagram of a usage scenario of a terminal device provided in an embodiment of the present application.
[0097] Some terminal devices are small in size and have high integration of input and output devices, such as Figure 4 As shown in (a) in FIG. 1 , the terminal device is a mobile phone including a touch screen. The touch screen can be used as a display device to display a human-computer interaction interface, such as animation effects, etc., and can also be used as an input device to receive user operations such as touch and press.
[0098] Some terminal devices are large in size, and the input device is separated from the output device, such as Figure 4 As shown in (b), the terminal device is a desktop computer and a laptop computer, including a mouse, a keyboard and a display screen. The mouse and keyboard are only used as input devices to receive user operations, and the display screen is only used as a display device to display the human-computer interaction interface. When the input device is separated from the output device, the user's perception threshold for the response delay in human-computer interaction is higher. The mouse has higher requirements for control accuracy, which requires the terminal device to respond to various user operations on the mouse more promptly and accurately.
[0099] Combination Figure 4 (a) Figure 4 (b) and Figure 4 In (c), from mobile phones to laptops and then to desktop computers, the size of the display screen has gradually increased, and the distance between the display screen and the user (i.e., viewing distance) has also gradually increased. When the display screen is larger, the user is more sensitive to changes such as the human-computer interaction interface.
[0100] Therefore, how to improve the performance experience of terminal devices while ensuring long battery life is also receiving more and more attention.
[0101] In some embodiments, the terminal device may pre-define one or more focus windows. When a focus window is detected and displayed, a corresponding power consumption adjustment strategy is determined based on the focus window and the current system load of the terminal device. However, due to the need to obtain the system load of the terminal, there is a serious lag in adjusting the energy consumption of the device.
[0102] In order to solve at least part of the above technical problems, the embodiments of the present application provide another technical solution for adjusting the performance of the device. The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0103] Please refer to Figure 5 , is a flow chart of a method for adjusting device performance provided in an embodiment of the present application. It should be noted that the method is not based on Figure 5The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0104] S501: The terminal device obtains an input event for the terminal device.
[0105] The input event may be an event generated based on data and information input by an input device, and the input device may be integrated into the terminal device or connected to the terminal device.
[0106] In some embodiments, the input event may include an event type and device information. The event type may be used to indicate the type of the input event and distinguish different input events. The device information may indicate the input device corresponding to the input event. In some embodiments, the device information may include one or more of the device identification, device type, device ID, device manufacturer, software version, hardware version, and the port number of the input device connected to the terminal device, and it is understood that in actual applications, the device information may include more or less information related to the input device.
[0107] In some implementations, an input event may include one or more messages, and each message may carry at least part of the information of the input event.
[0108] In some embodiments, the input event of the input device can be obtained through the probe. In some embodiments, the probe can subscribe to the input event from the kernel layer (such as the device driver of the input device), and the kernel layer communicates with the input device through at least one of I2C, USB and the MCU in the input device, and when the input event is detected, the input event is responded to the probe through the system callback function. It is understandable that in actual applications, input events can also be obtained by other means.
[0109] For example, the input device is a mouse or a touchpad, and the event types of the input event may include left-click, left-click, right-click, scroll, and drag. When a message indicating that the left button is lifted is obtained, it can be determined that an input event of the left-click type is obtained. When two messages indicating that the left button is pressed, two messages indicating that the left button is lifted, and the time interval between the two messages indicating that the left button is lifted is less than 500ms (milliseconds), it can be determined that an input event of the left-click type is obtained. When a message indicating that the right button is lifted is obtained, it can be determined that an input event of the right-click type is obtained. When a message indicating that the left button is pressed, a message indicating that the mouse or touchpad is pressed and moved is obtained, it can be determined that an input event of the drag type is obtained. When a message indicating that the mouse wheel (or the middle mouse button) is scrolled is obtained, it can be determined that an input event of the mouse scrolling type is obtained.
[0110] For another example, the input device includes a keyboard, and the event type of the input event may include character input and shortcut command input, and the shortcut command input may include at least one of quick copy, quick paste, and quick save. When messages indicating that a letter key (i.e., a key with a virtual key code of 65-90) or a numeric key (i.e., a key with a virtual key code of 48-57) is pressed is obtained within 2 seconds, it can be determined that an input event of the character input type is obtained. Specifically, a message queue of length 10 can be created. Whenever a message of a character key being pressed is received, it is determined whether the time interval between the last message and the first message in the message queue is less than 2s. If so, it is determined that an input event of the character input type is obtained, otherwise the first message is removed and the eleventh message is inserted. When a message of the ctrl key being pressed is obtained and a message of the S key, C key, or V key being pressed is obtained, it is determined that an input event of the shortcut command input type such as quick copy, quick paste, or quick save is obtained. Specifically, taking quick save as an example, the mark corresponding to the ctrl key can be set to true when the ctrl key is pressed, and the mark corresponding to the ctrl key can be set to false when the ctrl key is released. When the mark is true and a message indicating that the S key (that is, the key with a virtual key code of 83) is pressed is obtained, it is determined that an input event of the quick save type is obtained.
[0111] It can be understood that the event type of the input event and the related acquisition method can be set in advance according to the specific type of the input device. The embodiment of the present application only takes the input devices as mice, touch pads and keyboards as examples to illustrate several possible input events and the corresponding acquisition methods, rather than limiting the input events and their acquisition methods.
[0112] S502: The terminal device determines a first energy efficiency ratio corresponding to an input event.
[0113] The first energy efficiency ratio corresponding to the input event may be determined according to the input event, at least one of the input device corresponding to the input event and the terminal device.
[0114] In some implementations, at least one of an event type of an input event and device information of an input device may be determined, and the first energy efficiency ratio may be determined based on the event type and at least one of the device information of the input device. Various input events may be distinguished by the event type and the corresponding input device, so the first energy efficiency ratio corresponding to the input event may be determined based on the event type and the input device, so that when the terminal device may include multiple input events, different first energy efficiency ratios may be determined for the multiple input events.
[0115] In some implementations, the first energy efficiency ratio corresponding to the input event can be acquired based on the event type of the current input event and the device information of the input device from the correspondence between the event type, the device information of the input device and the energy efficiency ratio.
[0116] Taking the device information of the input device including the device type as an example, the corresponding relationship between the event type, the device type and the energy efficiency ratio can be shown in the following Table 1.
[0117] Table 1
[0118]
[0119]
[0120] It is understandable that the embodiment of the present application only uses the above Table 1 to illustrate the correspondence between the event type, the device information of the input device and the energy efficiency ratio, but does not limit the correspondence between the event type, the device information of the input device and the energy efficiency ratio and the value of the energy efficiency ratio, nor does it limit the device information, nor does it limit the storage method of the correspondence between the event type, the device information of the input device and the energy efficiency ratio. It can also be understood that for any two input events with different device types and / or different event types, the energy efficiency ratios corresponding to the two input events may be the same or different. In other embodiments, the energy efficiency ratio corresponding to quick save and keyboard may also be 127, the energy efficiency ratio corresponding to right-click and mouse may also be 84, the energy efficiency ratio corresponding to right-click and touch screen icon may also be 84, and the energy efficiency ratio corresponding to right-click and touchpad may also be 84. In other embodiments, Table 1 can be split into more tables. For example, Table 1 can be split based on event type to obtain multiple tables, so that each table corresponds to an event type, and each table includes the correspondence between the device information of the input device and the energy efficiency ratio; or, similarly, Table 1 can be split based on device information to obtain multiple tables, so that each table corresponds to a type of device information, and each table includes the correspondence between the event type and the energy efficiency ratio.
[0121] The terminal device may obtain and store the correspondence between the event type, the device information of the input device and the energy efficiency ratio in one or more of the following ways: in some embodiments, the terminal device may receive the correspondence between the event type, the device information of the input device and the energy efficiency ratio set by the user; in some embodiments, the terminal device may learn the energy efficiency ratio configured by the user for the input event during the operation process or history of the terminal device, thereby obtaining the correspondence between the event type, the device information of the input device and the energy efficiency ratio; in some embodiments, the terminal device may obtain the correspondence between the configured event type, the device information of the input device and the energy efficiency ratio from other external devices. Of course, in actual applications, the terminal device may also obtain the correspondence between the event type, the device information of the input device and the energy efficiency ratio in other ways.
[0122] In some embodiments, the platform type of the processor can be determined, and the first energy efficiency ratio corresponding to the input event can be determined based on the event type, the device information of the input device, and the platform type of the processor. Since the adjustment range of the energy efficiency ratio corresponding to processors of different platforms may be different, determining the first energy efficiency ratio based on the event type, the device information of the input device, and the platform type of the processor can ensure that the first energy efficiency ratio matches the processor in the terminal device more closely, improve the accuracy of the first energy efficiency ratio, and thus improve the accuracy of subsequent adjustment of device performance. Of course, the first energy efficiency ratio can also be determined not based on the platform type of the processor. For example, the first energy efficiency ratio can be a value within the energy efficiency ratio range common to processors of multiple platform types.
[0123] In some implementations, the first energy efficiency ratio corresponding to the input event can be acquired based on the event type, device information of the input device, and platform type of the current input event from the correspondence between the event type, device information of the input device, platform type, and energy efficiency ratio.
[0124] Taking the device information of the input device including the device type as an example, the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio can be shown in Table 2 below. Among them, the energy efficiency ratio adjustment range corresponding to the first platform can be 0-255, and the adjustment range corresponding to the second platform can be 0-100. For example, the first platform can be The second platform can be
[0125] Table 2
[0126]
[0127]
[0128] It is understandable that the embodiment of the present application only uses the above Table 2 to illustrate the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio, but does not limit the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio and the value of the energy efficiency ratio, nor does it limit the device information, nor does it limit the storage method of the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio. It can also be understood that for any two input events with different device types and / or different event types, the energy efficiency ratios corresponding to the two input events can be the same or different.
[0129] The terminal device may obtain and store the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio in one or more of the following ways: In some embodiments, the terminal device may receive the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio set by the user; In some embodiments, the terminal device may learn the energy efficiency ratio configured by the user for the input event during the operation process or history of the terminal device, thereby obtaining the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio; In some embodiments, the terminal device may obtain the correspondence between the configured event type, the device information of the input device, the platform type and the energy efficiency ratio from other external devices. Of course, in actual applications, the terminal device may also obtain the correspondence between the event type, the device information of the input device, the platform type and the energy efficiency ratio in other ways.
[0130] In some implementations, the temperature of the processor may also be obtained, and the first energy efficiency ratio may be updated based on the temperature to obtain an updated first energy efficiency ratio, wherein the lower the temperature, the smaller the updated first energy efficiency ratio. Since a significant increase in processor performance when the processor temperature is high may reduce processor stability, and a small increase in processor capacity when the processor temperature is low may not fully utilize processor performance, in order to ensure processor stability and to fully utilize processor performance, the first energy efficiency ratio may be adjusted based on the processor temperature when determining the first energy efficiency ratio, so that when the processor temperature is higher, the updated first energy efficiency ratio is also larger, thereby reducing the extent of processor performance improvement, and when the processor temperature is lower, the updated first energy efficiency ratio is also smaller, thereby increasing the extent of processor performance improvement.
[0131] In some embodiments, a reference temperature may be set and the temperature of the processor may be compared with the reference temperature. If the temperature is greater than the reference temperature, the first energy efficiency ratio may be increased; if the temperature is less than the reference temperature, the first energy efficiency ratio may be decreased.
[0132] S503: The terminal device adjusts the energy efficiency ratio of the processor in the terminal device to a first energy efficiency ratio.
[0133] Since the first energy efficiency ratio is determined based on the input event including the event type and the input device, the energy efficiency ratio of the processor in the terminal device is adjusted to the first energy efficiency ratio, or in other words, the processor is instructed to operate based on the first energy efficiency ratio, so that the processor can generate performance that satisfies processing the input event, thereby improving the efficiency and effect of responding to the input event.
[0134] In some implementations, the first energy efficiency ratio may be sent to the processor through the BIOS in the firmware layer so that the processor can operate based on the first energy efficiency ratio. In some implementations, the first energy efficiency ratio may be sent to the processor according to the platform type of the processor, wherein if the processor is of the first platform type (e.g. ), the first energy efficiency ratio can be sent to the processor through the dynamic tuning driver; if the processor is of the second platform type (for example ), the first energy efficiency ratio can be sent to the processor through the power manager.
[0135] In some implementations, if the first energy efficiency ratio is updated in the aforementioned step, the energy efficiency ratio of the processor in the terminal device may be adjusted to the updated first energy efficiency ratio in S503.
[0136] In some embodiments, a first duration corresponding to an input event may be determined, and when the processor runs for the first duration based on at least the first energy efficiency ratio, the energy efficiency ratio of the processor is adjusted to the second energy efficiency ratio to indicate that the processor runs based on the second energy efficiency ratio, and the second energy efficiency ratio is greater than the first energy efficiency ratio. In some embodiments, when the processor starts to run based on the first energy efficiency ratio, a timer may be created, and the target duration of the timer may be set to the first duration. If the timer times out, the energy efficiency ratio of the processor may be adjusted to the first energy efficiency ratio to indicate that the processor runs based on the second energy efficiency ratio. The second energy efficiency ratio may be any value greater than the first energy efficiency ratio. In some embodiments, the second energy efficiency ratio may be an energy efficiency ratio of the original state, such as an energy efficiency ratio when the terminal device is in a standby state or an idle state. That is, the processor is instructed to run for at least the first duration based on the first energy efficiency ratio, so that the performance of the terminal device can be improved in time to respond to the input event, and when the duration of the processor running based on the first energy efficiency ratio is greater than or equal to the first duration, the processor can also be instructed to run based on the higher second energy efficiency ratio in time to improve the endurance of the terminal device.
[0137] The method for determining the first duration corresponding to the input event may be the same as or similar to the method for determining the first energy efficiency ratio corresponding to the input event. In some embodiments, the first duration may be determined based on at least one of the event type and the device information of the input device. In some embodiments, the corresponding frequency boost duration may be obtained as the first duration based on the event type of the input event and the device information of the input device from the correspondence between the event type, the device information of the input device and the frequency boost duration.
[0138] Taking the device information of the input device including the device type as an example, the corresponding relationship between the event type, the device information and the frequency increase duration can be shown in the following Table 3.
[0139] Table 3
[0140] Event Type Device Type Frequency boost duration Character Input keyboard 2s Quick Save keyboard 2s Quick Paste keyboard 2s Double left click mouse 2s Right click mouse 2s scroll mouse 2s drag mouse 2s Double left click touchscreen 2s Right click touchscreen 2s drag touchscreen 2s drag Trackpad 2s Double left click Trackpad 2s Right click Trackpad 2s … … …
[0141] It is understandable that the embodiment of the present application only uses the above Table 3 to illustrate the correspondence between the event type, the device information of the input device, and the frequency boost duration, but does not limit the correspondence between the event type, the device information of the input device, and the frequency boost duration, nor the numerical value of the frequency boost duration, nor the device information, nor the storage method of the correspondence between the event type, the device information of the input device, and the frequency boost duration. For example, although in Table 3, the frequency boost durations corresponding to different device types and different event types are the same, in actual applications, for any two input events with different device types and / or different event types, the frequency boost durations corresponding to the two input events may also be different.
[0142] The terminal device may obtain and store the correspondence between the event type, the device information of the input device, and the frequency boost duration in one or more of the following ways: In some embodiments, the terminal device may receive the correspondence between the event type, the device information of the input device, and the frequency boost duration set by the user; In some embodiments, the terminal device may learn the frequency boost duration configured by the user for the input event during the operation process or history of the terminal device, thereby obtaining the correspondence between the event type, the device information of the input device, and the frequency boost duration; In some embodiments, the terminal device may obtain the correspondence between the configured event type, the device information of the input device, and the frequency boost duration from other external devices. Of course, in actual applications, the terminal device may also obtain the correspondence between the event type, the device information of the input device, and the frequency boost duration in other ways.
[0143] In an embodiment of the present application, when an input event of a terminal device is obtained, and a first energy efficiency ratio corresponding to the input event is determined, the energy efficiency ratio of the processor in the terminal device is adjusted to the first energy efficiency ratio, thereby instructing the processor to run based on the first energy efficiency ratio, so that the performance of the processor can meet the needs of responding to the input event. On the one hand, the performance of the processor can be adjusted without relying on the load conditions of the processor or the terminal device, which improves the efficiency and effect of adjusting the performance of the processor and responding to input events; on the other hand, the performance of the processor can be adjusted according to specific input events, making the method of adjusting the performance of the device more accurate and reducing resource waste. For example, a PC device has the characteristics of a large display screen, multiple windows and multiple tasks. The method of adjusting the performance of the device provided in the embodiment of the present application can more accurately identify various input events and adjust the performance of the processor for each input event, thereby fully identifying the instantaneous scene of the user's operation and improving the user experience.
[0144] Please refer to Figure 6, is a flow chart of a method for adjusting device performance provided in an embodiment of the present application. It should be noted that the method is not based on Figure 6 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0145] S601: The processor of the terminal device operates based on a third energy efficiency ratio.
[0146] The third energy efficiency ratio may be the energy efficiency ratio of the processor before receiving the instruction to run based on the first energy efficiency ratio. In some embodiments, the third energy efficiency ratio may be the energy efficiency ratio of the original state, such as the energy efficiency ratio when the terminal device is in a standby state or an idle state. The third energy efficiency ratio may be greater than the first energy efficiency ratio, and the third energy efficiency ratio may be the same as the second energy efficiency ratio. In other embodiments, the third energy efficiency ratio may be the energy efficiency ratio indicated to the processor based on another input event, and the third energy efficiency ratio may be greater than, equal to, or less than the first energy efficiency ratio.
[0147] S602: The terminal device obtains an input event.
[0148] It should be noted that the method of executing S602 may be the same as or similar to the method of executing S501 described above, and will not be described in detail here.
[0149] S603: The terminal device determines a first energy efficiency ratio corresponding to the input event.
[0150] It should be noted that the method of executing S603 may be the same as or similar to the method of executing S502 described above, and will not be described in detail here.
[0151] S604, the terminal device determines whether the third energy efficiency ratio is greater than the first energy efficiency ratio. If the third energy efficiency ratio is greater than the first energy efficiency ratio, execute S605; if the third energy efficiency ratio is less than or equal to the first energy efficiency ratio, execute S606.
[0152] In some implementations, S606 may be performed when the third energy efficiency ratio is equal to the first energy efficiency ratio, and S608 may be performed when the third energy efficiency ratio is less than the first energy efficiency ratio. That is, when the current performance of the processor is higher than the performance required to process the current input event, the duration of boosting the processor may not be extended.
[0153] S605: The processor starts to run based on the first energy efficiency ratio and sets the target duration of the timer to the first duration. After that, S608 may be executed.
[0154] If the processor's current third energy efficiency ratio is greater than the first energy efficiency ratio, the processor's current performance cannot meet the response requirements for input events. For example, the terminal device may be processing a standby state or a low power consumption state. Therefore, in order to improve the efficiency and effectiveness of responding to input events, the energy efficiency ratio of the processor in the terminal device can be adjusted to the first energy efficiency ratio to instruct the processor to start running based on the first energy efficiency ratio, and create a timer, setting the target duration of the timer to the first duration.
[0155] S606, the terminal device determines whether the timer meets the delay condition, if the timer meets the delay condition, execute S607, otherwise execute S608.
[0156] If the processor's current third energy efficiency ratio is less than or equal to the first energy efficiency ratio, the processor's current performance can meet the response requirements for input events. For example, the terminal device may have improved the processor's performance at least once based on another input event or other reasons. Therefore, it is possible to determine whether to extend the time the processor runs at a higher performance by judging whether the timer meets the delay condition.
[0157] The delay condition can be obtained by setting in advance. In some embodiments, the delay condition can include at least one of the following: the time interval of the most recent increase in the target duration in the current distance history is greater than or equal to the second duration; the number of times the target duration is extended is greater than or equal to the first value; the target duration is greater than or equal to the third duration.
[0158] When the delay condition includes that the time interval of the most recent extension of the target duration in the current distance history is greater than or equal to the second duration, the problem of frequently increasing the target duration of the timer can be improved, thereby improving the problems of heating and poor battery life caused by this. For example, when the same or similar input events are frequently obtained (that is, at least one of the event type and device information of the two input events is the same), the problem of repeated frequency increase caused by the same or similar input events can be improved. Among them, the second duration can be obtained by prior setting. In some embodiments, the second duration can be 1s, and it can be understood that in actual applications, the second duration can also be other values.
[0159] When the delay condition includes the number of times the target duration is extended being greater than or equal to the first value, the problem of the processor running for too long at a higher performance due to too many delays in a single process of improving the performance of the processor can be improved, thereby improving the problems of heat generation and poor battery life caused by the delay. The first value can be obtained by setting in advance.
[0160] When the target duration is greater than or equal to the third duration, the problem of the processor running at a higher performance for too long in the process of improving the performance of the processor once can be improved, thereby improving the problems of heating and poor battery life caused by this. The third duration can be obtained by setting in advance, and the third duration can be greater than the first duration. In some embodiments, the third duration can be greater than or equal to the product of the first value and the first duration.
[0161] It is understandable that the fewer delay conditions, the longer the processor can run at a higher performance, so that it can respond to more input events in a timely manner. Conversely, the more delay conditions, the more accurately the time to improve processor performance can be controlled, and on the basis of responding to input events in a timely manner, the problems of terminal device heating and poor battery life can be improved. In actual applications, one or more delay conditions can be set based on factors such as the overall performance of the terminal device and the usage scenario. Of course, no delay condition can be set, that is, S606 is omitted.
[0162] S607: The processor continues to operate based on the third energy efficiency ratio, and the terminal device extends the target duration of the timer by the first duration.
[0163] The timer may be a timer created when instructing the processor to start running based on the third energy efficiency ratio. When the timer satisfies the delay condition, the timer may be acquired, and the target duration of the timer may be extended by a first duration, so that the processor continues to run based on the third energy efficiency ratio for at least the first duration, that is, the processor is at a higher performance for at least the first duration.
[0164] S608: If the timer times out, adjust the energy efficiency ratio of the processor to a second energy efficiency ratio.
[0165] When the timer times out, the energy efficiency ratio of the processor can be adjusted to a second energy efficiency ratio to instruct the processor to operate based on the higher second energy efficiency ratio, thereby reducing the performance of the processor and improving problems such as performance waste, heat generation and poor battery life.
[0166] In an embodiment of the present application, when an input event is obtained and the corresponding first energy efficiency ratio is determined, the performance of the processor can be more accurately adjusted in combination with the third energy efficiency ratio currently running the processor. When the third energy efficiency ratio is greater than the first energy efficiency ratio, the processor can be instructed to run based on the first energy efficiency ratio, thereby further improving the performance of the processor so that the processor can meet the needs of responding to input events. When the third energy efficiency ratio is less than or equal to the first energy efficiency ratio, the processor is already running based on a higher performance, so the processor can be instructed to continue to run based on the third energy efficiency ratio, thereby maintaining a higher performance. In addition, when the timer times out, the processor can be instructed to run according to the higher second energy efficiency ratio, thereby improving problems such as performance waste, heat generation, and poor battery life.
[0167] The following will take the terminal device as a PC device and the input device as a touchpad and a keyboard as an example to specifically illustrate the method for adjusting device performance provided in the embodiment of the present application.
[0168] Please refer to Figure 7 , is a method for adjusting device performance provided in an embodiment of the present application, wherein the terminal device is a PC device and the input device is a mouse. It should be noted that the method does not Figure 7 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0169] S701, the terminal device obtains multiple messages from the mouse.
[0170] The multiple messages may be messages generated by the mouse based on user operations, such as a message indicating left button pressed, a message indicating left button lifted, a message indicating right button pressed, a message indicating right button lifted, a message indicating pressing the mouse and moving, and the like.
[0171] S702: The terminal device determines an event type of an input event based on multiple messages.
[0172] The terminal device may determine the corresponding event type based on the received messages and the order of the messages.
[0173] In some embodiments, the message combination corresponding to each event type among multiple event types can be determined in advance, so that the message combination received from the mouse can be compared with multiple stored message combinations. If the message combination is consistent with any stored message combination, it can be determined that an input event of the event type corresponding to any message combination is obtained.
[0174] For example, as shown in Table 4 below, when two messages indicating that the left button is pressed and two messages indicating that the left button is lifted are obtained, and the time interval between the two messages indicating that the left button is lifted is less than 500ms, it can be determined that an input event of the left button double-click type is obtained. When a message indicating that the right button is lifted is obtained, it can be determined that an input event of the right-click type is obtained. When a message indicating that the left button is pressed and a message indicating that the left button is pressed and moved are obtained, it can be determined that an input event of the drag type is obtained. When a message indicating that the wheel is scrolled is obtained, it can be determined that an input event of the scroll type is obtained.
[0175] Table 4
[0176]
[0177] S703, the terminal device determines whether the event type of the current input event is the same as the event type of the input event obtained from the mouse last time. If they are the same, S704 can be executed, otherwise the end is ended, thereby ignoring the current input event.
[0178] When the event type of the current input event is the same as the event type of the input event previously obtained from the mouse, the terminal device executes subsequent steps. This allows the terminal device to respond to the user operations in a scenario where the user uses the mouse to perform the same or similar user operations, thereby improving the efficiency and effectiveness of the response.
[0179] In some implementations, S703 may be omitted.
[0180] S704, the terminal device determines whether the time interval from the last input event obtained from the mouse is greater than or equal to 1 second. If yes, S705 is executed, otherwise, the process ends, thereby ignoring the current input event.
[0181] Among them, 1s can be the second duration mentioned above.
[0182] When the terminal device determines whether the time interval from the last input event obtained from the mouse is greater than or equal to 1s, it continues to execute subsequent steps, which can improve the problem of repeatedly improving processor performance when the user frequently performs the same or similar user operations.
[0183] In some implementations, S704 may be omitted.
[0184] S705: The terminal device determines that the first energy efficiency ratio is 33 and the first duration is 2s based on the event type of the current input event, the device type is a mouse, and the platform type of the processor is the second platform.
[0185] Among them, the terminal device can determine that the first energy efficiency ratio is 33 based on the aforementioned Table 2, and determine that the first duration is 2s based on the aforementioned Table 3.
[0186] S706: The terminal device instructs the processor to run for 2 seconds based on an energy efficiency ratio of 33.
[0187] The terminal device may send an energy efficiency ratio of 33 to the processor, create a timer, and set the target duration of the timer to 2 seconds. The processor may run based on the energy efficiency ratio of 33 and respond to the current input event. In some embodiments, when the timer times out, that is, the terminal device runs for 2 seconds based on the energy efficiency ratio of 33, the processor may be instructed to restore to the original state, such as restoring to continue running based on the energy efficiency ratio of 80.
[0188] It is understandable that the terminal device responds to input events in different ways based on the different active windows in the display screen of the terminal device. For example, if the display screen displays any active window, the user clicks the left button on the minimum button in the upper left corner of the active window, then the terminal device can minimize the active window; if the user clicks the left button on the close button in the upper left corner of the active window, then the terminal device can close the active window; if the user double-clicks the touch screen with one joint, the terminal device can take a screenshot of the current screen and edit it; if the user double-clicks the touch screen with two joints, the terminal device can start screen recording until the user double-clicks the touch screen again to stop recording; if the user slides up and down along the left edge of the touch screen, the terminal device can adjust the brightness of the touch screen; if the user slides up and down along the right edge of the touch screen, the terminal device can adjust the volume of the speaker; if the user slides up and down along the upper edge of the touch screen, the terminal device can control the fast forward or rewind of the video played on the touch screen; if the user slides in with three fingers along the right edge of the touch screen, the terminal device can display the notification center.
[0189] In the embodiment of the present application, in the scenario where the user uses the mouse, when the mouse input event is detected, the corresponding first energy efficiency ratio can be determined in time and the processor can be instructed to operate based on the first energy efficiency ratio, thereby improving the efficiency of responding to the input event. In addition, by determining the event type and time interval between the current input event and the previous input event, when the user performs the same or similar user operation, the user operation in the scenario can be responded to in time, and the problem of repeatedly improving the processor performance when the user frequently performs the same or similar user operation can be improved.
[0190] Taking the case where a user double-clicks to open the mail application as an example, the processor runs at loads of 20%, 60%, and 80%, respectively, based on energy efficiency ratios of 33, 50, and 70, and the duration of responding to the user's operation of opening the mail application and displaying the mail application interface is shown in Table 5. Among them, the event type of the input event is left double-click, and the device type is mouse.
[0191] Table 5
[0192]
[0193] Taking the first four columns of data in Table 5 as an example, when the processor load is 20%, the response time of the user opening the email application is tested three times. When the first energy efficiency ratio is 33, the time for the terminal device to respond to the user's operation of opening the email application and display the email application interface is 0.44s, 0.85s and 1.09s respectively, when the first energy efficiency ratio is 50, the time for the terminal device to respond to the user's operation of opening the email application and display the email application interface is 1.16s, 1.39s and 0.93s respectively, when the first energy efficiency ratio is 70, the time for the terminal device to respond to the user's operation of opening the email application and display the email application interface is 2.34s, 2.25s and 2.13s respectively. It can be seen that no matter whether the processor is in a light load, medium load or heavy load state, the smaller the value of the first energy efficiency ratio, the smaller the time to respond to the user's operation of opening the email application and displaying the email application interface, that is, the greater the performance improvement of the processor.
[0194] Taking the case where a user right-clicks to open a shortcut menu as an example, the processor runs at loads of 20%, 60%, and 80%, respectively, based on energy efficiency ratios of 33, 50, and 70, and the duration of displaying the shortcut menu in response to the operation of opening the shortcut menu is shown in Table 6. Among them, the event type of the input event is right-click, and the device type is mouse.
[0195] Table 6
[0196]
[0197] Taking the first four columns of data in Table 5 as an example, when the processor load is 20%, the response time of the user right-clicking to open the shortcut menu is tested three times. When the first energy efficiency ratio is 33, the time for the terminal device to respond to the user's right-click to open the shortcut menu operation and display the shortcut menu is 0.41s, 0.52s and 0.52s respectively, when the first energy efficiency ratio is 50, the time for the terminal device to respond to the user's right-click to open the shortcut menu operation and display the shortcut menu is 0.49s, 053s and 0.49s respectively, when the first energy efficiency ratio is 70, the time for the terminal device to respond to the user's right-click to open the shortcut menu operation and display the shortcut menu is 0.55s, 0.555s and 0.55s respectively. It can be seen that the smaller the value of the first energy efficiency ratio, the smaller the time for responding to the user's right-click to open the shortcut menu operation and displaying the shortcut menu, that is, the greater the performance improvement of the processor.
[0198] Taking the user scrolling the middle mouse button as an example, the processor operates at loads of 20%, 60%, and 80%, respectively, based on energy efficiency ratios of 33, 50, and 70, and the frame rates of responding to the user scrolling the middle mouse button to scroll a 2000-row table in a tabular application are shown in Table 7 below. Among them, the event type of the input event is the scroll middle button, and the device type is the mouse.
[0199] Table 7
[0200]
[0201] It can be seen from Table 7 that the smaller the value of the first energy efficiency ratio is, the higher the frame rate of the terminal device in response to the user sliding the middle mouse button to display the table is, that is, the greater the performance improvement of the processor is.
[0202] Please refer to Figure 8 , is a method for adjusting device performance provided in an embodiment of the present application, wherein the terminal device is a PC device and the input device is a keyboard. It should be noted that the method does not Figure 8 The specific order described below is a limitation, and it should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0203] S801, the terminal device obtains multiple messages from the keyboard.
[0204] The multiple messages may be messages generated by the keyboard based on user operations. In some implementations, the message may include a virtual key code corresponding to the key pressed by the user.
[0205] For example, in the order of the alphabet from A to Z, the virtual key codes corresponding to the letter keys are 65-90; in the order of numbers from 1 to 9, the virtual key codes corresponding to the number keys can be 48-57.
[0206] S802, the terminal device determines whether the user presses the ctrl key. If yes, execute S803, otherwise execute S805.
[0207] Wherein, when the message of ctrl key pressing is obtained, it can be determined that the user presses the ctrl key. In some implementations, the flag corresponding to the ctrl key can be set to true when the ctrl key is pressed.
[0208] S803, the terminal device determines whether the user presses the C key, the S key or the V key, if yes, executes S804, otherwise ends.
[0209] When a message indicating that the C key is pressed is obtained, it can be determined that the user presses the C key; when a message indicating that the S key is pressed is obtained, it can be determined that the user presses the S key; when a message indicating that the V key is pressed is obtained, it can be determined that the user presses the V key.
[0210] S804, the terminal device determines that the first energy efficiency ratio is 50 and the first duration is 2s based on the event type of the input event being quick copy, quick save or quick paste, the device type being keyboard, and the platform type of the processor being the second platform.
[0211] Among them, when the mark corresponding to the ctrl key is true and a message of the C key being pressed is received, it can be determined that an input event of the quick copy type is obtained; when the mark corresponding to the ctrl key is true and a message of the S key being pressed is received, it can be determined that an input event of the quick save type is obtained; when the mark corresponding to the ctrl key is true and a message of the V key being pressed is received, it can be determined that an input event of the quick paste type is obtained.
[0212] The terminal device can determine that the first energy efficiency ratio is 50 based on Table 2 mentioned above, and determine that the first duration is 2s based on Table 3 mentioned above.
[0213] S805, the terminal device determines whether the user presses a letter key or a number key 10 times within 2 seconds. If yes, execute S806, otherwise end.
[0214] Among them, a message queue with a length of 10 can be created. Whenever a message of a character key being pressed is received, it is determined whether the time interval between the last message and the first message in the message queue is less than 2s. If so, it is determined that an input event of the character input type is obtained, otherwise the first message is removed and the eleventh message is inserted.
[0215] S806: The terminal device determines that the first energy efficiency ratio is 50 and the first duration is 2s based on the event type of the input event being character input, the device type being keyboard, and the platform type of the processor being the second platform.
[0216] Among them, the terminal device can determine that the first energy efficiency ratio is 50 based on the aforementioned Table 2, and determine that the first time length is 2s based on the aforementioned Table 3.
[0217] S807, the terminal device determines whether the time interval between the current and the last keyboard input event detected is greater than or equal to 1s. If so, execute S808, otherwise execute S809.
[0218] Among them, 1s can be the second duration mentioned above.
[0219] When the terminal device determines that the time interval between the current distance and the last time a keyboard input event was detected is greater than or equal to 1s, it continues to execute subsequent steps, which can improve the problem of repeatedly improving processor performance when the user frequently performs the same or similar user operations.
[0220] S808: The terminal device instructs the processor to operate based on an energy efficiency ratio of 50 and extends the target duration of the timer by 2 seconds.
[0221] S809: When the timer times out or an input event from another input device is obtained, the processor is instructed to stop running based on an energy efficiency ratio of 50.
[0222] In some implementations, when the timer times out, indicating that the user temporarily stops inputting information to the terminal device through the keyboard, the terminal device may instruct the processor to restore to an initial state, for example, may instruct the processor to restore to operation based on an energy efficiency ratio of 70.
[0223] In some embodiments, when input events from other input devices are obtained, it means that the user temporarily stops inputting information to the terminal device through the keyboard and switches to inputting information to the terminal device through other input devices. The terminal device can determine a new first energy efficiency ratio based on the input events from other input devices, and instruct the processor to operate based on the new first energy efficiency ratio.
[0224] In the embodiment of the present application, in the scenario where the user uses the keyboard, when the keyboard input event is detected, the corresponding first energy efficiency ratio can be determined in time and the processor can be instructed to operate based on the first energy efficiency ratio to improve the response efficiency of the input event. In addition, the time interval between the current and the last time the keyboard input event was detected can improve the problem of repeatedly improving the processor performance when the user frequently performs the same or similar user operations.
[0225] Taking the case where a user inputs a paragraph of text through a keyboard as an example, the responses of the terminal device in different power modes may be shown in the following Table 8. Among them, the event type of the input event may be character input, and the device type may be a keyboard.
[0226] Table 8
[0227]
[0228] In the above Table 8, when the terminal device is in the best energy efficiency mode, the terminal device can give priority to reducing energy consumption, so the terminal device can have lower power consumption and lower performance, and when the terminal device is in the balanced mode, the terminal device can reduce energy consumption while ensuring performance to a certain extent, so the terminal device can have higher energy consumption and higher performance. It can be seen from Table 8 that under the same power mode, when the energy efficiency ratio is smaller, the response speed to character input is higher.
[0229] Taking the case where a user opens a tab application and uses a keyboard to perform quick copy, quick paste, and quick save in the tab application as an example, the response of the terminal device may be as shown in Table 9. Among them, the event type of the input event may be a shortcut command input, and the device type may be a keyboard.
[0230] Table 9
[0231]
[0232] It can be seen from Table 9 that, in the case of tables of the same size, when the energy efficiency ratio is smaller, the time consumed for opening the table, quickly pasting the table, and quickly saving the table is shorter.
[0233] In an embodiment of the present application, a method is provided that can adjust the energy efficiency ratio of a processor according to an input event of a terminal device. In practical applications, the method can be used independently to adjust the performance of the processor, or it can be combined with other methods for adjusting the performance of a terminal device. In some embodiments, the current scene of the terminal device, such as an idle scene, a music scene, etc., can be identified, the performance of the terminal device can be adjusted based on the scene, and the energy efficiency ratio of the processor can be adjusted according to the method provided in the embodiment of the present application. In some embodiments, the current scene of the terminal device can be identified, and only when the terminal device is in a specific scene, the energy efficiency ratio of the processor can be adjusted according to the method provided in the embodiment of the present application. In some embodiments, the current window or process of the terminal device can be identified, and only when the current window is a specific window or only when the current process is a specific process, the energy efficiency ratio of the processor can be adjusted according to the method provided in the embodiment of the present application.
[0234] Based on the same inventive concept, an embodiment of the present application also provides a device for adjusting equipment performance, which includes an acquisition module, a determination module and an adjustment module.
[0235] An acquisition module, used to acquire input events for a terminal device;
[0236] A determination module, configured to determine a first energy efficiency ratio corresponding to the input event;
[0237] An adjustment module is used to adjust the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio.
[0238] Among them, the device can be equivalent to the terminal device, or the device can be set in the terminal device, or the terminal device can be connected to the device, and the device can implement the operations performed by the terminal device in the aforementioned embodiments and have corresponding technical effects.
[0239] Based on the same inventive concept, the embodiment of the present application further provides a terminal device. The terminal device includes: a memory and a processor, the memory is used to store a computer program; the processor is used to execute the method described in the above method embodiment when calling the computer program.
[0240] The terminal device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0241] Based on the same inventive concept, an embodiment of the present application further provides a chip system, which includes a processor coupled to a memory, and the processor executes a computer program stored in the memory to implement the method described in the above method embodiment.
[0242] The chip system may be a single chip or a chip module composed of multiple chips.
[0243] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in the above method embodiment is implemented.
[0244] The embodiment of the present application also provides a computer program product. When the computer program product is run on a terminal device, the terminal device implements the method described in the above method embodiment when executing the computer program product.
[0245] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0246] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0247] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0248] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0249] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0250] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0251] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0252] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0253] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0254] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for adjusting equipment performance, characterized in that: The method comprises: Get input events for terminal devices; determining a first energy efficiency ratio corresponding to the input event; The energy efficiency ratio of the processor in the terminal device is adjusted to the first energy efficiency ratio.
2. The method according to claim 1, characterized in that The determining a first energy efficiency ratio corresponding to the input event includes: determining at least one of an event type of the input event and device information of an input device, the input device corresponding to the input event; The first energy efficiency ratio is determined based on at least one of the event type and device information of the input device.
3. The method according to claim 2, characterized in that The method further comprises: determining a platform type of the processor; The determining the first energy efficiency ratio based on at least one of the event type and the device information of the input device includes: The first energy efficiency ratio is determined based on at least one of the event type and the device information of the input device, and the platform type.
4. The method according to any one of claims 1 to 3, characterized in that: Before adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio, the method further includes: obtaining a temperature of the processor; updating the first energy efficiency ratio based on the temperature to obtain an updated first energy efficiency ratio, wherein when the temperature is lower, the updated first energy efficiency ratio is smaller; The step of adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio includes: The energy efficiency ratio of the processor in the terminal device is adjusted to the updated first energy efficiency ratio.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining a first duration corresponding to the input event; When the processor runs for the first time period based at least on the first energy efficiency ratio, the energy efficiency ratio of the processor is adjusted to a second energy efficiency ratio, where the second energy efficiency ratio is greater than the first energy efficiency ratio.
6. The method according to claim 5, characterized in that The determining a first duration corresponding to the input event includes: determining at least one of an event type of the input event and device information of an input device, the input device corresponding to the input event; The first duration is determined based on at least one of the event type and device information of the input device.
7. The method according to claim 5 or 6, characterized in that: Before adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio, the energy efficiency ratio of the processor is a third energy efficiency ratio, and the third energy efficiency ratio is greater than the first energy efficiency ratio, and when the processor runs for the first time period based at least on the first energy efficiency ratio, adjusting the energy efficiency ratio of the processor to the second energy efficiency ratio includes: When the processor starts to operate based on the first energy efficiency ratio, creating a timer; Setting the target duration of the timer to the first duration; If the timer times out, the energy efficiency ratio of the processor is adjusted to the second energy efficiency ratio.
8. The method according to claim 5 or 6, characterized in that: Before adjusting the energy efficiency ratio of the processor in the terminal device to the first energy efficiency ratio, the energy efficiency ratio of the processor is a third energy efficiency ratio, and the third energy efficiency ratio is less than or equal to the first energy efficiency ratio, and when the processor runs for the first time period at least based on the first energy efficiency ratio, adjusting the energy efficiency ratio of the processor to the second energy efficiency ratio includes: Acquire a timer, where the timer is a timer created when the processor starts to run based on the third energy efficiency ratio; Extending the target duration of the timer by the first duration; If the timer times out, the energy efficiency ratio of the processor is adjusted to the second energy efficiency ratio.
9. The method according to claim 8, characterized in that Before extending the target duration of the timer by the first duration, the method further includes: Determine that the timer satisfies a delay condition, where the delay condition includes at least one of the following: The time interval for the most recent extension of the target duration in the current distance history is greater than or equal to the second duration; The number of times the target duration is extended is greater than or equal to a first value; The target duration is greater than or equal to the third duration.
10. A terminal device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method according to any one of claims 1 to 9 when calling the computer program.
11. The terminal device according to claim 10, characterized in that: The terminal device is a personal computing device, a tablet device or smart glasses.
12. The terminal device according to claim 11, characterized in that: When the terminal device is the personal computing device or the tablet device, the input device includes at least one of a keyboard, a touch pad, a mouse and a touch screen.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
14. A computer program product, characterized in that When the computer program product is executed on a terminal device, the terminal device is caused to execute the method according to any one of claims 1 to 9.
Citation Information
Cited By
Method for adjusting performance of device, and terminal device
EP4726505A1
Method for adjusting performance of device, and terminal device
WO2025035899A1