Hardware resource control method, device, storage medium and terminal
By obtaining the current usage environment and user portrait information of the terminal, and dynamically adjusting hardware resources, the problem of insufficient user stickiness in the existing technology is solved, and better user experience and resource allocation are achieved.
Patent Information
- Application Number
- CN202110841065.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-07-23
AI Technical Summary
In the prior art, the adjustment of terminal hardware resources is based only on the current application scenario, and fails to fully consider the personalized needs of users, resulting in insufficient user stickiness.
By obtaining the terminal's current usage environment and user profile information, the hardware resources, such as CPU, GPU and backlight brightness, are dynamically adjusted to meet the usage habits and needs of different users.
It improves user stickiness, and by reasonably allocating hardware resources, meeting the needs of different users, and improving the terminal's user experience.
Smart Images

Figure CN113568745B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a hardware resource control method, device, storage medium and terminal. Background Art
[0002] In the prior art, when adjusting the hardware resources of the terminal, most of them are adjusted on demand according to the current application scenario. Hardware resources can generally include parameters such as the central processing unit (CPU), graphics processing unit (GPU), and backlight brightness. When these hardware parameters are adjusted, the adjustment methods are similar. When the terminal has a demand, the parameter value can be increased, and when the terminal is idle, the parameter value can be decreased.
[0003] For example, when adjusting the CPU operating frequency, the Android phone operating system will adjust the CPU frequency according to the current CPU load to achieve the purpose of reducing power consumption while meeting current usage. Generally, there are several CPU frequency adjustment modes: on-demand mode, interactive mode, conservative mode, hot-swap mode, high-performance mode, and power-saving mode.
[0004] In on-demand mode, the CPU frequency is adjusted on demand. When the phone is not being operated, it is controlled at the lowest frequency. When sliding the screen or entering an application, it will quickly increase to the highest frequency, and when it is idle, it will quickly reduce the frequency. In interactive mode, the rule is "fast increase and slow decrease", focusing on response speed and performance. When there is high demand, it quickly jumps to a high frequency, and when there is low demand, it gradually reduces the frequency. In conservative mode, the rule is "slow increase and fast decrease", focusing on power saving. When there is high demand, the frequency is gradually increased, and when there is low demand, it quickly jumps to a low frequency. In hot-swap mode, when there is high demand, it directly jumps to the highest frequency, and when the demand decreases, the frequency is gradually reduced, but when the screen is turned off, it runs at a single core at a low frequency to save power. In high-performance mode, it runs at the highest frequency in the set range. Even if the system load is very low, the CPU runs at the highest frequency. In power-saving mode, it runs at the lowest frequency in the set range. It has no daily use value, unless it is used in conjunction with the setcpu scenario mode. This mode is used when the screen is turned off and asleep, which saves power but the system response speed is slow.
[0005] From the above-mentioned CPU frequency allocation modes, it can be seen that the CPU frequency is mainly adjusted according to the application scenario of the mobile phone. For other hardware parameters, the adjustment method is similar to the CPU frequency adjustment method. Therefore, in the related technology, for all users, the adjustment method of hardware resources is the same, which is adjusted according to the current application scenario. Summary of the invention
[0006] The embodiments of the present application provide a hardware resource control method, device, computer storage medium and terminal, aiming to solve the technical problem of how to improve user stickiness when adjusting hardware resources in the related art. The technical solution is as follows:
[0007] In a first aspect, an embodiment of the present application provides a hardware resource control method, the method comprising:
[0008] Obtain the current usage environment of the terminal and obtain user portrait information of the terminal;
[0009] The hardware resources of the terminal are adjusted based on the current usage environment and the user portrait information.
[0010] In a second aspect, an embodiment of the present application provides a hardware resource control device, the device comprising:
[0011] An acquisition module is used to acquire the current usage environment of the terminal and acquire user portrait information of the terminal;
[0012] An adjustment module is used to adjust the hardware resources of the terminal based on the current usage environment and the user portrait information.
[0013] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium has a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0014] In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a memory and a processor; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the memory and executing the above-mentioned method steps.
[0015] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0016] When the solution of the embodiment of the present application is executed, the current use environment of the terminal is obtained, and the user portrait information of the terminal is obtained, and the hardware resources of the terminal are adjusted based on the current use environment and the user portrait information. The present application adjusts the hardware resources of the terminal used by different users by combining the current use environment of the terminal and the user portrait information. Unlike the related art, which only adjusts the hardware resources based on the current application scenario of the terminal, the hardware resources can be reasonably allocated according to the use habits and needs of different users, thereby improving user stickiness. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a flowchart of a hardware resource control method provided in an embodiment of the present application;
[0019] Figure 2 It is a scenario diagram of a hardware resource control method provided in an embodiment of the present application;
[0020] Figure 3 It is a flowchart of another hardware resource control method provided in an embodiment of the present application;
[0021] Figure 4 is a structural diagram of a hardware resource control device provided in an embodiment of the present application;
[0022] Figure 5 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0024] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0025] In the related art, the allocation of terminal hardware resources is mostly based on the hardware performance of the terminal, and the resources are allocated according to the different usage environments of the terminal. For example, for application scenarios with high performance requirements, the CPU operating frequency is usually increased to improve performance, while for application scenarios with low performance requirements, the CPU operating frequency is usually reduced to save resources. Obviously, this resource allocation method only adjusts the resources according to the terminal's own usage environment. In these same scenarios, for different users using the same terminal, these terminals will use the same resource adjustment method, without considering the actual needs of the users.
[0026] The present application is described in detail below with reference to specific embodiments.
[0027] In the following method embodiments, for the sake of convenience, only the execution subject of each step is introduced and described as the terminal.
[0028] See also Figure 1 , is a flowchart of a hardware resource control method provided in an embodiment of the present application. Figure 1 As shown, the method of the embodiment of the present application may include the following steps:
[0029] S101, obtaining the current usage environment of the terminal and obtaining user portrait information of the terminal.
[0030] Among them, the current usage environment refers to a comprehensive environment in which the terminal is currently located at a certain moment or in a short period of time, involving conditions such as application scenarios, user actions, battery modes, and current temperature. Application scenarios refer to a scenario in which an application is currently running in the foreground of the terminal and the user is using the application. User actions refer to the interactive actions that the user is performing with the terminal in the aforementioned application scenarios. Battery modes mainly refer to power saving mode and normal mode. Current temperature refers to the current operating temperature of the terminal.
[0031] For example, the application scenario can be a scenario in which a user plays a game in a game software, a scenario in which a user plays a video using a video playback software, a scenario in which a user reads a book in a reading software, a scenario in which a user chats in a social software, a scenario in which a user uses navigation in a map software, or an application scenario in which a user uses other software.
[0032] For example, the user action can be an interactive action of sliding or clicking the screen with the user's finger in a game scenario, an interactive action of sliding the screen with the user's finger in a video playback scenario, an interactive action of turning pages with the user's finger in a reading scenario, an interactive action of typing with the user's finger in a chat scenario, and also an interactive action of the user in other software.
[0033] Among them, user portrait information refers to information generated based on the behavioral habits of different users in using the terminal on a regular basis, which is used to describe the user's personal characteristics.
[0034] The user's behavioral habits mainly include: the application name, application type, usage duration and usage time period of the applications commonly used by the user, the charging time period and charging frequency when the user charges the terminal, the time period when the terminal is in power saving mode and the battery consumption rate, etc.
[0035] As for the behavioral habits of the above-mentioned users, the user portrait information can usually be simply divided into user portrait information of two different types of users, one is performance-sensitive users; the other is power-sensitive users. For performance-sensitive users, such users usually care more about the performance of the terminal and do not mind the problem of reducing power consumption due to improved performance. For power-sensitive users, such users usually care more about the power consumption of the terminal while ensuring basic performance, and can accept the increase in power consumption brought about by saving some performance. For example, some performance-sensitive users cannot accept the problem of poor display effect caused by the low brightness of the terminal display screen. Even if the terminal is currently in a state of insufficient power, the display screen brightness is always adjusted to a brightness value that allows them to have a more comfortable viewing effect. In order to save power consumption, some power-sensitive users can always set the brightness of the terminal display screen to a lower brightness value, so that the terminal can consume less power to maintain a longer battery life.
[0036] like Figure 2 The figure is a schematic diagram of a scenario of a hardware resource control method provided in an embodiment of the present application. Figure 2 Including terminals and users, the terminal can be a mobile phone. In daily life, users can carry mobile phones for various daily activities, including calls, social networking, entertainment and other activities. Now, mobile phones are an indispensable communication tool for users. The performance and power consumption of mobile phones are what users care about, and they are also the two most important factors affecting user experience. Usually, when users use the terminal, the terminal can monitor and obtain the current use environment in real time. At the same time, the terminal can also obtain user portrait information. The user portrait information can be information generated by the terminal in advance and saved locally or on a server by collecting the user's behavior habits. When obtaining the user portrait information, it can be obtained in real time from the local or server. For different users, the user portrait information can be bound to the user's terminal account. The terminal account refers to the terminal manufacturer account. For example, OPPO mobile phones have OPPO accounts, Xiaomi mobile phones have Xiaomi accounts, and Huawei mobile phones have Huawei accounts. The terminal account refers to these accounts. Even if the user changes to the terminal of the same brand, if the user portrait information of the user has been generated before, the user portrait information can be quickly obtained through the user's terminal account.
[0037] In some embodiments, the user portrait information may be updated regularly by the terminal. When the terminal generates user portrait information for a user for the first time, it may collect the user's behavior habits within a week, a month, or other period, and then generate the user portrait information for the user. Then, the terminal may continue to collect the user's behavior habits within a week or a month, and may update the user portrait information previously generated for the user based on the user's latest behavior habits. In this way, it can be ensured that the terminal can obtain the latest user portrait information of the user each time it obtains the user portrait information.
[0038] S102: Adjust the hardware resources of the terminal based on the current usage environment and the user portrait information.
[0039] The hardware resources may include: CPU, GPU, Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM for short), backlight brightness and other hardware. DDR SDRAM is usually referred to as DDR.
[0040] Optionally, for users corresponding to two different types of user portrait information in S101, the requirements for hardware resources are different in different current usage environments of the terminal.
[0041] In a feasible implementation, for performance-sensitive users, if the current usage environment of the terminal is in an application scenario with high performance requirements, such as a gaming scenario, the battery power is sufficient, the current terminal temperature is normal, and the gaming scene is stuck, in order to meet the user's performance requirements, the hardware resources can be adjusted, such as adjusting the CPU operating frequency, and the CPU operating frequency can be appropriately increased; still in the gaming scenario, the battery power is less than 30%, the current terminal temperature is high, and the current time period is when it is inconvenient for the user to charge, if the gaming scene is stuck, while meeting the user's performance requirements, power consumption must also be guaranteed. At this time, you can choose not to adjust the hardware resources and choose to maintain power consumption for a certain period of time.
[0042] In a feasible implementation, for power-sensitive users, if the current usage environment of the terminal is in an application scenario with high real-time requirements, such as a map navigation scenario, the battery is sufficient, the current terminal temperature is normal, and the map navigation scenario is stuck, although the user is power-sensitive, it affects the user's real-time requirements, and the hardware resources can also be adjusted, such as adjusting the CPU operating frequency, which can increase the CPU operating frequency.
[0043] Optionally, when the terminal is in different usage environments, different types of users have different terminal requirements. Therefore, the hardware resources of the terminal can be appropriately adjusted in different usage environments based on the current usage environment of the terminal and the user's behavior habits to ensure user needs.
[0044] When the solution of the embodiment of the present application is executed, the current use environment of the terminal is obtained, and the user portrait information of the terminal is obtained, and the hardware resources of the terminal are adjusted based on the current use environment and the user portrait information. The present application adjusts the hardware resources of the terminal used by different users by combining the current use environment of the terminal and the user portrait information. Different from the related art, the hardware resources are adjusted only by the current application scenario of the terminal. The hardware resources can be reasonably allocated according to the use habits and needs of different users, which can improve user stickiness.
[0045] See also Figure 3 , is a flowchart of a hardware resource control method provided in an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps:
[0046] S301, obtaining the current usage environment of the terminal.
[0047] For details, see Figure 1 S101 in the description will not be described in detail here.
[0048] S302: Obtain application usage information corresponding to the user of the terminal within a first preset time period.
[0049] Among them, the first preset time period refers to the period for collecting user information, for example, it can be set to one week, one month, two months, etc.
[0050] The application usage information refers to information such as the application names of all applications used by the user within the first preset time period, the application types to which these applications belong, the usage time of these applications, and the usage time period of these applications.
[0051] Optionally, you can count the application usage information of users on the terminal every day to obtain the names of applications used by users every day and the length of time these applications are used. In order to better understand the user's behavioral habits of using these applications, you can choose to count the application usage information of users within a certain time period, such as counting the application usage information of users within a month.
[0052] S303: Obtain battery charging and discharging information and battery setting information of the terminal within the first preset time period.
[0053] Among them, the battery charging and discharging information refers to the time when the user charges the terminal and the corresponding charging time of each charge. The battery setting information refers to the time when the terminal is in power saving mode, the number of times the user sets the power saving mode, and the time when the user sets the power saving mode.
[0054] Optionally, the battery charging and discharging information and battery setting information can be monitored in real time to understand whether charging is convenient for the user and the demand for the terminal's endurance.
[0055] S304, collecting statistics on the application usage information, the battery charging and discharging information, and the battery setting information to obtain user portrait information corresponding to the user.
[0056] Optionally, the application usage information, battery charging and discharging information, and battery setting information can be combined to obtain the daily power consumption of the terminal, including the battery power consumed by each application. The time period when the user habitually charges the terminal can also be obtained, and the user's personal characteristics can be obtained based on the above information.
[0057] For example, we can know that user A charges his terminal after 7 pm every day, is accustomed to setting the battery mode to power saving mode in the afternoon, does not use game applications, and uses social software and news software more often in daily life. Based on the above information, we can know that user A is inconvenient to charge during the day, rarely uses applications with high performance requirements, and is more concerned about power consumption. Therefore, user A can be defined as a power consumption sensitive user.
[0058] For another example, we can learn that user B never sets the power saving mode, charges the terminal when the battery is at a low level, spends more time on game applications, followed by social software and short video software. Based on the above information, we can learn that user B is convenient for charging and frequently uses applications with high performance requirements. Therefore, user B can be defined as a performance-sensitive user.
[0059] S305: When the user portrait information indicates that the user is a performance-sensitive user, the hardware resources of the terminal are adjusted according to a first adjustment condition based on the current usage environment.
[0060] Optionally, performance-sensitive users can be understood as users who can accept the performance improvement brought by sacrificing battery life. Even if this type of user pays more attention to performance, when the terminal freezes and affects the user experience, it is necessary to consider whether the hardware resources of the terminal can be adjusted according to different usage environments. It does not mean that because users value performance, the hardware resources are adjusted to the corresponding maximum value regardless of the application scenario. For example, setting the CPU operating frequency to a high value for a long time, such resource adjustment will lead to waste of resources while maintaining optimal performance. Specifically, the hardware resources of the terminal are adjusted according to the first adjustment condition based on the current usage environment, as shown in S3051, S3052 and S3053.
[0061] S3051: When the current usage environment is system freeze and / or application freeze with high performance requirements, adjust each resource parameter in the hardware resources of the terminal according to each first adjustment step.
[0062] Optionally, system freeze can be understood as the situation where the system operation freezes when the user slides the screen left and right, the user slides the screen up and down, the user locks the screen, and the user unlocks. Application freezes with high performance requirements can include the situation where software such as game software freezes. In addition, in the above-mentioned usage environment, the battery power of the terminal is sufficient, or the terminal is in a charging state, and the battery life can be ignored for a short time. For performance-sensitive users, if these freezes occur, the values of the various hardware parameters included in the hardware resources can be increased according to the first adjustment step. In the related art, when adjusting the various hardware parameters included in the hardware resources, the standard step corresponding to each hardware resource parameter is usually pre-set. Since the hardware resources can include multiple resource parameters, the standard step set for different resource parameters is also different. According to the actual needs of the application scenario, the value of each resource parameter is increased or decreased according to the corresponding standard step. In the embodiment of the present application, the value of the first adjustment step can be set to a value greater than the standard step.
[0063] S3052: When the current usage environment is an application freeze with a high real-time requirement, adjust each resource parameter in the hardware resources of the terminal according to each first adjustment step size.
[0064] Optionally, the jamming of applications with high real-time requirements can be understood as the jamming of video playback software when playing live or recorded videos, the jamming of audio playback software when playing audio in real time, the jamming of map software when performing real-time map navigation, and other software. Moreover, in the above-mentioned usage environment, the battery power of the terminal is sufficient, or the terminal is in charging state, and the battery life can be temporarily ignored. For performance-sensitive users, the jamming in the above-mentioned situation affects the user experience, and the resource parameters in the hardware resources can be adjusted according to the resource adjustment method in S3051.
[0065] S3053. When the current usage environment is that the system does not freeze, and / or the application with high performance requirements does not freeze, and / or the application with high real-time requirements does not freeze, maintain the value of each resource parameter in the hardware resources of the terminal.
[0066] Optionally, when the terminal is fully charged or charging, and there is no system or application lag, performance-sensitive users can keep the values of various resource parameters in the current hardware resources unchanged without deliberately lowering the values of various resource parameters to extend battery life.
[0067] S306: When the user portrait information indicates that the user is a power-sensitive user, the hardware resources of the terminal are adjusted according to a second adjustment condition based on the current usage environment.
[0068] Optionally, power consumption-sensitive users can be understood as users who can accept the extension of battery life brought about by reduced performance. Although this type of user attaches great importance to battery life, when the terminal is stuck, it is also necessary to consider whether the hardware resources of the terminal can be adjusted according to different usage environments. It does not mean that because users value battery life, when any stuck situation occurs in the terminal, the values of various resource parameters included in the hardware resources must be lowered. For example, in order to extend the battery life, the CPU operating frequency is set at a low value for a long time. Such resource adjustments will affect the performance of the terminal in some application scenarios, resulting in a poor user experience. Specifically, the hardware resources of the terminal are adjusted according to the second adjustment condition based on the current usage environment, as shown in S3061, S3062 and S3063.
[0069] S3061, when the current usage environment is that the system freezes twice continuously and / or the application with high performance requirements freezes twice continuously, adjust each resource parameter in the hardware resources of the terminal according to each second adjustment step.
[0070] Optionally, for power-sensitive users, when the terminal system freezes twice in a row, and / or an application with high performance requirements freezes twice in a row within a continuous time period, the various resource parameters included in the hardware resources can be adjusted according to the second adjustment step. The second adjustment step refers to the standard step. When adjusting hardware resources in related technologies, the corresponding resource parameter values are usually adjusted up or down according to the standard step. In the above-mentioned usage environment, the embodiment of the present application does not need to consider the power situation of the terminal at this time, because the continuous freezing has affected the user experience, and the performance needs to be improved to improve the user experience. The values of the various resource parameters included in the hardware resources can be increased according to the standard step. For example, the CPU operating frequency can be increased according to the standard step.
[0071] S3062: When the current usage environment is an application freeze with a high real-time requirement, adjust each resource parameter in the hardware resources of the terminal according to each second adjustment step.
[0072] Optionally, for power-sensitive users, when an application with a high real-time demand freezes, regardless of the current power situation, the resource parameters included in the hardware resources can be adjusted according to the second adjustment step. Here, the second adjustment step corresponding to each resource parameter can be equal to the standard step corresponding to each resource parameter. Because, for all users, when encountering a freeze in an application with a high real-time demand, the user needs to obtain the information provided by the terminal in real time. At this time, if the value of each resource parameter is not increased to improve performance, it will greatly affect the user experience.
[0073] S3063, when the current usage environment is that the system does not lag and / or the application with high performance requirements does not lag, determine the stability coefficient corresponding to the current usage environment, and adjust each resource parameter in the hardware resources of the terminal according to each second adjustment step and the stability coefficient.
[0074] Optionally, for power-sensitive users, if the current terminal power is lower than a power threshold, and the user portrait information indicates that it is not convenient for the user to charge in the future, when the terminal does not experience any lag in a continuous period of time, in order to extend the battery life, you can consider lowering the values corresponding to the resource parameters included in the hardware resources. It is understandable that the current terminal does not experience any lag, indicating that the performance is relatively stable. If the performance is reduced, there is a risk of lag.
[0075] In a feasible implementation, the stability coefficient corresponding to the current usage environment can be determined first, and further, the product of the stability coefficient and the second adjustment step length can be used as the adjustment step length, and the resource parameters included in the hardware resources can be adjusted using the adjustment step length. The second adjustment step length here refers to the standard step length corresponding to each resource parameter. The stability coefficient is used to indicate the stability of the resource parameters corresponding to each application scenario or each interaction between a user and the system. The value of the stability parameter can be a value between 0 and 1, where 1 indicates that the resource parameters corresponding to the scenario or the interaction are not yet stable, and there is still room for saving these resource parameters. 0 indicates that the resource parameters of the scenario or the interaction are relatively stable, and these resource parameters cannot be lowered any further. If they continue to be lowered, there is a risk of freezing.
[0076] In a feasible implementation, the value of the stability coefficient can be positioned as: (M2-M1) / M1, where M2 is the quantized value corresponding to the value of the resource parameter after the latest update, and M1 is the quantized value corresponding to the value of the resource parameter after the last update. For example, in an application scenario with a high real-time demand, the most recent adjustment record of the CPU operating frequency is: from 2.0GHZ to 2.5GHZ. In other words, the most recent updated value of the CPU operating frequency is 2.5GHZ, and the quantized value corresponding to 2.5GHZ is 5. The last updated value of the CPU operating frequency is 2.0GHZ, and the quantized value corresponding to 2.0GHZ is 4. In this scenario, the stability coefficient corresponding to the CPU operating frequency is (5-4) / 4=0.25.
[0077] For the convenience of description, the value of the stability coefficient of 1 is called the first coefficient threshold, and the value of the stability coefficient of 0 is called the second coefficient threshold. The adjustment step is the product of the stability coefficient and the second adjustment step. The adjustment step is used to adjust the resource parameters included in the hardware resources and is explained.
[0078] In some embodiments, when the current usage environment is that the system does not lag, and / or applications with high performance requirements do not lag, and the stability coefficient is equal to the first coefficient threshold, in order to extend the battery life and reduce performance, the value of each resource parameter included in the hardware resources can be lowered according to the standard step size corresponding to each resource parameter.
[0079] In some embodiments, when the current usage environment is that the system does not lag, and / or applications with high performance requirements do not lag, and the stability coefficient is greater than the second coefficient threshold and less than the first coefficient threshold, in order to extend the battery life, reduce performance, and ensure that no lag occurs, the product of the stability coefficient and the standard can be used as the adjustment step corresponding to each resource parameter, and the value of each resource parameter included in the hardware resources can be lowered according to the adjustment step.
[0080] In some embodiments, when the current usage environment is that the system does not lag, and / or the application with high performance requirements does not lag, and the stability coefficient is equal to the second coefficient threshold, it means that the resource parameters in the usage environment are relatively stable values. If the values of these parameters are lowered further, lags may occur. Therefore, the values of the resource parameters included in the hardware resources do not need to be adjusted.
[0081] When the scheme of the embodiment of the present application is executed, the current use environment of the terminal is obtained, and the user portrait information of the terminal is obtained. When the user portrait information indicates that the user is a performance-sensitive user, the hardware resources of the terminal are adjusted according to the first adjustment condition based on the current use environment; when the user portrait information indicates that the user is a power-sensitive user, the hardware resources of the terminal are adjusted according to the second adjustment condition based on the current use environment. Moreover, the first adjustment step corresponding to the first adjustment condition is not equal to the second adjustment step corresponding to the second adjustment condition. When adjusting the hardware resources of terminals of different types of users, the present application uses different adjustment steps to adjust each resource parameter according to user needs and the use environment of the terminal. For performance-sensitive users, it can ensure that the terminal maintains better performance; for power-sensitive users, it can save hardware resources while appropriately extending the battery life of the terminal.
[0082] See also Figure 4 , is a schematic diagram of the structure of a hardware resource control device provided in an embodiment of the present application. The hardware resource control device 400 can be implemented as all or part of the terminal through software, hardware or a combination of both. The device 400 includes:
[0083] The acquisition module 410 is used to acquire the current usage environment of the terminal and acquire the user portrait information of the terminal;
[0084] The adjustment module 420 is used to adjust the hardware resources of the terminal based on the current usage environment and the user portrait information.
[0085] Optionally, the acquisition module 410 includes:
[0086] A first acquisition unit, configured to acquire application usage information corresponding to a user of the terminal within a first preset time period;
[0087] A second acquisition unit, used to acquire battery charging and discharging information and battery setting information of the terminal within the first preset time period;
[0088] The third acquisition unit is used to collect statistics on the application usage information, the battery charging and discharging information, and the battery setting information to obtain user portrait information corresponding to the user.
[0089] Optionally, the adjustment module 420 includes:
[0090] A first adjustment unit, configured to adjust the hardware resources of the terminal according to a first adjustment condition based on the current usage environment when the user portrait information indicates that the user is a performance-sensitive user;
[0091] The second adjustment unit is used to adjust the hardware resources of the terminal according to the second adjustment condition based on the current usage environment when the user portrait information indicates that the user is a power consumption sensitive user.
[0092] Optionally, the first adjustment unit includes:
[0093] A first subunit is configured to adjust each resource parameter in the hardware resources of the terminal according to each first adjustment step size when the current use environment is system lag and / or application lag with high performance requirements;
[0094] The second subunit is used to adjust each resource parameter in the hardware resources of the terminal according to each first adjustment step size when the current use environment is an application with a high real-time requirement stuck;
[0095] The third subunit is used to maintain the values of various resource parameters in the hardware resources of the terminal when the current usage environment is that the system does not freeze, and / or the applications with high performance requirements do not freeze, and / or the applications with high real-time requirements do not freeze.
[0096] Optionally, the second adjustment unit includes:
[0097] A fourth subunit, when the current usage environment is that the system freezes twice continuously and / or the application with high performance requirements freezes twice continuously, adjusts each resource parameter in the hardware resources of the terminal according to each second adjustment step size;
[0098] A fifth subunit, when the current use environment is an application with a high real-time requirement and is stuck, adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step size;
[0099] The sixth subunit, when the current usage environment is that the system does not lag and / or the application with high performance requirements does not lag, determines the stability coefficient corresponding to the current usage environment, and adjusts each resource parameter in the hardware resources of the terminal according to each second adjustment step and the stability coefficient.
[0100] Optionally, the sixth subunit includes:
[0101] A first quantization unit, configured to quantize the parameter values corresponding to the two most recent updates of each resource parameter in the hardware resource of the terminal under the current use environment to obtain a quantized value;
[0102] The second calculation unit is used to perform proportional calculation on the quantized value to obtain a stability coefficient.
[0103] Optionally, the sixth subunit includes:
[0104] a first coefficient adjustment unit, configured to adjust each resource parameter in the hardware resources of the terminal according to each second adjustment step size if the stability coefficient is equal to the first coefficient threshold;
[0105] a second coefficient adjustment unit, configured to adjust each resource parameter in the hardware resources of the terminal according to the product of each adjustment step length and the stability coefficient if the stability coefficient is greater than the second coefficient threshold and less than the first coefficient threshold;
[0106] The third coefficient adjustment unit is used to maintain the value of each resource parameter in the hardware resources of the terminal if the stability coefficient is equal to the second coefficient threshold.
[0107] When the solution of the embodiment of the present application is executed, the current use environment of the terminal is obtained, and the user portrait information of the terminal is obtained, and the hardware resources of the terminal are adjusted based on the current use environment and the user portrait information. The present application adjusts the hardware resources of the terminal used by different users by combining the current use environment of the terminal and the user portrait information. Different from the related art, the hardware resources are adjusted only by the current application scenario of the terminal. The hardware resources can be reasonably allocated according to the use habits and needs of different users, which can improve user stickiness.
[0108] Further, Figure 5 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. Figure 5 As shown, the terminal 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0109] Terminal 500 also includes a display screen assembly 506 .
[0110] The communication bus 502 is used to realize the connection and communication between these components.
[0111] The user interface 503 may include a display screen (Display) and a camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.
[0112] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0113] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire terminal 500, and executes various functions and processes data of the terminal 500 by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0114] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a hardware resource control program.
[0115] exist Figure 5In the terminal 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 501 can be used to call the hardware resource control program stored in the memory 505 and specifically perform the following operations:
[0116] Obtain the current usage environment of the terminal and obtain user portrait information of the terminal;
[0117] The hardware resources of the terminal are adjusted based on the current usage environment and the user portrait information.
[0118] In one embodiment, when the processor 501 executes the step of obtaining the user portrait information of the terminal, the processor 501 specifically performs the following steps:
[0119] Acquire application usage information corresponding to the user of the terminal within a first preset time period;
[0120] Acquire battery charging and discharging information and battery setting information of the terminal within the first preset time period;
[0121] The application usage information, the battery charging and discharging information, and the battery setting information are counted to obtain user portrait information corresponding to the user.
[0122] In one embodiment, when the processor 501 performs the step of adjusting the hardware resources of the terminal based on the current usage environment and the user portrait information, the processor 501 specifically performs the following steps:
[0123] If the user portrait information indicates that the user is a performance-sensitive user, adjusting the hardware resources of the terminal according to the first adjustment condition based on the current usage environment;
[0124] If the user portrait information indicates that the user is a power-sensitive user, the hardware resources of the terminal are adjusted according to the second adjustment condition based on the current usage environment.
[0125] In one embodiment, when the processor 501 adjusts the hardware resources of the terminal according to the first adjustment condition based on the current usage environment, the processor 501 specifically performs the following steps:
[0126] If the current usage environment is system lag and / or application lag with high performance requirements, adjusting each resource parameter in the hardware resources of the terminal according to each first adjustment step size;
[0127] If the current usage environment is an application freeze with a high real-time requirement, adjusting each resource parameter in the hardware resources of the terminal according to each first adjustment step;
[0128] If the current usage environment is that the system does not freeze, and / or applications with high performance requirements do not freeze, and / or applications with high real-time requirements do not freeze, then the values of each resource parameter in the hardware resources of the terminal are maintained.
[0129] In one embodiment, the processor 501 performs the following steps when adjusting the hardware resources of the terminal according to the second adjustment condition based on the current usage environment:
[0130] If the current usage environment is that the system freezes twice continuously and / or the application with high performance requirements freezes twice continuously, adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step size;
[0131] If the current usage environment is an application freeze with a high real-time requirement, adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step;
[0132] If the current usage environment is that the system does not lag and / or the application with high performance requirements does not lag, then determine the stability coefficient corresponding to the current usage environment, and adjust each resource parameter in the hardware resources of the terminal according to each second adjustment step and the stability coefficient.
[0133] In one embodiment, when the processor 501 determines the stability coefficient corresponding to the current use environment, the processor 501 specifically performs the following steps:
[0134] Quantizing the parameter values corresponding to the two most recent updates of each resource parameter in the hardware resources of the terminal under the current use environment to obtain a quantized value;
[0135] The quantized value is proportionally calculated to obtain a stability coefficient.
[0136] In one embodiment, when the processor 501 performs the step of adjusting the resource parameters in the hardware resources of the terminal according to the second adjustment step sizes and the stability coefficients, the processor 501 specifically performs the following steps:
[0137] If the stability coefficient is equal to the first coefficient threshold, adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step size;
[0138] If the stability coefficient is greater than the second coefficient threshold and less than the first coefficient threshold, adjusting each resource parameter in the hardware resources of the terminal according to the product of each adjustment step and the stability coefficient;
[0139] If the stability coefficient is equal to the second coefficient threshold, the value of each resource parameter in the hardware resources of the terminal is maintained.
[0140] In addition, those skilled in the art will appreciate that the structure of the terminal 500 shown in the above figures does not limit the terminal 500, and the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the terminal 500 also includes a radio frequency circuit, an audio circuit, a wireless fidelity (WiFi) component, a power supply, a Bluetooth component, and other components, which will not be described in detail here.
[0141] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the hardware resource control method as described in the above embodiments.
[0142] An embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the hardware resource control method described in the above embodiments.
[0143] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0144] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling hardware resources, characterized in that: The method comprises: Obtain the current usage environment of the terminal and obtain user portrait information of the terminal; Adjusting the hardware resources of the terminal based on the current usage environment and the user portrait information; Wherein, the adjusting the hardware resources of the terminal based on the current usage environment and the user portrait information includes: if the user portrait information indicates that the user is a performance-sensitive user, adjusting the hardware resources of the terminal according to a first adjustment condition based on the current usage environment; if the user portrait information indicates that the user is a power consumption-sensitive user, adjusting the hardware resources of the terminal according to a second adjustment condition based on the current usage environment; The adjusting of the hardware resources of the terminal according to the second adjustment condition based on the current usage environment includes: if the current usage environment is that the system freezes twice continuously and / or the application with high performance requirements freezes twice continuously, then adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step; if the current usage environment is that the application with high real-time requirements freezes, then adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step; if the current usage environment is that the system does not freeze, and / or the application with high performance requirements does not freeze, then determining the stability coefficient corresponding to the current usage environment, and adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step and the stability coefficient.
2. The method according to claim 1, characterized in that The obtaining of user portrait information of the terminal includes: Acquire application usage information corresponding to the user of the terminal within a first preset time period; Acquire battery charging and discharging information and battery setting information of the terminal within the first preset time period; The application usage information, the battery charging and discharging information, and the battery setting information are counted to obtain user portrait information corresponding to the user.
3. The method according to claim 1, characterized in that The adjusting the hardware resources of the terminal according to the first adjustment condition based on the current use environment includes: If the current usage environment is system lag and / or application lag with high performance requirements, adjusting each resource parameter in the hardware resources of the terminal according to each first adjustment step size; If the current usage environment is an application freeze with a high real-time requirement, adjusting each resource parameter in the hardware resources of the terminal according to each first adjustment step; If the current usage environment is that the system does not freeze, and / or applications with high performance requirements do not freeze, and / or applications with high real-time requirements do not freeze, then the values of each resource parameter in the hardware resources of the terminal are maintained.
4. The method according to claim 1, characterized in that: The determining of the stability coefficient corresponding to the current use environment includes: Quantizing the parameter values corresponding to the two most recent updates of each resource parameter in the hardware resources of the terminal under the current use environment to obtain a quantized value; The quantized value is proportionally calculated to obtain a stability coefficient.
5. The method according to claim 1 or 4, characterized in that: The adjusting each resource parameter in the hardware resource of the terminal according to each second adjustment step size and the stability coefficient respectively includes: If the stability coefficient is equal to the first coefficient threshold, adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step size; If the stability coefficient is greater than the second coefficient threshold and less than the first coefficient threshold, adjusting each resource parameter in the hardware resources of the terminal according to the product of each adjustment step and the stability coefficient; If the stability coefficient is equal to the second coefficient threshold, the value of each resource parameter in the hardware resources of the terminal is maintained.
6. A hardware resource control device, characterized in that: The device comprises: An acquisition module is used to acquire the current usage environment of the terminal and acquire user portrait information of the terminal; An adjustment module, configured to adjust the hardware resources of the terminal based on the current usage environment and the user portrait information; Wherein, the adjustment module is specifically used to: if the user portrait information indicates that the user is a performance-sensitive user, adjust the hardware resources of the terminal according to the first adjustment condition based on the current usage environment; if the user portrait information indicates that the user is a power consumption-sensitive user, adjust the hardware resources of the terminal according to the second adjustment condition based on the current usage environment; The adjustment module is specifically used for: if the current usage environment is that the system freezes twice continuously and / or the application with high performance requirements freezes twice continuously, then adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step; if the current usage environment is that the application with high real-time requirements freezes, then adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step; if the current usage environment is that the system does not freeze, and / or the application with high performance requirements does not freeze, then determining the stability coefficient corresponding to the current usage environment, and adjusting each resource parameter in the hardware resources of the terminal according to each second adjustment step and the stability coefficient.
7. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 5.
8. A terminal, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Terminal resource optimization method and device, storage medium and terminal equipment
CN111796928A
Portrayal construction method and device, equipment and storage medium
CN113051126A