[go: up one dir, main page]

WO2015172367A1 - 一种资源配置方法及装置 - Google Patents

一种资源配置方法及装置 Download PDF

Info

Publication number
WO2015172367A1
WO2015172367A1 PCT/CN2014/077622 CN2014077622W WO2015172367A1 WO 2015172367 A1 WO2015172367 A1 WO 2015172367A1 CN 2014077622 W CN2014077622 W CN 2014077622W WO 2015172367 A1 WO2015172367 A1 WO 2015172367A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource configuration
configuration information
application
terminal
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2014/077622
Other languages
English (en)
French (fr)
Inventor
成琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201480026552.8A priority Critical patent/CN105308941A/zh
Priority to PCT/CN2014/077622 priority patent/WO2015172367A1/zh
Publication of WO2015172367A1 publication Critical patent/WO2015172367A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones
    • H04M1/73Battery saving arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a resource configuration method and apparatus. Background technique
  • terminals can download and install more and more applications, which meets the needs of users, brings convenience to users, and also increases the power consumption requirements of terminals. Especially for consumer applications such as games that require high CPU resources and screen brightness, the contradiction between terminal power consumption and performance becomes more prominent.
  • the mobile terminal in order to extend battery life, the mobile terminal is provided with a power saving mode, and in the power saving mode, it is possible to limit unnecessary hardware resources used when the mobile terminal is running (eg, limiting the maximum CPU frequency, limiting the number of operating cores, etc.) Etc.), screen brightness, playback volume, etc.
  • unnecessary hardware resources used when the mobile terminal is running eg, limiting the maximum CPU frequency, limiting the number of operating cores, etc.
  • Etc. screen brightness, playback volume, etc.
  • the power-saving mode can reduce the power consumption of the terminal unit time to a certain extent, when the terminal runs the consumption-type application in the power-saving mode, the phenomenon such as catastrophic phenomenon may occur, which seriously affects the user experience.
  • the resource configuration method and device of the embodiment of the present invention are used to achieve a balance between power consumption and performance of the terminal.
  • an embodiment of the present invention provides a resource configuration method, where the method includes: acquiring an identifier of an application currently started by a terminal;
  • the resource used by the terminal to run the application is set according to the resource configuration information.
  • the database is stored in a terminal, and the database is specifically configured to save a mapping relationship between an identifier of the application and resource configuration information, where Finding a preset database according to the identifier includes:
  • the database is stored in a cloud server, and the database is specifically configured to save a mapping relationship between an identifier of the application, terminal identity information, and resource configuration information, where Finding a preset database according to the identifier includes:
  • the identity information of the terminal Acquiring the identity information of the terminal, and sending a query request to the cloud server, where the query request includes an identifier of the application and identity information of the terminal;
  • the resource configuration information is a central processor CPU computing capability
  • the resource used by the terminal to run the application according to the resource configuration information includes:
  • the method further includes:
  • the setting, according to the resource configuration information, the resource used by the terminal to run the application includes: setting, according to the adjusted resource configuration information, a resource used by the terminal to run the application.
  • the method further includes:
  • the resource configuration information is adjusted according to a resource adjustment instruction input by the user;
  • the embodiment of the present invention provides a resource configuration apparatus, where the apparatus includes: an acquiring unit, configured to acquire an identifier of an application currently started by the terminal;
  • a searching unit configured to search a preset database according to the identifier, and determine resource configuration information corresponding to the application, where the database is used to save a mapping relationship between the application and the resource configuration information;
  • a setting unit configured to set, according to the resource configuration information, a resource used by the terminal when the application is run.
  • the database is stored in the terminal, and the database is specifically configured to save a mapping relationship between the identifier of the application and the resource configuration information,
  • the searching unit is specifically configured to invoke the database, and search for resource configuration information corresponding to the identifier.
  • the database is stored in a cloud server, and the database is specifically configured to save a mapping relationship between an identifier of the application, terminal identity information, and resource configuration information, where
  • the search unit includes:
  • a sending unit configured to acquire identity information of the terminal, and send a query request to the cloud server, where the query request includes an identifier of the application and identity information of the terminal;
  • a receiving unit configured to receive resource configuration information returned by the cloud server, where the resource configuration information is obtained by the cloud server from the database according to the identifier and identity information.
  • the resource configuration information is a central processing unit CPU computing capability
  • the setting unit includes:
  • a calculation unit configured to calculate, by using a CPU performance model, a CPU performance parameter corresponding to the CPU computing capability, where the CPU performance model is used to reflect a correspondence between a CPU computing capability and a CPU performance parameter;
  • a setting subunit configured to set, according to the CPU performance parameter, a resource used by the terminal to run the application.
  • the device further includes:
  • a display unit configured to set, in the setting unit, a terminal operation manner according to the resource configuration information Before the resources used in the application, the resource configuration information is displayed to the user by using the terminal;
  • the first adjusting unit is configured to receive a resource adjustment instruction input by the user, and adjust the resource configuration information according to the resource adjustment instruction;
  • the setting unit is specifically configured to set, according to the adjusted resource configuration information, a resource used by the terminal to run the application.
  • the device further includes:
  • a second adjusting unit configured to adjust the resource configuration information according to a resource adjustment instruction input by the user after the application is finished running
  • an information sending unit configured to send the adjusted resource configuration information to the database, so that the database updates resource configuration information corresponding to the application.
  • an embodiment of the present invention provides a resource configuration apparatus, where the apparatus includes: at least one processor, a memory, and at least one communication bus.
  • the communication bus is configured to implement connection communication between the at least one processor and the memory
  • the memory is configured to store program instructions
  • the processor is configured to perform the following steps according to the program instructions:
  • the resource used by the terminal to run the application is set according to the resource configuration information.
  • the database is stored in the terminal, and the database is specifically configured to save a mapping relationship between the identifier of the application and the resource configuration information, and the processor performs the following:
  • the resource configuration information corresponding to the application is determined:
  • the database is stored in a cloud server, and the database is specifically configured to save a mapping relationship between an identifier of the application, terminal identity information, and resource configuration information, where The processor performs the following steps to determine resource configuration information corresponding to the application: acquiring identity information of the terminal, and sending a query request to the cloud server, where the query request is Including the identity of the application and the identity information of the terminal;
  • the resource configuration information is a central processor CPU computing capability, and the processor performs the following steps to set a resource used by the terminal to run the application:
  • the resource used by the application is executed in the processor setting terminal Previously, it was also used to perform the following steps:
  • the processor is further configured to perform the following steps:
  • the resource configuration information is adjusted according to a resource adjustment instruction input by the user;
  • the adjusted resource configuration information is sent to the database, so that the database updates the resource configuration information corresponding to the application.
  • the resource configuration method and device of the embodiment of the present invention establish a mapping relationship between the application and the resource configuration information, and when the terminal starts an application, find the resource configuration information corresponding to the application, and set the application operation according to the indication of the resource configuration information. Resources used. In this way, the user experience of the application runtime can be guaranteed, and power consumption can be minimized to achieve a balance between terminal performance and power consumption. At the same time, each application installed in the terminal has a matching resource configuration information, which can also improve the flexibility and pertinence of the terminal resource configuration.
  • Embodiment 1 is a flowchart of Embodiment 1 of a resource configuration method according to an embodiment of the present invention
  • FIG. 3 is a flowchart of an implementation step 103 in the embodiment of the present invention.
  • Embodiment 4 is a flowchart of Embodiment 2 of a resource configuration method according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of Embodiment 3 of a resource configuration method according to an embodiment of the present invention.
  • Embodiment 1 of a resource configuration apparatus according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of Embodiment 2 of a resource configuration apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of Embodiment 3 of a resource configuration apparatus according to an embodiment of the present invention.
  • FIG. 9 is a hardware configuration of a resource configuration apparatus according to an embodiment of the present invention. detailed description
  • the terminal After the user downloads the application to the terminal, in order to improve the user experience, the terminal is generally set to operate in the high-performance mode, so that the power consumption of the terminal is large, and the battery power consumption is fast.
  • the general method is to set the terminal in the power saving mode, so that although the power consumption can be reduced, the jamming phenomenon may occur when the terminal runs the application, and the pass occurs.
  • the way to set the power-saving mode to reduce power consumption is very poor. Regardless of the application, the terminal only configures the same performance parameters, and the pertinence is poor.
  • the embodiments of the present invention are directed to providing a solution for maximizing terminal performance and power consumption balance, and setting different performance parameters for different applications, so that the performance parameters of the terminal can be adjusted in real time according to the application running by the terminal, and the parameter setting is improved. Flexibility and pertinence.
  • Step 101 Obtain an identifier of an application currently started by a terminal.
  • the operating system broadcasts the application. If the user currently launches the "Temple Escape" game application, the corresponding operating system will receive this after receiving the startup command. The system broadcasts to inform the game that the hardware or software involved in the normal operation of the game is ready to run.
  • This step can be regarded as a process of monitoring the broadcast of the system, and after the application start information broadcasted by the operating system is monitored, the identifier of the application can be extracted therefrom.
  • the identifier may be embodied as an application name, and the extracted example "com.company.temple" may be used as an application identifier.
  • the identification may also be embodied as other information that characterizes the identity of the application, or as a pre-configured resource level.
  • the most important purpose of the embodiment of the present invention is to configure an appropriate resource for the application currently running on the terminal, which does not affect the normal operation of the application (it can be understood that there is no such thing as affecting the user experience, such as the occurrence of the cardon), and does not cause resources.
  • the waste of power consumption maximizes the balance between performance and power consumption. Therefore, a resource configuration information can be set for each application.
  • the application identifier can be embodied as an application name or other representation application identity. Information.
  • all the applications installed in the terminal are classified according to the resources required by each application, and the applications corresponding to the same resource configuration information are classified into one level, corresponding to the situation, the application identifier It can be reflected as the resource level to which the application belongs.
  • Step 102 Search for a preset database according to the identifier, and determine resource configuration information corresponding to the application.
  • the database is used to save a mapping relationship between the application and the resource configuration information.
  • the embodiment of the present invention pre-establishes a database for storing the correspondence between the application and the resource configuration information, and the database may be stored locally in the terminal or may be stored in the cloud.
  • the database may be stored locally in the terminal or may be stored in the cloud.
  • the locally stored database can be downloaded from the cloud server or locally.
  • the terminal provides a performance setting option to the user, and the user sets different resource configuration information for each application installed by the terminal through the performance setting option, and continuously adjusts the original resource configuration information according to the actual running condition of each application. Balance each application's performance and power consumption. In this way, the mapping relationship between the application and the resource configuration information is generated and saved to the database. It should be noted that, because the mapping relationship is set by the user according to the application running in the terminal, the mapping relationship may be specifically represented by the correspondence between the application identifier and the resource configuration information.
  • the database can be directly called, and the resource configuration information corresponding to the acquired application identifier can be searched for.
  • the mapping relationship between the application and the resource configuration information saved in the database of the cloud server may be provided by the service provider in advance.
  • the application developer pre-configures according to the test result, and the mapping relationship generated by the terminal may be uploaded by the user to the server.
  • the resource configuration information can be embodied as specific performance parameters required by the application, such as the number of CPU cores and the highest CPU frequency.
  • the mapping relationship saved in the database of the cloud server can be embodied as: application identifier.
  • the resource configuration information can also be expressed as the CPU capacity or CPU usage of the application running, for example, running an application with 80% CPU power. Considering that the performance parameters of different terminals will be different, for the same application, terminal A may need to use 80% of the CPU capacity, and terminal B needs to use 70% of the CPU capacity. Therefore, corresponding to this situation, the cloud server database
  • the saved mapping relationship may be embodied as: a correspondence between the application identifier, the terminal identity information, and the resource configuration information.
  • the update information may be updated according to the supplier or the user.
  • the existing mapping relationship is adjusted to make the resource configuration information corresponding to the application more accurate.
  • the resource configuration information corresponding to the application may be obtained according to the following steps.
  • Figure 2 may include:
  • Step 201 Obtain identity information of the terminal, and send a query request to the cloud server, where the query request includes an identifier of the application and identity information of the terminal.
  • Step 202 Receive resource configuration information returned by the cloud server, where the resource configuration information is obtained by the cloud server from the database according to the identifier and identity information.
  • the scheme shown in FIG. 2 corresponds to the method of using the CPU capacity occupied by the application running or the percentage of the CPU capacity to represent the resource configuration information, so in addition to the application identifier, the terminal needs to be obtained. End identity information, and then find resource configuration information corresponding to the two information.
  • the terminal identity information is mainly used to reflect the CPU performance of the terminal, and may be specifically embodied as a model of the terminal, which may not be specifically limited in this embodiment of the present invention.
  • the terminal can directly add the application identifier to the query request and send it to the cloud server, and the cloud server searches for the corresponding resource configuration information according to the application identifier.
  • Method 1 using the database stored by the terminal to perform resource configuration information query
  • the second method is to send a query request to the cloud server, and use the database stored by the cloud server to perform resource configuration information query;
  • the resource configuration information is first queried in the database stored in the terminal. If the query is not queried to the IJ, the query request is sent to the cloud server, and the resource configuration information is queried by using the database stored by the cloud server.
  • Step 103 Set, according to the resource configuration information, a resource used by the terminal to run the application.
  • the resource used by the application runtime can be set under the instruction of the information. In this way, the user experience during runtime can be guaranteed, and power consumption can be minimized to achieve a balance between terminal performance and power consumption.
  • the embodiments of the present invention can set different running resources for different applications, and can also improve the flexibility and pertinence of resource configuration.
  • the embodiment of the present invention further provides a solution for implementing the step 103.
  • the process shown in FIG. 1 refers to the process shown in FIG. 1
  • Step 301 Calculate, by using a CPU performance model, a CPU performance parameter corresponding to the CPU computing capability, where the CPU performance model is used to reflect a correspondence between a CPU computing capability and a CPU performance parameter.
  • Step 302 Set, according to the CPU performance parameter, a resource used by the terminal to run the application.
  • the embodiment of the present invention provides a CPU performance model that reflects the correspondence between the CPU capability and the CPU parameters.
  • the model can convert the performance parameters used by the application into CPU capabilities, and The resource configuration information is saved to the database; On the contrary, using the model, the CPU performance parameters used when the terminal runs the application can be calculated under the knowledge of the CPU capability, and the running resources of the application can be configured according to the calculated performance parameters.
  • the process of establishing a CPU performance model can be embodied as:
  • the CPU architecture it can be embodied as arm7, arm9, arm15, 386, 486, 586, powerpc, etc.
  • arm7 can be used as the benchmark, and the coefficient of the arm7 architecture is taken as 1, corresponding to this. Determine the architectural coefficients of other CPUs. It should be noted that the present invention is not limited to the specific CPU architecture and the CPU architecture to be used as a reference.
  • CPU cores For the number of CPU cores, it can be embodied as one core, two cores, three cores, four cores, etc., and the present invention does not specifically limit this.
  • Step 401 Obtain an identifier of an application currently started by a terminal.
  • Step 402 Search for a preset database according to the identifier, and determine resource configuration information corresponding to the application.
  • the database is used to save a mapping relationship between the application and the resource configuration information.
  • Steps 401 and 402 are the same as steps 101 and 102, and are not described herein again.
  • Step 403 Display, by using a terminal, the resource configuration information to a user.
  • Step 404 Receive a resource adjustment instruction input by a user, and adjust the resource configuration information according to the resource adjustment instruction.
  • Step 405 Set, according to the adjusted resource configuration information, a resource used by the terminal to run the application.
  • the embodiment of the present invention also finds an application match. After the resource configuration information is displayed, it is displayed to the user through the terminal, and the user determines whether the performance parameter indicated by the resource configuration information can meet the requirements of the normal operation of the application.
  • Step 501 Obtain an identifier of an application currently started by a terminal.
  • Step 502 Search for a preset database according to the identifier, and determine resource configuration information corresponding to the application.
  • the database is used to save a mapping relationship between the application and the resource configuration information.
  • Step 503 Set, according to the resource configuration information, a resource used by the terminal to run the application. Steps 501 ⁇ 503 are the same as steps 101 ⁇ 103, and are not described here.
  • Step 504 After the application runs, adjust the resource configuration information according to a resource adjustment instruction input by the user.
  • Step 505 Send the adjusted resource configuration information to the database, so that the database updates resource configuration information corresponding to the application.
  • the existing mapping relationship can be adjusted according to the update information sent by the supplier or the user, so that the resource configuration information corresponding to the application is more To be accurate.
  • the embodiment of the present invention provides three schemes for adjusting resource configuration information:
  • the resource configuration information is adjusted by the user, and the database is updated by using the adjusted resource configuration information.
  • the terminal sets the running resource for the application according to the original resource configuration information, and after the application runs according to the set resource, the user adjusts the resource configuration information according to the usage experience, and uses the adjusted resource configuration.
  • Information update database
  • the third type in combination with the embodiment 2, 3, is to prompt the user to perform the first resource configuration information adjustment before the application runs, and set the resource used by the application operation according to the first adjusted resource configuration information.
  • the user may not adjust the resource configuration information here, but use the original resource configuration information to set the running resource of the application
  • the user may be prompted to perform the second resource configuration information adjustment (of course, if If the user thinks that the current running condition of the application meets its usage requirements, then the resource configuration information adjustment may not be performed here, so that the database can be updated according to the two adjustment processes.
  • FIG. 6 is a schematic diagram of Embodiment 1 of a resource configuration apparatus according to an embodiment of the present invention, which may include:
  • the obtaining unit 601 is configured to obtain an identifier of an application currently started by the terminal.
  • the searching unit 602 is configured to: search a preset database according to the identifier, and determine resource configuration information corresponding to the application; where the database is used to save a mapping relationship between the application and the resource configuration information;
  • the setting unit 603 is configured to set, according to the resource configuration information, a resource used by the terminal when the application is run.
  • the database can be stored in the terminal or in the cloud server.
  • the embodiments of the present invention provide the following two implementation manners of the search unit according to the data storage location.
  • the database is stored in the terminal, and the database is specifically configured to save a mapping relationship between the identifier of the application and the resource configuration information.
  • the searching unit is specifically configured to invoke the database, and search for resource configuration information corresponding to the identifier.
  • the database is stored in the cloud server, and the database is specifically configured to save a mapping relationship between the identifier of the application, the terminal identity information, and the resource configuration information, where the searching unit includes:
  • a sending unit configured to acquire identity information of the terminal, and send a query request to the cloud server, where
  • the query request includes an identifier of the application and identity information of the terminal;
  • a receiving unit configured to receive resource configuration information returned by the cloud server, where the resource configuration information is obtained by the cloud server from the database according to the identifier and identity information.
  • the resource configuration information in the embodiment of the present invention may be embodied as: specific performance parameters required for the application operation, CPU computing power required for the application operation, and percentage of the CPU capacity required for the application operation.
  • the setting unit may include:
  • a calculation unit configured to calculate, by using a CPU performance model, a CPU performance parameter corresponding to the CPU computing capability, where the CPU performance model is used to reflect a correspondence between a CPU computing capability and a CPU performance parameter;
  • FIG. 7 is a schematic diagram of a second embodiment of a resource configuration apparatus according to an embodiment of the present invention, which may include: an obtaining unit 701, configured to acquire an identifier of an application currently started by the terminal;
  • the searching unit 702 is configured to: search a preset database according to the identifier, and determine resource configuration information corresponding to the application; where the database is used to save a mapping relationship between the application and the resource configuration information;
  • the display unit 703 is configured to display the resource configuration information to the user through the terminal before the setting unit sets the resource used by the terminal to run the application according to the resource configuration information.
  • the first adjusting unit 704 is configured to receive a resource adjustment instruction input by the user, and adjust the resource configuration information according to the resource adjustment instruction;
  • the setting unit 705 is specifically configured to set, according to the adjusted resource configuration information, a resource used by the terminal to run the application.
  • FIG. 8 is a schematic diagram of Embodiment 3 of a resource configuration apparatus according to an embodiment of the present invention, which may include: an obtaining unit 801, configured to acquire an identifier of an application currently started by the terminal;
  • the searching unit 802 is configured to search the preset database according to the identifier, and determine resource configuration information corresponding to the application, where the database is used to save a mapping relationship between the application and the resource configuration information;
  • the setting unit 803 is configured to use, when the terminal runs the application according to the resource configuration information. resource of.
  • the second adjusting unit 804 is configured to: after the application is finished running, adjust the resource configuration information; the information sending unit 805 is configured to send the adjusted resource configuration information to the database, so that the database update The resource configuration information corresponding to the application.
  • the embodiment of the present invention further provides a hardware configuration of the resource configuration apparatus.
  • at least one processor e.g., a CPU
  • the processor is configured to execute an executable module, such as a computer program, stored in the memory.
  • the memory may include a random access memory (RAM), and may also include a non-volatile memory such as at least one disk memory.
  • the communication connection between the system gateway and at least one other network element may be implemented through at least one network interface (which may be wired or wireless), and may use an Internet, a wide area network, a local area network, a metropolitan area network, or the like.
  • the processor may perform the following steps according to the program instructions stored in the memory:
  • the resource used by the terminal to run the application is set according to the resource configuration information.
  • the embodiment of the present invention provides the following two specific implementation solutions.
  • the database is stored in the terminal, and the database is specifically configured to save a mapping relationship between the identifier of the application and the resource configuration information, where the processor performs the following steps to determine the resource configuration corresponding to the application.
  • Information :
  • the database is stored in the cloud server, and the database is specifically configured to save a mapping relationship between the identifier of the application, the terminal identity information, and the resource configuration information, where the processor performs the following steps to determine the Apply the corresponding resource configuration information:
  • the resource configuration information in the embodiment of the present invention may be implemented as a CPU power of the CPU, and the processor is configured to perform the following steps to set resources used by the terminal to run the application. :
  • the processor is further configured to perform the following steps:
  • the resource configuration information is adjusted according to a resource adjustment instruction input by the user;
  • the adjusted resource configuration information is sent to the database, so that the database updates the resource configuration information corresponding to the application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例公开了一种资源配置方法及装置,所述方法可包括:获取终端当前启动的应用的标识;根据所述标识查找预设数据库,确定所述应用对应的资源配置信息;其中,所述数据库用于保存应用与资源配置信息之间的映射关系;按照所述资源配置信息设置终端运行所述应用时使用的资源。如此,既可保证应用运行时的用户体验,又能将功耗降到最低,实现终端性能和功耗之间的平衡。同时,终端安装的每个应用都对应有一个匹配的资源配置信息,还能提高终端资源配置的灵活性和针对性。

Description

一种资源配置方法及装置
技术领域
本发明涉及通信技术领域, 具体涉及一种资源配置方法及装置。 背景技术
随着移动终端功能的日益丰富, 终端可以下载安装越来越多的应用, 这 在满足用户使用需求, 给用户带来便利的同时, 也提高了对终端功耗的要求。 特别是针对游戏等对 CPU资源和屏幕亮度要求较高的消耗类应用, 终端功耗 和性能之间的矛盾就越发突出。
一般情况下, 为了延长电池续航时间, 移动终端都设置有省电模式, 在 省电模式下可以限制移动终端运行时使用的非必要的硬件资源(如,限定 CPU 最高频率、 限定操作内核数等等)、 屏幕亮度、 播放音量等。 省电模式虽能在 一定程度上降低终端单位时间的功耗, 但当终端在省电模式下运行消耗类应 用时, 会出现卡顿等现象, 严重影响用户体验。 为了提升终端的性能体验, 用户还是会选择使移动终端在大部分时间处于高性能模式下, 只有在电池电 量很少时才将终端切换到省电模式下, 也就是说, 终端电池的实际续航能力 并没有得到提升, 也未解决终端功耗和性能之间的矛盾。 发明内容
本发明实施例的资源配置方法及装置, 用以实现终端功耗和性能之间的 平衡。
为此, 本发明实施例提供如下技术方案:
第一方面, 本发明实施例提供了一种资源配置方法, 所述方法包括: 获取终端当前启动的应用的标识;
根据所述标识查找预设数据库, 确定所述应用对应的资源配置信息;其 中, 所述数据库用于保存应用与资源配置信息之间的映射关系;
按照所述资源配置信息设置终端运行所述应用时使用的资源。
在第一方面的第一种可能的实现方式中, 所述数据库存储于终端, 且所 述数据库具体用于保存应用的标识与资源配置信息之间的映射关系, 则所述 根据所述标识查找预设数据库, 包括:
调用所述数据库, 并从中查找所述标识对应的资源配置信息。
在第一方面的第二种可能的实现方式中, 所述数据库存储于云服务器, 且所述数据库具体用于保存应用的标识、 终端身份信息与资源配置信息之间 的映射关系, 则所述根据所述标识查找预设数据库, 包括:
获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中 包括应用的标识和终端的身份信息;
接收所述云服务器返回的资源配置信息, 所述资源配置信息由所述云服 务器根据所述标识和身份信息从所述数据库中查找获得。
在第一方面的第三种可能的实现方式中, 所述资源配置信息为中央处理 器 CPU运算能力, 则所述按照所述资源配置信息设置终端运行所述应用时使 用的资源, 包括:
利用 CPU性能模型计算所述 CPU运算能力对应的 CPU性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的对应关系;
根据所述 CPU性能参数设置终端运行所述应用使用的资源。
结合第一方面或第一方面的第一种至第三种中的任一种可能的实现方 式, 在第四种可能的实现方式中, 所述方法还包括:
在所述按照所述资源配置信息设置终端运行所述应用时使用的资源之 前,
通过终端向用户显示所述资源配置信息;
接收用户输入的资源调整指令, 并根据所述资源调整指令调整所述资源 配置信息;
所述按照所述资源配置信息设置终端运行所述应用时使用的资源,包括: 根据调整后的资源配置信息设置终端运行所述应用使用的资源。
结合第一方面或第一方面的第一种至第四种中的任一种可能的实现方 式, 在第五种可能的实现方式中, 所述方法还包括:
在所述应用运行结束后, 根据用户输入的资源调整指令调整所述资源配 置信息;
将调整后的资源配置信息发送至所述数据库, 以使所述数据库更新所述 应用对应的资源配置信息。
第二方面, 本发明实施例提供了一种资源配置装置, 所述装置包括: 获取单元, 用于获取终端当前启动的应用的标识;
查找单元, 用于根据所述标识查找预设数据库, 确定所述应用对应的资 源配置信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射关 系;
设置单元, 用于按照所述资源配置信息设置终端运行所述应用时使用的 资源。
在第二方面的第一种可能的实现方式中, 所述数据库存储于终端, 且所 述数据库具体用于保存应用的标识与资源配置信息之间的映射关系, 则
所述查找单元, 具体用于调用所述数据库, 并从中查找所述标识对应的 资源配置信息。
在第二方面的第二种可能的实现方式中, 所述数据库存储于云服务器, 且所述数据库具体用于保存应用的标识、 终端身份信息与资源配置信息之间 的映射关系, 则所述查找单元包括:
发送单元, 用于获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中包括应用的标识和终端的身份信息;
接收单元, 用于接收所述云服务器返回的资源配置信息, 所述资源配置 信息由所述云服务器根据所述标识和身份信息从所述数据库中查找获得。
在第二方面的第三种可能的实现方式中, 所述资源配置信息为中央处理 器 CPU运算能力, 则所述设置单元包括:
计算单元, 用于利用 CPU性能模型计算所述 CPU运算能力对应的 CPU 性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的 对应关系;
设置子单元, 用于根据所述 CPU性能参数设置终端运行所述应用使用的 资源。
结合第二方面或第二方面的第一种至第三种中的任一种可能的实现方 式, 在第四种可能的实现方式中, 所述装置还包括:
显示单元, 用于在所述设置单元按照所述资源配置信息设置终端运行所 述应用时使用的资源之前, 通过终端向用户显示所述资源配置信息; 第一调整单元, 用于接收用户输入的资源调整指令, 并根据所述资源调 整指令调整所述资源配置信息;
所述设置单元, 具体用于根据调整后的资源配置信息设置终端运行所述 应用使用的资源。
结合第二方面或第二方面的第一种至第四种中的任一种可能的实现方 式, 在第五种可能的实现方式中, 所述装置还包括:
第二调整单元, 用于在所述应用运行结束后, 根据用户输入的资源调整 指令调整所述资源配置信息;
信息发送单元, 用于将调整后的资源配置信息发送至所述数据库, 以使 所述数据库更新所述应用对应的资源配置信息。
第三方面, 本发明实施例提供了一种资源配置装置, 所述装置包括:至 少一个处理器、 存储器、 和至少一个通信总线,
所述通信总线, 用于实现所述至少一个处理器与所述存储器之间的连接 通信;
所述存储器用于存储程序指令, 所述处理器用于根据所述程序指令执行 以下歩骤:
获取终端当前启动的应用的标识;
根据所述标识查找预设数据库, 确定所述应用对应的资源配置信息;其 中, 所述数据库用于保存应用与资源配置信息之间的映射关系;
按照所述资源配置信息设置终端运行所述应用时使用的资源。
在第三方面的第一种可能的实现方式中, 所述数据库存储于终端, 且所 述数据库具体用于保存应用的标识与资源配置信息之间的映射关系, 则所述 处理器执行以下歩骤确定所述应用对应的资源配置信息:
调用所述数据库, 并从中查找所述标识对应的资源配置信息。
在第三方面的第二种可能的实现方式中, 所述数据库存储于云服务器, 且所述数据库具体用于保存应用的标识、 终端身份信息与资源配置信息之间 的映射关系,则所述处理器执行以下歩骤确定所述应用对应的资源配置信息: 获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中 包括应用的标识和终端的身份信息;
接收所述云服务器返回的资源配置信息, 所述资源配置信息由所述云服 务器根据所述标识和身份信息从所述数据库中查找获得。
在第三方面的第三种可能的实现方式中, 所述资源配置信息为中央处理 器 CPU运算能力, 则所述处理器执行以下歩骤设置终端运行所述应用时使用 的资源:
利用 CPU性能模型计算所述 CPU运算能力对应的 CPU性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的对应关系;
根据所述 CPU性能参数设置终端运行所述应用使用的资源。
结合第三方面或第三方面的第一种至第三种中的任一种可能的实现方 式, 在第四种可能的实现方式中, 在所述处理器设置终端运行所述应用使用 的资源之前, 还用于执行以下步骤:
通过终端向用户显示所述资源配置信息;
接收用户输入的资源调整指令, 并根据所述资源调整指令调整所述资源 配置信息,以根据调整后的资源配置信息设置终端运行所述应用使用的资源。
结合第三方面或第三方面的第一种至第四种中的任一种可能的实现方 式, 在第五种可能的实现方式中, 所述处理器还用于执行以下歩骤:
在所述应用运行结束后, 根据用户输入的资源调整指令调整所述资源配 置信息;
将调整后的资源配置信息发送至所述数据库, 以使所述数据库更新所述 应用对应的资源配置信息。
本发明实施例的资源配置方法及装置, 建立应用与资源配置信息之间的 映射关系, 在终端启动某个应用时, 查找该应用对应的资源配置信息, 并按 照资源配置信息的指示设置应用运行使用的资源。 如此, 既可保证应用运行 时的用户体验, 又能将功耗降到最低, 实现终端性能和功耗之间的平衡。 同 时, 终端安装的每个应用都对应有一个匹配的资源配置信息, 还能提高终端 资源配置的灵活性和针对性。
附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例资源配置方法实施例 1的流程图;
图 2是本发明实施例中获取资源配置信息的流程图;
图 3是本发明实施例中实现歩骤 103的流程图;
图 4是本发明实施例资源配置方法实施例 2的流程图;
图 5是本发明实施例资源配置方法实施例 3的流程图;
图 6是本发明实施例资源配置装置实施例 1的示意图;
图 7是本发明实施例资源配置装置实施例 2的示意图;
图 8是本发明实施例资源配置装置实施例 3的示意图;
图 9是本发明实施例资源配置装置的硬件构成。 具体实施方式
为了使本技术领域的人员更好地理解本发明实施例的方案, 下面结合附 图和实施方式对本发明实施例作进一歩的详细说明。
用户将应用下载安装到终端后, 为了提高使用体验, 一般会将终端设置 在高性能模式下运行, 如此终端功耗就会较大, 电池电量消耗较快。 对应地, 为了降低终端功耗, 一般的做法是将终端设置在省电模式下, 如此虽能起到 降低功耗的作用, 但在终端运行应用时可能会出现卡顿现象, 且这种通过设 置省电模式来降低功耗的方式灵活性很差, 不论针对哪种应用, 终端都只配 置相同的性能参数, 针对性很差。
本发明实施例旨在提供一种能最大程度实现终端性能和功耗平衡的方 案, 且为不同应用设置不同性能参数, 这样就可根据终端运行的应用实时调 整终端的性能参数, 提高参数设置的灵活性和针对性。
下面对本发明实施例的资源配置方法进行解释说明。
参见图 1 ,示出了本发明实施例资源配置方法实施例 1的流程图,可包括: 歩骤 101 , 获取终端当前启动的应用的标识。 一般情况下, 在用户启动终端已安装的应用时, 操作系统会对此进行广 播, 如用户当前启动 "神庙逃亡" 游戏应用, 对应的操作系统在接收到启动 指令后, 即会对此进行系统广播, 通知该游戏应用正常运行涉及的硬件或软 件做好运行准备。
本歩骤即可枧为是一个监听系统广播的过程, 在监听到操作系统广播的 应用启动信息之后, 就可从中提取出应用的标识。 具体地, 该标识可体现为 应用的名称, 如上述示例可将提取到的 "com.company.temple"作为应用标识。 或者, 标识还可体现为能表征应用身份的其它信息, 或者, 体现为预先配置 好的资源等级。
因为, 本发明实施例最主要的目的是为终端当前运行的应用配置合适的 资源, 既不会影响应用正常运行 (可以理解为不出现卡顿等影响用户体验的 情况),也不会造成资源功耗的浪费,最大程度的实现性能和功耗之间的平衡, 因此, 可以为每个应用对应的设置一个资源配置信息, 对应这种情况, 应用 标识可体现为应用名称或其它表征应用身份的信息。 此外, 还可通过统计分 析的方式, 按照每种应用需要的资源, 对终端安装的所有应用进行资源等级 划分, 对应相同资源配置信息的应用被划分到一个等级里, 对应这种情况, 应用标识就可体现为应用所属的资源等级。
歩骤 102,根据所述标识查找预设数据库,确定所述应用对应的资源配置 信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射关系。
为了针对不同应用设置不同终端资源, 本发明实施例预先建立一个用来 保存应用与资源配置信息对应关系的数据库,该数据库可被存储在终端本地, 也可被存储在云端。 下面分别结合这两种情况对本歩骤进行解释说明。
(1) 数据库存储于本地
存储于本地的数据库可以是从云端服务器下载的, 也可以是在本地生成 的。 以本地生成为例, 终端向用户提供性能设置选项, 用户则通过该性能设 置选项为终端安装的每个应用设置不同的资源配置信息, 并根据各应用的实 际运行情况不断调整原资源配置信息, 使每种应用在性能和功耗之间都达到 平衡。 如此, 就生成了应用与资源配置信息之间的映射关系, 并保存至数据 库中。 需要说明的是, 因为映射关系是用户根据应用在本终端运行的情况而设 定, 故映射关系可具体体现为:应用标识与资源配置信息之间的对应关系。
对应这种情况, 在歩骤 101 获取到应用标识后, 就可直接调用数据库, 并从中查找与该获取到的应用标识相对应的资源配置信息即可。
(2) 数据库存储于云服务器
云服务器的数据库中保存的应用与资源配置信息之间的映射关系, 可以 是服务供应商预先提供的, 如应用开发者根据其测试结果预先配置, 也可以 由用户将终端生成的映射关系上传到服务器。
需要说明的是,资源配置信息可以体现为应用运行需要的具体性能参数, 如 CPU内核数、 CPU最高频率等, 对应这种情况, 云服务器的数据库中保存 的映射关系可具体体现为:应用标识与资源配置信息之间的对应关系。 或者, 资源配置信息还可体现为应用运行需要占用的 CPU能力或占用 CPU能力的 百分比, 如, 使用 80%的 CPU能力运行某个应用。 考虑到不同终端的性能参 数会有所不同, 针对同一应用, 终端 A可能需要使用 80%的 CPU能力, 终端 B则需要使用 70%的 CPU能力, 因此, 对应这种情况, 云服务器的数据库中 保存的映射关系可具体体现为:应用标识、 终端身份信息与资源配置信息之 间的对应关系。
另外, 需要说明的是, 不论是供应商提供的映射关系, 还是用户上传的 映射关系, 云服务器据此进行首次设置并保存到数据库之后, 均可再根据供 应商或用户上传的更新信息对已存在的映射关系进行调整, 以使应用对应的 资源配置信息更为准确。
如此, 在歩骤 101 获取到应用标识后, 就可按照以下歩骤获取应用对应 的资源配置信息, 具体可参见图 2所示流程图, 可包括:
歩骤 201 , 获取终端的身份信息, 向所述云服务器发送查询请求, 所述查 询请求中包括应用的标识和终端的身份信息;
歩骤 202,接收所述云服务器返回的资源配置信息,所述资源配置信息由 所述云服务器根据所述标识和身份信息从所述数据库中查找获得。
图 2所示方案对应的是,利用应用运行需要占用的 CPU能力或占用 CPU 能力百分比的方式来表示资源配置信息, 故除应用标识之外, 还需要获取终 端身份信息, 然后查找与这两个信息相对应的资源配置信息。 其中, 终端身 份信息主要用于反映终端的 CPU性能, 可具体体现为终端的型号, 本发明实 施例对此可不做具体限定。 当然, 如果直接利用 CPU性能参数来表示资源配 置信息, 那么, 终端就可以直接将应用标识添加到查询请求中发送至云服务 器, 由云服务器根据应用标识查找对应的资源配置信息。
另外, 需要说明的是, 结合数据库存储位置的不同, 本发明实施例提供 以下三种查询资源配置信息的方式:
方式一, 利用终端存储的数据库进行资源配置信息查询;
方式二, 向云服务器发送查询请求, 利用云服务器存储的数据库进行资 源配置信息查询;
方式三, 先在终端存储的数据库中进行资源配置信息查询, 如果未查询 至 IJ , 再向云服务器发送查询请求, 利用云服务器存储的数据库进行资源配置 信息查询。
歩骤 103, 按照所述资源配置信息设置终端运行所述应用时使用的资源。 经歩骤 102查询得到终端当前启动的应用所对应的资源配置信息之后, 即可在该信息的指示下设置应用运行时使用的资源。 如此, 既可保证应用运 行时的用户体验, 又能将功耗降到最低, 实现终端性能和功耗之间的平衡。 且, 本发明实施例针对不同应用, 可设置不同的运行资源, 还能提高资源配 置的灵活性和针对性。
如上文所做介绍, 当资源配置信息为应用运行需要占用的 CPU能力时, 本发明实施例还提供了一种实现歩骤 103的方案, 具体可参见图 3所示流程 提, 包括:
歩骤 301 , 利用 CPU性能模型计算所述 CPU运算能力对应的 CPU性能 参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的对应 关系;
歩骤 302, 根据所述 CPU性能参数设置终端运行所述应用使用的资源。 对应这种 CPU能力表示资源配置信息的方案, 本发明实施例提供一个反 应 CPU能力与 CPU参数对应关系的 CPU性能模型, 利用该模型就可将应用 运行使用的性能参数转化成 CPU能力,并作为资源配置信息保存到数据库中; 反之, 利用该模型就可在知晓 CPU能力的情况下计算出终端运行应用时使用 的 CPU性能参数, 并按照计算出的性能参数配置应用的运行资源。
具体地, 建立 CPU性能模型的过程可体现为:
(1) 确定性能参数, 可包括 CPU架构系数、 CPU内核数、 CPU最高频 率。
对于 CPU架构来说,可体现为 arm7、 arm9、 arm15、 386、 486、 586、 powerpc 等, 为了统一标准, 可将 arm7作为基准, 将 arm7构架的系数取为 1 , 对应的 在此基础上再确定其它 CPU的构架系数。 需要说明的是, 对于可选用的 CPU 构架、 选用哪种 CPU构架作为基准等方面, 本发明均不可不做具体限定。
对于 CPU内核数来说, 可体现为 1核、 2核、 3核、 4核等, 本发明对此 也不做具体限定。
(2) 确定性能模型, X = A*B*C, 其中, A为 CPU架构系数, B为 CPU 内核数、 C为 CPU最高频率、 X为 CPU运算能力。
另外, 需要说明的是, 考虑到 CPU之间可能存在差异性, 特别是同一型 号规格的 CPU的不同品牌之间也可能存在差异, 本发明实施例中的性能参数 还可包括特殊参数的系数 D。 对应地, 性能模型体现为 X = A*B*C*(1 + D)。 参见图 4,示出了本发明实施例资源配置方法实施例 2的流程图,可包括: 歩骤 401 , 获取终端当前启动的应用的标识。
歩骤 402,根据所述标识查找预设数据库,确定所述应用对应的资源配置 信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射关系。
歩骤 401、 402与歩骤 101、 102相同, 此处不再赘述。
歩骤 403, 通过终端向用户显示所述资源配置信息。
歩骤 404,接收用户输入的资源调整指令, 并根据所述资源调整指令调整 所述资源配置信息。
歩骤 405, 根据调整后的资源配置信息设置终端运行所述应用使用的资 源。
考虑到终端之间的差异性 (特别是相同型号终端之间可能也存在一定的 差异) 以及用户对使用体验的不同要求, 本发明实施例还在查找到应用匹配 的资源配置信息后, 将其通过终端显示给用户查看, 由用户判断该资源配置 信息表示的性能参数, 是否能满足应用正常运行的需求。 如果能满足, 则直 接确认, 并使终端按照该资源配置信息设置应用运行使用的资源;如果否, 则由用户向终端输入调整指令 (调整指令可体现为用户输入的具体的性能参 数值、 或占用的 CPU性能、 或占用 CPU性能的百分比), 并在用户确认后, 根据调整指令更新资源配置信息, 进而按照更新后的资源配置信息设置应用 运行使用的资源。 参见图 5,示出了本发明实施例资源配置方法实施例 3的流程图,可包括: 歩骤 501 , 获取终端当前启动的应用的标识。
歩骤 502,根据所述标识查找预设数据库,确定所述应用对应的资源配置 信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射关系。
歩骤 503, 按照所述资源配置信息设置终端运行所述应用时使用的资源。 歩骤 501 ~503与歩骤 101 ~103相同, 此处不再赘述。
歩骤 504,在所述应用运行结束后,根据用户输入的资源调整指令调整所 述资源配置信息。
歩骤 505,将调整后的资源配置信息发送至所述数据库, 以使所述数据库 更新所述应用对应的资源配置信息。
如上文所做介绍, 不论是将数据库保存在终端本地, 还是保存在云服务 器, 都可根据供应商或用户发送的更新信息对已存在的映射关系进行调整, 以使应用对应的资源配置信息更为准确。
为此, 本发明实施例提供了三种调整资源配置信息的方案:
第一种, 实施例 2中, 在终端为应用设置运行资源之前, 由用户进行资 源配置信息调整, 并利用调整后的资源配置信息更新数据库。
第二种, 实施例 3中, 终端按照原资源配置信息为应用设置运行资源, 且应用按照设置好的资源运行结束后, 由用户根据使用体验进行资源配置信 息调整, 并利用调整后的资源配置信息更新数据库。
第三种, 结合实施例 2、 3, 即在应用运行前, 提示用户进行第一次资源 配置信息调整, 并按第一次调整后的资源配置信息设置应用运行使用的资源 (当然, 用户也可不在此进行资源配置信息调整, 而是利用原资源配置信息 设置应用的运行资源), 在应用运行结束后, 还可提示用户进行第二次资源配 置信息调整 (当然, 如果用户认为应用当前的运行情况满足其使用要求, 则 可不在此进行资源配置信息调整), 如此就可根据这两次调整过程更新数据 库。
另外, 需要说明的是, 如果调整后的资源配置信息只用于更新终端本地 存储的数据库, 因该配置主要用于满足终端用户的使用体验, 故可直接用调 整后的资源配置信息替换原已存在的资源配置信息。 如果调整后的资源配置 信息还用于更新云服务器存储的数据库, 那么最好是利用调整后的资源配置 信息 (可以是多个用户或供应商提供) 和原资源配置信息进行均值处理, 并 利用计算出的均值替换原已存在的资源配置信息。 与上述方法相对应, 本发明实施例还提供一种资源配置装置。 参见图 6, 示出了本发明实施例资源配置装置实施例 1的示意图, 可包括:
获取单元 601 , 用于获取终端当前启动的应用的标识;
查找单元 602, 用于根据所述标识查找预设数据库,确定所述应用对应的 资源配置信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射 关系;
设置单元 603,用于按照所述资源配置信息设置终端运行所述应用时使用 的资源。
具体地, 数据库既可被存储在终端, 也可被存储在云服务器, 根据数据 库存储位置的不同, 本发明实施例提供了查找单元的如下两种实现方式。
所述数据库存储于终端, 且所述数据库具体用于保存应用的标识与资源 配置信息之间的映射关系, 则
所述查找单元, 具体用于调用所述数据库, 并从中查找所述标识对应的 资源配置信息。
所述数据库存储于云服务器, 且所述数据库具体用于保存应用的标识、 终端身份信息与资源配置信息之间的映射关系, 则所述查找单元包括:
发送单元, 用于获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中包括应用的标识和终端的身份信息;
接收单元, 用于接收所述云服务器返回的资源配置信息, 所述资源配置 信息由所述云服务器根据所述标识和身份信息从所述数据库中查找获得。
本发明实施例中的资源配置信息可体现为:应用运行需要的具体性能参 数、 应用运行需要占用的 CPU运算能力、 应用运行需要占用 CPU能力的百 分比等。 针对后两种情况, 所述设置单元可包括:
计算单元, 用于利用 CPU性能模型计算所述 CPU运算能力对应的 CPU 性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的 对应关系;
设置子单元, 用于根据所述 CPU性能参数设置终端运行所述应用使用的 资源。 参见图 7,示出了本发明实施例资源配置装置实施例 2的示意图,可包括: 获取单元 701 , 用于获取终端当前启动的应用的标识;
查找单元 702, 用于根据所述标识查找预设数据库,确定所述应用对应的 资源配置信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射 关系;
显示单元 703,用于在所述设置单元按照所述资源配置信息设置终端运行 所述应用时使用的资源之前, 通过终端向用户显示所述资源配置信息;
第一调整单元 704, 用于接收用户输入的资源调整指令, 并根据所述资源 调整指令调整所述资源配置信息;
所述设置单元 705,具体用于根据调整后的资源配置信息设置终端运行所 述应用使用的资源。
参见图 8,示出了本发明实施例资源配置装置实施例 3的示意图,可包括: 获取单元 801 , 用于获取终端当前启动的应用的标识;
查找单元 802, 用于根据所述标识查找预设数据库,确定所述应用对应的 资源配置信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射 关系;
设置单元 803,用于按照所述资源配置信息设置终端运行所述应用时使用 的资源。
第二调整单元 804,用于在所述应用运行结束后,调整所述资源配置信息; 信息发送单元 805, 用于将调整后的资源配置信息发送至所述数据库, 以 使所述数据库更新所述应用对应的资源配置信息。 进一歩地, 本发明实施例还提供了资源配置装置的硬件构成。 参见图 9 所示, 可包括至少一个处理器 (例如 CPU) , 至少一个网络接口或者其它通信 接口, 存储器, 和至少一个通信总线, 用于实现这些装置之间的连接通信。 处理器用于执行存储器中存储的可执行模块, 例如计算机程序。 存储器可能 包含高速随机存取存储器 (RAM: Random Access Memory) , 也可能还包括非 不稳定的存储器 (non-volatile memory) , 例如至少一个磁盘存储器。 通过至少 一个网络接口 (可以是有线或者无线) 实现该系统网关与至少一个其它网元 之间的通信连接, 可以使用互联网, 广域网, 本地网, 城域网等。
在实现本发明实施例的资源配置过程中, 处理器可以根据存储器中存储 的程序指令执行以下歩骤:
获取终端当前启动的应用的标识;
根据所述标识查找预设数据库, 确定所述应用对应的资源配置信息;其 中, 所述数据库用于保存应用与资源配置信息之间的映射关系;
按照所述资源配置信息设置终端运行所述应用时使用的资源。
具体地, 在确定所述应用对应的资源配置信息时, 本发明实施例提供了 如下两种具体实现方案。
实现方案一中, 所述数据库存储于终端, 且所述数据库具体用于保存应 用的标识与资源配置信息之间的映射关系, 则所述处理器执行以下歩骤确定 所述应用对应的资源配置信息:
调用所述数据库, 并从中查找所述标识对应的资源配置信息。
实现方案二中, 所述数据库存储于云服务器, 且所述数据库具体用于保 存应用的标识、 终端身份信息与资源配置信息之间的映射关系, 则所述处理 器执行以下歩骤确定所述应用对应的资源配置信息:
获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中 包括应用的标识和终端的身份信息;
接收所述云服务器返回的资源配置信息, 所述资源配置信息由所述云服 务器根据所述标识和身份信息从所述数据库中查找获得。
作为一种可实现方式, 本发明实施例中的资源配置信息可以体现为中央 处理器 CPU运算能力, 对应于此, 所述处理器用于执行以下歩骤来设置终端 运行所述应用时使用的资源:
利用 CPU性能模型计算所述 CPU运算能力对应的 CPU性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的对应关系;
根据所述 CPU性能参数设置终端运行所述应用使用的资源。
作为一种优选方案, 在所述处理器设置终端运行所述应用使用的资源之 前, 还用于执行以下步骤:
通过终端向用户显示所述资源配置信息;
接收用户输入的资源调整指令, 并根据所述资源调整指令调整所述资源 配置信息,以根据调整后的资源配置信息设置终端运行所述应用使用的资源。
或者, 作为一种优选方案, 所述处理器还用于执行以下歩骤:
在所述应用运行结束后, 根据用户输入的资源调整指令调整所述资源配 置信息;
将调整后的资源配置信息发送至所述数据库, 以使所述数据库更新所述 应用对应的资源配置信息。
通过以上的实施方式的描述可知, 本领域的技术人员可以清楚地了解到 上述实施例方法中的全部或部分歩骤可借助软件加必需的通用硬件平台的方 式来实现。 基于这样的理解, 本发明的技术方案本质上或者说对现有技术做 出贡献的部分可以以软件产品的形式体现出来, 该计算机软件产品可以存储 在存储介质中, 如 ROM/RAM、 磁碟、 光盘等, 包括若干指令用以使得一台 计算机设备 (可以是个人计算机, 服务器, 或者诸如媒体网关等网络通信设 备, 等等) 执行本发明各个实施例或者实施例的某些部分所述的方法。
需要说明的是, 本说明书中的各个实施例均采用递进的方式描述, 各个 实施例之间相同相似的部分互相参见即可, 每个实施例重点说明的都是与其 他实施例的不同之处。 尤其, 对于设备及系统实施例而言, 由于其基本相似 于方法实施例, 所以描述得比较简单, 相关之处参见方法实施例的部分说明 即可。 以上所描述的设备及系统实施例仅仅是示意性的, 其中作为分离部件 说明的单元可以是或者也可以不是物理上分开的, 作为单元显示的部件可以 是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个 网络单元上。 可以根据实际的需要选择其中的部分或者全部模块来实现本实 施例方案的目的。 本领域普通技术人员在不付出创造性劳动的情况下, 即可 以理解并实施。
以上所述仅为本发明的较佳实施例而已, 并非用于限定本发明的保护范 围。 凡在本发明的精神和原则之内所作的任何修改、 等同替换、 改进等, 均 包含在本发明的保护范围内。

Claims

权 利 要 求
1、 一种资源配置方法, 其特征在于, 所述方法包括:
获取终端当前启动的应用的标识;
根据所述标识查找预设数据库, 确定所述应用对应的资源配置信息;其 中, 所述数据库用于保存应用与资源配置信息之间的映射关系;
按照所述资源配置信息设置终端运行所述应用时使用的资源。
2、 根据权利要求 1所述的方法, 其特征在于, 所述数据库存储于终端, 且所述数据库具体用于保存应用的标识与资源配置信息之间的映射关系, 则 所述根据所述标识查找预设数据库, 包括:
调用所述数据库, 并从中查找所述标识对应的资源配置信息。
3、 根据权利要求 1所述的方法, 其特征在于, 所述数据库存储于云服务 器, 且所述数据库具体用于保存应用的标识、 终端身份信息与资源配置信息 之间的映射关系, 则所述根据所述标识查找预设数据库, 包括:
获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中 包括应用的标识和终端的身份信息;
接收所述云服务器返回的资源配置信息, 所述资源配置信息由所述云服 务器根据所述标识和身份信息从所述数据库中查找获得。
4、 根据权利要求 1所述的方法, 其特征在于, 所述资源配置信息为中央 处理器 CPU运算能力, 则所述按照所述资源配置信息设置终端运行所述应用 时使用的资源, 包括:
利用 CPU性能模型计算所述 CPU运算能力对应的 CPU性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的对应关系;
根据所述 CPU性能参数设置终端运行所述应用使用的资源。
5、根据权利要求 1 ~4任一项所述的方法,其特征在于,所述方法还包括: 在所述按照所述资源配置信息设置终端运行所述应用时使用的资源之 前,
通过终端向用户显示所述资源配置信息;
接收用户输入的资源调整指令, 并根据所述资源调整指令调整所述资源 配置信息; 所述按照所述资源配置信息设置终端运行所述应用时使用的资源,包括: 根据调整后的资源配置信息设置终端运行所述应用使用的资源。
6、根据权利要求 1 ~5任一项所述的方法,其特征在于,所述方法还包括: 在所述应用运行结束后, 根据用户输入的资源调整指令调整所述资源配 置信息;
将调整后的资源配置信息发送至所述数据库, 以使所述数据库更新所述 应用对应的资源配置信息。
7、 一种资源配置装置, 其特征在于, 所述装置包括:
获取单元, 用于获取终端当前启动的应用的标识;
查找单元, 用于根据所述标识查找预设数据库, 确定所述应用对应的资 源配置信息;其中, 所述数据库用于保存应用与资源配置信息之间的映射关 系;
设置单元, 用于按照所述资源配置信息设置终端运行所述应用时使用的 资源。
8、 根据权利要求 7所述的装置, 其特征在于, 所述数据库存储于终端, 且所述数据库具体用于保存应用的标识与资源配置信息之间的映射关系, 则 所述查找单元, 具体用于调用所述数据库, 并从中查找所述标识对应的 资源配置信息。
9、 根据权利要求 7所述的装置, 其特征在于, 所述数据库存储于云服务 器, 且所述数据库具体用于保存应用的标识、 终端身份信息与资源配置信息 之间的映射关系, 则所述查找单元包括:
发送单元, 用于获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中包括应用的标识和终端的身份信息;
接收单元, 用于接收所述云服务器返回的资源配置信息, 所述资源配置 信息由所述云服务器根据所述标识和身份信息从所述数据库中查找获得。
10、 根据权利要求 7所述的装置, 其特征在于, 所述资源配置信息为中 央处理器 CPU运算能力, 则所述设置单元包括:
计算单元, 用于利用 CPU性能模型计算所述 CPU运算能力对应的 CPU 性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的 对应关系;
设置子单元, 用于根据所述 CPU性能参数设置终端运行所述应用使用的 资源。
11、 根据权利要求 7~10任一项所述的装置, 其特征在于, 所述装置还包 括:
显示单元, 用于在所述设置单元按照所述资源配置信息设置终端运行所 述应用时使用的资源之前, 通过终端向用户显示所述资源配置信息;
第一调整单元, 用于接收用户输入的资源调整指令, 并根据所述资源调 整指令调整所述资源配置信息;
所述设置单元, 具体用于根据调整后的资源配置信息设置终端运行所述 应用使用的资源。
12、 根据权利要求 7~11任一项所述的装置, 其特征在于, 所述装置还包 括:
第二调整单元, 用于在所述应用运行结束后, 根据用户输入的资源调整 指令调整所述资源配置信息;
信息发送单元, 用于将调整后的资源配置信息发送至所述数据库, 以使 所述数据库更新所述应用对应的资源配置信息。
13、 一种资源配置装置, 其特征在于, 所述装置包括:至少一个处理器、 存储器、 和至少一个通信总线,
所述通信总线, 用于实现所述至少一个处理器与所述存储器之间的连接 通信;
所述存储器用于存储程序指令, 所述处理器用于根据所述程序指令执行 以下歩骤:
获取终端当前启动的应用的标识;
根据所述标识查找预设数据库, 确定所述应用对应的资源配置信息;其 中, 所述数据库用于保存应用与资源配置信息之间的映射关系;
按照所述资源配置信息设置终端运行所述应用时使用的资源。
14、根据权利要求 13所述的装置, 其特征在于, 所述数据库存储于终端, 且所述数据库具体用于保存应用的标识与资源配置信息之间的映射关系, 则 所述处理器执行以下歩骤确定所述应用对应的资源配置信息:
调用所述数据库, 并从中查找所述标识对应的资源配置信息。
15、 根据权利要求 13所述的装置, 其特征在于, 所述数据库存储于云服 务器, 且所述数据库具体用于保存应用的标识、 终端身份信息与资源配置信 息之间的映射关系, 则所述处理器执行以下歩骤确定所述应用对应的资源配 置信息:
获取终端的身份信息, 向所述云服务器发送查询请求, 所述查询请求中 包括应用的标识和终端的身份信息;
接收所述云服务器返回的资源配置信息, 所述资源配置信息由所述云服 务器根据所述标识和身份信息从所述数据库中查找获得。
16、 根据权利要求 13所述的装置, 其特征在于, 所述资源配置信息为中 央处理器 CPU运算能力, 则所述处理器执行以下歩骤设置终端运行所述应用 时使用的资源:
利用 CPU性能模型计算所述 CPU运算能力对应的 CPU性能参数, 所述 CPU性能模型用于反映 CPU运算能力与 CPU性能参数间的对应关系;
根据所述 CPU性能参数设置终端运行所述应用使用的资源。
17、 根据权利要求 13~16任一项所述的装置, 其特征在于, 在所述处理 器设置终端运行所述应用使用的资源之前, 还用于执行以下步骤:
通过终端向用户显示所述资源配置信息;
接收用户输入的资源调整指令, 并根据所述资源调整指令调整所述资源 配置信息,以根据调整后的资源配置信息设置终端运行所述应用使用的资源。
18、 根据权利要求 13~17任一项所述的装置, 其特征在于, 所述处理器 还用于执行以下歩骤:
在所述应用运行结束后, 根据用户输入的资源调整指令调整所述资源配 置信息;
将调整后的资源配置信息发送至所述数据库, 以使所述数据库更新所述 应用对应的资源配置信息。
PCT/CN2014/077622 2014-05-16 2014-05-16 一种资源配置方法及装置 Ceased WO2015172367A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480026552.8A CN105308941A (zh) 2014-05-16 2014-05-16 一种资源配置方法及装置
PCT/CN2014/077622 WO2015172367A1 (zh) 2014-05-16 2014-05-16 一种资源配置方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/077622 WO2015172367A1 (zh) 2014-05-16 2014-05-16 一种资源配置方法及装置

Publications (1)

Publication Number Publication Date
WO2015172367A1 true WO2015172367A1 (zh) 2015-11-19

Family

ID=54479186

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/077622 Ceased WO2015172367A1 (zh) 2014-05-16 2014-05-16 一种资源配置方法及装置

Country Status (2)

Country Link
CN (1) CN105308941A (zh)
WO (1) WO2015172367A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106408199A (zh) * 2016-09-28 2017-02-15 大唐软件技术股份有限公司 信息处理方法和装置
WO2019024789A1 (en) * 2017-07-31 2019-02-07 Guangdong Oppo Mobile Telecommunications Corp., Ltd. RESOURCE ALLOCATION METHOD AND TERMINAL DEVICE
CN111221774A (zh) * 2020-01-10 2020-06-02 华为技术有限公司 处理单元配置方法和处理单元配置装置
CN111309484A (zh) * 2020-02-25 2020-06-19 Oppo广东移动通信有限公司 一种提升终端性能的管理方法、装置及计算机可读存储介质
CN112000215A (zh) * 2020-08-25 2020-11-27 北京字节跳动网络技术有限公司 终端控制方法、装置和电子设备
CN113238858A (zh) * 2021-04-29 2021-08-10 贵州数据宝网络科技有限公司 一种数据分流及资源配置方法及系统
CN115291971A (zh) * 2022-08-05 2022-11-04 珠海格力电器股份有限公司 一种应用的参数设置方法、装置及电子设备
CN115408210A (zh) * 2021-05-28 2022-11-29 华为技术有限公司 一种性能优化方法以及相关设备

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147806B (zh) * 2017-06-26 2020-05-29 北京金山安全软件有限公司 应用资源提供方法、设备及系统
CN110113176B (zh) * 2018-02-01 2022-12-02 北京京东尚科信息技术有限公司 用于配置服务器的信息同步方法及装置
DE102018212726A1 (de) * 2018-07-31 2020-02-06 BSH Hausgeräte GmbH Aktualisierung eines Hausgeräts
CN111124432B (zh) * 2018-10-31 2023-10-20 成都鼎桥通信技术有限公司 一种针对apk的信息的存储方法和装置
CN110413510B (zh) * 2019-06-28 2024-04-12 腾讯科技(深圳)有限公司 一种数据处理方法、装置及设备
CN114205496B (zh) * 2021-11-29 2024-06-18 信利光电股份有限公司 一种摄像模组信息烧录方法及摄像模组

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129287A (zh) * 2011-03-17 2011-07-20 宇龙计算机通信科技(深圳)有限公司 一种移动终端应用程序电源管理方法和移动终端
CN202009430U (zh) * 2011-03-01 2011-10-12 深圳市华域无线技术有限公司 低功耗手机
CN102946468A (zh) * 2012-10-18 2013-02-27 广东欧珀移动通信有限公司 一种手机运行程序异常自动报警的方法及系统
CN103475790A (zh) * 2013-09-06 2013-12-25 中国科学院计算技术研究所 一种智能移动终端功耗管理方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1248431B1 (en) * 2001-03-27 2007-10-31 Sony Deutschland GmbH Method for achieving end-to-end quality of service negotiation for distributed multimedia applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202009430U (zh) * 2011-03-01 2011-10-12 深圳市华域无线技术有限公司 低功耗手机
CN102129287A (zh) * 2011-03-17 2011-07-20 宇龙计算机通信科技(深圳)有限公司 一种移动终端应用程序电源管理方法和移动终端
CN102946468A (zh) * 2012-10-18 2013-02-27 广东欧珀移动通信有限公司 一种手机运行程序异常自动报警的方法及系统
CN103475790A (zh) * 2013-09-06 2013-12-25 中国科学院计算技术研究所 一种智能移动终端功耗管理方法

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106408199A (zh) * 2016-09-28 2017-02-15 大唐软件技术股份有限公司 信息处理方法和装置
WO2019024789A1 (en) * 2017-07-31 2019-02-07 Guangdong Oppo Mobile Telecommunications Corp., Ltd. RESOURCE ALLOCATION METHOD AND TERMINAL DEVICE
US11182210B2 (en) 2017-07-31 2021-11-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for resource allocation and terminal device
CN111221774A (zh) * 2020-01-10 2020-06-02 华为技术有限公司 处理单元配置方法和处理单元配置装置
CN111221774B (zh) * 2020-01-10 2023-05-19 华为技术有限公司 处理单元配置方法和处理单元配置装置
CN111309484A (zh) * 2020-02-25 2020-06-19 Oppo广东移动通信有限公司 一种提升终端性能的管理方法、装置及计算机可读存储介质
CN112000215A (zh) * 2020-08-25 2020-11-27 北京字节跳动网络技术有限公司 终端控制方法、装置和电子设备
CN113238858A (zh) * 2021-04-29 2021-08-10 贵州数据宝网络科技有限公司 一种数据分流及资源配置方法及系统
CN115408210A (zh) * 2021-05-28 2022-11-29 华为技术有限公司 一种性能优化方法以及相关设备
EP4339784A4 (en) * 2021-05-28 2024-11-20 Huawei Technologies Co., Ltd. PERFORMANCE OPTIMIZATION METHOD AND ASSOCIATED DEVICE
US12475279B2 (en) 2021-05-28 2025-11-18 Huawei Technologies Co., Ltd. Performance optimization method and related device
CN115291971A (zh) * 2022-08-05 2022-11-04 珠海格力电器股份有限公司 一种应用的参数设置方法、装置及电子设备

Also Published As

Publication number Publication date
CN105308941A (zh) 2016-02-03

Similar Documents

Publication Publication Date Title
WO2015172367A1 (zh) 一种资源配置方法及装置
CN108255653B (zh) 一种产品的测试方法及其终端
US11258667B2 (en) Network management method and related device
CN102591768B (zh) 用于从设备获得反馈的方法和装置
CN104584621B (zh) 用于减少计算设备的无线重新连接时间的混合场外/现场预测计算
JP7419482B2 (ja) ソフトウェアアップグレード管理方法、サーバ、端末、装置及び記憶媒体
CN112187531B (zh) 模块的升级方法及系统、存储介质、电子装置
CN105074658A (zh) 提供设备特定更新的普遍服务
CN104704886A (zh) 减少计算装置的无线重连时间
CN105425603A (zh) 控制智能设备的方法及装置
EP3624546A1 (en) Packet data unit (pdu) session control method and apparatus
WO2019080719A1 (zh) 数据处理方法、装置、存储介质、处理器和系统
CN107920103A (zh) 一种信息推送的方法和系统及客户端和服务器
CN112671572A (zh) 智能设备配网的方法、装置、存储介质及电子装置
WO2020088170A1 (zh) 域名系统配置方法及相关装置
US10708870B2 (en) Systems and methods for adjusting power settings of a wireless device
CN110546591B (zh) 一种电池虚拟化
CN117997807A (zh) 一种物联网设备心跳检测的方法、系统以及通信装置
CN112073215B (zh) 一种实现应用的方法及业务控制器
CN110012527A (zh) 唤醒方法及电子设备
RU2618943C2 (ru) Способ, устройство и система распространения приложений
EP3750295A1 (en) Methods and apparatus to create opportunistic network of iot collaboration agents to collect data from mobile devices
CN103631621A (zh) 一种信息提示方法及装置
CN105025064A (zh) 下载文件的方法、装置及系统
CN111489540A (zh) 智能设备控制方法、装置、计算机可读介质及电子设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480026552.8

Country of ref document: CN

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

Ref document number: 14891854

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14891854

Country of ref document: EP

Kind code of ref document: A1